|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.dbtools.DBRecord<RT> org.opengts.db.AccountRecord<RT> org.opengts.db.DeviceRecord<Device> org.opengts.db.tables.Device
public class Device
This class represents a tracked asset (ie. something that is being tracked). Currently, this DBRecord also represents the tracking hardware device as well.
Nested Class Summary | |
---|---|
static class |
Device.BorderCrossingState
BorderCrossing enabled state enumeration |
static class |
Device.DeviceDescriptionComparator
Comparator optimized for EventData device description |
static interface |
Device.EventDataHandler
EventDataHandler interface |
static class |
Device.FuelEconomyType
FuelEconomy Type enumeration |
static class |
Device.GeozoneTransition
Geozone transition container for providing arrive/depart events |
static class |
Device.Key
Device record key |
static class |
Device.NearbyDevice
Container class for a detected nearby device |
static class |
Device.ReminderType
Reminder Type enumeration |
Nested classes/interfaces inherited from class org.opengts.db.DeviceRecord |
---|
DeviceRecord.DeviceKey<RT extends DBRecord> |
Nested classes/interfaces inherited from class org.opengts.db.AccountRecord |
---|
AccountRecord.AccountKey<RT extends DBRecord> |
Nested classes/interfaces inherited from class org.opengts.dbtools.DBRecord |
---|
DBRecord.DBChangeListener |
Field Summary | |
---|---|
static java.lang.String |
_TABLE_NAME
|
static boolean |
ALLOW_USE_EMAIL_WRAPPER
|
static DBField[] |
AttributeInfo
|
static boolean |
AUTO_GENERATE_NON_MOVING_EVENT
|
static DBField[] |
BorderCrossingFieldInfo
|
static boolean |
CACHE_STATUS_CODE_DESCRIPTIONS
|
static boolean |
CHECK_LAST_ODOMETER
|
static DBField[] |
DataPushInfo
|
static WorkHours |
DefaultWorkHours
|
static boolean |
DEFERRED_RULE_CHECK
|
static DBField[] |
ELogHOSInfo
|
static Device[] |
EMPTY_ARRAY
|
static double |
EPS_ALPHA
|
static long |
EPS_RANGE_MS
|
static long |
EPS_RANGE_SECONDS
|
static double |
EPS_WEIGHT
|
static double |
EVENT_START_MOTION_RADIUS_M
|
static DBField[] |
FixedLocationFieldInfo
|
static java.lang.String |
FLD_activeCorridor
|
static java.lang.String |
FLD_allowNotify
|
static java.lang.String |
FLD_assignedUserID
|
static java.lang.String |
FLD_borderCrossing
|
static java.lang.String |
FLD_codeVersion
|
static java.lang.String |
FLD_commandStateMask
|
static java.lang.String |
FLD_customAttributes
|
static java.lang.String |
FLD_dataKey
|
static java.lang.String |
FLD_dcsCommandHost
|
static java.lang.String |
FLD_dcsConfigMask
|
static java.lang.String |
FLD_dcsConfigString
|
static java.lang.String |
FLD_dcsPropertiesID
|
static java.lang.String |
FLD_deviceCode
|
static java.lang.String |
FLD_deviceType
|
static java.lang.String |
FLD_displayColor
|
static java.lang.String |
FLD_driverID
|
static java.lang.String |
FLD_driverStatus
|
static java.lang.String |
FLD_duplexMaxConn
|
static java.lang.String |
FLD_duplexMaxConnPerMin
|
static java.lang.String |
FLD_duplexProfileMask
|
static java.lang.String |
FLD_eLogEnabled
|
static java.lang.String |
FLD_engineHoursOffset
|
static java.lang.String |
FLD_equipmentStatus
|
static java.lang.String |
FLD_equipmentType
|
static java.lang.String |
FLD_expectAck
|
static java.lang.String |
FLD_expectAckCode
|
static java.lang.String |
FLD_expirationTime
|
static java.lang.String |
FLD_featureSet
|
static java.lang.String |
FLD_fixedAddress
|
static java.lang.String |
FLD_fixedContactPhone
|
static java.lang.String |
FLD_fixedLatitude
|
static java.lang.String |
FLD_fixedLongitude
|
static java.lang.String |
FLD_fixedServiceTime
|
static java.lang.String |
FLD_fuelCapacity
|
static java.lang.String |
FLD_fuelCostPerLiter
|
static java.lang.String |
FLD_fuelEconomy
|
static java.lang.String |
FLD_fuelRatePerHour
|
static java.lang.String |
FLD_fuelTankProfile
|
static java.lang.String |
FLD_groupID
|
static java.lang.String |
FLD_hoursOfOperation
|
static java.lang.String |
FLD_ignitionIndex
|
static java.lang.String |
FLD_imeiNumber
|
static java.lang.String |
FLD_installTime
|
static java.lang.String |
FLD_insuranceExpire
|
static java.lang.String |
FLD_ipAddressCurrent
|
static java.lang.String |
FLD_ipAddressLocal
|
static java.lang.String |
FLD_ipAddressValid
|
static java.lang.String |
FLD_jobLatitude
|
static java.lang.String |
FLD_jobLongitude
|
static java.lang.String |
FLD_jobNumber
|
static java.lang.String |
FLD_jobRadius
|
static java.lang.String |
FLD_lastAckCommand
|
static java.lang.String |
FLD_lastAckResponse
|
static java.lang.String |
FLD_lastAckTime
|
static java.lang.String |
FLD_lastBatteryLevel
|
static java.lang.String |
FLD_lastBorderCrossTime
|
static java.lang.String |
FLD_lastCellServingInfo
|
static java.lang.String |
FLD_lastDataPushTime
|
static java.lang.String |
FLD_lastDistanceKM
|
static java.lang.String |
FLD_lastDuplexConnectTime
|
static java.lang.String |
FLD_lastELogState
|
static java.lang.String |
FLD_lastEngineHours
|
static java.lang.String |
FLD_lastEngineOffTime
|
static java.lang.String |
FLD_lastEngineOnHours
|
static java.lang.String |
FLD_lastEngineOnTime
|
static java.lang.String |
FLD_lastEventCreateMillis
|
static java.lang.String |
FLD_lastEventsPerSecond
|
static java.lang.String |
FLD_lastEventsPerSecondMS
|
static java.lang.String |
FLD_lastEventTimestamp
|
static java.lang.String |
FLD_lastFaultCode
|
static java.lang.String |
FLD_lastFuelLevel
|
static java.lang.String |
FLD_lastFuelTotal
|
static java.lang.String |
FLD_lastGPSTimestamp
|
static java.lang.String |
FLD_lastIgnitionHours
|
static java.lang.String |
FLD_lastIgnitionOffTime
|
static java.lang.String |
FLD_lastIgnitionOnHours
|
static java.lang.String |
FLD_lastIgnitionOnTime
|
static java.lang.String |
FLD_lastInputState
|
static java.lang.String |
FLD_lastMalfunctionLamp
|
static java.lang.String |
FLD_lastNotifyCode
|
static java.lang.String |
FLD_lastNotifyRule
|
static java.lang.String |
FLD_lastNotifyTime
|
static java.lang.String |
FLD_lastOdometerKM
|
static java.lang.String |
FLD_lastOilLevel
|
static java.lang.String |
FLD_lastOutputState
|
static java.lang.String |
FLD_lastPingTime
|
static java.lang.String |
FLD_lastServiceTime
|
static java.lang.String |
FLD_lastStartTime
|
static java.lang.String |
FLD_lastStopTime
|
static java.lang.String |
FLD_lastSubdivision
|
static java.lang.String |
FLD_lastTcpSessionID
|
static java.lang.String |
FLD_lastTotalConnectTime
|
static java.lang.String |
FLD_lastValidHeading
|
static java.lang.String |
FLD_lastValidLatitude
|
static java.lang.String |
FLD_lastValidLongitude
|
static java.lang.String |
FLD_lastValidSpeedKPH
|
static java.lang.String |
FLD_licenseExpire
|
static java.lang.String |
FLD_licensePlate
|
static java.lang.String |
FLD_linkDescription
|
static java.lang.String |
FLD_linkURL
|
static java.lang.String |
FLD_listenPortCurrent
|
static java.lang.String |
FLD_maintEngHoursHR0
|
static java.lang.String |
FLD_maintIntervalHR0
|
static java.lang.String |
FLD_maintIntervalKM0
|
static java.lang.String |
FLD_maintIntervalKM1
|
static java.lang.String |
FLD_maintNotes
|
static java.lang.String |
FLD_maintOdometerKM0
|
static java.lang.String |
FLD_maintOdometerKM1
|
static java.lang.String |
FLD_maxAllowedEvents
|
static java.lang.String |
FLD_maxPassengers
|
static java.lang.String |
FLD_maxPingCount
|
static java.lang.String |
FLD_nextServiceTime
|
static java.lang.String |
FLD_notifyAction
|
static java.lang.String |
FLD_notifyDescription
|
static java.lang.String |
FLD_notifyEmail
|
static java.lang.String |
FLD_notifyPriority
|
static java.lang.String |
FLD_notifySelector
|
static java.lang.String |
FLD_notifySubject
|
static java.lang.String |
FLD_notifyText
|
static java.lang.String |
FLD_notifyUseWrapper
|
static java.lang.String |
FLD_odometerOffsetKM
|
static java.lang.String |
FLD_parkedLatitude
|
static java.lang.String |
FLD_parkedLongitude
|
static java.lang.String |
FLD_parkedMaxSpeedKPH
|
static java.lang.String |
FLD_parkedRadius
|
static java.lang.String |
FLD_pendingMessage
|
static java.lang.String |
FLD_pendingMessageACK
|
static java.lang.String |
FLD_pendingPingCommand
|
static java.lang.String |
FLD_pingCommandURI
|
static java.lang.String |
FLD_planDistanceKM
|
static java.lang.String |
FLD_proximityGroupID
|
static java.lang.String |
FLD_proximityMaximumAge
|
static java.lang.String |
FLD_proximityRadius
|
static java.lang.String |
FLD_pushpinID
|
static java.lang.String |
FLD_reminderInterval
|
static java.lang.String |
FLD_reminderMessage
|
static java.lang.String |
FLD_reminderTime
|
static java.lang.String |
FLD_reminderType
|
static java.lang.String |
FLD_remotePortCurrent
|
static java.lang.String |
FLD_resetTime
|
static java.lang.String |
FLD_serialNumber
|
static java.lang.String |
FLD_simID
|
static java.lang.String |
FLD_simPhoneNumber
|
static java.lang.String |
FLD_smsEmail
|
static java.lang.String |
FLD_speedLimitKPH
|
static java.lang.String |
FLD_statusCodeState
|
static java.lang.String |
FLD_supportedEncodings
|
static java.lang.String |
FLD_supportsDMTP
|
static java.lang.String |
FLD_thermalProfile
|
static java.lang.String |
FLD_totalMaxConn
|
static java.lang.String |
FLD_totalMaxConnPerMin
|
static java.lang.String |
FLD_totalPingCount
|
static java.lang.String |
FLD_totalProfileMask
|
static java.lang.String |
FLD_uniqueID
|
static java.lang.String |
FLD_unitLimitInterval
|
static java.lang.String |
FLD_vehicleID
|
static java.lang.String |
FLD_vehicleMake
|
static java.lang.String |
FLD_vehicleModel
|
static java.lang.String |
FLD_vehicleYear
|
static java.lang.String |
FLD_workOrderID
|
static int |
FUTURE_DATE_DISABLED
|
static int |
FUTURE_DATE_IGNORE
|
static int |
FUTURE_DATE_TRUNCATE
|
static int |
FUTURE_DATE_UNDEFINED
|
static DBField[] |
GeoCorridorFieldInfo
|
static boolean |
INSERT_REVERSEGEOCODE_REQUIRED
|
static int |
INVALID_SPEED_DISABLED
|
static int |
INVALID_SPEED_IGNORE
|
static int |
INVALID_SPEED_TRUNCATE
|
static int |
INVALID_SPEED_UNDEFINED
|
static int |
INVALID_SPEED_ZERO
|
static java.lang.String[] |
KEY_DRIVER_BADGE
|
static java.lang.String[] |
KEY_DRIVER_LICENSE
|
static java.lang.String[] |
KEY_DRIVER_PHONE
|
static java.lang.String[] |
KEY_LICENSE_PLATE
|
static DBField[] |
LinkFieldInfo
|
static DBField[] |
MaintOdometerFieldInfo
|
static double |
MAX_DEVICE_ODOM_KM
|
static long |
MAX_STOPPED_DELTA_SEC
|
static DBField[] |
NotificationFieldInfo
|
static java.lang.String |
OPTCOLS_AttributeInfo
|
static java.lang.String |
OPTCOLS_BorderCrossingFieldInfo
|
static java.lang.String |
OPTCOLS_DataPushInfo
|
static java.lang.String |
OPTCOLS_ELogHOSInfo
|
static java.lang.String |
OPTCOLS_FixedLocationFieldInfo
|
static java.lang.String |
OPTCOLS_GeoCorridorFieldInfo
|
static java.lang.String |
OPTCOLS_LinkFieldInfo
|
static java.lang.String |
OPTCOLS_MaintOdometerFieldInfo
|
static java.lang.String |
OPTCOLS_NotificationFieldInfo
|
static java.lang.String |
OPTCOLS_WorkOrderInfo
|
static int |
PAST_DATE_DISABLED
|
static int |
PAST_DATE_IGNORE
|
static int |
PAST_DATE_TRUNCATE
|
static int |
PAST_DATE_UNDEFINED
|
static boolean |
SAVE_EVENT_DRIVER_ID
|
static boolean |
SIMULATE_ENGINE_HOURS
|
static boolean |
UPDATE_EVENT_WITH_GEOZONE_LOC
|
static DBField[] |
WorkOrderInfo
|
Fields inherited from class org.opengts.db.DeviceRecord |
---|
FLD_deviceID |
Fields inherited from class org.opengts.db.AccountRecord |
---|
FLD_accountID, FLD_displayName, FLD_isActive, FLD_notes |
Fields inherited from class org.opengts.dbtools.DBRecord |
---|
errorDescription, excludedUpdateFields, FLD_creationMillis, FLD_creationTime, FLD_description, FLD_lastUpdateAccount, FLD_lastUpdateTime, FLD_lastUpdateUser, hasError, ID_SIZE, isValidating, lastSQLException, NOTIFY_GROUP, PSEUDO_FIELD_CHAR, tempProps |
Constructor Summary | |
---|---|
Device()
|
|
Device(Device.Key key)
|
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
_createChangedFieldsSet(java.util.Set<java.lang.String> flds)
Creates a list of fields that should be updated for this device |
java.util.Set<java.lang.String> |
_createChangedFieldsSet(java.lang.String... flds)
Creates a list of fields that should be updated for this device |
static Device |
_getDevice(Account account,
java.lang.String devID)
Gets the specified Device record. This method should only be used when relatively sure that the specified deviceID exists. |
static Device |
_getDevice(Account account,
java.lang.String devID,
java.lang.String... fieldNames)
Gets the specified Device record. This method should only be used when relatively sure that the specified deviceID exists. |
static java.lang.String |
_getKeyFieldString(boolean getTitle,
java.lang.String key,
java.lang.String arg,
java.util.Locale locale,
BasicPrivateLabel bpl,
Device dev)
Gets the field title/value for the specified key |
protected boolean |
_insertEventData(EventData evdb)
Insert event into EventData table |
Device |
_reload(java.lang.String... fldNames)
Reload the contents of this record from the DB |
void |
_setExpectAck(boolean v)
Sets the expected ACK state |
void |
_setLastAckTime(long v)
Sets the last ACK time (if supported) |
void |
_setLastDuplexConnectTime(long v)
Sets the last Duplex/TCP connection time |
void |
_setLastPingTime(long v)
Sets the time of the last command sent to the device |
void |
_setLastTotalConnectTime(long v)
Sets the last UDP/TCP connection time |
void |
_setMaxPingCount(int v)
Sets the maximum number of commands that can be sent to the device |
void |
_setTotalPingCount(int v)
Sets the total number of commands sent to the device, since last reset |
void |
addOtherChangedFieldNames(java.util.Set<java.lang.String> flds)
Adds the specified list of update fields to the internal set |
void |
addOtherChangedFieldNames(java.lang.String... flds)
Adds the specified list of update fields to the internal set |
boolean |
addWorkOrderID(java.lang.String woid)
Adds the specified Work Order ID to the current list |
double |
adjustOdometerKM(double odomKM)
Adjusts the specified odometer value to the maximum allow value |
double |
adjustOdometerKM(double odomKM,
boolean checkLast)
Adjusts the specified odometer value to the maximum allow value |
void |
appendLastFaultCode(java.lang.String v)
Appends the specified fault code to the current list of fault codes |
static double |
CalculateFuelCost(Account a,
Device d,
double liters)
|
double |
calculateOdometerKM(double odomKM,
long fixtime,
boolean validGPS,
GeoPoint geoPoint,
boolean estimate,
boolean logInfo)
Calculates an odometer value based on the specified attributes |
protected boolean |
checkEventRules(EventData event)
Checks the rules which are applicable for the specified event Note: The EventData instance MUST already be set with the parent Device record! |
java.util.List<Device.GeozoneTransition> |
checkGeozoneTransitions(long eventTime,
GeoPoint eventGP)
Checks the new event time and GeoPoint to calculate and returns a set of Geozone arrive/depart events, which should be inserted into the EventData table. |
static boolean |
CheckNotifySelector()
True to test notify rule selector, false to ignore |
static boolean |
CheckSelectorSyntax(java.lang.String selector)
Validates the syntax of the specified Rule selector |
boolean |
clearExpectCommandAck(boolean didAck,
boolean update)
Clears the expect ACK state for the specified command |
void |
clearLastNotifyEvent(boolean update)
Clears the last notification for this Device |
void |
clearOriginalLastValidGeoPoint()
Clear original last valid GeoPoint |
void |
clearOtherChangedFieldNames()
clear all fields specified in the internal update field set |
void |
clearParkedLocation(boolean update)
Clears the parked location state |
boolean |
clearPendingCommand(boolean update)
|
boolean |
clearPendingPingCommand(boolean update)
Clears the device pending commands |
long |
countOldEvents(long oldTimeSec)
Count the number of events prior to the specified time Note: Will return -1 if EventData table is InnoDB. |
static Device |
createNewDevice(Account account,
java.lang.String devID,
java.lang.String uniqueID)
Create/Save Device record |
static Device |
createVirtualDevice(java.lang.String acctID,
java.lang.String devID)
(EXPERIMENTAL) Creates a virtual Device record |
long |
deleteEventsPriorTo(long priorToTime)
Deletes old events from EventData table. |
long |
deleteOldEvents(long oldTimeSec,
java.lang.StringBuffer logMsg)
Delete events prior to the specified time. Note: Will return -1 if EventData table is InnoDB. |
boolean |
doesExpire()
Returns true if this Device has an expiry date |
protected void |
eventDidInsert(EventData evdb)
Callback indicating EventData instance has been inserted Note: "evdb.getDevice()" may be a copy of "this" Device instance, but made prior to any adjustments made from the EventData instance. |
protected void |
eventWillInsert(EventData evdb)
Callback indicating EventData instance will be inserted Note: "evdb.getDevice()" may be a copy of "this" Device instance. |
boolean |
exceedsMaxPingCount()
Returns true if the maximum number of commands sent to the server has been exceeded. |
static boolean |
exists(java.lang.String acctID,
java.lang.String devID)
Returns true if the specified record exists |
static int |
futureEventDateAction()
Gets the action to perform when a future event date is detected |
static long |
futureEventDateMaximumSec()
Gets the maximum number of seconds an event is allowed to be into the future |
java.lang.String |
getActiveCorridor()
Gets the active corridor for this device |
double |
getActualFuelLevel(double fuelLevel)
Gets the FuelLevelProfile instance |
double |
getAgedEventsPerSecond(long ageMS)
Gets the aged estimated events-per-second |
boolean |
getAllowNotify()
Returns true if this device allows notifications |
boolean |
getAllowNotify(boolean checkAccount)
Returns true if this device allows notifications |
static boolean |
GetAllowSlowReverseGeocoding()
Returns true is slow reverse-geocoding is allowed |
User |
getAssignedUser()
Gets the assigned User |
java.lang.String |
getAssignedUserID()
Gets the assigned User-ID |
java.util.TimeZone |
getAssignedUserTimeZone()
Gets the TimeZone for the assigned user-id. |
java.lang.String |
getAssocAccountID()
DataTransport Interface: Gets the Associated AccountID |
java.lang.String |
getAssocDeviceID()
DataTransport Interface: Gets the Associated DeviceID |
java.lang.String[] |
getAttachedEntityDescriptions(EntityManager.EntityType etype)
Gets and array of the attached Entity Descriptions which are attached to this Device |
java.lang.String[] |
getAttachedEntityDescriptions(int entityType)
Gets and array of the attached Entity Descriptions which are attached to this Device |
java.lang.String[] |
getAttachedEntityIDs(EntityManager.EntityType etype)
Gets and array of the attached Entity IDs which are attached to this Device |
java.lang.String[] |
getAttachedEntityIDs(int entityType)
Gets and array of the attached Entity IDs which are attached to this Device |
static OrderedSet<User> |
getAuthorizedUsers(Device device)
Gets a list of authorised Users for this Device |
java.lang.String |
getAutoGeozoneID(EventData ev)
Creates a unique Geozone ID which may be used by the ENRE predefined-actions |
int |
getBorderCrossing()
Gets the Border-Crossing enabled state |
static boolean |
GetCheckLastOdometer()
Get configured maximum allowed odometer value |
java.lang.String |
getCodeVersion()
Gets the code/firmware version of this Device |
long |
getCommandStateMask()
Gets the command state mask as set by commands sent to the device |
boolean |
getCommandStateMaskBit(int bit)
Gets the state for the specified bit from the command state mask |
static java.lang.String[] |
getCorridorIDsForAccount(java.lang.String acctId)
Gets a String array of all GeoCorridor ID for the specified account (TODO: move to Account.java) |
int |
getCurrentIgnitionState()
Returns the current ignition state -1 = unknown 0 = off 1 = on |
int |
getCurrentIgnitionState(boolean checkSC,
boolean update)
Returns the current ignition state -1 = unknown 0 = off 1 = on |
java.lang.String |
getCustomAttribute(java.lang.String key)
Gets the value for a specific custom attribute key |
java.util.Collection<java.lang.String> |
getCustomAttributeKeys()
Gets a Collection of custom attribute keys for this device |
java.lang.String |
getCustomAttributes()
Gets the custom attributes for this device |
RTProperties |
getCustomAttributesRTP()
Gets the custom attributes for this device as an RTProperties instance |
java.lang.String |
getDataKey()
Gets the data key (PIN) for this device |
byte[] |
getDataKeyAsByteArray()
Gets the data key (PIN) for this device, as a byte array |
DataTransport |
getDataTransport()
Gets the DataTransport for this Device |
java.lang.String |
getDcsCommandHost()
Gets the DCS Command Host assigned to this device (ie. |
long |
getDcsConfigMask()
Gets the DCS configuration mask (usage defined by specific DCS) |
java.lang.String |
getDcsConfigString()
Gets the DCS configuration String (usage defined by specific DCS) |
DCServerConfig |
getDCServerConfig()
Gets the DCServerConfig instance for this Device |
java.lang.String |
getDcsPropertiesID()
Gets the DCS Properties ID assigned to this device (DCS Property ID) Used by some DCS modules to select specific device configurations |
static java.lang.String |
GetDcsPropertiesID(Device device)
Gets the DCS Property ID for the specified device |
static Device |
getDevice(Account account,
java.lang.String devID)
Gets the specified Device record |
static Device |
getDevice(Account account,
java.lang.String devID,
boolean create)
Gets or Creates a Device record |
static Device |
getDevice(Account account,
java.lang.String devID,
java.lang.String... fieldNames)
Gets the specified Device record |
java.lang.String |
getDeviceCode()
Gets the Device-Code (also called Server-ID) for this Device |
static java.util.Comparator<Device> |
getDeviceDescriptionComparator()
Gets the Device Description Sort Comparator |
static OrderedSet<java.lang.String> |
getDeviceIDsForAccount(java.lang.String acctId,
User userAuth,
boolean inclInactv)
Gets a set of Device IDs for the specified Account (oes not return null) |
static OrderedSet<java.lang.String> |
getDeviceIDsForAccount(java.lang.String acctId,
User userAuth,
boolean inclInactv,
long limit)
Gets a set of Device IDs for the specified Account (oes not return null) |
static java.util.List<java.lang.String> |
getDeviceIDsForSimPhoneNumber(java.lang.String simPhone)
Returns an array of Device-IDs for the specified SIM phone number |
static java.util.List<java.lang.String> |
getDeviceIDsForSimPhoneNumber(java.lang.String simPhone,
char sepCH)
Returns an array of Device-IDs for the specified SIM phone number |
java.lang.String |
getDeviceType()
Gets the Device-Type for this Device |
boolean |
getDigitalInputIgnitionState(long gpioInput)
Returns the ignition state based on the specified digital input mask. |
java.lang.String |
getDisplayColor()
Gets the defined display-color |
ColorTools.RGB |
getDisplayColor(ColorTools.RGB dft)
Gets the defined display-color, or returns the specified default color if not display-color is defined. |
Driver |
getDriver()
Gets the Driver record, or null if not defined |
java.lang.String |
getDriverID()
Gets the Driver-ID, or blank if not defined |
long |
getDriverStatus()
Gets the driver status |
int |
getDuplexMaxConn()
OpenDMTP: Gets the maximum Duplex/TCP connections per Interval Note: The effective maximum value for this field is defined by the following: (org.opendmtp.server.base.ValidateConnections.BITS_PER_MINUTE_MASK * this.getUnitLimitIntervalMinutes()) |
int |
getDuplexMaxConnPerMin()
OpenDMTP: Gets the maximum Duplex/TCP connections per Minute Note: The effective maximum value for this field is defined by the constant: "org.opendmtp.server.base.ValidateConnections.BITS_PER_MINUTE_MASK" |
DTProfileMask |
getDuplexProfileMask()
OpenDMTP: Gets the Duplex/TCP connection profile mask |
boolean |
getELogEnabled()
Returns true if ELog/HOS is enabled for this Device |
double |
getEngineHoursOffset()
Gets the displayed engine-hours offset |
static java.lang.String |
getEntityDescription(java.lang.String accountID,
java.lang.String entityID,
EntityManager.EntityType etype)
Gets the Description for the specified Entity ID |
static java.lang.String |
getEntityDescription(java.lang.String accountID,
java.lang.String entityID,
int etype)
Gets the Description for the specified Entity ID |
static EntityManager |
getEntityManager()
Gets the defined EntityManager |
java.lang.String |
getEquipmentStatus()
Gets the equipment status |
static OrderedMap<java.lang.String,java.lang.String> |
GetEquipmentStatusMap(java.util.Locale locale)
Return a map of EquipmentStatus keys to description |
java.lang.String |
getEquipmentType()
Gets the equipment type |
long |
getEventCount()
Gets the total number of events for this Device/Vehicle |
long |
getEventCount(long timeStart,
long timeEnd)
Gets the number of events between the specified timestamps (inclusive) Note: will return -1 if EventData table is InnoDB |
int |
getEventIgnitionState(EventData ev)
Returns the ignition state change of the specified Event -1 = no change 0 = changed to off 1 = changed to on |
boolean |
getExpectAck()
Returns true if an ACK is expected from the device |
int |
getExpectAckCode()
Gets the expected ACK status code, or '0' if any code should match |
long |
getExpirationTime()
Gets the expiration time of this Device (in Unix Epoch time format) |
static DBFactory<Device> |
getFactory()
Gets the Device DBFactory |
java.lang.String |
getFeatureSet()
Gets the feature set of this Device |
EventData |
getFirstEvent(long startTime,
boolean validGPS)
Gets the first EventData record greater-than or equal-to the specified start time |
java.lang.String |
getFixedAddress()
Gets the address for the fixed location for this device |
java.lang.String |
getFixedContactPhone()
Gets the phone number for the fixed location for this device |
double |
getFixedLatitude()
Gets the fixed latitude for this device |
GeoPoint |
getFixedLocation()
Gets the fixed location for this device |
double |
getFixedLongitude()
Gets the fixed longitude for this device |
long |
getFixedServiceTime()
Gets the last time this fixed location was serviced |
double |
getFuelCapacity()
Gets the tank Fuel Capacity, in Liters |
double |
getFuelCostPerLiter()
Gets the Fuel cost per Liter |
double |
getFuelEconomy()
Gets the approximate Fuel Economy, in Km/Liter |
FuelLevelProfile |
getFuelLevelProfile()
Gets the FuelLevelProfile instance. |
FuelLevelProfile |
getFuelLevelProfile(FuelLevelProfile dft)
Gets the FuelLevelProfile instance. |
static FuelManager |
getFuelManager()
Gets the FuelManager |
double |
getFuelRatePerHour()
Gets the approximate Fuel Consumption Rate in Litres/Hour |
java.lang.String |
getFuelTankProfile()
Gets the Fuel tank profile |
double |
getFuelUsedInRange(long startTime,
long endTime)
Gets the fuel used within the specified time range |
java.lang.String |
getGroupID()
Gets the user informational Group ID (user informational only, not used by DeviceGroup) (currently used in various ReportLayout subclasses) |
java.lang.String |
getHoursOfOperation()
Gets the HoursOfOperation for this device (as a String) |
int |
getIgnitionIndex()
Returns the bit index within the input mask which indicates the ignition state. |
int |
getIgnitionStateAsOfEvent(EventData ev)
Returns the ignition state as-of the specified Event -1 = unknown 0 = off 1 = on |
int |
getIgnitionStateAsOfEvent(EventData ev,
boolean checkSC)
Returns the ignition state as-of the specified Event -1 = unknown 0 = off 1 = on |
int[] |
getIgnitionStatusCodes()
Returns a 2 element array indicating the status codes which indicate the ignition state. |
java.lang.String |
getImeiNumber()
Gets the IMEI# (or ESN) for this device. |
long |
getInstallTime()
Gets the install time of this Device (in Unix Epoch time format) |
long |
getInsuranceExpire()
Gets the insurance expiration date as a DayNumber value |
DTIPAddress |
getIpAddressCurrent()
Gets the last known IP address used by the Device |
DTIPAddress |
getIpAddressLocal()
Gets the local IP address to which this device sent its latest packet |
DTIPAddrList |
getIpAddressValid()
Gets the valid assigned IP address/mask for this Device (used for validating incoming IP addresses used by this Device) |
boolean |
getIsActive()
Gets the active state of this Device record |
double |
getJobLatitude()
Gets the Job latitude |
double |
getJobLongitude()
Gets the Job longitude |
java.lang.String |
getJobNumber()
Gets the Job number |
double |
getJobRadius()
Gets the Job radius, in meters |
static java.lang.String |
getKeyFieldTitle(java.lang.String key,
java.lang.String arg,
java.util.Locale locale)
Gets the field title for the specified key |
java.lang.String |
getKeyFieldValue(java.lang.String key,
java.lang.String arg,
BasicPrivateLabel bpl)
Gets the field value for the specified key |
java.lang.String |
getLastAckCommand()
Gets the last ACK command sent to the device (if supported) |
java.lang.String |
getLastAckResponse()
Gets the last ACK response (if supported) |
long |
getLastAckTime()
Gets the last ACK time (if supported) |
double |
getLastBatteryLevel()
Gets the last battery level recieved |
long |
getLastBorderCrossTime()
Gets the last calculated Border-Crossing time (Unix Epoch format) |
java.lang.String |
getLastCellServingInfo()
Gets the last received serving cell-tower information |
long |
getLastConnectTime()
Gets the last UDP/TCP connection time |
long |
getLastDataPushTime()
Gets the last data push time |
double |
getLastDistanceKM()
Gets the last distance value |
long |
getLastDuplexConnectTime()
Gets the last Duplex/TCP connection time |
DTELogState |
getLastELogState()
Gets the last ELog/HOS state RTP:"enabled=true lastTS=123456789 lastSC=0xF010 isDriving=true|false distKM=1234.5" |
double |
getLastEngineHours()
Gets the last engine-hours received |
long |
getLastEngineOffTime()
Gets the last engine off time received |
double |
getLastEngineOnHours()
Gets the engine-hours at the last engine-on time |
long |
getLastEngineOnTime()
Gets the last engine on time received |
EventData |
getLastEvent(boolean validGPS)
Gets the last EventData record in the EventData table for this Device |
EventData |
getLastEvent(int[] statusCodes)
Gets the last EventData record in the EventData table for this Device |
EventData |
getLastEvent(int[] statusCodes,
long endTime,
boolean validGPS)
Gets the last EventData record in the EventData table for this Device |
EventData |
getLastEvent(long endTime,
boolean validGPS)
Gets the last EventData record in the EventData table for this Device |
long |
getLastEventCreateMillis()
Gets the Last Event Creation time, in milliseconds |
double |
getLastEventsPerSecond()
Gets the last estimated events-per-second |
long |
getLastEventsPerSecondMS()
Gets the last event-per-second timestamp (milliseconds) |
long |
getLastEventTimestamp()
Gets the last event timestamp |
java.lang.String |
getLastFaultCode()
Gets the last fault codes |
double |
getLastFuelLevel()
Gets the last fuel level recieved |
double |
getLastFuelTotal()
Gets the last fuel total recieved |
long |
getLastGPSTimestamp()
Gets the last valid GPS timestamp |
double |
getLastIgnitionHours()
Gets the last ignition hours received. |
long |
getLastIgnitionOffTime()
Gets the last ignition off time received |
double |
getLastIgnitionOnHours()
Gets the ignition hours at the last ignition-on. |
long |
getLastIgnitionOnTime()
Gets the last ignition on time received |
long |
getLastInputState()
Gets the bit mask of the last digital input received see also EventData.getInputMask() |
boolean |
getLastInputState(int bit)
Gets the specified bit state of the last digital input received |
boolean |
getLastMalfunctionLamp()
Gets the last Malfuntion Indicator Lamp (MIL) state |
int |
getLastNotifyCode()
Gets the Last Notification Status-Code for this Device |
EventData |
getLastNotifyEvent()
Gets the EventData record for the last notification |
java.lang.String |
getLastNotifyRule()
Gets the Rule-ID which triggered the Last Notification for this Device |
long |
getLastNotifyTime()
Gets the Last Notification time for this Device (in Unix Epoch time format) |
double |
getLastOdometerKM()
Gets the last odometer value |
double |
getLastOilLevel()
Gets the last oil level recieved |
long |
getLastOutputState()
Gets the bit mask of the last digital output received see also EventData.getOutputMask() |
boolean |
getLastOutputState(int bit)
Gets the specified bit state of the last digital output received |
long |
getLastPingTime()
Gets the time of the last command sent to the device |
long |
getLastServiceDayNumber()
Gets the day of the last service |
long |
getLastServiceTime()
Gets the last service time |
org.opengts.cellid.CellTower |
getLastServingCellTower()
Gets the last received serving cell-tower information |
long |
getLastStartTime()
Gets the last Start time |
EventData |
getLastStopEvent()
Gets the last Stop event |
long |
getLastStopTime()
Gets the last stopped time received. |
java.lang.String |
getLastSubdivision()
Gets the last valid subdivision/state |
java.lang.String |
getLastTcpSessionID()
Gets the last TCP session ID |
long |
getLastTotalConnectTime()
Gets the last UDP/TCP connection time |
java.lang.String |
getLastValidAddress()
Returns the last valid street address, based on the last know location (not currently supported) |
double |
getLastValidHeading()
Gets the last valid heading |
double |
getLastValidLatitude()
Gets the last known valid latitude for this Device |
GeoPoint |
getLastValidLocation()
Gets the last known valid GeoPoint for this Device |
GeoPoint |
getLastValidLocation(boolean tryLastEvent)
Gets the last known valid GeoPoint for this Device |
double |
getLastValidLongitude()
Gets the last known valid longitude for this Device |
double |
getLastValidSpeedKPH()
Gets the last valid speed |
java.lang.String |
getLastVehicleID()
Gets the previous value for the VIN. |
EventData[] |
getLatestEvents(long limit,
boolean validGPS)
Gets an array of EventData records |
long |
getLicenseExpire()
Gets the license/registration expiration date as a DayNumber value |
java.lang.String |
getLicensePlate()
Gets the Vehicle License Plate |
java.lang.String |
getLinkDescription()
Gets the Link-Description for this Device |
java.lang.String |
getLinkURL()
Gets the Link-URL for this Device |
int |
getListenPortCurrent()
Gets the last known listen port used by the Device |
java.lang.String |
getMaintDescriptionKM(int ndx)
Gets the maintenance descrption for the specified index |
java.lang.String |
getMaintDescriptionKM0()
Gets the maintenance descrption for index #0 |
java.lang.String |
getMaintDescriptionKM1()
Gets the maintenance descrption for index #1 |
double |
getMaintEngHoursHR(int ndx)
Gets the Maintenance Engine Hours for the specified index |
double |
getMaintEngHoursHR0()
Gets the maintenance engine-hours elapsed for index #0 |
double |
getMaintIntervalHR(int ndx)
Gets the maintenance engine-hours interval for the specified index |
double |
getMaintIntervalHR0()
Gets the maintenance engine-hours interval for index #0 |
double |
getMaintIntervalKM(int ndx)
Gets the last maintenance interval for the specified index |
double |
getMaintIntervalKM0()
Gets the maintenance interval for index #0 |
double |
getMaintIntervalKM1()
Gets the maintenance interval for index #1 |
java.lang.String |
getMaintNotes()
Gets the maintenance notes |
double |
getMaintOdometerKM(int ndx)
Gets the last maintenance odometer for the specified index |
double |
getMaintOdometerKM0()
Gets the maintenance odometer for index #0 |
double |
getMaintOdometerKM1()
Gets the maintenance odometer for index #1 |
int |
getMaintTriggeredKM()
Gets the index of the first triggered device maintenance. Returns '-1' if not defined. |
java.lang.String |
getMapLegend()
Gets the map legend (currently not used) |
int |
getMaxAllowedEvents()
OpenDMTP: Gets the maximum allowed OpenDMTP events |
static int |
getMaximumNotifyEmailLength()
Gets the maximum Notify Email length |
static double |
GetMaximumOdometerKM()
Get configured maximum allowed odometer value |
static double |
GetMaximumRuntimeHours()
Get configured maximum allowed engine-hours value |
double |
getMaxOdometerKM()
Gets the maximum allowed odometer value |
int |
getMaxPassengers()
Gets the maximum number of passengers |
int |
getMaxPingCount()
Gets the maximum number of commands that can be sent to the device |
double |
getMaxRuntimeHours()
Gets the maximum allowed engine-hours value |
double |
getMetersToLastValidLocation(GeoPoint gp)
Calculates and returns the number of meters from the last valid GPS location to the specified GeoPoint. |
static org.opengts.cellid.MobileLocationProvider |
getMobileLocationProvider()
Gets the MobileLocationProvider |
java.lang.String |
getModemID()
Extracts the Mobile-ID from the IMEI# or Unique-ID This method relies on the unique-id prefix to end with "_" or "-". |
static java.util.Map<java.lang.String,Device.NearbyDevice> |
GetNearbyDeviceMap(Account account,
java.lang.String targetDevID,
boolean inclTargetID,
long startTime,
long endTime,
GeoPoint gp,
double radiusM,
boolean activeOnly,
User userAuth,
boolean sortByDist)
Return Device.NearbyDevice list of Devices near specified location |
java.util.Map<java.lang.String,Device.NearbyDevice> |
getNearbyDevices(double radiusM,
long maxAgeSec,
User userAuth)
Return Device.NearbyDevice list of Devices near this Device Active only, this device excluded from list. |
double |
getNextOdometerKM(GeoPoint geoPoint)
Calculates the next odometer value based on the specified GeoPoint |
long |
getNextServiceDayNumber()
Gets the day of the next service |
long |
getNextServiceTime()
Gets the next service time |
int |
getNotifyAction()
Gets the Notify Actions to be executed if the Notify Rule-Selector is triggered. This notify action is currently only used by default with the "RuleFactoryLite" module. |
java.lang.String |
getNotifyDescription()
Gets the Notify Description for the rule-selector specified. This notify description is currently only used by default with the "RuleFactoryLite" module. |
java.lang.String |
getNotifyEmail()
Gets the Notification Email address |
java.lang.String |
getNotifyEmail(boolean inclAccount,
boolean inclUser)
Deprecated. |
java.lang.String |
getNotifyEmail(boolean inclAccount,
boolean inclUser,
boolean inclGroup)
Returns a String containing all email address that should be notified for this Device |
int |
getNotifyPriority()
(OBSOLETE) Gets the notification priority. The method is obsolete and should not be used. |
java.lang.String |
getNotifySelector()
Gets the Rule Selector to be evaluated by the installed RuleFactory. This rule-selector is currently only used by default with the "RuleFactoryLite" module. |
java.lang.String |
getNotifySubject()
Gets the Email Subject for the triggered notification email . This email subject is currently only used by default with the "RuleFactoryLite" module. |
java.lang.String |
getNotifyText()
Gets the Email Body/Text for the triggered notification email . This email body/text is currently only used by default with the "RuleFactoryLite" module. |
boolean |
getNotifyUseWrapper()
(OBSOLETE) Gets the configuration state indicating whether the email wrapper from the "private.xml" file should be used. The method is obsolete and should not be used. |
double |
getOdometerOffsetKM()
Gets the displayed odometer offset in kilometers. |
GeoPoint |
getOriginalLastValidGeoPoint()
Get Original last valid GeoPoint |
java.util.Set<java.lang.String> |
getOtherChangedFieldNames()
Returns the set of fields to update (may be null) |
java.lang.String |
getParkedAddress()
Gets the parked address, if parked |
double |
getParkedLatitude()
Gets the Parked Latitude |
GeoPoint |
getParkedLocation()
Gets the Parked GeoPoint |
double |
getParkedLongitude()
Gets the Parked Longitude |
double |
getParkedMaxSpeedKPH()
Gets the parked maximum speed km/h |
double |
getParkedRadius()
Gets the parked radius, in meters |
java.lang.String |
getPendingCommand()
|
java.lang.String |
getPendingMessage()
Gets the pending message for this device |
java.lang.String |
getPendingMessageACK()
Gets the pending message acknowledgement for this device |
java.lang.String |
getPendingPingCommand()
Gets the currently pending commands which should be sent to the device |
static int |
getPeriodicMaintEngHoursCount()
Gets the number of supported maintenance engine-hour fields |
static int |
getPeriodicMaintOdometerCount()
Gets the number of maintenance fields to support (current maximum value is 2) |
java.lang.String |
getPingCommandURI()
(NOT FULLY IMPLEMENTED) Gets the Ping command URI/URL |
static PingDispatcher |
getPingDispatcher()
Gets the PingDispatcher |
double |
getPlanDistanceKM()
Gets the assigned "Plan Distance" for this device, in kilometers |
GeoBounds |
getProximityBoundingBox(long asOfTime)
Gets the proximity bounding box. |
java.lang.String |
getProximityGroupID()
Gets the nearby proximity Group ID |
long |
getProximityMaximumAge()
Gets the nearby proximity location maximum age (in seconds) |
double |
getProximityRadius()
Gets the nearby proximity radius, in meters |
java.lang.String |
getPushpinID()
Gets the defined pushpin-id, or blank if no pushpin-id is defined |
EventData[] |
getRangeEvents(long timeStart,
long timeEnd,
boolean validGPS,
EventData.LimitType limitType,
long limit)
Gets an array of events for the specified range and attributes |
EventData[] |
getRangeEvents(long timeStart,
long timeEnd,
int[] statusCodes,
boolean validGPS,
EventData.LimitType limitType,
long limit)
Gets an array of events for the specified range and attributes |
java.lang.String |
getReminderInterval()
Gets the maintenance reminder interval |
java.lang.String |
getReminderMessage()
Gets the maintenance reminder message |
long |
getReminderTime()
Gets the maintenance reminder time |
int |
getReminderType()
Gets the maintenance reminder type (currently always returns '0') |
static Device.ReminderType |
getReminderType(Device d)
Returns the defined ReminderType for the specified device. |
int |
getRemotePortCurrent()
Gets the last known remote port used by the Device |
long |
getResetTime()
Gets the reset time of this Device (in Unix Epoch time format) |
static RuleFactory |
getRuleFactory()
Gets the RuleFactory |
static RuleFactory |
getRuleFactory(boolean checkRuntime)
Gets the RuleFactory |
EventData[] |
getSavedRangeEvents()
Gets the saved list of cached events |
static boolean |
GetSaveEventDriverID()
Returns true if configured to save the EventData "driverID" into the Device record |
java.lang.String |
getSerialNumber()
Gets the assigned device serial number |
static SessionStatsFactory |
getSessionStatsFactory()
Gets the SessionStatsFactory |
java.lang.String |
getSimID()
Gets the SIM-ID |
java.lang.String |
getSimPhoneNumber()
Gets the SIM phone number |
static boolean |
GetSimulateEngineHours(Device dev)
Get configured state of estimating engine hours based on ignition state |
java.lang.String |
getSmsEmail()
Gets the SMS email address for this device. Used for sending commands to the device using email-to-SMS. |
double |
getSpeedLimitKPH()
Gets the assigned speed limit for this device, in km/h |
int[] |
getStartStopStatusCodes()
Returns the start/stop status codes defined in the Device record |
boolean |
getStartStopSupported()
Gets the "Start/Stop StatusCode supported" config |
StatusCode |
getStatusCode(int code)
Gets the StatusCode instance for the specified code |
long |
getStatusCodeState()
Gets the bit mask of the StatusCode on/off state |
boolean |
getStatusCodeStateBit(int bit)
Gets the StatusCode state for the specified bit |
java.util.Map<java.lang.String,java.lang.String> |
getSupportedCommands(BasicPrivateLabel privLabel,
User user,
java.lang.String type)
Return a list of supported commands |
int |
getSupportedEncodings()
OpenDMTP: Gets the supported OpenDMTP encodings |
boolean |
getSupportsDMTP()
OpenDMTP: Returns true if this device supports the OpenDMTP protocol |
static java.lang.String |
getTableDescription(java.util.Locale loc)
|
java.lang.String |
getThermalProfile()
Gets the temperature profile for this device |
static java.lang.String[] |
GetTitles(java.util.Locale loc)
|
int |
getTotalMaxConn()
OpenDMTP: Gets the maximum total connections allowed per interval Note: The effective maximum value for this field is defined by the following: (org.opendmtp.server.base.ValidateConnections.BITS_PER_MINUTE_MASK * this.getUnitLimitIntervalMinutes()) |
int |
getTotalMaxConnPerMin()
OpenDMTP: Gets the maximum total connections allowed per minute Note: The effective maximum value for this field is defined by the constant: "org.opendmtp.server.base.ValidateConnections.BITS_PER_MINUTE_MASK" |
int |
getTotalPingCount()
Gets the total number of commands sent to the device, since last reset |
DTProfileMask |
getTotalProfileMask()
OpenDMTP: Gets the total (UDP/TCP) connection profile mask |
java.lang.String |
getTransportID()
Gets the Transport-ID for this Device (if any) |
java.lang.String |
getUniqueID()
Gets the Unique-ID for this Device |
int |
getUnitLimitInterval()
OpenDMTP: Gets the OpenDMTP unit limit interval |
java.lang.String |
getVehicleID()
Gets the Vehicle Identification Number (VIN) |
java.lang.String |
getVehicleMake()
Gets the vehicle make |
java.lang.String |
getVehicleModel()
Gets the vehicle model |
int |
getVehicleYear()
Gets the vehicle year |
WorkHours |
getWorkHours(WorkHours dft)
Gets a WorkHours instance, based on the HoursOfOperation of this Device |
java.lang.String |
getWorkOrderID()
Gets the Work Order ID |
java.lang.String[] |
getWorkOrderIDs()
Gets the Work Order IDs as an array |
boolean |
hasActiveCorridor()
Returns true if this device has an active corridor |
static boolean |
hasCellTowerGetLocation()
Returns true if a MobileLocationProvider is defined |
boolean |
hasChangedFieldNames()
Returns true if the changed field set has been initialized |
boolean |
hasCurrentJob()
Returns true if there is a current job defined |
boolean |
hasDataKey()
Returns true if this device defines a data-key |
boolean |
hasDcsCommandHost()
Returns true if this device defines a custom command host. |
boolean |
hasDcsPropertiesID()
Returns true if this device has a non-default DCS Properties ID |
boolean |
hasDisplayColor()
Returns true if this Device has a specific defined display color |
boolean |
hasDriverID()
Returns true if a driver-id is defined for this Device |
boolean |
hasDriverStatus()
Returns true if a driver-status is defined for this Device |
static boolean |
hasENRE()
Returns true if the defined RuleFactory is the ENRE |
static boolean |
hasEntityManager()
Returns true if an EntityManager has been defined |
boolean |
hasEquipmentStatus()
Returns true if an equipment-status is defined for this Device |
boolean |
hasFixedLocation()
Returns true if this device supports fixed locations |
static boolean |
hasFuelManager()
Returns true if a FuelManager has been defined |
boolean |
hasFuelTankProfile()
Returns true if a Fuel tank profile is defined |
boolean |
hasHoursOfOperation()
Returns true if this device has a defined HoursOfOperation (ie. |
boolean |
hasJobNumber()
Returns true if Job number is defined |
boolean |
hasLastTcpSessionID()
Returns true if this device has an assigned TCP session-id |
boolean |
hasLastValidLocation()
Returns true if this device has a last known valid GeoPoint |
boolean |
hasLink()
Returns true if this Device record defines a non-blank Link-URL value |
boolean |
hasPendingCommand()
|
boolean |
hasPendingMessage()
Returns true if this device has a pending message |
boolean |
hasPendingPingCommand()
Returns true if this device contains any pending commands |
static boolean |
hasPingDispatcher()
Returns true if a PingDispatcher has been defined |
boolean |
hasPushpinID()
Returns true if this Device has a specific defined pushpin-id |
static boolean |
hasRuleFactory()
Returns true if a RuleFactory is defined |
static boolean |
hasSessionStatsFactory()
Returns true if a SessionStatsFactory has been defined |
boolean |
hasVehicleID()
Returns true if the Vehicle Identification Number (VIN) is defined |
boolean |
hasVinChanged()
Returns true if the VIN has changed |
boolean |
incrementPingCount(long pingTime,
boolean reload,
boolean update)
Increments the command count for this device |
static void |
initEventsPerSecond()
|
boolean |
insertEventData(EventData evdb)
Insert event into EventData table |
void |
insertSessionStatistic(long startTime,
java.lang.String ipAddr,
boolean isDuplex,
long bytesRead,
long bytesWritten,
long evtsRecv)
Insert connection session statistics into the SessionStats table |
static int |
invalidSpeedAction()
|
static double |
invalidSpeedMaximumKPH()
|
boolean |
isAckStatusCode(int statusCode)
Returns true if the device is expecting an ACK and the specified status code matched the expected ACK status code. |
boolean |
isBorderCrossing()
Returns true if Border-Crossing is enabled |
boolean |
isDriverID(java.lang.String drvID)
Returns true if the specified driver-id matches the current driver-id. |
static boolean |
isEntityAttached(java.lang.String accountID,
java.lang.String deviceID,
java.lang.String entityID,
EntityManager.EntityType etype)
Returns true if the specified Entity is attached to the specified Device ID |
static boolean |
isEntityAttached(java.lang.String accountID,
java.lang.String deviceID,
java.lang.String entityID,
int etype)
Returns true if the specified Entity is attached to the specified Device ID |
boolean |
isExpectingCommandAck()
Returns true if an ACK is expected from the device |
boolean |
isExpired()
Returns true if this Device has expired |
boolean |
isHoursOfOperation(DateTime dt,
java.util.TimeZone tz)
Returns true if the specified time is within the HoursOfOperation. |
boolean |
isHoursOfOperation(long ts)
Returns true if the specified time is within the HoursOfOperation relative to the Account timezone. |
boolean |
isIgnitionOff(int code)
Returns true if the specified status code represents an Ignition-Off for this device |
boolean |
isIgnitionOn(int code)
Returns true if the specified status code represents an Ignition-On for this device |
boolean |
isImplicitJobDepart(GeoPoint gp)
Returns true if the specified location would represent a job depart |
boolean |
isInsuranceExpired(DayNumber asof)
Returns true if the insurance is expired as-of the specified date |
boolean |
isInsuranceExpired(long asofDay)
Returns true if the insurance is expired as-of the specified date |
boolean |
isLicenseExpired(DayNumber asof)
Returns true if the license/registration is expired as-of the specified date |
boolean |
isLicenseExpired(long asofDay)
Returns true if the license/registration is expired as-of the specified date |
boolean |
isMaintenanceDueHR(int ndx,
double deltaHR)
Returns true if the maintenance engine hours for the specified index is due |
boolean |
isMaintenanceDueKM(int ndx,
double deltaKM)
Returns true if the maintenance interval is due for the specified index and specified number of delta kilometers. |
boolean |
isNearLastValidLocation(GeoPoint gp,
double meters)
Returns true if the last know location of this device is is within the specified number of meters to the specified GeoPoint. |
boolean |
isNearLastValidLocation(GeoPoint gp,
double meters,
long maxFixAge)
Returns true if the last know location of this device is is within the specified number of meters to the specified GeoPoint. |
boolean |
isOldEventTimestamp(long timestamp)
Returns true if the specified timestamp is prior to the last received event timestamp |
boolean |
isParked()
Returns true if this Device is parked |
boolean |
isParkedViolation(GeoPoint gp,
double speedKPH)
Returns true if the specified GeoPoint location indicates a "Park" violation |
boolean |
isPingSupported(BasicPrivateLabel privLabel,
User user)
Returns true if sending commands is supported for the specified private-label and user |
boolean |
isReminderExpired(java.util.TimeZone tz)
Returns true if the reminder time has expired |
boolean |
isReminderExpired(java.util.TimeZone tz,
long nowTime)
Returns true if the maintenance reminder has expired |
boolean |
isStopped()
Returns true if the device is currently stopped, based on the start/stop configuration calculated as each event arrives. |
boolean |
isValidFixedLocation()
Returns true if this device defines a valid fixed location |
boolean |
isValidIPAddress(java.lang.String ipAddr)
Returns true if the specified IP address matches the IP address/mask assigned to this Device. |
static Device |
loadDeviceByName(Account account,
java.lang.String devID)
This method is called by "Transport.loadDeviceByTransportID(...)" to load a Device within a Device Communication Server, based on the Account and Device IDs. |
static Device |
loadDeviceBySimPhoneNumber(java.lang.String simPhone)
This method is used to load a Device record based on the SIM phone number. |
static Device |
loadDeviceByUniqueID(java.lang.String uniqId)
This method is called by "Transport.loadDeviceByUniqueID(String)" to load a Device within a Device Communication Server, based on a Unique-ID. |
void |
log_EventData(int logLevel,
EventData ev)
Prints the event information to the log file |
static void |
main(java.lang.String[] args)
Main entry point for Device command-line tools |
static double |
MinMax(double val,
double min,
double max)
|
static long |
MinMax(long val,
long min,
long max)
|
static int |
pastEventDateAction()
Gets the action to perform when a past event date is detected |
static long |
pastEventDateMaximumSec()
Gets the maximum number of seconds an event is allowed to be into the past |
boolean |
postCommandHandling(DCServerConfig.Command command,
java.lang.String cmdStr,
boolean update)
Post command handling (called by "DCServerConfig.Command.setDeviceCommandAttributes" after a successful command) |
boolean |
removeWorkOrderID(java.lang.String woid)
Removes the specified Work Order ID from the current list |
void |
reprocessEventDataRecords(long timeStart,
long timeEnd,
Device.EventDataHandler edh)
Reprocesses a range of EventData reocrds |
void |
resetMaintEngHoursHR(int ndx)
Resets the maintenance engine hours for the specified index |
void |
resetMaintEngHoursHR0()
Resets the maintenance engine-hours for index #0 |
void |
resetMaintOdometerKM(int ndx)
Resets the last maintenance odometer for the specified index |
void |
resetMaintOdometerKM0()
Resets the maintenance odometer for index #0 |
void |
resetMaintOdometerKM1()
Resets the maintenance odometer for index #1 |
void |
resetReminder()
Reset the reminder time (to current time) |
void |
resetReminder(long currentTime)
Reset the reminder time |
void |
save()
Save this Device to db storage |
boolean |
saveOriginalLastValidGeoPoint()
Save last valid GeoPoint |
void |
saveParkedLocation()
Saves the set parked location back to the Device table |
boolean |
sendDeviceCommand(java.lang.String cmdType,
java.lang.String cmdName,
java.lang.String[] cmdArgs)
Sends the specified command to this device |
void |
setActiveCorridor(java.lang.String v)
Sets the active corridor for this device |
void |
setAllowNotify(boolean v)
Sets the "Allow Notification" state for this Device |
static void |
SetAllowSlowReverseGeocoding(boolean allow)
Enabled/Disabled slow reverse-geocoding (default is to allow) |
void |
setAssignedUserID(java.lang.String v)
Sets the assigned User-ID |
void |
setBorderCrossing(Device.BorderCrossingState bcs)
Sets the Border-Crossing enabled state |
void |
setBorderCrossing(int flags)
Sets the Border-Crossing enabled state |
static void |
setCellTowerGetLocation(org.opengts.cellid.MobileLocationProvider ctgl)
Sets the MobileLocationProvider |
void |
setCodeVersion(java.lang.String v)
Sets the code/firmware version of this Device |
void |
setCommandStateBit(int bit,
boolean state)
Sets the state for the specified bit from the command state mask |
void |
setCommandStateMask(long v)
Sets the command state mask as set by commands sent to the device |
void |
setCreationDefaultValues()
Sets the record creation default values |
java.lang.String |
setCustomAttribute(java.lang.String key,
java.lang.String value)
Sets a specific custom attribute value |
void |
setCustomAttributes(java.lang.String v)
Sets the custom attributes for this device |
void |
setDataKey(java.lang.String v)
Gets the data key (PIN) for this device |
void |
setDcsCommandHost(java.lang.String v)
Sets the DCS Command Host assigned to this device (ie. |
void |
setDcsConfigMask(long v)
Sets the DCS configuration mask (usage defined by specific DCS) |
void |
setDcsConfigString(java.lang.String v)
Sets the DCS configuration String (usage defined by specific DCS) |
void |
setDcsPropertiesID(java.lang.String v)
Sets the DCS Properties ID assigned to this device (DCS Property ID) Used by some DCS modules to select specific device configurations |
void |
setDeviceCode(java.lang.String v)
Sets the Device-Code (also called Server-ID) for this Device |
void |
setDeviceType(java.lang.String v)
Sets the Device-Type for this Device |
void |
setDisplayColor(ColorTools.RGB v)
Sets the display color |
void |
setDisplayColor(java.lang.String v)
Sets the display color |
void |
setDriverID(java.lang.String v)
Sets the Driver-ID |
void |
setDriverStatus(long v)
Sets the driver status |
void |
setDuplexMaxConn(int v)
OpenDMTP: Sets the maximum Duplex/TCP connections per Interval |
void |
setDuplexMaxConnPerMin(int v)
OpenDMTP: Sets the maximum Duplex/TCP connections per Minute |
void |
setDuplexProfileMask(DTProfileMask v)
OpenDMTP: Sets the Duplex/TCP connection profile mask |
void |
setELogEnabled(boolean v)
Sets the "ELog/HOS Enabled" state for this Device |
void |
setEngineHoursOffset(double v)
Sets the displayed engine-hours offset |
static void |
setEntityManager(EntityManager ef)
Sets the EntityManager |
void |
setEquipmentStatus(java.lang.String v)
Sets the equipment status |
void |
setEquipmentType(java.lang.String v)
Sets the equipment type |
void |
setExpectAck(boolean v)
Sets the expected ACK state |
void |
setExpectAckCode(int v)
Sets the expected ACK status code, or '0' if any code should match |
void |
setExpirationTime(long v)
Sets the expiration time of this Device (in Unix Epoch time format) |
void |
setFeatureSet(java.lang.String v)
Sets the feature set of this Device |
void |
setFixedAddress(java.lang.String v)
Sets the address for the fixed location for this device |
void |
setFixedContactPhone(java.lang.String v)
Sets the phone number for the fixed location for this device |
void |
setFixedLatitude(double v)
Sets the fixed latitude for this device |
void |
setFixedLongitude(double v)
Sets the fixed longitude for this device |
void |
setFixedServiceTime(long v)
Sets the last time this fixed location was serviced |
void |
setFuelCapacity(double v)
Sets the tank Fuel Capacity, in Liters |
void |
setFuelCostPerLiter(double v)
Sets the Fuel cost per Liter |
void |
setFuelEconomy(double v)
Sets the approximate Fuel Economy, in Km/Liter |
static void |
setFuelManager(FuelManager fm)
Sets the FuelManager |
void |
setFuelRatePerHour(double v)
Sets the approximate Fuel Consumption Rate in Litres/Hour |
void |
setFuelTankProfile(java.lang.String v)
Sets the Fuel tank profile |
void |
setGroupID(java.lang.String v)
Sets the user informational Group ID (user informational only, not used by DeviceGroup) (currently used in various ReportLayout subclasses) |
void |
setHoursOfOperation(RTProperties rtp)
Sets the HoursOfOperation for this device |
void |
setHoursOfOperation(java.lang.String v)
Sets the HoursOfOperation for this device |
void |
setHoursOfOperation(WorkHours wh)
Sets the HoursOfOperation for this device |
void |
setIgnitionIndex(int v)
Sets the bit index for the inputMask ignition state indicator. |
void |
setImeiNumber(java.lang.String v)
Gets the IMEI# (or ESN) for this device. |
void |
setInstallTime(long v)
Sets the install time of this Device (in Unix Epoch time format) |
void |
setInsuranceExpire(DayNumber dn)
Sets the insurance expiration date as a DayNumber instance |
void |
setInsuranceExpire(int year,
int month1,
int day)
Sets the insurance expiration date |
void |
setInsuranceExpire(long v)
Sets the insurance expiration date as a DayNumber value |
void |
setIpAddressCurrent(DTIPAddress v)
Sets the last known IP address used by the Device |
void |
setIpAddressCurrent(java.lang.String v)
Sets the last known IP address used by the Device |
void |
setIpAddressLocal(DTIPAddress v)
Sets the local IP address to which this device sent its latest packet |
void |
setIpAddressLocal(java.lang.String v)
Sets the local IP address to which this device sent its latest packet |
void |
setIpAddressValid(DTIPAddrList v)
Sets the valid assigned IP address/mask for this Device (used for validating incoming IP addresses used by this Device) |
void |
setIpAddressValid(java.lang.String v)
Sets the valid assigned IP address/mask for this Device (used for validating incoming IP addresses used by this Device) |
void |
setJobLatitude(double v)
Sets the Job latitude |
void |
setJobLocation(GeoPoint jobLoc,
double jobRadM)
Sets the Job location |
void |
setJobLongitude(double v)
Sets the Job longitude |
void |
setJobNumber(java.lang.String v)
Sets the Job number |
void |
setJobRadius(double v)
Sets the Job radius, in meters |
void |
setLastAckCommand(java.lang.String v)
Sets the last ACK command sent to the device |
void |
setLastAckResponse(java.lang.String v)
Sets the last ACK response |
void |
setLastAckTime(long v)
Sets the last ACK time (if supported) |
void |
setLastBatteryLevel(double v)
Sets the last battery level recieved |
void |
setLastBorderCrossTime(long v)
Sets the last calculated Border-Crossing time (Unix Epoch format) |
void |
setLastCellServingInfo(java.lang.String v)
Sets the last received serving cell-tower information |
void |
setLastConnectTime(long v,
boolean isDuplex)
Sets the last UDP/TCP connection time |
void |
setLastDataPushTime(long v)
Sets the last data push time |
void |
setLastDistanceKM(double distKM)
Sets the last distance value |
void |
setLastDuplexConnectTime(long v)
Sets the last Duplex/TCP connection time |
void |
setLastELogState(DTELogState v)
Sets the last HOS pata push time |
void |
setLastEngineHours(double v)
Sets the last engine-hours received |
void |
setLastEngineOffTime(long v)
Sets the last engine off time received |
void |
setLastEngineOnHours(double v)
Sets the engine-hours at the last engine-on time |
void |
setLastEngineOnTime(long v)
Sets the last engine on time received |
void |
setLastEventCreateMillis(long v)
Sets the Last Event Creation time, in milliseconds |
void |
setLastEventsPerSecond(double v)
Sets the last estimated events-per-second |
void |
setLastEventsPerSecondMS(long v)
Sets the last event-per-second timestamp (milliseconds) |
void |
setLastEventTimestamp(long v)
Sets the last event timestamp |
void |
setLastFaultCode(java.lang.String v)
Sets the last fault codes |
void |
setLastFuelLevel(double v)
Sets the last fuel level recieved |
void |
setLastFuelTotal(double v)
Sets the last fuel total recieved |
void |
setLastGPSTimestamp(long v)
Sets the last valid GPS timestamp |
void |
setLastIgnitionHours(double v)
Sets the last ignition hours received. |
void |
setLastIgnitionOffTime(long v)
Sets the last ignition off time received |
void |
setLastIgnitionOnHours(double v)
Sets the ignition hours at the last ignition-on. |
void |
setLastIgnitionOnTime(long v)
Sets the last ignition on time received |
void |
setLastInputState(long v)
Sets the bit mask of the last digital input received |
void |
setLastMalfunctionLamp(boolean v)
Sets the last Malfuntion Indicator Lamp (MIL) state |
void |
setLastNotifyCode(int v)
Sets the Last Notification Status-Code for this Device |
void |
setLastNotifyEvent(EventData event,
java.lang.String ruleID,
boolean update)
Sets the event information for the last rule-triggered notification |
void |
setLastNotifyEvent(long timestamp,
java.lang.String ruleID,
boolean update)
Sets the event information for the last rule-triggered notification |
void |
setLastNotifyRule(java.lang.String v)
Sets the Rule-ID which triggered the Last Notification for this Device |
void |
setLastNotifyTime(long v)
Sets the Last Notification time for this Device (in Unix Epoch time format) |
void |
setLastOdometerKM(double odomKM)
Sets the last odometer value |
void |
setLastOilLevel(double v)
Sets the last oil level recieved |
void |
setLastOutputState(long v)
Sets the bit mask of the last digital output received |
void |
setLastPingTime(long v)
Sets the time of the last command sent to the device |
void |
setLastServiceTime(long v)
Sets the last service time |
void |
setLastServingCellTower(org.opengts.cellid.CellTower sct)
Sets the last received serving cell-tower information |
void |
setLastStartTime(long v)
Sets the last Start time |
void |
setLastStopTime(long v)
Sets the last stopped time received. |
void |
setLastSubdivision(java.lang.String v)
Sets the last valid subdivision/state |
void |
setLastTcpSessionID(java.lang.String v)
Sets the last TCP session ID |
void |
setLastTotalConnectTime(long v)
Sets the last UDP/TCP connection time |
void |
setLastValidHeading(double v)
Sets the last valid heading |
void |
setLastValidLatitude(double v)
Gets the last known valid latitude for this Device |
void |
setLastValidLongitude(double v)
Sets the last known valid longitude for this Device |
void |
setLastValidSpeedKPH(double v)
Sets the last valid speed |
void |
setLicenseExpire(DayNumber dn)
Sets the license/registration expiration date as a DayNumber instance |
void |
setLicenseExpire(int year,
int month1,
int day)
Sets the license/registration expiration date |
void |
setLicenseExpire(long v)
Sets the license/registration expiration date as a DayNumber value |
void |
setLicensePlate(java.lang.String v)
Sets the Vehicle License Plate |
void |
setLinkDescription(java.lang.String v)
Sets the Link-Description for this Device |
void |
setLinkURL(java.lang.String v)
Sets the Link-URL for this Device |
void |
setListenPortCurrent(int v)
Sets the last known listen port used by the Device |
static void |
SetLogEventDataInsertion(int logLevel)
|
void |
setMaintEngHoursHR0(double v)
Sets the maintenance engine-hours elapsed for index #0 |
void |
setMaintIntervalHR0(double v)
Sets the maintenance engine-hours interval for index #0 |
void |
setMaintIntervalKM0(double v)
Sets the maintenance interval for index #0 |
void |
setMaintIntervalKM1(double v)
Sets the maintenance interval for index #1 |
void |
setMaintNotes(java.lang.String v)
Sets the maintenance notes |
void |
setMaintOdometerKM0(double v)
Sets the maintenance odometer for index #0 |
void |
setMaintOdometerKM1(double v)
Sets the maintenance odometer for index #1 |
void |
setMaintTriggeredKM(int ndx)
Sets the index of the first triggered device maintenance. (Used for Rule '$MAINTKM' trigger state caching) |
void |
setMapLegend(java.lang.String legend)
Sets the map legend (currently not used) |
void |
setMaxAllowedEvents(int v)
OpenDMTP: Sets the maximum allowed OpenDMTP events |
void |
setMaxPassengers(int v)
Sets the maximum number of passengers |
void |
setMaxPingCount(int v)
Sets the maximum number of commands that can be sent to the device |
void |
setModemID(java.lang.String mid)
Sets the preextracted Mobile-ID for this device |
void |
setNextServiceTime(long v)
Sets the next service time |
void |
setNotifyAction(int v)
Sets the Notify Actions to be executed if the Notify Rule-Selector is triggered. This notify action is currently only used by default with the "RuleFactoryLite" module. |
void |
setNotifyDescription(java.lang.String v)
Sets the Notify Description for the rule-selector specified. This notify description is currently only used by default with the "RuleFactoryLite" module. |
void |
setNotifyEmail(java.lang.String v)
Sets the Notification Email address |
void |
setNotifyPriority(int v)
(OBSOLETE) Sets the notification priority. The method is obsolete and should not be used. |
void |
setNotifySelector(java.lang.String v)
Sets the Rule Selector to be evaluated by the installed RuleFactory. This rule-selector is currently only used by default with the "RuleFactoryLite" module. |
void |
setNotifySubject(java.lang.String v)
Sets the Email Subject for the triggered notification email . This email subject is currently only used by default with the "RuleFactoryLite" module. |
void |
setNotifyText(java.lang.String v)
Sets the Email Body/Text for the triggered notification email . This email body/text is currently only used by default with the "RuleFactoryLite" module. |
void |
setNotifyUseWrapper(boolean v)
(OBSOLETE) Sets the configuration state indicating whether the email wrapper from the "private.xml" file should be used. The method is obsolete and should not be used. |
void |
setOdometerOffsetKM(double v)
Sets the displayed odometer offset in kilometers. |
void |
setParkedAddress(java.lang.String v)
Sets the parked address, if parked |
void |
setParkedLatitude(double v)
Sets the Parked Latitude |
void |
setParkedLocation(GeoPoint parkLoc,
double parkRadM,
double parkSpeed,
boolean update)
Sets the parked location state |
void |
setParkedLongitude(double v)
Sets the Parked Longitude |
void |
setParkedMaxSpeedKPH(double v)
Sets the parked maximum speed km/h |
void |
setParkedRadius(double v)
Sets the parked radius, in meters |
void |
setPendingCommand(java.lang.String v)
|
void |
setPendingMessage(java.lang.String v)
Sets the pending message for this device |
void |
setPendingMessageACK(java.lang.String v)
Sets the pending message acknowledgement for this device |
void |
setPendingPingCommand(java.lang.String v)
Sets the currently pending commands which should be sent to the device |
void |
setPingCommandURI(java.lang.String v)
(NOT FULLY IMPLEMENTED) Sets the Ping command URI/URL |
static void |
setPingDispatcher(PingDispatcher pd)
Sets the PingDispatcher |
void |
setPlanDistanceKM(double v)
Sets the assigned "Plan Distance" for this device, in kilometers |
void |
setProximityGroupID(java.lang.String v)
Sets the nearby proximity Group ID |
void |
setProximityMaximumAge(long v)
Sets the nearby proximity location maximum age (in seconds) |
void |
setProximityRadius(double v)
Sets the nearby proximity radius, in meters |
void |
setPushpinID(java.lang.String v)
Sets the defined pushpin-id, or blank if no pushpin-id is defined |
void |
setReminderInterval(java.lang.String v)
Sets the maintenance reminder interval |
void |
setReminderMessage(java.lang.String v)
Sets the maintenance reminder message |
void |
setReminderTime(long v)
Sets the maintenance reminder time |
void |
setReminderType(Device.ReminderType r)
Sets the maintenance reminder type |
void |
setReminderType(int v)
Sets the maintenance reminder type |
void |
setRemotePortCurrent(int v)
Sets the last known remote port used by the Device |
void |
setResetTime(long v)
Sets the reset time of this Device (in Unix Epoch time format) |
static void |
setRuleFactory(RuleFactory rf)
Sets the RuleFactory |
void |
setSavedRangeEvents(EventData[] events)
Sets the saved list of cached events |
void |
setSerialNumber(java.lang.String v)
Sets the assigned device serial number |
static void |
setSessionStatsFactory(SessionStatsFactory rf)
Sets the SessionStatsFactory |
void |
setSimID(java.lang.String v)
Gets the SIM-ID |
void |
setSimPhoneNumber(java.lang.String v)
Sets the SIM phone number |
void |
setSmsEmail(java.lang.String v)
Sets the SMS email address for this device. Used for sending commands to the device using email-to-SMS. |
void |
setSpeedLimitKPH(double v)
Sets the assigned speed limit for this device, in km/h |
void |
setStatusCodeState(long v)
Sets the bit mask of the StatusCode on/off state |
void |
setStatusCodeStateBit(int bit,
boolean state)
Sets the StatusCode state for the specified bit |
void |
setSupportedEncodings(int v)
OpenDMTP: Sets the supported OpenDMTP encodings |
void |
setSupportsDMTP(boolean v)
OpenDMTP: Sets the OpenDMTP protocol support state |
void |
setThermalProfile(java.lang.String v)
Sets the temperature profile for this device |
void |
setTotalMaxConn(int v)
OpenDMTP: Sets the maximum total connections allowed per interval |
void |
setTotalMaxConnPerMin(int v)
OpenDMTP: Sets the maximum total connections allowed per minute |
void |
setTotalPingCount(int v)
Sets the total number of commands sent to the device, since last reset |
void |
setTotalProfileMask(DTProfileMask v)
OpenDMTP: Sets the total (UDP/TCP) connection profile mask |
void |
setTransport(Transport xport)
Sets the Transport for this Device |
void |
setUniqueID(java.lang.String v)
Sets the Unique-ID for this Device |
void |
setUnitLimitInterval(int v)
OpenDMTP: Sets the OpenDMTP unit limit interval |
void |
setVehicleID(java.lang.String v)
Sets the Vehicle Identification Number (VIN) |
void |
setVehicleMake(java.lang.String v)
Sets the vehicle make |
void |
setVehicleModel(java.lang.String v)
Sets the vehicle model |
void |
setVehicleYear(int v)
Sets the vehicle year |
void |
setWorkOrderID(java.lang.String v)
Sets the Work Order ID |
void |
setWorkOrderIDs(java.lang.String[] W)
Sets the Work Order IDs as an array |
static boolean |
supportsActiveCorridor()
Returns true if active corridors are supported |
static boolean |
supportsAssignedUserID()
Returns true if assigned-userID is supported |
static boolean |
supportsBorderCrossing()
Returns true if this Device record supports Border-Crossing |
boolean |
supportsDataPushTime()
Returns true if DataPushTime is supported |
boolean |
supportsDMTP()
OpenDMTP: Returns true if this device supports the OpenDMTP protocol |
boolean |
supportsELogState()
Returns true if ELogState is supported |
static boolean |
supportsEventsPerSecond()
Returns true if EventsPerSecond is supported/enabled |
static boolean |
supportsFaultCodes()
Returns true if Fault Codes are supported |
static boolean |
supportsFixedLocation()
Returns true if Fixed Locations are supported |
static boolean |
supportsHoursOfOperation()
Returns true if HoursOfOperation/WorkHours is supported |
static boolean |
supportsLastEngineHours()
Returns true if LastEngineHours is supported |
static boolean |
supportsLastOdometer()
Returns true if the Device record supports the last odometer fields |
static boolean |
supportsLinkURL()
Returns true if this Device record supports the "linkURL" field |
static boolean |
supportsNotification()
Returns true if this Device record supports the "allowNotify" field |
static boolean |
supportsPendingMessage()
Returns true if PendingMessage is supported |
static boolean |
supportsPeriodicMaintenance()
Returns true if Periodic Maintenance fields are supported |
static boolean |
supportsThermalProfile()
Returns true if ThermalProfile is supported |
static java.lang.String |
TABLE_NAME()
|
java.lang.String |
toString()
Return a String representation of this Device |
void |
updateChangedEventFields()
Updates all fields specified in the internal changed field set |
void |
updateChangedEventFields(java.util.Set<java.lang.String> flds)
Updates the specified changed fields |
void |
updateChangedEventFields(java.lang.String... flds)
Updates the specified changed fields |
static boolean |
UpdateEventWithGeozoneLocation()
Get configured state obtaining lat/lon from Geozone |
void |
updateOtherChangedEventFields()
Updates all fields specified in the internal update field set |
boolean |
validateDataKey(java.lang.String pin)
Returns true if the specified key matches the "dataKey" (also call PIN) for this device |
protected void |
vinDidChange(java.lang.String oldVIN,
java.lang.String newVIN)
Callback for VIN changed |
boolean |
willExpire(long withinSec)
Returns true if this Device will expire within the specified number of seconds |
Methods inherited from class org.opengts.db.DeviceRecord |
---|
getDevice, getDeviceDescription, getDeviceID, getDeviceVIN, hasDevice, newField_deviceID, newField_deviceID, newField_deviceID, newField_deviceID, setDevice, setDeviceID |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opengts.db.DataTransport |
---|
getDescription, update, update |
Field Detail |
---|
public static boolean CACHE_STATUS_CODE_DESCRIPTIONS
public static boolean INSERT_REVERSEGEOCODE_REQUIRED
public static boolean ALLOW_USE_EMAIL_WRAPPER
public static boolean AUTO_GENERATE_NON_MOVING_EVENT
public static long MAX_STOPPED_DELTA_SEC
public static double EVENT_START_MOTION_RADIUS_M
public static boolean DEFERRED_RULE_CHECK
public static final Device[] EMPTY_ARRAY
public static final java.lang.String OPTCOLS_NotificationFieldInfo
public static final java.lang.String OPTCOLS_BorderCrossingFieldInfo
public static final java.lang.String OPTCOLS_LinkFieldInfo
public static final java.lang.String OPTCOLS_FixedLocationFieldInfo
public static final java.lang.String OPTCOLS_GeoCorridorFieldInfo
public static final java.lang.String OPTCOLS_MaintOdometerFieldInfo
public static final java.lang.String OPTCOLS_WorkOrderInfo
public static final java.lang.String OPTCOLS_DataPushInfo
public static final java.lang.String OPTCOLS_ELogHOSInfo
public static final java.lang.String OPTCOLS_AttributeInfo
public static long EPS_RANGE_SECONDS
public static long EPS_RANGE_MS
public static double EPS_WEIGHT
public static double EPS_ALPHA
public static final boolean CHECK_LAST_ODOMETER
public static boolean SIMULATE_ENGINE_HOURS
public static boolean UPDATE_EVENT_WITH_GEOZONE_LOC
public static final double MAX_DEVICE_ODOM_KM
public static final boolean SAVE_EVENT_DRIVER_ID
public static final int PAST_DATE_UNDEFINED
public static final int PAST_DATE_IGNORE
public static final int PAST_DATE_DISABLED
public static final int PAST_DATE_TRUNCATE
public static final int FUTURE_DATE_UNDEFINED
public static final int FUTURE_DATE_IGNORE
public static final int FUTURE_DATE_DISABLED
public static final int FUTURE_DATE_TRUNCATE
public static final int INVALID_SPEED_UNDEFINED
public static final int INVALID_SPEED_IGNORE
public static final int INVALID_SPEED_DISABLED
public static final int INVALID_SPEED_TRUNCATE
public static final int INVALID_SPEED_ZERO
public static final java.lang.String _TABLE_NAME
public static final java.lang.String FLD_groupID
public static final java.lang.String FLD_equipmentType
public static final java.lang.String FLD_equipmentStatus
public static final java.lang.String FLD_vehicleMake
public static final java.lang.String FLD_vehicleModel
public static final java.lang.String FLD_vehicleYear
public static final java.lang.String FLD_vehicleID
public static final java.lang.String FLD_licensePlate
public static final java.lang.String FLD_licenseExpire
public static final java.lang.String FLD_insuranceExpire
public static final java.lang.String FLD_driverID
public static final java.lang.String FLD_driverStatus
public static final java.lang.String FLD_fuelCapacity
public static final java.lang.String FLD_fuelEconomy
public static final java.lang.String FLD_fuelRatePerHour
public static final java.lang.String FLD_fuelCostPerLiter
public static final java.lang.String FLD_fuelTankProfile
public static final java.lang.String FLD_speedLimitKPH
public static final java.lang.String FLD_planDistanceKM
public static final java.lang.String FLD_installTime
public static final java.lang.String FLD_resetTime
public static final java.lang.String FLD_expirationTime
public static final java.lang.String FLD_uniqueID
public static final java.lang.String FLD_deviceCode
public static final java.lang.String FLD_deviceType
public static final java.lang.String FLD_pushpinID
public static final java.lang.String FLD_displayColor
public static final java.lang.String FLD_serialNumber
public static final java.lang.String FLD_simPhoneNumber
public static final java.lang.String FLD_simID
public static final java.lang.String FLD_smsEmail
public static final java.lang.String FLD_imeiNumber
public static final java.lang.String FLD_dataKey
public static final java.lang.String FLD_ignitionIndex
public static final java.lang.String FLD_codeVersion
public static final java.lang.String FLD_featureSet
public static final java.lang.String FLD_ipAddressValid
public static final java.lang.String FLD_lastTcpSessionID
public static final java.lang.String FLD_ipAddressLocal
public static final java.lang.String FLD_ipAddressCurrent
public static final java.lang.String FLD_remotePortCurrent
public static final java.lang.String FLD_listenPortCurrent
public static final java.lang.String FLD_pingCommandURI
public static final java.lang.String FLD_pendingPingCommand
public static final java.lang.String FLD_lastPingTime
public static final java.lang.String FLD_totalPingCount
public static final java.lang.String FLD_maxPingCount
public static final java.lang.String FLD_commandStateMask
public static final java.lang.String FLD_expectAck
public static final java.lang.String FLD_expectAckCode
public static final java.lang.String FLD_lastAckCommand
public static final java.lang.String FLD_lastAckResponse
public static final java.lang.String FLD_lastAckTime
public static final java.lang.String FLD_dcsPropertiesID
public static final java.lang.String FLD_dcsCommandHost
public static final java.lang.String FLD_dcsConfigMask
public static final java.lang.String FLD_dcsConfigString
public static final java.lang.String FLD_supportsDMTP
public static final java.lang.String FLD_supportedEncodings
public static final java.lang.String FLD_unitLimitInterval
public static final java.lang.String FLD_maxAllowedEvents
public static final java.lang.String FLD_totalProfileMask
public static final java.lang.String FLD_totalMaxConn
public static final java.lang.String FLD_totalMaxConnPerMin
public static final java.lang.String FLD_duplexProfileMask
public static final java.lang.String FLD_duplexMaxConn
public static final java.lang.String FLD_duplexMaxConnPerMin
public static final java.lang.String FLD_lastTotalConnectTime
public static final java.lang.String FLD_lastDuplexConnectTime
public static final java.lang.String FLD_lastInputState
public static final java.lang.String FLD_lastOutputState
public static final java.lang.String FLD_statusCodeState
public static final java.lang.String FLD_lastBatteryLevel
public static final java.lang.String FLD_lastFuelLevel
public static final java.lang.String FLD_lastFuelTotal
public static final java.lang.String FLD_lastOilLevel
public static final java.lang.String FLD_lastValidLatitude
public static final java.lang.String FLD_lastValidLongitude
public static final java.lang.String FLD_lastValidHeading
public static final java.lang.String FLD_lastValidSpeedKPH
public static final java.lang.String FLD_lastGPSTimestamp
public static final java.lang.String FLD_lastEventTimestamp
public static final java.lang.String FLD_lastCellServingInfo
public static final java.lang.String FLD_lastDistanceKM
public static final java.lang.String FLD_lastOdometerKM
public static final java.lang.String FLD_odometerOffsetKM
public static final java.lang.String FLD_lastEngineOnHours
public static final java.lang.String FLD_lastEngineOnTime
public static final java.lang.String FLD_lastEngineOffTime
public static final java.lang.String FLD_lastEngineHours
public static final java.lang.String FLD_engineHoursOffset
public static final java.lang.String FLD_lastIgnitionOnHours
public static final java.lang.String FLD_lastIgnitionOnTime
public static final java.lang.String FLD_lastIgnitionOffTime
public static final java.lang.String FLD_lastIgnitionHours
public static final java.lang.String FLD_lastStopTime
public static final java.lang.String FLD_lastStartTime
public static final java.lang.String FLD_lastMalfunctionLamp
public static final java.lang.String FLD_lastFaultCode
public static final java.lang.String FLD_allowNotify
public static final java.lang.String FLD_lastNotifyTime
public static final java.lang.String FLD_lastNotifyCode
public static final java.lang.String FLD_lastNotifyRule
public static final java.lang.String FLD_notifyEmail
public static final java.lang.String FLD_notifySelector
public static final java.lang.String FLD_notifyAction
public static final java.lang.String FLD_notifyDescription
public static final java.lang.String FLD_notifySubject
public static final java.lang.String FLD_notifyText
public static final java.lang.String FLD_notifyUseWrapper
public static final java.lang.String FLD_notifyPriority
public static final java.lang.String FLD_lastSubdivision
public static final java.lang.String FLD_parkedLatitude
public static final java.lang.String FLD_parkedLongitude
public static final java.lang.String FLD_parkedRadius
public static final java.lang.String FLD_parkedMaxSpeedKPH
public static final java.lang.String FLD_proximityRadius
public static final java.lang.String FLD_proximityGroupID
public static final java.lang.String FLD_proximityMaximumAge
public static final java.lang.String FLD_assignedUserID
public static final java.lang.String FLD_thermalProfile
public static final java.lang.String FLD_hoursOfOperation
public static final java.lang.String FLD_pendingMessage
public static final java.lang.String FLD_pendingMessageACK
public static final java.lang.String FLD_lastEventsPerSecond
public static final java.lang.String FLD_lastEventsPerSecondMS
public static final DBField[] NotificationFieldInfo
public static final java.lang.String FLD_borderCrossing
public static final java.lang.String FLD_lastBorderCrossTime
public static final DBField[] BorderCrossingFieldInfo
public static final java.lang.String FLD_linkURL
public static final java.lang.String FLD_linkDescription
public static final DBField[] LinkFieldInfo
public static final java.lang.String FLD_fixedLatitude
public static final java.lang.String FLD_fixedLongitude
public static final java.lang.String FLD_fixedAddress
public static final java.lang.String FLD_fixedContactPhone
public static final java.lang.String FLD_fixedServiceTime
public static final DBField[] FixedLocationFieldInfo
public static final java.lang.String FLD_activeCorridor
public static final DBField[] GeoCorridorFieldInfo
public static final java.lang.String FLD_maintIntervalKM0
public static final java.lang.String FLD_maintOdometerKM0
public static final java.lang.String FLD_maintIntervalKM1
public static final java.lang.String FLD_maintOdometerKM1
public static final java.lang.String FLD_maintIntervalHR0
public static final java.lang.String FLD_maintEngHoursHR0
public static final java.lang.String FLD_maintNotes
public static final java.lang.String FLD_reminderType
public static final java.lang.String FLD_reminderMessage
public static final java.lang.String FLD_reminderInterval
public static final java.lang.String FLD_reminderTime
public static final java.lang.String FLD_lastServiceTime
public static final java.lang.String FLD_nextServiceTime
public static final DBField[] MaintOdometerFieldInfo
public static final java.lang.String FLD_workOrderID
public static final java.lang.String FLD_jobNumber
public static final java.lang.String FLD_jobLatitude
public static final java.lang.String FLD_jobLongitude
public static final java.lang.String FLD_jobRadius
public static final DBField[] WorkOrderInfo
public static final java.lang.String FLD_lastDataPushTime
public static final java.lang.String FLD_lastEventCreateMillis
public static final DBField[] DataPushInfo
public static final java.lang.String FLD_eLogEnabled
public static final java.lang.String FLD_lastELogState
public static final DBField[] ELogHOSInfo
public static final java.lang.String FLD_maxPassengers
public static final java.lang.String FLD_customAttributes
public static final DBField[] AttributeInfo
public static WorkHours DefaultWorkHours
public static final java.lang.String[] KEY_LICENSE_PLATE
public static final java.lang.String[] KEY_DRIVER_BADGE
public static final java.lang.String[] KEY_DRIVER_LICENSE
public static final java.lang.String[] KEY_DRIVER_PHONE
Constructor Detail |
---|
public Device()
public Device(Device.Key key)
Method Detail |
---|
public static void SetLogEventDataInsertion(int logLevel)
public static long MinMax(long val, long min, long max)
public static double MinMax(double val, double min, double max)
public static void initEventsPerSecond()
public static java.lang.String[] GetTitles(java.util.Locale loc)
public static OrderedMap<java.lang.String,java.lang.String> GetEquipmentStatusMap(java.util.Locale locale)
public static Device.ReminderType getReminderType(Device d)
d
- The device from which the ReminderType will be obtained.
If null, the default ReminderType will be returned.
public static double CalculateFuelCost(Account a, Device d, double liters)
public static boolean GetCheckLastOdometer()
public static boolean GetSimulateEngineHours(Device dev)
public static boolean UpdateEventWithGeozoneLocation()
public static double GetMaximumOdometerKM()
public static double GetMaximumRuntimeHours()
public static boolean CheckNotifySelector()
public static boolean GetSaveEventDriverID()
public static void setCellTowerGetLocation(org.opengts.cellid.MobileLocationProvider ctgl)
ctgl
- The MobileLocationProviderpublic static boolean hasCellTowerGetLocation()
public static org.opengts.cellid.MobileLocationProvider getMobileLocationProvider()
public static void setRuleFactory(RuleFactory rf)
rf
- The RuleFactorypublic static boolean hasRuleFactory()
public static boolean hasENRE()
public static RuleFactory getRuleFactory()
public static RuleFactory getRuleFactory(boolean checkRuntime)
checkRuntime
- True to peform the RuleFactory runtime validation
public static void setSessionStatsFactory(SessionStatsFactory rf)
rf
- The SessionStatsFactorypublic static boolean hasSessionStatsFactory()
public static SessionStatsFactory getSessionStatsFactory()
public static void setEntityManager(EntityManager ef)
ef
- The EntityManagerpublic static boolean hasEntityManager()
public static EntityManager getEntityManager()
public static java.lang.String getEntityDescription(java.lang.String accountID, java.lang.String entityID, EntityManager.EntityType etype)
accountID
- The Account IDentityID
- The Entity IDetype
- The Entity type
public static java.lang.String getEntityDescription(java.lang.String accountID, java.lang.String entityID, int etype)
accountID
- The Account IDentityID
- The Entity IDetype
- The Entity type
public static boolean isEntityAttached(java.lang.String accountID, java.lang.String deviceID, java.lang.String entityID, EntityManager.EntityType etype)
accountID
- The Account IDdeviceID
- The Device IDentityID
- The Entity IDetype
- The Entity type
public static boolean isEntityAttached(java.lang.String accountID, java.lang.String deviceID, java.lang.String entityID, int etype)
accountID
- The Account IDdeviceID
- The Device IDentityID
- The Entity IDetype
- The Entity type
public static void setFuelManager(FuelManager fm)
fm
- The FuelManagerpublic static boolean hasFuelManager()
public static FuelManager getFuelManager()
public static void setPingDispatcher(PingDispatcher pd)
pd
- The PingDispatcherpublic static boolean hasPingDispatcher()
public static PingDispatcher getPingDispatcher()
public static int pastEventDateAction()
public static long pastEventDateMaximumSec()
public static int futureEventDateAction()
public static long futureEventDateMaximumSec()
public static int invalidSpeedAction()
public static double invalidSpeedMaximumKPH()
public static java.lang.String TABLE_NAME()
public static DBFactory<Device> getFactory()
public static java.lang.String getTableDescription(java.util.Locale loc)
public java.lang.String getGroupID()
public void setGroupID(java.lang.String v)
v
- The user informational group idpublic java.lang.String getEquipmentType()
public void setEquipmentType(java.lang.String v)
v
- The equipment typepublic boolean hasEquipmentStatus()
public java.lang.String getEquipmentStatus()
public void setEquipmentStatus(java.lang.String v)
v
- The equipment statuspublic java.lang.String getVehicleMake()
public void setVehicleMake(java.lang.String v)
v
- The vehicle makepublic java.lang.String getVehicleModel()
public void setVehicleModel(java.lang.String v)
v
- The vehicle modelpublic int getVehicleYear()
public void setVehicleYear(int v)
v
- The vehicle yearpublic boolean hasVehicleID()
public java.lang.String getVehicleID()
public void setVehicleID(java.lang.String v)
v
- The Vehicle ID (VIN)public java.lang.String getLastVehicleID()
public boolean hasVinChanged()
public java.lang.String getLicensePlate()
public void setLicensePlate(java.lang.String v)
v
- The License Platepublic long getLicenseExpire()
public void setLicenseExpire(long v)
v
- The license expiration date as a DayNumber valuepublic void setLicenseExpire(int year, int month1, int day)
year
- The expiration yearmonth1
- The expiration monthday
- The expiration daypublic void setLicenseExpire(DayNumber dn)
dn
- The license expiration date as a DayNumber instancepublic boolean isLicenseExpired(long asofDay)
asofDay
- The as-of expiration test DayNumberpublic boolean isLicenseExpired(DayNumber asof)
asof
- The as-of expiration test DayNumberpublic long getInsuranceExpire()
public void setInsuranceExpire(long v)
v
- The insurance expiration date as a DayNumber valuepublic void setInsuranceExpire(int year, int month1, int day)
year
- The expiration yearmonth1
- The expiration monthday
- The expiration daypublic void setInsuranceExpire(DayNumber dn)
dn
- The insurance expiration date as a DayNumber instancepublic boolean isInsuranceExpired(long asofDay)
asofDay
- The as-of expiration test DayNumberpublic boolean isInsuranceExpired(DayNumber asof)
asof
- The as-of expiration test DayNumberpublic boolean hasDriverID()
public boolean isDriverID(java.lang.String drvID)
public java.lang.String getDriverID()
public void setDriverID(java.lang.String v)
v
- The Driver-IDpublic Driver getDriver()
public boolean hasDriverStatus()
public long getDriverStatus()
public void setDriverStatus(long v)
v
- The driver statuspublic double getFuelCapacity()
public void setFuelCapacity(double v)
v
- The tank Fuel Capacity, in Literspublic double getFuelEconomy()
public void setFuelEconomy(double v)
v
- The approximate Fuel Economy, in Km/Literpublic double getFuelRatePerHour()
public void setFuelRatePerHour(double v)
v
- The approximate Fuel Consumption Rate in Litres/Hourpublic double getFuelCostPerLiter()
public void setFuelCostPerLiter(double v)
v
- The Fuel cost per Literpublic java.lang.String getFuelTankProfile()
public void setFuelTankProfile(java.lang.String v)
v
- The Fuel tank profilepublic boolean hasFuelTankProfile()
public FuelLevelProfile getFuelLevelProfile(FuelLevelProfile dft)
public FuelLevelProfile getFuelLevelProfile()
public double getActualFuelLevel(double fuelLevel)
public double getSpeedLimitKPH()
public void setSpeedLimitKPH(double v)
v
- The assigned speed limit for this device, in km/hpublic double getPlanDistanceKM()
public void setPlanDistanceKM(double v)
v
- The assigned "Plan Distance" for this device, in kilometerspublic long getInstallTime()
public void setInstallTime(long v)
v
- The install time of this Device, or '0' if undefined.public long getResetTime()
public void setResetTime(long v)
v
- The reset time of this Device, or '0' if undefined.public long getExpirationTime()
public void setExpirationTime(long v)
v
- The expiration time of this Device, or '0' if this Device never expires.public boolean isExpired()
public boolean doesExpire()
public boolean willExpire(long withinSec)
withinSec
- The tested expiry time range (in seconds)
public static boolean supportsLinkURL()
public boolean hasLink()
public java.lang.String getLinkURL()
public void setLinkURL(java.lang.String v)
v
- The Link-URL for this Devicepublic java.lang.String getLinkDescription()
public void setLinkDescription(java.lang.String v)
v
- The Link-Description for this Devicepublic static boolean supportsNotification()
public boolean getAllowNotify()
public void setAllowNotify(boolean v)
v
- The "Allow Notification" state for this Devicepublic boolean getAllowNotify(boolean checkAccount)
checkAccount
- True to also check Account
public long getLastNotifyTime()
public void setLastNotifyTime(long v)
v
- The Last Notification time for this Device (in Unix Epoch time format)public int getLastNotifyCode()
public void setLastNotifyCode(int v)
v
- The Last Notification Status-Code for this Devicepublic java.lang.String getLastNotifyRule()
public void setLastNotifyRule(java.lang.String v)
v
- The Rule-ID which triggered the Last Notification for this Devicepublic void setLastNotifyEvent(long timestamp, java.lang.String ruleID, boolean update) throws DBException
timestamp
- The timestamp (Unix Epoch format) of the notificationruleID
- The Rule-ID which triggered the notificationupdate
- True to update the Device record now
DBException
public void setLastNotifyEvent(EventData event, java.lang.String ruleID, boolean update) throws DBException
event
- The EventData record of the notificationruleID
- The Rule-ID which triggered the notificationupdate
- True to update the Device record now
DBException
public void clearLastNotifyEvent(boolean update) throws DBException
update
- True to update the Device record after clearing
DBException
public EventData getLastNotifyEvent()
public java.lang.String getNotifyEmail()
public void setNotifyEmail(java.lang.String v)
v
- The Notification Email Addresspublic static int getMaximumNotifyEmailLength()
@Deprecated public java.lang.String getNotifyEmail(boolean inclAccount, boolean inclUser)
inclAccount
- True to include the Account notify email addressinclUser
- True to include the assigned User notify email address
public java.lang.String getNotifyEmail(boolean inclAccount, boolean inclUser, boolean inclGroup)
inclAccount
- True to include the Account notify email addressinclUser
- True to include the assigned User notify email addressinclGroup
- True to include the notify email address from all group memberships
public java.lang.String getNotifySelector()
public void setNotifySelector(java.lang.String v)
v
- The rule-selector to evaluatepublic int getNotifyAction()
public void setNotifyAction(int v)
v
- The notify action maskpublic java.lang.String getNotifyDescription()
public void setNotifyDescription(java.lang.String v)
v
- The notify descriptionpublic java.lang.String getNotifySubject()
public void setNotifySubject(java.lang.String v)
v
- The notify email subjectpublic java.lang.String getNotifyText()
public void setNotifyText(java.lang.String v)
v
- The notify email bodypublic boolean getNotifyUseWrapper()
public void setNotifyUseWrapper(boolean v)
v
- The email wrapper configuration statepublic int getNotifyPriority()
public void setNotifyPriority(int v)
v
- The notification prioritypublic void clearParkedLocation(boolean update) throws DBException
DBException
public void setParkedLocation(GeoPoint parkLoc, double parkRadM, double parkSpeed, boolean update) throws DBException
parkLoc
- The GeoPoint of the location where the device should be "parked"parkRadM
- The radius, in meters, of the parked locationparkSpeed
- The maximum speed allowed within the parked locationupdate
- True to update the Device record now
DBException
public void saveParkedLocation() throws DBException
DBException
public boolean isParked()
public boolean isParkedViolation(GeoPoint gp, double speedKPH)
gp
- The current GeoPoint to testspeedKPH
- The current speed to test
public double getParkedLatitude()
public void setParkedLatitude(double v)
v
- The parked latitudepublic double getParkedLongitude()
public void setParkedLongitude(double v)
v
- The parked Longitudepublic GeoPoint getParkedLocation()
public double getParkedRadius()
public void setParkedRadius(double v)
v
- The parked radius, in meterspublic double getParkedMaxSpeedKPH()
public void setParkedMaxSpeedKPH(double v)
v
- The parked maximum speed km/hpublic java.lang.String getParkedAddress()
public void setParkedAddress(java.lang.String v)
v
- The parked address, if parkedpublic double getProximityRadius()
public void setProximityRadius(double v)
v
- The nearby proximity radius, in meterspublic GeoBounds getProximityBoundingBox(long asOfTime)
public java.lang.String getProximityGroupID()
public void setProximityGroupID(java.lang.String v)
v
- The nearby proximity group idpublic long getProximityMaximumAge()
public void setProximityMaximumAge(long v)
v
- The nearby proximity location maximum age (in seconds)public static boolean supportsBorderCrossing()
public boolean isBorderCrossing()
public int getBorderCrossing()
public void setBorderCrossing(int flags)
flags
- The Border-Crossing enabled statepublic void setBorderCrossing(Device.BorderCrossingState bcs)
bcs
- The Border-Crossing enabled statepublic long getLastBorderCrossTime()
public void setLastBorderCrossTime(long v)
v
- The last calculated Border-Crossing time (Unix Epoch format)public java.lang.String getModemID()
public void setModemID(java.lang.String mid)
mid
- The Mobile-ID for this devicepublic java.lang.String getUniqueID()
getUniqueID
in interface DataTransport
public void setUniqueID(java.lang.String v)
v
- The Unique-IDpublic java.lang.String getDeviceCode()
getDeviceCode
in interface DataTransport
public void setDeviceCode(java.lang.String v)
setDeviceCode
in interface DataTransport
v
- The Device-Code / Server-IDpublic java.lang.String getDeviceType()
getDeviceType
in interface DataTransport
public void setDeviceType(java.lang.String v)
setDeviceType
in interface DataTransport
v
- The Device-Typepublic boolean hasDcsPropertiesID()
public java.lang.String getDcsPropertiesID()
public void setDcsPropertiesID(java.lang.String v)
v
- The DCS Property IDpublic static java.lang.String GetDcsPropertiesID(Device device)
device
- The Device
public java.lang.String getDcsCommandHost()
public boolean hasDcsCommandHost()
public void setDcsCommandHost(java.lang.String v)
v
- The DCS Command Hostnamepublic boolean hasPushpinID()
public java.lang.String getPushpinID()
public void setPushpinID(java.lang.String v)
v
- The defined pushpin-id, or blank if no pushpin-id is definedpublic boolean hasDisplayColor()
public java.lang.String getDisplayColor()
public ColorTools.RGB getDisplayColor(ColorTools.RGB dft)
public void setDisplayColor(ColorTools.RGB v)
v
- The display colorpublic void setDisplayColor(java.lang.String v)
v
- The display colorpublic java.lang.String getMapLegend()
public void setMapLegend(java.lang.String legend)
legend
- The map legendpublic java.lang.String getSerialNumber()
getSerialNumber
in interface DataTransport
public void setSerialNumber(java.lang.String v)
setSerialNumber
in interface DataTransport
v
- The serial numberpublic java.lang.String getSimPhoneNumber()
getSimPhoneNumber
in interface DataTransport
public void setSimPhoneNumber(java.lang.String v)
setSimPhoneNumber
in interface DataTransport
v
- The SIM phone numberpublic static java.util.List<java.lang.String> getDeviceIDsForSimPhoneNumber(java.lang.String simPhone) throws DBException
simPhone
- The SIM phone number
DBException
public static java.util.List<java.lang.String> getDeviceIDsForSimPhoneNumber(java.lang.String simPhone, char sepCH) throws DBException
simPhone
- The SIM phone numbersepCH
- The preferred character for separating the account/device ids
DBException
public java.lang.String getSimID()
public void setSimID(java.lang.String v)
v
- The SIM-IDpublic java.lang.String getSmsEmail()
getSmsEmail
in interface DataTransport
public void setSmsEmail(java.lang.String v)
setSmsEmail
in interface DataTransport
v
- The SMS email address for this devicepublic java.lang.String getImeiNumber()
getImeiNumber
in interface DataTransport
public void setImeiNumber(java.lang.String v)
setImeiNumber
in interface DataTransport
v
- The IMEI# for this devicepublic boolean validateDataKey(java.lang.String pin)
pin
- The data key (PIN) to check
public boolean hasDataKey()
public java.lang.String getDataKey()
public byte[] getDataKeyAsByteArray()
public void setDataKey(java.lang.String v)
v
- The Data key (PIN) for this devicepublic boolean getLastInputState(int bit)
public long getLastInputState()
getLastInputState
in interface DataTransport
public void setLastInputState(long v)
setLastInputState
in interface DataTransport
v
- The bit mask of the last digital input receivedpublic boolean getLastOutputState(int bit)
public long getLastOutputState()
getLastOutputState
in interface DataTransport
public void setLastOutputState(long v)
setLastOutputState
in interface DataTransport
v
- The bit mask of the last digital output receivedpublic boolean getStatusCodeStateBit(int bit)
bit
- The bit index
public void setStatusCodeStateBit(int bit, boolean state)
bit
- The bit indexstate
- The bit statepublic long getStatusCodeState()
public void setStatusCodeState(long v)
v
- The bit mask of the StatusCode on/off statepublic double getLastBatteryLevel()
public void setLastBatteryLevel(double v)
v
- The last battery level recievedpublic double getLastFuelLevel()
public void setLastFuelLevel(double v)
v
- The last fuel level recievedpublic double getLastFuelTotal()
public void setLastFuelTotal(double v)
v
- The last fuel total recievedpublic double getFuelUsedInRange(long startTime, long endTime)
public double getLastOilLevel()
public void setLastOilLevel(double v)
v
- The last oil level recievedpublic int getIgnitionIndex()
getIgnitionIndex
in interface DataTransport
public void setIgnitionIndex(int v)
setIgnitionIndex
in interface DataTransport
v
- The bit index, or 99 to indicate IGNITION_ON/IGNITION_OFF status codespublic int[] getIgnitionStatusCodes()
getIgnitionStatusCodes
in interface DataTransport
public int getCurrentIgnitionState()
public boolean isIgnitionOn(int code)
public boolean isIgnitionOff(int code)
public int getCurrentIgnitionState(boolean checkSC, boolean update)
checkSC
- True to check ignition state based on the most recent event status codesupdate
- True to update Device last ignition on/off times
public int getIgnitionStateAsOfEvent(EventData ev)
public int getIgnitionStateAsOfEvent(EventData ev, boolean checkSC)
public int getEventIgnitionState(EventData ev)
public boolean getDigitalInputIgnitionState(long gpioInput)
gpioInput
- The digital input mask
public java.lang.String getCodeVersion()
getCodeVersion
in interface DataTransport
public void setCodeVersion(java.lang.String v)
setCodeVersion
in interface DataTransport
v
- the code/firmware version of this Devicepublic java.lang.String getFeatureSet()
getFeatureSet
in interface DataTransport
public void setFeatureSet(java.lang.String v)
setFeatureSet
in interface DataTransport
v
- The feature set of this Devicepublic DTIPAddrList getIpAddressValid()
getIpAddressValid
in interface DataTransport
public void setIpAddressValid(DTIPAddrList v)
setIpAddressValid
in interface DataTransport
v
- The valid assigned IP address/mask for this Devicepublic void setIpAddressValid(java.lang.String v)
v
- The valid assigned IP address/mask for this Devicepublic boolean isValidIPAddress(java.lang.String ipAddr)
isValidIPAddress
in interface DataTransport
ipAddr
- The IP address the Device is currently using to send data to the server
public boolean hasLastTcpSessionID()
public java.lang.String getLastTcpSessionID()
public void setLastTcpSessionID(java.lang.String v)
v
- The last TCP session IDpublic DTIPAddress getIpAddressLocal()
public void setIpAddressLocal(DTIPAddress v)
v
- The local IP address for this Devicepublic void setIpAddressLocal(java.lang.String v)
v
- The local IP address for this Devicepublic DTIPAddress getIpAddressCurrent()
getIpAddressCurrent
in interface DataTransport
public void setIpAddressCurrent(DTIPAddress v)
v
- The last known IP address used by the Devicepublic void setIpAddressCurrent(java.lang.String v)
setIpAddressCurrent
in interface DataTransport
v
- The last known IP address used by the Devicepublic int getRemotePortCurrent()
getRemotePortCurrent
in interface DataTransport
public void setRemotePortCurrent(int v)
setRemotePortCurrent
in interface DataTransport
v
- The last known remote port used by the Devicepublic int getListenPortCurrent()
getListenPortCurrent
in interface DataTransport
public void setListenPortCurrent(int v)
setListenPortCurrent
in interface DataTransport
v
- The last known listen port used by the Devicepublic boolean saveOriginalLastValidGeoPoint()
public void clearOriginalLastValidGeoPoint()
public GeoPoint getOriginalLastValidGeoPoint()
public double getLastValidLatitude()
public void setLastValidLatitude(double v)
v
- The last known valid latitude for this Devicepublic double getLastValidLongitude()
public void setLastValidLongitude(double v)
v
- The last known valid longitude for this Devicepublic boolean hasLastValidLocation()
public GeoPoint getLastValidLocation()
public GeoPoint getLastValidLocation(boolean tryLastEvent)
tryLastEvent
- If true, the last valid EventData record may be queried
public double getMetersToLastValidLocation(GeoPoint gp)
gp
- The GeoPoint to test
public boolean isNearLastValidLocation(GeoPoint gp, double meters)
gp
- The GeoPoint to testmeters
- The radius to test, in meterspublic boolean isNearLastValidLocation(GeoPoint gp, double meters, long maxFixAge)
gp
- The GeoPoint to testmeters
- The radius to test, in metersmaxFixAge
- The maximum fix agepublic java.util.Map<java.lang.String,Device.NearbyDevice> getNearbyDevices(double radiusM, long maxAgeSec, User userAuth) throws DBException
radiusM
- The radius in metersmaxAgeSec
- Maximum last location age (in seconds)userAuth
- If non-null, returns devices authorized to user only
DBException
public static java.util.Map<java.lang.String,Device.NearbyDevice> GetNearbyDeviceMap(Account account, java.lang.String targetDevID, boolean inclTargetID, long startTime, long endTime, GeoPoint gp, double radiusM, boolean activeOnly, User userAuth, boolean sortByDist) throws DBException
account
- The Account instance (cannot be null)targetDevID
- The target deviceIDinclTargetID
- True to include targetDeviceID in NearbyDevice list, false to exclude.startTime
- Include last location timestamps after this time (0 to disable)endTime
- Include last location timestamps before this time (0 to disable)gp
- The GPS locationradiusM
- The radius in metersactiveOnly
- True for active devices onlyuserAuth
- If non-null, returns devices authorized to user onlysortByDist
- True to return list sorted by distance, from closest to farthest
DBException
public java.lang.String getLastValidAddress()
public java.lang.String getLastSubdivision()
public void setLastSubdivision(java.lang.String v)
v
- The last valid subdivision/statepublic double getLastValidSpeedKPH()
public void setLastValidSpeedKPH(double v)
v
- The last valid speedpublic double getLastValidHeading()
public void setLastValidHeading(double v)
v
- The last valid headingpublic long getLastGPSTimestamp()
public void setLastGPSTimestamp(long v)
v
- The last valid GPS timestamppublic long getLastEventTimestamp()
public void setLastEventTimestamp(long v)
v
- The last event timestamppublic boolean isOldEventTimestamp(long timestamp)
timestamp
- The timestamp to check
public static boolean supportsEventsPerSecond()
public double getLastEventsPerSecond()
public void setLastEventsPerSecond(double v)
v
- The last estimated events-per-secondpublic double getAgedEventsPerSecond(long ageMS)
ageMS
- Aged timestamp
public long getLastEventsPerSecondMS()
public void setLastEventsPerSecondMS(long v)
v
- The last event-per-second timestamp (milliseconds)public java.lang.String getLastCellServingInfo()
public void setLastCellServingInfo(java.lang.String v)
v
- The last received serving cell-tower informationpublic void setLastServingCellTower(org.opengts.cellid.CellTower sct)
sct
- The last received serving cell-tower informationpublic org.opengts.cellid.CellTower getLastServingCellTower()
public java.util.List<Device.GeozoneTransition> checkGeozoneTransitions(long eventTime, GeoPoint eventGP)
eventTime
- The tie of the eventeventGP
- The new event location
public java.lang.String getAutoGeozoneID(EventData ev)
public double getLastDistanceKM()
public void setLastDistanceKM(double distKM)
distKM
- The last distance valuepublic double getMaxOdometerKM()
public static boolean supportsLastOdometer()
public double getLastOdometerKM()
public void setLastOdometerKM(double odomKM)
odomKM
- The last odometer valuepublic double getNextOdometerKM(GeoPoint geoPoint)
geoPoint
- The next GPS location
public double adjustOdometerKM(double odomKM)
odomKM
- The odometer value to adjust
public double adjustOdometerKM(double odomKM, boolean checkLast)
odomKM
- The odometer value to adjust
public double calculateOdometerKM(double odomKM, long fixtime, boolean validGPS, GeoPoint geoPoint, boolean estimate, boolean logInfo)
odomKM
- The odometer value from the device (or 0.0 if the device does not provide an odometer)fixtime
- The timestamp of the eventvalidGPS
- The GPS fix stategeoPoint
- The GPS locationestimate
- True if the odometer is to be calculated based on the GPS locationlogInfo
- True to display the results via "Print.logInfo"
public double getOdometerOffsetKM()
public void setOdometerOffsetKM(double v)
v
- The displayed odometer offset in kilometers.public double getLastEngineOnHours()
public void setLastEngineOnHours(double v)
v
- The engine-hours at the last engine-on timepublic long getLastEngineOnTime()
public void setLastEngineOnTime(long v)
v
- The last engine on time receivedpublic long getLastEngineOffTime()
public void setLastEngineOffTime(long v)
v
- The last engine off time receivedpublic double getMaxRuntimeHours()
public static boolean supportsLastEngineHours()
public double getLastEngineHours()
public void setLastEngineHours(double v)
v
- The last engine-hours receivedpublic double getEngineHoursOffset()
public void setEngineHoursOffset(double v)
v
- The displayed engine-hours offsetpublic double getLastIgnitionOnHours()
public void setLastIgnitionOnHours(double v)
v
- The ignition hours at the last ignition-on.public long getLastIgnitionOnTime()
public void setLastIgnitionOnTime(long v)
v
- The last ignition on time receivedpublic long getLastIgnitionOffTime()
public void setLastIgnitionOffTime(long v)
v
- The last ignition off time receivedpublic double getLastIgnitionHours()
public void setLastIgnitionHours(double v)
v
- The last ignition hours receivedpublic long getLastStopTime()
public void setLastStopTime(long v)
v
- The last stopped time receivedpublic boolean isStopped()
public EventData getLastStopEvent()
public long getLastStartTime()
public void setLastStartTime(long v)
v
- The last Start timepublic boolean getLastMalfunctionLamp()
public void setLastMalfunctionLamp(boolean v)
v
- The last Malfuntion Indicator Lamp (MIL) statepublic static boolean supportsFaultCodes()
public java.lang.String getLastFaultCode()
public void setLastFaultCode(java.lang.String v)
v
- The last fault codespublic void appendLastFaultCode(java.lang.String v)
v
- The fault code to addpublic java.lang.String getPingCommandURI()
public void setPingCommandURI(java.lang.String v)
v
- The Ping command URI/URLpublic java.lang.String getPendingPingCommand()
public java.lang.String getPendingCommand()
public void setPendingPingCommand(java.lang.String v)
v
- Any pending device commandspublic void setPendingCommand(java.lang.String v)
public boolean hasPendingPingCommand()
public boolean hasPendingCommand()
public boolean clearPendingPingCommand(boolean update)
update
- True to update the device record now
public boolean clearPendingCommand(boolean update)
public long getLastPingTime()
getLastPingTime
in interface DataTransport
public void _setLastPingTime(long v)
v
- The time of the last command sent to the devicepublic void setLastPingTime(long v)
v
- The time of the last command sent to the devicepublic int getTotalPingCount()
getTotalPingCount
in interface DataTransport
public void _setTotalPingCount(int v)
v
- The total number of commands sent to the device, since last resetpublic void setTotalPingCount(int v)
v
- The total number of commands sent to the device, since last resetpublic boolean incrementPingCount(long pingTime, boolean reload, boolean update)
pingTime
- The time of the commandreload
- True to force a reload of the Device record prior to counting the commandupdate
- True to update the Device after incrementing the count
public int getMaxPingCount()
getMaxPingCount
in interface DataTransport
public void _setMaxPingCount(int v)
v
- The maximum number of commands that can be sent to the devicepublic void setMaxPingCount(int v)
v
- The maximum number of commands that can be sent to the devicepublic boolean exceedsMaxPingCount()
public long getCommandStateMask()
public boolean getCommandStateMaskBit(int bit)
bit
- The command state bit index
public void setCommandStateMask(long v)
v
- The command state maskpublic void setCommandStateBit(int bit, boolean state)
bit
- The command state bitstate
- The state for the specified bits in the command state maskpublic boolean getExpectAck()
public void _setExpectAck(boolean v)
v
- The expected ACK statepublic void setExpectAck(boolean v)
v
- The expected ACK statepublic int getExpectAckCode()
public void setExpectAckCode(int v)
v
- The expected ACK status codepublic boolean isAckStatusCode(int statusCode)
statusCode
- The current event status code
public java.lang.String getLastAckCommand()
public void setLastAckCommand(java.lang.String v)
v
- The last ACK command sent to the devicepublic boolean isExpectingCommandAck()
public boolean clearExpectCommandAck(boolean didAck, boolean update)
didAck
- True if the ACK was receivedupdate
- True to update the Device record
public java.lang.String getLastAckResponse()
public void setLastAckResponse(java.lang.String v)
v
- The last ACK responsepublic long getLastAckTime()
public void _setLastAckTime(long v)
v
- The last ACK timepublic void setLastAckTime(long v)
v
- The last ACK timepublic long getDcsConfigMask()
public void setDcsConfigMask(long v)
v
- The DCS configuration maskpublic java.lang.String getDcsConfigString()
public void setDcsConfigString(java.lang.String v)
v
- The DCS configuration Stringpublic boolean getSupportsDMTP()
getSupportsDMTP
in interface DataTransport
public boolean supportsDMTP()
public void setSupportsDMTP(boolean v)
setSupportsDMTP
in interface DataTransport
v
- The OpenDMTP protocol support statepublic int getSupportedEncodings()
getSupportedEncodings
in interface DataTransport
public void setSupportedEncodings(int v)
setSupportedEncodings
in interface DataTransport
v
- The supported OpenDMTP encodingspublic int getUnitLimitInterval()
getUnitLimitInterval
in interface DataTransport
public void setUnitLimitInterval(int v)
v
- The OpenDMTP unit limit intervalpublic int getMaxAllowedEvents()
getMaxAllowedEvents
in interface DataTransport
public void setMaxAllowedEvents(int v)
v
- The maximum allowed OpenDMTP eventspublic DTProfileMask getTotalProfileMask()
getTotalProfileMask
in interface DataTransport
public void setTotalProfileMask(DTProfileMask v)
setTotalProfileMask
in interface DataTransport
v
- The total (UDP/TCP) connection profile maskpublic int getTotalMaxConn()
getTotalMaxConn
in interface DataTransport
public void setTotalMaxConn(int v)
v
- The maximum total connections allowed per intervalpublic int getTotalMaxConnPerMin()
getTotalMaxConnPerMin
in interface DataTransport
public void setTotalMaxConnPerMin(int v)
v
- The maximum total connections allowed per minutepublic DTProfileMask getDuplexProfileMask()
getDuplexProfileMask
in interface DataTransport
public void setDuplexProfileMask(DTProfileMask v)
setDuplexProfileMask
in interface DataTransport
v
- The Duplex/TCP connection profile maskpublic int getDuplexMaxConn()
getDuplexMaxConn
in interface DataTransport
public void setDuplexMaxConn(int v)
v
- The maximum Duplex/TCP connections per Intervalpublic int getDuplexMaxConnPerMin()
getDuplexMaxConnPerMin
in interface DataTransport
public void setDuplexMaxConnPerMin(int v)
v
- The maximum Duplex/TCP connections per Minutepublic long getLastDuplexConnectTime()
getLastDuplexConnectTime
in interface DataTransport
public void _setLastDuplexConnectTime(long v)
v
- The last Duplex/TCP connection timepublic void setLastDuplexConnectTime(long v)
setLastDuplexConnectTime
in interface DataTransport
v
- The last Duplex/TCP connection timepublic long getLastTotalConnectTime()
getLastTotalConnectTime
in interface DataTransport
public void _setLastTotalConnectTime(long v)
v
- The last UDP/TCP connection timepublic void setLastTotalConnectTime(long v)
setLastTotalConnectTime
in interface DataTransport
v
- The last UDP/TCP connection timepublic long getLastConnectTime()
public void setLastConnectTime(long v, boolean isDuplex)
v
- The last UDP/TCP connection timepublic static boolean supportsFixedLocation()
public double getFixedLatitude()
public void setFixedLatitude(double v)
v
- The fixed latitude for this devicepublic double getFixedLongitude()
public void setFixedLongitude(double v)
v
- The fixed longitude for this devicepublic boolean hasFixedLocation()
public boolean isValidFixedLocation()
public GeoPoint getFixedLocation()
public java.lang.String getFixedAddress()
public void setFixedAddress(java.lang.String v)
v
- The address for the fixed location for this devicepublic java.lang.String getFixedContactPhone()
public void setFixedContactPhone(java.lang.String v)
v
- The phone number for the fixed location for this devicepublic long getFixedServiceTime()
public void setFixedServiceTime(long v)
v
- The last time this fixed location was servicedpublic static boolean supportsActiveCorridor()
public java.lang.String getActiveCorridor()
public boolean hasActiveCorridor()
public void setActiveCorridor(java.lang.String v)
v
- The active corridor for this devicepublic static java.lang.String[] getCorridorIDsForAccount(java.lang.String acctId)
acctId
- The Account ID
public static boolean supportsPeriodicMaintenance()
public static int getPeriodicMaintOdometerCount()
public void setMaintTriggeredKM(int ndx)
public int getMaintTriggeredKM()
public java.lang.String getMaintDescriptionKM(int ndx)
ndx
- The index of the maintenance descrption to return
public double getMaintOdometerKM(int ndx)
ndx
- The index of the maintenance odometer to return
public void resetMaintOdometerKM(int ndx)
ndx
- The index of the maintenance odometer to resetpublic double getMaintIntervalKM(int ndx)
ndx
- The index of the maintenance interval to return
public boolean isMaintenanceDueKM(int ndx, double deltaKM)
ndx
- The index of the maintenance intervaldeltaKM
- The delta-kilometers to check
public java.lang.String getMaintDescriptionKM0()
public double getMaintIntervalKM0()
public void setMaintIntervalKM0(double v)
v
- The maintenance interval #0, in kilometerspublic double getMaintOdometerKM0()
public void setMaintOdometerKM0(double v)
v
- The maintenance odometer #0, in kilometerspublic void resetMaintOdometerKM0()
public java.lang.String getMaintDescriptionKM1()
public double getMaintIntervalKM1()
public void setMaintIntervalKM1(double v)
v
- The maintenance interval #1, in kilometerspublic double getMaintOdometerKM1()
public void setMaintOdometerKM1(double v)
v
- The maintenance odometer #1, in kilometerspublic void resetMaintOdometerKM1()
public static int getPeriodicMaintEngHoursCount()
public double getMaintEngHoursHR(int ndx)
ndx
- The maintenance engine-hours index
public void resetMaintEngHoursHR(int ndx)
ndx
- The maintenance engine-hours indexpublic double getMaintIntervalHR(int ndx)
ndx
- The maintenance engine-hours index
public boolean isMaintenanceDueHR(int ndx, double deltaHR)
ndx
- The maintenance engine-hours indexdeltaHR
- The delta engine-hours to checkpublic double getMaintIntervalHR0()
public void setMaintIntervalHR0(double v)
v
- The maintenance engine-hours interval for index #0public double getMaintEngHoursHR0()
public void setMaintEngHoursHR0(double v)
v
- The maintenance engine-hours elapsed for index #0public void resetMaintEngHoursHR0()
public java.lang.String getMaintNotes()
public void setMaintNotes(java.lang.String v)
v
- the maintenance notespublic int getReminderType()
public void setReminderType(int v)
v
- the maintenance reminder typepublic void setReminderType(Device.ReminderType r)
r
- the maintenance reminder typepublic java.lang.String getReminderMessage()
public void setReminderMessage(java.lang.String v)
v
- the maintenance reminder messagepublic long getReminderTime()
public void setReminderTime(long v)
v
- the maintenance reminder timepublic java.lang.String getReminderInterval()
public void setReminderInterval(java.lang.String v)
v
- the maintenance reminder intervalpublic boolean isReminderExpired(java.util.TimeZone tz, long nowTime)
tz
- The TimeZonenowTime
- The current time
public boolean isReminderExpired(java.util.TimeZone tz)
tz
- The TimeZone
public void resetReminder(long currentTime)
currentTime
- The time to which the reminder is resetpublic void resetReminder()
public long getLastServiceTime()
public void setLastServiceTime(long v)
v
- The last service timepublic long getLastServiceDayNumber()
public long getNextServiceTime()
public void setNextServiceTime(long v)
v
- The next service timepublic long getNextServiceDayNumber()
public static boolean supportsAssignedUserID()
public java.lang.String getAssignedUserID()
public void setAssignedUserID(java.lang.String v)
v
- The assigned User-IDpublic User getAssignedUser()
public java.util.TimeZone getAssignedUserTimeZone()
public static boolean supportsThermalProfile()
public java.lang.String getThermalProfile()
public void setThermalProfile(java.lang.String v)
v
- The temperature profilepublic static boolean supportsHoursOfOperation()
public boolean hasHoursOfOperation()
public java.lang.String getHoursOfOperation()
public void setHoursOfOperation(java.lang.String v)
v
- The HoursOfOperationpublic void setHoursOfOperation(RTProperties rtp)
rtp
- The HoursOfOperation specification (as a RTProperties
instance)public void setHoursOfOperation(WorkHours wh)
wh
- The HoursOfOperation specification (as a WorkHours
instance)public WorkHours getWorkHours(WorkHours dft)
public boolean isHoursOfOperation(long ts)
ts
- The timestamp representing the time to check
public boolean isHoursOfOperation(DateTime dt, java.util.TimeZone tz)
dt
- The DateTime instance representing the time to checktz
- The TimeZone (null to use the Account TimeZone)
public static boolean supportsPendingMessage()
public boolean hasPendingMessage()
public java.lang.String getPendingMessage()
public void setPendingMessage(java.lang.String v)
v
- The pending messagepublic java.lang.String getPendingMessageACK()
public void setPendingMessageACK(java.lang.String v)
v
- The pending message acknowledgementpublic int getMaxPassengers()
public void setMaxPassengers(int v)
v
- The maximum number of passengerspublic java.lang.String getCustomAttributes()
public void setCustomAttributes(java.lang.String v)
v
- The custom attributes for this devicepublic RTProperties getCustomAttributesRTP()
public java.util.Collection<java.lang.String> getCustomAttributeKeys()
public java.lang.String getCustomAttribute(java.lang.String key)
public java.lang.String setCustomAttribute(java.lang.String key, java.lang.String value)
key
- The custom attribute keyvalue
- The custom valuepublic java.lang.String getWorkOrderID()
public void setWorkOrderID(java.lang.String v)
v
- The Work Order ID (may be a comma separated list)public java.lang.String[] getWorkOrderIDs()
public boolean addWorkOrderID(java.lang.String woid)
woid
- The Work Order ID to add
public boolean removeWorkOrderID(java.lang.String woid)
woid
- The Work Order ID to remove
public void setWorkOrderIDs(java.lang.String[] W)
W
- The Work Order ID arraypublic java.lang.String getJobNumber()
public void setJobNumber(java.lang.String v)
v
- The Job numberpublic boolean hasJobNumber()
public void setJobLocation(GeoPoint jobLoc, double jobRadM)
jobLoc
- The Job Location GeoPointjobRadM
- The Job radius in meterspublic boolean hasCurrentJob()
public boolean isImplicitJobDepart(GeoPoint gp)
gp
- The GeoPoint to test
public double getJobLatitude()
public void setJobLatitude(double v)
v
- The Job latitudepublic double getJobLongitude()
public void setJobLongitude(double v)
v
- The Job longitudepublic double getJobRadius()
public void setJobRadius(double v)
v
- The Job radius, in meterspublic boolean supportsELogState()
public boolean getELogEnabled()
public void setELogEnabled(boolean v)
v
- The "ELog/HOS Enabled" state for this Devicepublic DTELogState getLastELogState()
public void setLastELogState(DTELogState v)
v
- The last HOS data push timepublic boolean supportsDataPushTime()
public long getLastDataPushTime()
public void setLastDataPushTime(long v)
v
- The last data push timepublic long getLastEventCreateMillis()
public void setLastEventCreateMillis(long v)
v
- The Last Event Creation time, in millisecondspublic boolean getIsActive()
getIsActive
in class AccountRecord<Device>
public void setCreationDefaultValues()
setCreationDefaultValues
in class DBRecord<Device>
public java.lang.String getAssocAccountID()
getAssocAccountID
in interface DataTransport
public java.lang.String getAssocDeviceID()
getAssocDeviceID
in interface DataTransport
public DCServerConfig getDCServerConfig()
public java.util.Map<java.lang.String,java.lang.String> getSupportedCommands(BasicPrivateLabel privLabel, User user, java.lang.String type)
privLabel
- The current PrivateLabel instanceuser
- The current user instancetype
- The command location type (ie. "map", "admin", ...)
public boolean getStartStopSupported()
public int[] getStartStopStatusCodes()
public boolean isPingSupported(BasicPrivateLabel privLabel, User user)
privLabel
- The BasicPrivateLabel instanceuser
- The Userpublic boolean sendDeviceCommand(java.lang.String cmdType, java.lang.String cmdName, java.lang.String[] cmdArgs)
cmdType
- The Command typecmdName
- The Command namecmdArgs
- The Command args/parameters
public static void SetAllowSlowReverseGeocoding(boolean allow)
allow
- True to allow, false to dis-allowpublic static boolean GetAllowSlowReverseGeocoding()
public long getEventCount(long timeStart, long timeEnd) throws DBException
timeStart
- The starting timestamptimeEnd
- The ending timestamp
DBException
public long getEventCount() throws DBException
DBException
public void log_EventData(int logLevel, EventData ev)
ev
- The event to logpublic boolean insertEventData(EventData evdb)
evdb
- The EventData record to insert
protected boolean _insertEventData(EventData evdb)
evdb
- The EventData record to insert
public boolean postCommandHandling(DCServerConfig.Command command, java.lang.String cmdStr, boolean update)
command
- The executed DCServerConfig.CommandcmdStr
- The command string sent to the deviceupdate
- True to update the Device record now.
public static OrderedSet<User> getAuthorizedUsers(Device device) throws DBException
device
- The device for which the User list will be returned.
DBException
public long deleteEventsPriorTo(long priorToTime) throws DBException
priorToTime
- EventData records up to (but excluding) this timestamp will be deleted.
DBException
public java.util.Set<java.lang.String> _createChangedFieldsSet(java.util.Set<java.lang.String> flds) throws DBException
flds
- The pre-initialized list of fields to update
DBException
public java.util.Set<java.lang.String> _createChangedFieldsSet(java.lang.String... flds) throws DBException
flds
- The pre-initialized list of fields to update
DBException
public void clearOtherChangedFieldNames()
public boolean hasChangedFieldNames()
public java.util.Set<java.lang.String> getOtherChangedFieldNames()
public void addOtherChangedFieldNames(java.util.Set<java.lang.String> flds)
flds
- The list of fields to addpublic void addOtherChangedFieldNames(java.lang.String... flds)
flds
- The list of fields to addpublic void updateOtherChangedEventFields() throws DBException
DBException
public void updateChangedEventFields() throws DBException
DBException
public void updateChangedEventFields(java.util.Set<java.lang.String> flds) throws DBException
flds
- The field set to update
DBException
public void updateChangedEventFields(java.lang.String... flds) throws DBException
flds
- The field set to update
DBException
public void insertSessionStatistic(long startTime, java.lang.String ipAddr, boolean isDuplex, long bytesRead, long bytesWritten, long evtsRecv)
startTime
- The time of the session statipAddr
- The IP addressisDuplex
- True if TCP/DuplexbytesRead
- The number of bytes readbytesWritten
- The number of bytes writtenevtsRecv
- The number of events receivedpublic static boolean CheckSelectorSyntax(java.lang.String selector)
selector
- The rule selector to check
protected boolean checkEventRules(EventData event)
event
- The EventData instance to checkpublic StatusCode getStatusCode(int code)
code
- The numeric status code value
public java.lang.String[] getAttachedEntityIDs(EntityManager.EntityType etype)
etype
- The EntityType
public java.lang.String[] getAttachedEntityIDs(int entityType)
entityType
- The EntityType
public java.lang.String[] getAttachedEntityDescriptions(EntityManager.EntityType etype)
etype
- The EntityType
public java.lang.String[] getAttachedEntityDescriptions(int entityType)
entityType
- The EntityType
public EventData[] getSavedRangeEvents()
public void setSavedRangeEvents(EventData[] events)
events
- The list of events to cachepublic EventData[] getRangeEvents(long timeStart, long timeEnd, int[] statusCodes, boolean validGPS, EventData.LimitType limitType, long limit) throws DBException
timeStart
- The event start timetimeEnd
- The event end timestatusCodes
- The list of status-codesvalidGPS
- True to read only events with valid GPS locationslimitType
- The limit type (FIRST, LAST)limit
- The maximum number of events to return
DBException
public EventData[] getRangeEvents(long timeStart, long timeEnd, boolean validGPS, EventData.LimitType limitType, long limit) throws DBException
timeStart
- The event start timetimeEnd
- The event end timevalidGPS
- True to read only events with valid GPS locationslimitType
- The limit type (FIRST, LAST)limit
- The maximum number of events to return
DBException
public EventData[] getLatestEvents(long limit, boolean validGPS) throws DBException
limit
- The maximum number of events to returnvalidGPS
- True to read only events with valid GPS locations
DBException
public EventData getFirstEvent(long startTime, boolean validGPS) throws DBException
startTime
- The event start timevalidGPS
- True to only return the first event with a valid GPS
DBException
public EventData getLastEvent(boolean validGPS) throws DBException
validGPS
- True to only return the last event with a valid GPS
DBException
public EventData getLastEvent(long endTime, boolean validGPS) throws DBException
endTime
- Return the EventData record less-than or equal-to this timevalidGPS
- True to only return the last event with a valid GPS
DBException
public EventData getLastEvent(int[] statusCodes) throws DBException
statusCodes
- Return the last event that matches one of these status codes
DBException
public EventData getLastEvent(int[] statusCodes, long endTime, boolean validGPS) throws DBException
statusCodes
- Return the last event that matches one of these status codesendTime
- Return the EventData record less-than or equal-to this timevalidGPS
- True to only return the last event with a valid GPS
DBException
public void reprocessEventDataRecords(long timeStart, long timeEnd, Device.EventDataHandler edh) throws DBException
timeStart
- The start timetimeEnd
- The end timeedh
- The callback EventDataHandler instance
DBException
protected void vinDidChange(java.lang.String oldVIN, java.lang.String newVIN)
protected void eventWillInsert(EventData evdb)
protected void eventDidInsert(EventData evdb)
public void save() throws DBException
save
in class DBRecord<Device>
DBException
- If a database error occurspublic java.lang.String toString()
toString
in class DBRecord<Device>
public void setTransport(Transport xport)
xport
- The Transport instancepublic java.lang.String getTransportID()
getTransportID
in interface DataTransport
public DataTransport getDataTransport()
public long countOldEvents(long oldTimeSec) throws DBException
oldTimeSec
- The timestamp before which events will be counted
DBException
public long deleteOldEvents(long oldTimeSec, java.lang.StringBuffer logMsg) throws DBException
oldTimeSec
- The timestamp before which events will be deletedlogMsg
- A StringBuffer instance into which deletion log messages are placed.
DBException
public Device _reload(java.lang.String... fldNames) throws DBException
DBRecord
_reload
in class DBRecord<Device>
DBException
- If a general DB error occurspublic static boolean exists(java.lang.String acctID, java.lang.String devID) throws DBException
acctID
- The Account IDdevID
- The Device ID
DBException
public static Device loadDeviceBySimPhoneNumber(java.lang.String simPhone) throws DBException
simPhone
- The SIM phone number of the device
DBException
- if a database error occurspublic static Device loadDeviceByUniqueID(java.lang.String uniqId) throws DBException
uniqId
- The Unique-ID of the device (ie. IMEI, ESN, Serial#, etc)
DBException
- if a database error occurspublic static Device loadDeviceByName(Account account, java.lang.String devID) throws DBException
account
- The Account instance representing the owning accountdevID
- The Device-ID
DBException
- if a database error occurspublic static Device getDevice(Account account, java.lang.String devID) throws DBException
account
- The AccountdevID
- The Device ID
DBException
public static Device getDevice(Account account, java.lang.String devID, java.lang.String... fieldNames) throws DBException
account
- The AccountdevID
- The Device IDfieldNames
- The specific field-names to load (null to load all)
DBException
public static Device _getDevice(Account account, java.lang.String devID) throws DBException
account
- The AccountdevID
- The Device ID
DBException
- If any DB error occurs.public static Device _getDevice(Account account, java.lang.String devID, java.lang.String... fieldNames) throws DBException
account
- The AccountdevID
- The Device IDfieldNames
- The specific field-names to load (null to load all).
All non-specified fields will be undefined in this Device record.
DBException
- If any DB error occurs.public static Device getDevice(Account account, java.lang.String devID, boolean create) throws DBException
account
- The AccountdevID
- The Device IDcreate
- True to create the Device if it does not already exist
DBExeption
DBException
public static Device createNewDevice(Account account, java.lang.String devID, java.lang.String uniqueID) throws DBException
account
- The AccountdevID
- The Device IDuniqueID
- The Device Unique ID
DBExeption
DBException
public static Device createVirtualDevice(java.lang.String acctID, java.lang.String devID)
acctID
- The Account IDdevID
- The Device ID
public static OrderedSet<java.lang.String> getDeviceIDsForAccount(java.lang.String acctId, User userAuth, boolean inclInactv) throws DBException
acctId
- The Account IDuserAuth
- The User recordinclInactv
- True to include inactive Devices
DBExeption
DBException
public static OrderedSet<java.lang.String> getDeviceIDsForAccount(java.lang.String acctId, User userAuth, boolean inclInactv, long limit) throws DBException
acctId
- The Account IDuserAuth
- The User recordinclInactv
- True to include inactive Deviceslimit
- The maximum number of Device IDs to return
DBExeption
DBException
public static java.lang.String getKeyFieldTitle(java.lang.String key, java.lang.String arg, java.util.Locale locale)
key
- The keyarg
- The type parameterlocale
- The Locale
public java.lang.String getKeyFieldValue(java.lang.String key, java.lang.String arg, BasicPrivateLabel bpl)
key
- The keyarg
- The type parameterbpl
- The BasicPrivateLabel
public static java.lang.String _getKeyFieldString(boolean getTitle, java.lang.String key, java.lang.String arg, java.util.Locale locale, BasicPrivateLabel bpl, Device dev)
getTitle
- True to get the title, false for valuekey
- The keyarg
- The type parameterlocale
- The Localebpl
- The BasicPrivateLabeldev
- The Device record
public static java.util.Comparator<Device> getDeviceDescriptionComparator()
public static void main(java.lang.String[] args)
args
- The main entry point arguments
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |