|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.db.DCServerConfig
public class DCServerConfig
Nested Class Summary | |
---|---|
static class |
DCServerConfig.Command
|
static class |
DCServerConfig.CommandArg
|
static class |
DCServerConfig.CommandProtocol
|
static class |
DCServerConfig.EventCode
Device event code to status code translation |
Field Summary | |
---|---|
static java.lang.String |
COMMAND_CONFIG
|
static java.lang.String |
COMMAND_DIAGNOSTIC
|
static java.lang.String |
COMMAND_GEOZONE
|
static java.lang.String |
COMMAND_GFMI
|
static java.lang.String |
COMMAND_INTERNAL
|
static java.lang.String |
COMMAND_PING
|
static char[] |
CSV_SEP
|
static java.lang.String |
DEFAULT_ARG_NAME
|
static java.lang.String |
DEFAULT_PROP_GROUP_ID
|
static java.lang.String[] |
DIAG_LOG
|
static long |
F_COMMAND_SMS
|
static long |
F_COMMAND_TCP
|
static long |
F_COMMAND_UDP
|
static long |
F_HAS_INPUTS
|
static long |
F_HAS_OUTPUTS
|
static long |
F_JAR_OPTIONAL
|
static long |
F_NONE
|
static long |
F_STD_PERSONAL
|
static long |
F_STD_VEHICLE
|
static long |
F_XMIT_SAT
|
static long |
F_XMIT_SMS
|
static long |
F_XMIT_TCP
|
static long |
F_XMIT_UDP
|
static char[] |
GP_SEP
|
static java.lang.String |
JSONKey_AclDefault
|
static java.lang.String |
JSONKey_AclName
|
static java.lang.String |
JSONKey_AllowQueue
|
static java.lang.String |
JSONKey_Args
|
static java.lang.String |
JSONKey_AuditCode
|
static java.lang.String |
JSONKey_Commands
|
static java.lang.String |
JSONKey_CommandString
|
static java.lang.String |
JSONKey_DCS
|
static java.lang.String |
JSONKey_DefaultValue
|
static java.lang.String |
JSONKey_Description
|
static java.lang.String |
JSONKey_DisplayLength
|
static java.lang.String |
JSONKey_Enabled
|
static java.lang.String |
JSONKey_ExpectAck
|
static java.lang.String |
JSONKey_ExpectAckCode
|
static java.lang.String |
JSONKey_MaximumLength
|
static java.lang.String |
JSONKey_MaximumRouteAge
|
static java.lang.String |
JSONKey_Name
|
static java.lang.String |
JSONKey_Protocol
|
static java.lang.String |
JSONKey_ReadOnly
|
static java.lang.String |
JSONKey_ResourceName
|
static java.lang.String |
JSONKey_StateBitMask
|
static java.lang.String |
JSONKey_StateBitValue
|
static java.lang.String |
JSONKey_Types
|
static java.lang.String[] |
KEYARG_GPLAT
|
static java.lang.String[] |
KEYARG_GPLON
|
static java.lang.String[] |
KEYARG_GPS
|
static java.lang.String[] |
KEYARG_HEX16
|
static java.lang.String[] |
KEYARG_HEX32
|
static java.lang.String[] |
KEYARG_HEX64
|
static java.lang.String[] |
KEYARG_HEX8
|
static java.lang.String[] |
KEYARG_INT
|
static java.lang.String[] |
KEYARG_NOSPACE
|
static java.lang.String[] |
KEYARG_QUOTE
|
static java.lang.String |
P_COMMAND_SMS
|
static java.lang.String |
P_COMMAND_TCP
|
static java.lang.String |
P_COMMAND_UDP
|
static java.lang.String |
P_HAS_INPUTS
|
static java.lang.String |
P_HAS_OUTPUTS
|
static java.lang.String |
P_JAR_OPTIONAL
|
static java.lang.String |
P_NONE
|
static java.lang.String |
P_XMIT_SAT
|
static java.lang.String |
P_XMIT_SMS
|
static java.lang.String |
P_XMIT_TCP
|
static java.lang.String |
P_XMIT_UDP
|
static int[] |
STARTSTOP_ENGINE
|
static int[] |
STARTSTOP_IGNITION
|
static int[] |
STARTSTOP_PARK
|
static int[] |
STARTSTOP_STARTSTOP
|
static java.lang.String |
VERSION_HASH
|
Constructor Summary | |
---|---|
DCServerConfig()
Blank Constructor |
|
DCServerConfig(java.lang.String name,
java.lang.String desc,
int[] tcpPorts,
int[] udpPorts,
int commandPort,
long flags,
java.lang.String... uniqPfx)
Constructor |
Method Summary | |
---|---|
void |
addCommand(java.lang.String cmdName,
java.lang.String cmdDesc,
boolean cmdEnable,
java.lang.String[] cmdTypes,
java.lang.String cmdAclName,
AclEntry.AccessLevel cmdAclDft,
java.lang.String cmdString,
boolean hasArgs,
java.util.Collection<DCServerConfig.CommandArg> cmdArgList,
java.lang.String cmdProto,
long maxRteAge,
boolean allowQueue,
boolean expectAck,
int expAckCode,
long stateMask,
boolean stateVal,
int cmdSCode)
|
void |
addRecommendedConfigPropertyKey(java.lang.String key)
Adds a recommended runtime configiuration property key to this DCS |
static double |
CalculateBatteryLevel(double voltage,
double[] range)
Calculates/returns the battery level based on the specified voltage range |
int |
compareTo(java.lang.Object other)
Compares another DCServerConfig instance to this instance. |
static byte[] |
convertToBytes(java.lang.String s)
Convenience for converting the initial/final packet to a byte array. |
ServerSocketThread |
createServerSocketThread_SAT(int port)
Create SAT ServerSocketThread |
ServerSocketThread |
createServerSocketThread_SAT(int port,
boolean useSSL)
Create SAT ServerSocketThread |
ServerSocketThread |
createServerSocketThread_TCP(int port)
Create TCP ServerSocketThread |
ServerSocketThread |
createServerSocketThread_TCP(int port,
boolean useSSL)
Create TCP ServerSocketThread |
ServerSocketThread |
createServerSocketThread_UDP(int port)
Create UDP ServerSocketThread |
boolean |
equals(java.lang.Object other)
Returns true if the 'other' DCServerCOnfig is equal to this DCServerConfig based on the name. |
static int |
getAckResponsePort(DCServerConfig dcsc,
int dft)
Gets the "ACK Response Port" |
int |
getAckResponsePort(int dft)
Gets the "ACK Response Port" |
static double |
getActualFuelLevel(DCServerConfig dcs,
Device dev,
double preLevel)
Converts and returns the actual fuel level based on the Device or Config FuelLevelProfile. |
static double |
getActualFuelLevel(DCServerConfig dcs,
Device dev,
double preLevel,
FuelLevelProfile dft)
Converts and returns the actual fuel level based on the Device or Config FuelLevelProfile. |
double |
getActualFuelLevel(Device dev,
double preLevel)
Converts and returns the actual fuel level based on the Device or Config FuelLevelProfile. |
double |
getActualFuelLevel(Device dev,
double preLevel,
FuelLevelProfile dft)
Converts and returns the actual fuel level based on the Device or Config FuelLevelProfile. |
long |
getAttributeFlags()
Gets the server attribute flags |
static long |
GetAttributeFlags(RTProperties rtp)
Gets the attribute flag mask for the specified RTProperties instance. |
static double |
getBatteryLevelFromVolts(DCServerConfig dcs,
Device dev,
double battVolts)
Converts and returns the actual battery level based on the Device or Config BatteryLevelProfile. |
static double |
getBatteryLevelFromVolts(DCServerConfig dcs,
Device dev,
double battVolts,
BatteryLevelProfile dft)
Converts and returns the actual battery level based on the Device or Config BatteryLevelProfile. |
double |
getBatteryLevelFromVolts(Device dev,
double battVolts)
Converts and returns the actual battery level based on the Device or Config BatteryLevelProfile. |
double |
getBatteryLevelFromVolts(Device dev,
double battVolts,
BatteryLevelProfile dft)
Converts and returns the actual battery level based on the Device or Config BatteryLevelProfile. |
BatteryLevelProfile |
getBatteryLevelProfile(BatteryLevelProfile dft)
Gets the default BatteryLevelProfile config |
static BatteryLevelProfile |
getBatteryLevelProfile(DCServerConfig dcsc,
BatteryLevelProfile dft)
Gets the default BatteryLevelProfile config |
BatteryLevelProfile |
getBatteryLevelProfile(Device dev,
BatteryLevelProfile dft)
Gets the BatteryLevelProfile config |
BatteryLevelProfile |
getBatteryLevelProfile(java.lang.String grpID,
BatteryLevelProfile dft)
Gets the BatteryLevelProfile config. |
static double[] |
getBatteryLevelRange(DCServerConfig dcsc,
double[] dft)
Gets the "Battery Level Range" config |
double[] |
getBatteryLevelRange(double[] dft)
Gets the "Battery Level Range" config |
java.lang.String |
getBindAddress()
Gets the server bind address |
boolean |
getBooleanProperty(Device dev,
java.lang.String[] key,
boolean dft)
Gets the Boolean value for the specified property key |
boolean |
getBooleanProperty(Device dev,
java.lang.String key,
boolean dft)
Gets the Boolean value for the specified property key |
boolean |
getBooleanProperty(java.lang.String[] key,
boolean dft)
Gets the Boolean value for the specified property key |
boolean |
getBooleanProperty(java.lang.String key,
boolean dft)
Gets the Boolean value for the specified property key |
boolean |
getCheckLastOdometer(boolean dft)
Gets the "Check Last Odometer" config |
static boolean |
getCheckLastOdometer(DCServerConfig dcsc,
boolean dft)
Gets the "Check Last Odometer" config |
java.lang.Class<?> |
getClassProperty(Device dev,
java.lang.String[] key,
java.lang.Class<?> dft)
Gets the Class for the specified property key |
java.lang.Class<?> |
getClassProperty(Device dev,
java.lang.String key,
java.lang.Class<?> dft)
Gets the Class for the specified property key |
java.lang.Class<?> |
getClassProperty(java.lang.String[] key,
java.lang.Class<?> dft)
Gets the Class for the specified property key |
java.lang.Class<?> |
getClassProperty(java.lang.String key,
java.lang.Class<?> dft)
Gets the Class for the specified property key |
int |
getClientCommandPort_tcp(int dft)
Gets the "Client Command Port" |
int |
getClientCommandPort_udp(int dft)
Gets the "Client Command Port" |
java.lang.Class<? extends ClientPacketHandler> |
getClientPacketHandlerClass(java.lang.Class<? extends ClientPacketHandler> dftC)
Gets the "ClientPacketHandler" subclass |
DCServerConfig.Command |
getCommand(java.lang.String name)
Returns the named command |
static int |
getCommandAckBit(DCServerConfig dcsc,
java.lang.String bitName,
int dft)
Gets the "Command ACK bit" config |
int |
getCommandAckBit(java.lang.String bitName,
int dft)
Gets the "Command ACK bit" config |
int |
getCommandAuditStatusCode(java.lang.String cmdName,
int code)
Gets the status-code for the specified command. |
java.lang.String |
getCommandDescription(java.lang.String cmdName,
java.lang.String dft)
Gets the "Command Description" for the specified command |
java.util.Map<java.lang.String,java.lang.String> |
getCommandDescriptionMap(BasicPrivateLabel privLabel,
User user,
java.lang.String type)
Gets the command's (name,description) map |
java.lang.String |
getCommandDispatcherHost(Device device)
Gets the device command listen host |
int |
getCommandDispatcherPort()
Gets the device command listen port (returns '0' if not supported) |
java.lang.String[] |
getCommandList()
Gets a list of command names |
java.util.Map<java.lang.String,DCServerConfig.Command> |
getCommandMap(BasicPrivateLabel privLabel,
User user,
java.lang.String type)
Gets the command's (name,description) map |
java.lang.Class<? extends CommandPacketHandler> |
getCommandPacketHandlerClass(java.lang.Class<? extends CommandPacketHandler> dftC)
Gets the "CommandPacketHandler" subclass |
DCServerConfig.CommandProtocol |
getCommandProtocol()
Gets the command protocol to use when communicating with remote devices |
static DCServerConfig.CommandProtocol |
getCommandProtocol(java.lang.String v)
Gets the CommandProtocol Enum value, based on the value of the specified String |
JSON._Object |
getCommands_JSON(BasicPrivateLabel privLabel,
User user,
java.lang.String type)
Gets the commands as a JSON object |
AclEntry.AccessLevel |
getCommandsAccessLevelDefault()
Gets the Commands Acl AccessLevel default |
java.lang.String |
getCommandsAclName()
Gets the Commands Acl name |
java.lang.String |
getCommandString(java.lang.String cmdName,
java.lang.String dft)
Gets the "Command String" for the specified command |
java.io.File |
getConfigFile(java.lang.String xDft)
Gets the config-file from this which this DCServerConfig was created |
CustomParser |
getCustomParserInstance(Device dev,
java.lang.String[] key,
CustomParser dft)
Returns the CustomParser instance specified by the property key |
CustomParser |
getCustomParserInstance(Device dev,
java.lang.String key,
CustomParser dft)
Returns the CustomParser instance specified by the property key |
CustomParser |
getCustomParserInstance(java.lang.String[] key,
CustomParser dft)
Returns the CustomParser instance specified by the property key |
CustomParser |
getCustomParserInstance(java.lang.String key,
CustomParser dft)
Returns the CustomParser instance specified by the property key |
boolean |
getDebugMode(boolean dft)
Gets the "Debug Mode" config |
static boolean |
getDebugMode(DCServerConfig dcsc,
boolean dft)
Gets the "Debug Mode" config |
RTProperties |
getDefaultProperties()
Returns the default RTProperties instance |
java.lang.String |
getDescription()
Gets the server description |
boolean |
getDigitalInputState(long mask,
int bit)
Returns the state of the indicated input bit within the mask for this device type. |
boolean |
getDigitalOutputState(long mask,
int bit)
Returns the state of the indicated output bit within the mask for this device type. |
double |
getDoubleProperty(Device dev,
java.lang.String[] key,
double dft)
Gets the Double value for the specified property key |
double |
getDoubleProperty(Device dev,
java.lang.String key,
double dft)
Gets the Double value for the specified property key |
double |
getDoubleProperty(java.lang.String[] key,
double dft)
Gets the Double value for the specified property key |
double |
getDoubleProperty(java.lang.String key,
double dft)
Gets the Double value for the specified property key |
boolean |
getEstimateOdometer(boolean dft)
Gets the "Estimate Odometer" flag |
static boolean |
getEstimateOdometer(DCServerConfig dcsc,
boolean dft)
Gets the "Estimate Odometer" flag |
DCServerConfig.EventCode |
getEventCode(int code)
Returns the EventCode instance for the specified code |
DCServerConfig.EventCode |
getEventCode(long code)
Returns the EventCode instance for the specified code |
DCServerConfig.EventCode |
getEventCode(java.lang.String code)
Returns the EventCode instance for the specified code |
boolean |
getEventCodeEnabled()
Gets the "Event Code Map Enable" config |
java.util.Map<java.lang.String,EventDataAnalog> |
getEventDataAnalogMap()
Gets the previously initialized EventDataAnalog conversion map. |
byte[] |
getFinalPacket(byte[] dft)
Gets the "Final Packet" byte array |
java.lang.String |
getFinalPacketString(java.lang.String dft)
Gets the "Final Packet" String |
static FuelLevelProfile |
getFuelLevelProfile(DCServerConfig dcsc,
FuelLevelProfile dft)
Gets the default FuelLevelProfile config |
FuelLevelProfile |
getFuelLevelProfile(Device dev,
FuelLevelProfile dft)
Gets the FuelLevelProfile config |
FuelLevelProfile |
getFuelLevelProfile(FuelLevelProfile dft)
Gets the default FuelLevelProfile config |
FuelLevelProfile |
getFuelLevelProfile(java.lang.String grpID,
FuelLevelProfile dft)
Gets the FuelLevelProfile config. |
boolean |
getGeozoneSkipOldEvents(boolean dft)
Gets the "Geozone Skip Old Events" state |
static boolean |
getGeozoneSkipOldEvents(DCServerConfig dcsc,
boolean dft)
Gets the "Geozone Skip Old Events" state |
boolean |
getIgnoreDeviceOdometer(boolean dft)
Gets the "Ignore Device Odometer" flag |
static boolean |
getIgnoreDeviceOdometer(DCServerConfig dcsc,
boolean dft)
Gets the "Ignore Device Odometer" flag |
boolean |
getIgnoreEventsWithInvalidGPS(boolean dft)
Gets the "Ignore Events with Invalid GPS" config |
static boolean |
getIgnoreEventsWithInvalidGPS(DCServerConfig dcsc,
boolean dft)
Gets the "Ignore Events with Invalid GPS" config |
boolean |
getIgnoreInvalidGPSFlag(boolean dft)
Gets the "Ignore Invalid GPS Location Flag" config |
static boolean |
getIgnoreInvalidGPSFlag(DCServerConfig dcsc,
boolean dft)
Gets the "Ignore Invalid GPS Location Flag" config |
byte[] |
getInitialPacket(byte[] dft)
Gets the "Initial Packet" byte array |
java.lang.String |
getInitialPacketString(java.lang.String dft)
Gets the "Initial Packet" String |
int[] |
getIntArrayProperty(Device dev,
java.lang.String[] key,
int[] dft)
Gets the Integer array for the specified property key |
int[] |
getIntArrayProperty(Device dev,
java.lang.String key,
int[] dft)
Gets the Integer array for the specified property key |
int[] |
getIntArrayProperty(java.lang.String[] key,
int[] dft)
Gets the Integer array for the specified property key |
int[] |
getIntArrayProperty(java.lang.String key,
int[] dft)
Gets the Integer array for the specified property key |
int |
getIntProperty(Device dev,
java.lang.String[] key,
int dft)
Gets the Integer value for the specified property key |
int |
getIntProperty(Device dev,
java.lang.String key,
int dft)
Gets the Integer value for the specified property key |
int |
getIntProperty(java.lang.String[] key,
int dft)
Gets the Integer value for the specified property key |
int |
getIntProperty(java.lang.String key,
int dft)
Gets the Integer value for the specified property key |
static java.io.File |
getLogFilePath(java.lang.String dcsName)
Return log file path for the specified DCS name |
long |
getLongProperty(Device dev,
java.lang.String[] key,
long dft)
Gets the Long value for the specified property key |
long |
getLongProperty(Device dev,
java.lang.String key,
long dft)
Gets the Long value for the specified property key |
long |
getLongProperty(java.lang.String[] key,
long dft)
Gets the Long value for the specified property key |
long |
getLongProperty(java.lang.String key,
long dft)
Gets the Long value for the specified property key |
static double |
getMaximumAccuracyMeters(DCServerConfig dcsc,
double dft)
Gets the "Maximum Accuracy Meters" |
double |
getMaximumAccuracyMeters(double dft)
Gets the "Maximum Accuracy Meters" |
static double |
getMaximumHDOP(DCServerConfig dcsc,
double dft)
Gets the "Maximum HDOP" |
double |
getMaximumHDOP(double dft)
Gets the "Maximum HDOP" |
static double |
getMinimumMovedMeters(DCServerConfig dcsc,
double dft)
Gets the "Minimum Moved Meters" |
double |
getMinimumMovedMeters(double dft)
Gets the "Minimum Moved Meters" |
static int |
getMinimumSatelliteCount(DCServerConfig dcsc,
int dft)
Gets the "Minimum Satellite Count" |
int |
getMinimumSatelliteCount(int dft)
Gets the "Minimum Satellite Count" |
static double |
getMinimumSpeedKPH(DCServerConfig dcsc,
double dft)
Gets the "Minimum Speed KPH" |
double |
getMinimumSpeedKPH(double dft)
Gets the "Minimum Speed KPH" |
java.lang.String |
getName()
Gets the server name/id |
java.lang.String |
getPortsString()
Returns a String representation of the ports utilized. |
java.lang.StringBuffer |
getPortsString(java.lang.StringBuffer sb)
Returns a StringBuffer representation of the ports utilized. |
RTProperties |
getProperties(Device device)
Gets the RTProperties instance for the specified group name. |
RTProperties |
getProperties(Device device,
RTProperties dftRTP)
Gets the RTProperties instance for the specified group name. |
RTProperties |
getProperties(java.lang.String grpID)
Gets the RTProperties instance for the specified group name. |
RTProperties |
getProperties(java.lang.String grpID,
boolean createNewGroup)
Gets the RTProperties instance for the specified group name. |
RTProperties |
getProperties(java.lang.String grpID,
RTProperties dftRTP)
Gets the RTProperties instance for the specified group name. |
RTProperties |
getPropertiesForKey(Device device,
java.lang.String key)
Gets the RTProperties instance that contains the specified key. |
RTProperties |
getPropertiesForKey(Device device,
java.lang.String[] key)
Gets the RTProperties instance that contains the specified key. |
RTProperties |
getPropertiesForKey(java.lang.String grpID,
java.lang.String key)
Gets the RTProperties instance that contains the specified key. |
RTProperties |
getPropertiesForKey(java.lang.String grpID,
java.lang.String[] key)
Gets the RTProperties instance that contains the specified key. |
java.lang.String |
getPropertiesID(Device device)
Gets the DCS properties ID for the specific device. |
java.lang.String |
getPropertiesID(Device device,
java.lang.String dftID)
Gets the DCS properties ID for the specific device. |
java.util.Set<java.lang.String> |
getPropertyGroupNames()
Returns a set of RTProperties group names |
java.util.Set<java.lang.String> |
getPropertyKeys(java.lang.String prefix)
Returns a set of all property keys that match the specified prefix. |
static java.lang.String |
getPSJavaCommand_jar(java.lang.String name,
java.lang.String display)
Returns the "psjava" command relative to GTS_HOME, and returning the specified information for the named jar file |
static java.lang.String |
getPSJavaCommand()
Returns the "psjava" command relative to GTS_HOME |
java.util.Set<java.lang.String> |
getRecommendedConfigPropertyKeys()
Returns the recommended runtime configuration property key set |
java.lang.String |
getRemoteLogging()
Gets the remote logging attribute string for this DCS |
java.io.File[] |
getRunningJarPath()
Return running jar file path |
static java.io.File[] |
getRunningJarPath(java.lang.String name)
Returns the file path for the named running DCServerConfig jar files. This method will return 'null' if no DCServerConfig jar files with the specified name are currently running. All matching running DCServerConfig entries will be returned. |
static int[] |
getRunningJarPID(java.lang.String name)
Returns the Process-ID (PID) for the named running DCServerConfig jar files. This method will return 'null' if no DCServerConfig jar files with the specified name are currently running, or if unable to determine the PID. All matching running DCServerConfig entries will be returned. |
java.net.InetAddress |
getSatPortBindAddress(int port)
Get SAT Port bind address |
int[] |
getSatPorts()
Gets the default SAT port for this server |
boolean |
getSaveRawDataPackets(boolean dft)
Gets the "Save Raw Data Packet" config |
static boolean |
getSaveRawDataPackets(DCServerConfig dcsc,
boolean dft)
Gets the "Save Raw Data Packet" config |
boolean |
getSaveSessionStatistics(boolean dft)
Gets the "Save Session Statistics" config |
static boolean |
getSaveSessionStatistics(DCServerConfig dcsc,
boolean dft)
Gets the "Save Session Statistics" config |
boolean |
getShowURL(boolean dft)
Gets the "Show URL" config |
static boolean |
getShowURL(DCServerConfig dcsc,
boolean dft)
Gets the "Show URL" config |
static long |
getSimulateDigitalInputs(DCServerConfig dcsc,
long dft)
Gets the "Simulate Geozones" mask |
long |
getSimulateDigitalInputs(long dft)
Gets the "Simulate Geozones" mask |
boolean |
getSimulateGeozones(boolean dft)
Gets the "Simulate Geozones" state |
static boolean |
getSimulateGeozones(DCServerConfig dcsc,
boolean dft)
Gets the "Simulate Geozones" state |
int[] |
getStartStopStatusCodes()
Gets the start/stop status codes, or null if no start/stop status codes have been defined. |
boolean |
getStartStopSupported(boolean dft)
Gets the "Start/Stop StatusCode supported" config |
static boolean |
getStartStopSupported(DCServerConfig dcsc,
boolean dft)
Gets the "Start/Stop StatusCode supported" config |
boolean |
getStatusLocationInMotion(boolean dft)
Gets the "Status Location/InMotion Translation" config |
static boolean |
getStatusLocationInMotion(DCServerConfig dcsc,
boolean dft)
Gets the "Status Location/InMotion Translation" config |
java.lang.String[] |
getStringArrayProperty(Device dev,
java.lang.String[] key,
java.lang.String[] dft)
Gets the String-array value for the specified property key |
java.lang.String[] |
getStringArrayProperty(Device dev,
java.lang.String key,
java.lang.String[] dft)
Gets the String-array value for the specified property key |
java.lang.String[] |
getStringArrayProperty(java.lang.String[] key,
java.lang.String[] dft)
Gets the String-array value for the specified property key |
java.lang.String[] |
getStringArrayProperty(java.lang.String key,
java.lang.String[] dft)
Gets the String-array value for the specified property key |
java.lang.String |
getStringProperty(Device dev,
java.lang.String[] key,
java.lang.String dft)
Gets the String value for the specified property key |
java.lang.String |
getStringProperty(Device dev,
java.lang.String key,
java.lang.String dft)
Gets the String value for the specified property key |
java.lang.String |
getStringProperty(java.lang.String[] key,
java.lang.String dft)
Gets the String value for the specified property key |
java.lang.String |
getStringProperty(java.lang.String key,
java.lang.String dft)
Gets the String value for the specified property key |
long |
getTcpIdleTimeoutMS(long dft)
Gets the "TCP idle timeout" |
long |
getTcpPacketTimeoutMS(long dft)
Gets the "TCP packet timeout" |
java.net.InetAddress |
getTcpPortBindAddress(int port)
Get TCP Port bind address |
int[] |
getTcpPorts()
Gets the default TCP port for this server |
long |
getTcpSessionTimeoutMS(long dft)
Gets the "TCP session timeout" |
java.lang.Class<?> |
getTrackServerAdapterClass(java.lang.Class<?> tsaC,
java.lang.Class<?> dftC)
Gets the "TrackServerAdapter" subclass |
long |
getUdpIdleTimeoutMS(long dft)
Gets the "UDP idle timeout" |
long |
getUdpPacketTimeoutMS(long dft)
Gets the "UDP packet timeout" |
java.net.InetAddress |
getUdpPortBindAddress(int port)
Get UDP Port bind address |
int[] |
getUdpPorts()
Gets the default UDP port for this server |
long |
getUdpSessionTimeoutMS(long dft)
Gets the "UDP session timeout" |
java.lang.String[] |
getUniquePrefix()
Gets the array of allowed UniqueID prefixes |
java.lang.String[] |
getUniquePrefix(java.lang.String[] dftPfx)
Gets the array of allowed UniqueID prefixes |
boolean |
getUseAltCurrentTimestamp(boolean dft)
Gets the "Use Alternate Current Timestamp for Event" config |
static boolean |
getUseAltCurrentTimestamp(DCServerConfig dcsc,
boolean dft)
Gets the "Use Alternate Current Timestamp for Event" config |
boolean |
getUseLastValidGPSLocation(boolean dft)
Gets the "Use Last Valid GPS Location" config |
static boolean |
getUseLastValidGPSLocation(DCServerConfig dcsc,
boolean dft)
Gets the "Use Last Valid GPS Location" config |
boolean |
getUseSSL()
Gets whether to use SSL on TCP connections |
static java.lang.String |
GetVersionHash()
|
boolean |
hasDigitalInputs()
Returns true if this device supports digital inputs |
boolean |
hasDigitalOutputs()
Returns true if this device supports digital outputs |
int |
hashCode()
Return hashCode based on the DCServerConfig name |
boolean |
hasProperty(Device dev,
java.lang.String[] key,
boolean inclDft)
Returns true is the property key has been defined. |
boolean |
hasProperty(java.lang.String[] key,
boolean inclDft)
Returns true is the property key has been defined. |
java.util.Map<java.lang.String,EventDataAnalog> |
initEventDataAnalogMap(java.lang.String keyPfx)
Creates/Returns an EventDataAnalog conversion map. |
java.util.Map<java.lang.String,EventDataAnalog> |
initEventDataAnalogMap(java.lang.String keyPfx,
java.lang.Class<? extends EventDataAnalog> edaClass)
Creates/Returns an EventDataAnalog conversion map. |
boolean |
isAttributeFlag(long mask)
Returns true if the indicate mask is non-zero |
boolean |
isJarOptional()
Returns true if this DCS requires a Jar file |
static Device |
loadDeviceUniqueID(DCServerConfig dcsc,
java.lang.String modemID)
Load device record from unique-id. |
Device |
loadDeviceUniqueID(java.lang.String modemID)
Load device record from unique-id. |
java.lang.String |
normalizeKey(java.lang.String key)
Prepend DCS name to key |
java.lang.String[] |
normalizeKeys(java.lang.String[] key)
Prepend DCS name to keys |
static OrderedMap<java.lang.String,DCServerConfig.Command> |
ParseCommandMap_JSON(JSON._Object commands)
Sets the commands, based on the specified JSON object |
boolean |
printEventCodeMap()
Prints the EventCodeMap |
static void |
printEventDataAnalog(DCServerConfig dcsc,
int width)
Prints the defined EventDataAnalog headers |
boolean |
serverJarExists()
Returns true if the named server is defined in the current installation. |
void |
setAttributeFlags(long f)
Sets the server attribute flags |
protected void |
setBindAddress(java.lang.String b)
Sets the server bind address |
void |
setCommandDispatcherHost(java.lang.String cmdHost)
Sets the device command listen host (may be null to use default bind-address) |
void |
setCommandDispatcherPort(int cmdPort)
Sets the device command listen port |
void |
setCommandDispatcherPort(int cmdPort,
boolean checkRTP)
Sets the device command listen port |
void |
setCommandProtocol(DCServerConfig.CommandProtocol proto)
Sets the command protocol to use when communicating with remote devices |
void |
setCommandProtocol(java.lang.String proto)
Sets the command protocol to use when communicating with remote devices |
void |
setCommandsAclName(java.lang.String aclName,
AclEntry.AccessLevel dft)
Sets the Commands Acl name |
void |
setConfigFile(java.io.File xmlFile)
Sets the config-file from which this DCServerConfig was created |
void |
setDescription(java.lang.String d)
Sets the server description |
void |
setEventCodeEnabled(boolean enabled)
Sets the "Event Code Map Enable" config |
void |
setEventCodeMap(java.util.Map<java.lang.Object,DCServerConfig.EventCode> codeMap)
Sets the EventCodeMap |
static boolean |
setEventDataAnalogField(DCServerConfig dcsc,
int aNdx,
EventData evdb,
double value)
Converts/Sets the EventData field value |
boolean |
setEventDataAnalogField(int aNdx,
EventData evdb,
double value)
Converts/Sets the EventData field value |
protected void |
setName(java.lang.String n)
Sets the server name/id |
void |
setRemoteLogging(java.lang.String logAttr)
Sets the remote logging attributes for this DCS |
void |
setSatPorts(java.net.InetAddress bindAddr,
int[] sat,
boolean checkRTP)
Sets the default SAT port for this server |
void |
setStartStopStatusCodes(int[] startStopCodes)
Sets the start and stop status codes. |
void |
setStartStopStatusCodes(int startCode,
int stopCode)
Sets the start and stop status codes. |
void |
setStartStopStatusCodes(java.lang.String ssKey)
Sets the start and stop status codes. |
void |
setTcpPorts(java.net.InetAddress bindAddr,
int[] tcp,
boolean checkRTP)
Sets the default TCP port for this server |
void |
setUdpPorts(java.net.InetAddress bindAddr,
int[] udp,
boolean checkRTP)
Sets the default UDP port for this server |
void |
setUniquePrefix(java.lang.String[] pfx)
Sets the array of allowed UniqueID prefixes |
void |
setUseSSL(boolean useSSL)
Sets whether to use SSL on TCP connections |
static ServerSocketThread |
startCommandHandler(int port,
java.lang.Class<? extends CommandPacketHandler> handler)
Start Command Listener |
boolean |
startRemoteLogging()
Starts the RemoteLogServer if remote logging is enabled |
static boolean |
startRemoteLogging(DCServerConfig dcsc)
Starts the RemoteLogServer if remote logging is enabled |
static void |
startServerSocketThread(ServerSocketThread sst,
java.lang.String type)
Start ServerSocketThread |
java.lang.String |
toString()
Returns a String representation of this instance |
java.lang.String |
toString(boolean inclName)
Returns a String representation of this instance |
int |
translateStatusCode(int code,
int dftStatusCode)
Translates the specified device status code into a GTS status code |
int |
translateStatusCode(java.lang.String code,
int dftStatusCode)
Translates the specified device status code into a GTS status code |
boolean |
userHasAccessToCommand(BasicPrivateLabel privLabel,
User user,
java.lang.String commandName)
Returns True if the specified user has access to the named command |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_PROP_GROUP_ID
public static final java.lang.String P_NONE
public static final java.lang.String P_HAS_INPUTS
public static final java.lang.String P_HAS_OUTPUTS
public static final java.lang.String P_COMMAND_SMS
public static final java.lang.String P_COMMAND_UDP
public static final java.lang.String P_COMMAND_TCP
public static final java.lang.String P_XMIT_TCP
public static final java.lang.String P_XMIT_UDP
public static final java.lang.String P_XMIT_SMS
public static final java.lang.String P_XMIT_SAT
public static final java.lang.String P_JAR_OPTIONAL
public static final long F_NONE
public static final long F_HAS_INPUTS
public static final long F_HAS_OUTPUTS
public static final long F_COMMAND_TCP
public static final long F_COMMAND_UDP
public static final long F_COMMAND_SMS
public static final long F_XMIT_TCP
public static final long F_XMIT_UDP
public static final long F_XMIT_SMS
public static final long F_XMIT_SAT
public static final long F_JAR_OPTIONAL
public static final long F_STD_VEHICLE
public static final long F_STD_PERSONAL
public static final java.lang.String VERSION_HASH
public static final java.lang.String COMMAND_CONFIG
public static final java.lang.String COMMAND_PING
public static final java.lang.String COMMAND_GEOZONE
public static final java.lang.String COMMAND_GFMI
public static final java.lang.String COMMAND_DIAGNOSTIC
public static final java.lang.String COMMAND_INTERNAL
public static final java.lang.String[] DIAG_LOG
public static final java.lang.String DEFAULT_ARG_NAME
public static final java.lang.String[] KEYARG_HEX8
public static final java.lang.String[] KEYARG_HEX16
public static final java.lang.String[] KEYARG_HEX32
public static final java.lang.String[] KEYARG_HEX64
public static final java.lang.String[] KEYARG_INT
public static final java.lang.String[] KEYARG_QUOTE
public static final java.lang.String[] KEYARG_GPS
public static final java.lang.String[] KEYARG_GPLAT
public static final java.lang.String[] KEYARG_GPLON
public static final java.lang.String[] KEYARG_NOSPACE
public static final java.lang.String JSONKey_DCS
public static final java.lang.String JSONKey_Commands
public static final java.lang.String JSONKey_Name
public static final java.lang.String JSONKey_Description
public static final java.lang.String JSONKey_ReadOnly
public static final java.lang.String JSONKey_ResourceName
public static final java.lang.String JSONKey_DefaultValue
public static final java.lang.String JSONKey_DisplayLength
public static final java.lang.String JSONKey_MaximumLength
public static final java.lang.String JSONKey_Enabled
public static final java.lang.String JSONKey_Types
public static final java.lang.String JSONKey_AclName
public static final java.lang.String JSONKey_AclDefault
public static final java.lang.String JSONKey_Protocol
public static final java.lang.String JSONKey_CommandString
public static final java.lang.String JSONKey_MaximumRouteAge
public static final java.lang.String JSONKey_AllowQueue
public static final java.lang.String JSONKey_ExpectAck
public static final java.lang.String JSONKey_ExpectAckCode
public static final java.lang.String JSONKey_StateBitMask
public static final java.lang.String JSONKey_StateBitValue
public static final java.lang.String JSONKey_AuditCode
public static final java.lang.String JSONKey_Args
public static final char[] GP_SEP
public static final char[] CSV_SEP
public static final int[] STARTSTOP_STARTSTOP
public static final int[] STARTSTOP_IGNITION
public static final int[] STARTSTOP_ENGINE
public static final int[] STARTSTOP_PARK
Constructor Detail |
---|
public DCServerConfig()
public DCServerConfig(java.lang.String name, java.lang.String desc, int[] tcpPorts, int[] udpPorts, int commandPort, long flags, java.lang.String... uniqPfx)
Method Detail |
---|
public static long GetAttributeFlags(RTProperties rtp)
rtp
- The RTProperties instance constructed from the "Attributes" tag
in the DCS "dcserver_XXXX.xml" file.
public static final java.lang.String GetVersionHash()
public static DCServerConfig.CommandProtocol getCommandProtocol(java.lang.String v)
v
- The command protocol name
public static java.lang.String getPSJavaCommand()
public static java.lang.String getPSJavaCommand_jar(java.lang.String name, java.lang.String display)
name
- The DCServerConfig namedisplay
- The type of information to return ("pid", "name", "user")
public static java.io.File[] getRunningJarPath(java.lang.String name)
name
- The DCServerConfig name
public static int[] getRunningJarPID(java.lang.String name)
name
- The DCServerConfig name
public static java.io.File getLogFilePath(java.lang.String dcsName)
protected void setBindAddress(java.lang.String b)
public java.lang.String getBindAddress()
protected void setName(java.lang.String n)
public java.lang.String getName()
public void setDescription(java.lang.String d)
public java.lang.String getDescription()
public void setConfigFile(java.io.File xmlFile)
public java.io.File getConfigFile(java.lang.String xDft)
public void setRemoteLogging(java.lang.String logAttr)
logAttr
- The remote log attributes in the form "[[HOST]:]PORT[/BUFFERSIZE]"public java.lang.String getRemoteLogging()
public boolean startRemoteLogging()
public static boolean startRemoteLogging(DCServerConfig dcsc)
dcsc
- The DCServerConfig instance
public void setAttributeFlags(long f)
public long getAttributeFlags()
public boolean isAttributeFlag(long mask)
public void setUseSSL(boolean useSSL)
public boolean getUseSSL()
public void setTcpPorts(java.net.InetAddress bindAddr, int[] tcp, boolean checkRTP)
public java.net.InetAddress getTcpPortBindAddress(int port)
public int[] getTcpPorts()
public ServerSocketThread createServerSocketThread_TCP(int port) throws java.net.SocketException, java.io.IOException
java.net.SocketException
java.io.IOException
public ServerSocketThread createServerSocketThread_TCP(int port, boolean useSSL) throws java.net.SocketException, java.io.IOException
java.net.SocketException
java.io.IOException
public void setUdpPorts(java.net.InetAddress bindAddr, int[] udp, boolean checkRTP)
public java.net.InetAddress getUdpPortBindAddress(int port)
public int[] getUdpPorts()
public ServerSocketThread createServerSocketThread_UDP(int port) throws java.net.SocketException, java.io.IOException
java.net.SocketException
java.io.IOException
public void setSatPorts(java.net.InetAddress bindAddr, int[] sat, boolean checkRTP)
public java.net.InetAddress getSatPortBindAddress(int port)
public int[] getSatPorts()
public ServerSocketThread createServerSocketThread_SAT(int port) throws java.net.SocketException, java.io.IOException
java.net.SocketException
java.io.IOException
public ServerSocketThread createServerSocketThread_SAT(int port, boolean useSSL) throws java.net.SocketException, java.io.IOException
java.net.SocketException
java.io.IOException
public void setStartStopStatusCodes(java.lang.String ssKey)
ssKey
- The start status code key ("ignition", "parked", "startStop")public void setStartStopStatusCodes(int startCode, int stopCode)
startCode
- The start status codestopCode
- The stop status codepublic void setStartStopStatusCodes(int[] startStopCodes)
startStopCodes
- An array containing 2 elements. The first element
is the start status code, and the second element
is the stop status code.public int[] getStartStopStatusCodes()
public static ServerSocketThread startCommandHandler(int port, java.lang.Class<? extends CommandPacketHandler> handler) throws java.lang.Throwable
port
- The listen porthandler
- The command handler class
java.lang.Throwable
public static void startServerSocketThread(ServerSocketThread sst, java.lang.String type)
sst
- The ServerSocketThread to starttype
- The short 'type' name of the socket listenerpublic static Device loadDeviceUniqueID(DCServerConfig dcsc, java.lang.String modemID)
dcsc
- The DCS DCServerConfig instance. If null, this method
will return null.modemID
- The unique modem ID (IMEI, ESN, etc)
public Device loadDeviceUniqueID(java.lang.String modemID)
modemID
- The unique modem ID (IMEI, ESN, etc)
public boolean serverJarExists()
public boolean isJarOptional()
public java.lang.Class<?> getTrackServerAdapterClass(java.lang.Class<?> tsaC, java.lang.Class<?> dftC)
tsaC
- The "TrackServerAdapter" classdftC
- The default "TrackServerAdapter" subclass
public java.lang.Class<? extends CommandPacketHandler> getCommandPacketHandlerClass(java.lang.Class<? extends CommandPacketHandler> dftC)
dftC
- The default "CommandPacketHandler" subclass
public java.lang.Class<? extends ClientPacketHandler> getClientPacketHandlerClass(java.lang.Class<? extends ClientPacketHandler> dftC)
dftC
- The default "ClientPacketHandler" subclass
public void setCommandProtocol(java.lang.String proto)
proto
- The CommandProtocolpublic void setCommandProtocol(DCServerConfig.CommandProtocol proto)
proto
- The CommandProtocolpublic DCServerConfig.CommandProtocol getCommandProtocol()
public int getClientCommandPort_udp(int dft)
dft
- The default Client Command Port
public int getClientCommandPort_tcp(int dft)
dft
- The default Client Command Port
public int getAckResponsePort(int dft)
dft
- The ACK response port
public static int getAckResponsePort(DCServerConfig dcsc, int dft)
dcsc
- The DCServerConfig instancedft
- The ACK response port
public long getTcpIdleTimeoutMS(long dft)
dft
- The default timeout value
public long getTcpPacketTimeoutMS(long dft)
dft
- The default timeout value
public long getTcpSessionTimeoutMS(long dft)
dft
- The default timeout value
public long getUdpIdleTimeoutMS(long dft)
dft
- The default timeout value
public long getUdpPacketTimeoutMS(long dft)
dft
- The default timeout value
public long getUdpSessionTimeoutMS(long dft)
dft
- The default timeout value
public java.lang.String[] getUniquePrefix(java.lang.String[] dftPfx)
dftPfx
- The default list of prefixes
public java.lang.String[] getUniquePrefix()
public void setUniquePrefix(java.lang.String[] pfx)
pfx
- The default UniqueID prefixespublic double getMinimumMovedMeters(double dft)
dft
- The default minimum distance
public static double getMinimumMovedMeters(DCServerConfig dcsc, double dft)
dcsc
- The DCServerConfig instancedft
- The default minimum distance
public double getMinimumSpeedKPH(double dft)
dft
- The default minimum speed
public static double getMinimumSpeedKPH(DCServerConfig dcsc, double dft)
dcsc
- The DCServerConfig instancedft
- The default minimum speed
public boolean getEstimateOdometer(boolean dft)
dft
- The default estimate odometer flag
public static boolean getEstimateOdometer(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default estimate odometer flag
public boolean getIgnoreDeviceOdometer(boolean dft)
dft
- The default ignore device odometer flag
public static boolean getIgnoreDeviceOdometer(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default ignore device odometer flag
public boolean getSimulateGeozones(boolean dft)
dft
- The default Simulate Geozones state
public static boolean getSimulateGeozones(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default Simulate Geozones state
public boolean getGeozoneSkipOldEvents(boolean dft)
dft
- The default Geozone Skip Old Events state
public static boolean getGeozoneSkipOldEvents(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default Geozone Skip Old Events state
public double getMaximumHDOP(double dft)
dft
- The default maximum HDOP
public static double getMaximumHDOP(DCServerConfig dcsc, double dft)
dcsc
- The DCServerConfig instancedft
- The default maximum HDOP
public int getMinimumSatelliteCount(int dft)
dft
- The default minimum satellite count
public static int getMinimumSatelliteCount(DCServerConfig dcsc, int dft)
dcsc
- The DCServerConfig instancedft
- The default minimum satellite count
public double getMaximumAccuracyMeters(double dft)
dft
- The default maximum accuracy meters
public static double getMaximumAccuracyMeters(DCServerConfig dcsc, double dft)
dcsc
- The DCServerConfig instancedft
- The default maximum accuracy meters
public boolean getCheckLastOdometer(boolean dft)
dft
- The default "Check Last Odometer" state
public static boolean getCheckLastOdometer(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Check Last Odometer" state
public boolean getSaveRawDataPackets(boolean dft)
dft
- The default "Save Raw Data Packet" state
public static boolean getSaveRawDataPackets(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Save Raw Data Packet" state
public FuelLevelProfile getFuelLevelProfile(java.lang.String grpID, FuelLevelProfile dft)
grpID
- DCS properties group IDdft
- The default FuelLevelProfile
public FuelLevelProfile getFuelLevelProfile(Device dev, FuelLevelProfile dft)
dev
- The device instancedft
- The default FuelLevelProfile
public double getActualFuelLevel(Device dev, double preLevel, FuelLevelProfile dft)
dev
- The Device instancepreLevel
- The fuel-level before conversiondft
- The default FuelLevelProfile to use
public double getActualFuelLevel(Device dev, double preLevel)
dev
- The Device instancepreLevel
- The fuel-level before conversion
public static double getActualFuelLevel(DCServerConfig dcs, Device dev, double preLevel, FuelLevelProfile dft)
dcs
- The DCServerConfig instancedev
- The Device instancepreLevel
- The fuel-level before conversiondft
- The default FuelLevelProfile to use
public static double getActualFuelLevel(DCServerConfig dcs, Device dev, double preLevel)
dcs
- The DCServerConfig instancedev
- The Device instancepreLevel
- The fuel-level before conversion
public FuelLevelProfile getFuelLevelProfile(FuelLevelProfile dft)
dft
- The default FuelLevelProfile
public static FuelLevelProfile getFuelLevelProfile(DCServerConfig dcsc, FuelLevelProfile dft)
dcsc
- The DCServerConfig instancedft
- The default FuelLevelProfile
public BatteryLevelProfile getBatteryLevelProfile(java.lang.String grpID, BatteryLevelProfile dft)
grpID
- DCS properties group IDdft
- The default BatteryLevelProfile return if no BatteryLevelProfile is defined
public BatteryLevelProfile getBatteryLevelProfile(Device dev, BatteryLevelProfile dft)
dev
- The device instancedft
- The default BatteryLevelProfile
public double getBatteryLevelFromVolts(Device dev, double battVolts, BatteryLevelProfile dft)
dev
- The Device instancebattVolts
- The battery voltsdft
- The default BatteryLevelProfile to use
public double getBatteryLevelFromVolts(Device dev, double battVolts)
dev
- The Device instancebattVolts
- The battery volts
public static double getBatteryLevelFromVolts(DCServerConfig dcs, Device dev, double battVolts, BatteryLevelProfile dft)
dcs
- The DCServerConfig instancedev
- The Device instancebattVolts
- The battery voltsdft
- The default BatteryLevelProfile to use
public static double getBatteryLevelFromVolts(DCServerConfig dcs, Device dev, double battVolts)
dcs
- The DCServerConfig instancedev
- The Device instancebattVolts
- The battery volts
public BatteryLevelProfile getBatteryLevelProfile(BatteryLevelProfile dft)
dft
- The default BatteryLevelProfile
public static BatteryLevelProfile getBatteryLevelProfile(DCServerConfig dcsc, BatteryLevelProfile dft)
dcsc
- The DCServerConfig instancedft
- The default BatteryLevelProfile
public boolean getStartStopSupported(boolean dft)
dft
- The default "Start/Stop StatusCode supported" state
public static boolean getStartStopSupported(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Start/Stop StatusCode supported" state
public boolean getStatusLocationInMotion(boolean dft)
dft
- The default "Status Location/InMotion Translation" state
public static boolean getStatusLocationInMotion(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Status Location/InMotion Translation" state
public boolean getIgnoreInvalidGPSFlag(boolean dft)
dft
- The default "Ignore Invalid GPS Location Flag" state
public static boolean getIgnoreInvalidGPSFlag(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Ignore Invalid GPS Location Flag" state
public boolean getIgnoreEventsWithInvalidGPS(boolean dft)
dft
- The default "Ignore Events with Invalid GPS" state
public static boolean getIgnoreEventsWithInvalidGPS(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Ignore Events with Invalid GPS" state
public boolean getUseLastValidGPSLocation(boolean dft)
dft
- The default "Use Last Valid GPS Location" state
public static boolean getUseLastValidGPSLocation(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Use Last Valid GPS Location" state
public boolean getUseAltCurrentTimestamp(boolean dft)
dft
- The default "Use Alternate Current Timestamp for Event" state
public static boolean getUseAltCurrentTimestamp(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Use Alternate Current Timestamp for Event" state
public boolean getSaveSessionStatistics(boolean dft)
dft
- The default "Save Session Statistics" state
public static boolean getSaveSessionStatistics(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Save Session Statistics" state
public boolean getDebugMode(boolean dft)
dft
- The default "Debug Mode" state
public static boolean getDebugMode(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Debug Mode" state
public boolean getShowURL(boolean dft)
dft
- The default "Show URL" state
public static boolean getShowURL(DCServerConfig dcsc, boolean dft)
dcsc
- The DCServerConfig instancedft
- The default "Show URL" state
public int getCommandAckBit(java.lang.String bitName, int dft)
dft
- The default "Command ACK bit"
public static int getCommandAckBit(DCServerConfig dcsc, java.lang.String bitName, int dft)
dcsc
- The DCServerConfig instancedft
- The default "Command ACK bit"
public double[] getBatteryLevelRange(double[] dft)
dft
- The default "Battery Level Range" min/max values
public static double[] getBatteryLevelRange(DCServerConfig dcsc, double[] dft)
dcsc
- The DCServerConfig instancedft
- The default "Battery Level Range" min/max values
public static double CalculateBatteryLevel(double voltage, double[] range)
voltage
- The current battery voltagerange
- The allowed voltage range
public long getSimulateDigitalInputs(long dft)
dft
- The default Simulate Geozones mask
public static long getSimulateDigitalInputs(DCServerConfig dcsc, long dft)
dcsc
- The DCServerConfig instancedft
- The default Simulate Geozones mask
public boolean hasDigitalInputs()
public boolean hasDigitalOutputs()
public java.util.Map<java.lang.String,EventDataAnalog> initEventDataAnalogMap(java.lang.String keyPfx, java.lang.Class<? extends EventDataAnalog> edaClass)
keyPfx
- The analog property prefix (such as "analog."). The analog property
entries are assumed to be 1-based (ie. "analog.1" is the first entry.edaClass
- The EventDataAnalog subclass from which the map entries are created.public java.util.Map<java.lang.String,EventDataAnalog> initEventDataAnalogMap(java.lang.String keyPfx)
keyPfx
- The analog property prefix (such as "analog."). The analog property
entries are assumed to be 1-based (ie. "analog.1" is the first entry).
If null, the default analog property key prefix will be used.public java.util.Map<java.lang.String,EventDataAnalog> getEventDataAnalogMap()
public boolean setEventDataAnalogField(int aNdx, EventData evdb, double value)
public static boolean setEventDataAnalogField(DCServerConfig dcsc, int aNdx, EventData evdb, double value)
public static void printEventDataAnalog(DCServerConfig dcsc, int width)
public static byte[] convertToBytes(java.lang.String s)
public java.lang.String getInitialPacketString(java.lang.String dft)
dft
- The default "Initial Packet" String
public byte[] getInitialPacket(byte[] dft)
dft
- The default "Initial Packet" byte array
public java.lang.String getFinalPacketString(java.lang.String dft)
dft
- The default "Final Packet" String
public byte[] getFinalPacket(byte[] dft)
dft
- The default "Final Packet" byte array
public void setEventCodeEnabled(boolean enabled)
enabled
- The "Event Code Map Enable" statepublic boolean getEventCodeEnabled()
public void setEventCodeMap(java.util.Map<java.lang.Object,DCServerConfig.EventCode> codeMap)
public boolean printEventCodeMap()
public DCServerConfig.EventCode getEventCode(int code)
code
- The code
public DCServerConfig.EventCode getEventCode(long code)
code
- The code
public DCServerConfig.EventCode getEventCode(java.lang.String code)
code
- The code
public int translateStatusCode(int code, int dftStatusCode)
code
- The code to translatedftStatusCode
- The default code returned if no translation is defined
public int translateStatusCode(java.lang.String code, int dftStatusCode)
code
- The code to translatedftStatusCode
- The default code returned if no translation is defined
public void setCommandDispatcherHost(java.lang.String cmdHost)
cmdHost
- The device command listen hostpublic java.lang.String getCommandDispatcherHost(Device device)
public void setCommandDispatcherPort(int cmdPort, boolean checkRTP)
cmdPort
- The device command listen portcheckRTP
- True to allow the RTConfig propertiesto override this valuepublic void setCommandDispatcherPort(int cmdPort)
cmdPort
- The device command listen portpublic int getCommandDispatcherPort()
public void setCommandsAclName(java.lang.String aclName, AclEntry.AccessLevel dft)
aclName
- The Commands Acl namepublic java.lang.String getCommandsAclName()
public AclEntry.AccessLevel getCommandsAccessLevelDefault()
public boolean userHasAccessToCommand(BasicPrivateLabel privLabel, User user, java.lang.String commandName)
public void addCommand(java.lang.String cmdName, java.lang.String cmdDesc, boolean cmdEnable, java.lang.String[] cmdTypes, java.lang.String cmdAclName, AclEntry.AccessLevel cmdAclDft, java.lang.String cmdString, boolean hasArgs, java.util.Collection<DCServerConfig.CommandArg> cmdArgList, java.lang.String cmdProto, long maxRteAge, boolean allowQueue, boolean expectAck, int expAckCode, long stateMask, boolean stateVal, int cmdSCode)
public java.lang.String[] getCommandList()
public java.util.Map<java.lang.String,DCServerConfig.Command> getCommandMap(BasicPrivateLabel privLabel, User user, java.lang.String type)
type
- The description type
public java.util.Map<java.lang.String,java.lang.String> getCommandDescriptionMap(BasicPrivateLabel privLabel, User user, java.lang.String type)
privLabel
- The context PrivateLabel instanceuser
- The context login Usertype
- The description type
public static OrderedMap<java.lang.String,DCServerConfig.Command> ParseCommandMap_JSON(JSON._Object commands)
commands
- The JSON command objectpublic JSON._Object getCommands_JSON(BasicPrivateLabel privLabel, User user, java.lang.String type)
privLabel
- The context PrivateLabel instanceuser
- The context login Usertype
- The description type
public DCServerConfig.Command getCommand(java.lang.String name)
name
- The name of the command to return
public java.lang.String getCommandDescription(java.lang.String cmdName, java.lang.String dft)
dft
- The default "Command Description"
public java.lang.String getCommandString(java.lang.String cmdName, java.lang.String dft)
dft
- The default "Command String"
public int getCommandAuditStatusCode(java.lang.String cmdName, int code)
code
- The default status-code
public void addRecommendedConfigPropertyKey(java.lang.String key)
key
- The recommended configuration property keypublic java.util.Set<java.lang.String> getRecommendedConfigPropertyKeys()
public RTProperties getDefaultProperties()
public java.util.Set<java.lang.String> getPropertyGroupNames()
public java.lang.String getPropertiesID(Device device)
public java.lang.String getPropertiesID(Device device, java.lang.String dftID)
public RTProperties getProperties(java.lang.String grpID)
grpID
- The property group name
public RTProperties getProperties(Device device)
device
- The device from which the property group name is obtained
public RTProperties getProperties(java.lang.String grpID, RTProperties dftRTP)
grpID
- The property group namedftRTP
- The default RTProperties to return if group not found (may be null)
public RTProperties getProperties(Device device, RTProperties dftRTP)
device
- The device from which the property group name is obtaineddftRTP
- The default RTProperties to return if group not found (may be null)
public RTProperties getPropertiesForKey(Device device, java.lang.String key)
public RTProperties getPropertiesForKey(Device device, java.lang.String[] key)
public RTProperties getProperties(java.lang.String grpID, boolean createNewGroup)
grpID
- The property group namecreateNewGroup
- True to create this group if not already present.
public RTProperties getPropertiesForKey(java.lang.String grpID, java.lang.String key)
public RTProperties getPropertiesForKey(java.lang.String grpID, java.lang.String[] key)
public java.lang.String normalizeKey(java.lang.String key)
public java.lang.String[] normalizeKeys(java.lang.String[] key)
public java.util.Set<java.lang.String> getPropertyKeys(java.lang.String prefix)
prefix
- The property key prefix
public boolean hasProperty(java.lang.String[] key, boolean inclDft)
key
- An array of property keys (true if any one of these keys are defined).inclDft
- True to also test default property key definitions.
public boolean hasProperty(Device dev, java.lang.String[] key, boolean inclDft)
dev
- The specific Device instancekey
- An array of property keys (true if any one of these keys are defined).inclDft
- True to also test default property key definitions.
public java.lang.String[] getStringArrayProperty(java.lang.String key, java.lang.String[] dft)
key
- The property keydft
- The default value if the property key is not defined
public java.lang.String[] getStringArrayProperty(Device dev, java.lang.String key, java.lang.String[] dft)
dev
- The specific Device instancekey
- The property keydft
- The default value if the property key is not defined
public java.lang.String[] getStringArrayProperty(java.lang.String[] key, java.lang.String[] dft)
key
- An array of property keysdft
- The default value if the property key is not defined
public java.lang.String[] getStringArrayProperty(Device dev, java.lang.String[] key, java.lang.String[] dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default value if the property key is not defined
public java.lang.String getStringProperty(java.lang.String key, java.lang.String dft)
key
- The property keydft
- The default value if the property key is not defined
public java.lang.String getStringProperty(Device dev, java.lang.String key, java.lang.String dft)
dev
- The specific Device instancekey
- The property keydft
- The default value if the property key is not defined
public java.lang.String getStringProperty(java.lang.String[] key, java.lang.String dft)
key
- An array of property keysdft
- The default value if the property key is not defined
public java.lang.String getStringProperty(Device dev, java.lang.String[] key, java.lang.String dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default value if the property key is not defined
public java.lang.Class<?> getClassProperty(java.lang.String key, java.lang.Class<?> dft)
key
- The property keydft
- The default class if the property key is not defined
public java.lang.Class<?> getClassProperty(Device dev, java.lang.String key, java.lang.Class<?> dft)
dev
- The specific Device instancekey
- The property keydft
- The default class if the property key is not defined
public java.lang.Class<?> getClassProperty(java.lang.String[] key, java.lang.Class<?> dft)
key
- An array of property keysdft
- The default Class if the property key is not defined
public java.lang.Class<?> getClassProperty(Device dev, java.lang.String[] key, java.lang.Class<?> dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default Class if the property key is not defined
public CustomParser getCustomParserInstance(java.lang.String key, CustomParser dft)
key
- The property keydft
- The default CustomParser instance if the property key is not defined
public CustomParser getCustomParserInstance(Device dev, java.lang.String key, CustomParser dft)
dev
- The specific Device instancekey
- The property keydft
- The default CustomParser instance if the property key is not defined
public CustomParser getCustomParserInstance(java.lang.String[] key, CustomParser dft)
key
- An array of property keysdft
- The default CustomParser instance if the property key is not defined
public CustomParser getCustomParserInstance(Device dev, java.lang.String[] key, CustomParser dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default CustomParser instance if the property key is not defined
public int getIntProperty(java.lang.String key, int dft)
key
- The property keydft
- The default value if the property key is not defined
public int getIntProperty(Device dev, java.lang.String key, int dft)
dev
- The specific Device instancekey
- The property keydft
- The default value if the property key is not defined
public int getIntProperty(java.lang.String[] key, int dft)
key
- An array of property keysdft
- The default value if the property key is not defined
public int getIntProperty(Device dev, java.lang.String[] key, int dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default value if the property key is not defined
public int[] getIntArrayProperty(java.lang.String key, int[] dft)
key
- The property keydft
- The default array if the property key is not defined
public int[] getIntArrayProperty(Device dev, java.lang.String key, int[] dft)
dev
- The specific Device instancekey
- The property keydft
- The default array if the property key is not defined
public int[] getIntArrayProperty(java.lang.String[] key, int[] dft)
key
- An array of property keysdft
- The default array if the property key is not defined
public int[] getIntArrayProperty(Device dev, java.lang.String[] key, int[] dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default array if the property key is not defined
public long getLongProperty(java.lang.String key, long dft)
key
- The property keydft
- The default value if the property key is not defined
public long getLongProperty(Device dev, java.lang.String key, long dft)
dev
- The specific Device instancekey
- The property keydft
- The default value if the property key is not defined
public long getLongProperty(java.lang.String[] key, long dft)
key
- An array of property keysdft
- The default value if the property key is not defined
public long getLongProperty(Device dev, java.lang.String[] key, long dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default value if the property key is not defined
public double getDoubleProperty(java.lang.String key, double dft)
key
- The property keydft
- The default value if the property key is not defined
public double getDoubleProperty(Device dev, java.lang.String key, double dft)
dev
- The specific Device instancekey
- The property keydft
- The default value if the property key is not defined
public double getDoubleProperty(java.lang.String[] key, double dft)
key
- An array of property keysdft
- The default value if the property key is not defined
public double getDoubleProperty(Device dev, java.lang.String[] key, double dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default value if the property key is not defined
public boolean getBooleanProperty(java.lang.String key, boolean dft)
key
- The property keydft
- The default value if the property key is not defined
public boolean getBooleanProperty(Device dev, java.lang.String key, boolean dft)
dev
- The specific Device instancekey
- The property keydft
- The default value if the property key is not defined
public boolean getBooleanProperty(java.lang.String[] key, boolean dft)
key
- An array of property keysdft
- The default value if the property key is not defined
public boolean getBooleanProperty(Device dev, java.lang.String[] key, boolean dft)
dev
- The specific Device instancekey
- An array of property keysdft
- The default value if the property key is not defined
public boolean getDigitalInputState(long mask, int bit)
mask
- The input mask from the devicebit
- The bit to testpublic boolean getDigitalOutputState(long mask, int bit)
mask
- The output mask from the devicebit
- The bit to testpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- The other DCServerConfig instance.
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
other
- The other DCServerConfig instance.
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean inclName)
inclName
- True to include the name in the returnsed String representation
public java.lang.StringBuffer getPortsString(java.lang.StringBuffer sb)
sb
- The StringBuffer to populate
public java.lang.String getPortsString()
public java.io.File[] getRunningJarPath()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |