public class Orcd
extends TableDataset
Modifier and Type | Field and Description |
---|---|
static int |
INDEX_ALLOWED
The index in the table for the ALLOWED column.
|
static int |
INDEX_MODE
The index in the table for the MODE column.
|
static int |
INDEX_NOT_ALLOWED
The index in the table for the NOT ALLOWED column.
|
static int |
INDEX_OFFSET
The index in the table for the OFFSET column.
|
static int |
INDEX_POWER
The index in the table for the POWER column.
|
static int |
INDEX_SEQUENCE
The index in the table for the SEQUENCE column.
|
Modifier and Type | Method and Description |
---|---|
herschel.ia.dataset.TableDataset |
asTable() |
boolean |
checkTransion(java.lang.String mode1,
java.lang.String mode2)
Check if transition from a mode to another is allowed in the ORCD
|
java.util.HashMap<java.lang.Long,java.lang.String> |
getModes(java.lang.String sequence)
Get the modes and times that a sequence will trigger
|
java.util.HashMap<java.lang.Long,java.lang.String> |
getModesAsHistory(AbstractSequence sequence)
Get the times and the modes that a sequence will trigger.
|
java.util.HashMap<java.lang.Long,java.lang.String> |
getModesAsHistory(java.lang.String sequence,
java.util.Date initialTime)
Get the times and the modes that a sequence will trigger.
|
java.util.HashMap<java.lang.Long,java.lang.String> |
getModesAsHistory(java.lang.String sequence,
long initialTime)
Get the times and the modes that a sequence will trigger.
|
static Orcd |
getOrcd()
Get the ORCD.
|
float |
getPowerForMode(java.lang.String mode)
Get the power defined in the ORCD for a given mode
|
float |
getTotalPowerForModes(java.lang.String[] modes)
Get the total power for a list of modes (just the sum of the power defined for each mode)
|
java.lang.String |
getVersion()
Get the version of the ORCD
|
static Orcd |
readORCDXmlfile(java.lang.String xmlFile)
Read the ORCD from a XML file
|
static Orcd |
readORCDXmlfromJar()
Read the XML from a jar file in the class path.
|
void |
setVersion(java.lang.String version)
Set the version of the ORCD
|
java.lang.String |
toXml()
Get a XML representation of the ORCD
|
void |
writeToXmlFile(java.lang.String file)
Write the ORCD representation to a XML file
|
public static int INDEX_MODE
public static int INDEX_POWER
public static int INDEX_SEQUENCE
public static int INDEX_OFFSET
public static int INDEX_ALLOWED
public static int INDEX_NOT_ALLOWED
public static Orcd getOrcd()
public void setVersion(java.lang.String version)
version
- public java.lang.String getVersion()
public herschel.ia.dataset.TableDataset asTable()
public java.util.HashMap<java.lang.Long,java.lang.String> getModes(java.lang.String sequence)
sequence
- public java.util.HashMap<java.lang.Long,java.lang.String> getModesAsHistory(AbstractSequence sequence)
sequence
- public java.util.HashMap<java.lang.Long,java.lang.String> getModesAsHistory(java.lang.String sequence, java.util.Date initialTime)
sequence
- initialTime
- public java.util.HashMap<java.lang.Long,java.lang.String> getModesAsHistory(java.lang.String sequence, long initialTime)
sequence
- initialTime
- public boolean checkTransion(java.lang.String mode1, java.lang.String mode2)
mode1
- current modemode2
- the mode to go topublic float getPowerForMode(java.lang.String mode)
mode
- public float getTotalPowerForModes(java.lang.String[] modes)
modes
- Array of mode namespublic void writeToXmlFile(java.lang.String file)
file
- full path of the target XML filepublic static Orcd readORCDXmlfromJar()
public static Orcd readORCDXmlfile(java.lang.String xmlFile)
xmlFile
- The xml file full pathpublic java.lang.String toXml()