|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<java.lang.Object,java.lang.Object>
java.util.Properties
org.mbari.siam.core.SiamProperties
org.mbari.siam.core.NodeProperties
public class NodeProperties
NodeProperties is responsible for parsing the Node properties file (typically siamPort.cfg) in order to configure the Node.
| Field Summary | |
|---|---|
static java.lang.String |
ADVERTISE_SERVICE_KEY
|
static java.lang.String |
CODEBASE_DIRECTORY_KEY
|
static java.lang.String |
COMMS_MODE_KEY
|
static java.lang.String |
DATA_SHELF_LIFE
|
static java.lang.String |
DEVICELOG_DIRECTORY_KEY
|
static java.lang.String |
HTTP_PORT_KEY
|
static java.lang.String |
MAX_PORTS_KEY
|
static java.lang.String |
MAX_REASSERT_COMMLINK_TRIES
|
static java.lang.String |
MISC_PORT_KEY
|
static java.lang.String |
NODE_DIAGNOSTIC_INTERVAL_KEY
|
static java.lang.String |
NODEID_KEY
|
static java.lang.String |
NVT_SERIAL_PORT_KEY
|
static java.lang.String |
PORT_ALIAS_KEY
|
static java.lang.String |
PORTNAME_KEY
|
static java.lang.String |
PORTNAMES_KEY
|
static java.lang.String |
POWER_PORT_KEY
|
static java.lang.String |
REASSERT_COMMLINK
|
static java.lang.String |
SERIAL_PORT_KEY
|
static java.lang.String |
SERVICE_JAR_KEY
|
static java.lang.String |
SERVICEJAR_DIRECTORY_KEY
|
static java.lang.String |
USE_PUCK_PAYLOAD_KEY
|
| Fields inherited from class java.util.Properties |
|---|
defaults |
| Constructor Summary | |
|---|---|
NodeProperties()
|
|
| Method Summary | |
|---|---|
java.lang.String |
getCodebaseDirectory()
Get name of codebase directory. |
float |
getDataShelfLifeHours()
Get data shelf-life (default is unlimited shelf-life) |
java.lang.String |
getDeviceLogDirectory()
Get name of sensor log directory. |
int |
getDiagnosticInterval()
Get node diagnostic interval (seconds). |
protected org.mbari.siam.core.HttpDevicePort |
getHttpDevicePort(int index,
java.lang.String url,
PowerPort powerPort,
java.lang.String jarName)
Create HttpDevicePort |
int |
getMaxPorts()
Get node diagnostic interval (seconds). |
long |
getNodeID()
Get Node ID. |
protected SerialDevicePort |
getNVTDevicePort(int index,
java.lang.String portId,
PowerPort powerPort,
java.lang.String jarName,
CommsMode commsMode)
Create an NVTDevicePort. |
protected DevicePort |
getPlatformPort(int index,
PowerPort powerPort,
java.lang.String jar,
CommsMode commsMode)
Look for platform-specific DevicePorts. |
DevicePort |
getPort(int index)
getPort() is responsible for parsing siamPort.cfg and creating the DevicePorts specified there. |
PowerPort |
getPowerPort(java.lang.String key)
Look for the power port. |
protected SerialDevicePort |
getSerialDevicePort(int index,
java.lang.String portName,
PowerPort powerPort,
java.lang.String jarName,
CommsMode commsMode)
Create a SerialDevicePort (or subclass). |
java.lang.String |
getSerialPortNames()
Get names of node serial ports. |
java.lang.String |
getServiceJarDirectory()
Get name of service jar directory. |
int |
maxReassertCommLinkTries()
Return true (default) if node should reassert prematurely broken comms link |
boolean |
reassertCommsLink()
Return true (default) if node should reassert prematurely broken comms link |
| Methods inherited from class org.mbari.siam.core.SiamProperties |
|---|
getChannelRangeProperty, getIntegerArrayProperty, getIntegerProperty, getIntegerProperty, getLongProperty, getLongProperty, getNonNegativeIntegerProperty, getProperty, getProperty, getRequiredProperty, getStringArrayProperty, parseChannelRangeProperty, parseInteger, parseStringArrayProperty |
| Methods inherited from class java.util.Properties |
|---|
list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
| Methods inherited from class java.util.Hashtable |
|---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NODEID_KEY
public static final java.lang.String PORTNAMES_KEY
public static final java.lang.String SERVICEJAR_DIRECTORY_KEY
public static final java.lang.String DEVICELOG_DIRECTORY_KEY
public static final java.lang.String CODEBASE_DIRECTORY_KEY
public static final java.lang.String ADVERTISE_SERVICE_KEY
public static final java.lang.String USE_PUCK_PAYLOAD_KEY
public static final java.lang.String COMMS_MODE_KEY
public static final java.lang.String HTTP_PORT_KEY
public static final java.lang.String SERIAL_PORT_KEY
public static final java.lang.String POWER_PORT_KEY
public static final java.lang.String SERVICE_JAR_KEY
public static final java.lang.String PORTNAME_KEY
public static final java.lang.String MAX_PORTS_KEY
public static final java.lang.String DATA_SHELF_LIFE
public static final java.lang.String REASSERT_COMMLINK
public static final java.lang.String MAX_REASSERT_COMMLINK_TRIES
public static final java.lang.String NVT_SERIAL_PORT_KEY
public static final java.lang.String MISC_PORT_KEY
public static final java.lang.String PORT_ALIAS_KEY
public static final java.lang.String NODE_DIAGNOSTIC_INTERVAL_KEY
| Constructor Detail |
|---|
public NodeProperties()
| Method Detail |
|---|
public java.lang.String getSerialPortNames()
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public java.lang.String getServiceJarDirectory()
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public java.lang.String getDeviceLogDirectory()
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public java.lang.String getCodebaseDirectory()
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public int getDiagnosticInterval()
throws InvalidPropertyException
InvalidPropertyExceptionpublic int getMaxPorts()
public DevicePort getPort(int index)
throws MissingPropertyException
index - - the index number of the DevicePort. The entries in
siamPort.cfg should end with this index number.
MissingPropertyException
public PowerPort getPowerPort(java.lang.String key)
throws MissingPropertyException
key - - Property key for the PowerPort.
MissingPropertyException
protected org.mbari.siam.core.HttpDevicePort getHttpDevicePort(int index,
java.lang.String url,
PowerPort powerPort,
java.lang.String jarName)
protected SerialDevicePort getSerialDevicePort(int index,
java.lang.String portName,
PowerPort powerPort,
java.lang.String jarName,
CommsMode commsMode)
protected SerialDevicePort getNVTDevicePort(int index,
java.lang.String portId,
PowerPort powerPort,
java.lang.String jarName,
CommsMode commsMode)
protected DevicePort getPlatformPort(int index,
PowerPort powerPort,
java.lang.String jar,
CommsMode commsMode)
throws MissingPropertyException
index - - the index number of the DevicePort.
MissingPropertyException
public long getNodeID()
throws MissingPropertyException,
InvalidPropertyException
MissingPropertyException
InvalidPropertyException
public float getDataShelfLifeHours()
throws InvalidPropertyException
InvalidPropertyException
public boolean reassertCommsLink()
throws InvalidPropertyException
InvalidPropertyException
public int maxReassertCommLinkTries()
throws InvalidPropertyException
InvalidPropertyException
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||