|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.opengts.util.AbstractClientPacketHandler org.opengts.servers.tk10x.TrackClientPacketHandler
public class TrackClientPacketHandler
Nested Class Summary | |
---|---|
static class |
TrackClientPacketHandler.TKDeviceType
Enumerated type: TK device type |
Field Summary | |
---|---|
static boolean |
DEBUG_MODE
|
static boolean |
ESTIMATE_ODOMETER
|
static double |
KILOMETERS_PER_KNOT
|
static double |
MINIMUM_MOVED_METERS
|
static double |
MINIMUM_SPEED_KPH
|
static boolean |
PACKET_LEN_END_OF_STREAM
|
static long |
SIMEVENT_DIGITAL_INPUTS
|
static boolean |
SIMEVENT_GEOZONES
|
static long |
TKNANO_GPIO_ACC
|
static long |
TKNANO_GPIO_ENGINE
|
static long |
TKNANO_GPIO_ON_BATTERY
|
static long |
TKNANO_GPIO_SENSOR_1
|
static long |
TKNANO_GPIO_SENSOR_2
|
static java.lang.String[] |
UNIQUEID_PREFIX
|
static boolean |
USE_LAST_VALID_GPS
|
static boolean |
XLATE_LOCATON_INMOTION
|
Fields inherited from class org.opengts.util.AbstractClientPacketHandler |
---|
GMT_Timezone, PACKET_LEN_LINE_TERMINATOR |
Constructor Summary | |
---|---|
TrackClientPacketHandler()
Packet handler constructor |
Method Summary | |
---|---|
static void |
configInit()
Startup configuration initialization |
int |
getActualPacketLength(byte[] packet,
int packetLen)
Returns the size of the packet in the queue. |
byte[] |
getHandlePacket(byte[] pktBytes)
Workhorse of the packet handler. |
static void |
main(java.lang.String[] argv)
Debug/Testing entry point (Debug purposes only, not used for production) |
void |
sessionStarted(java.net.InetAddress inetAddr,
boolean isTCP,
boolean isText)
Callback when session is starting |
void |
sessionTerminated(java.lang.Throwable err,
long readCount,
long writeCount)
Callback when session is terminating |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DEBUG_MODE
public static java.lang.String[] UNIQUEID_PREFIX
public static double MINIMUM_SPEED_KPH
public static boolean ESTIMATE_ODOMETER
public static boolean SIMEVENT_GEOZONES
public static long SIMEVENT_DIGITAL_INPUTS
public static boolean XLATE_LOCATON_INMOTION
public static boolean USE_LAST_VALID_GPS
public static double MINIMUM_MOVED_METERS
public static boolean PACKET_LEN_END_OF_STREAM
public static final double KILOMETERS_PER_KNOT
public static long TKNANO_GPIO_ACC
public static long TKNANO_GPIO_ENGINE
public static long TKNANO_GPIO_ON_BATTERY
public static long TKNANO_GPIO_SENSOR_1
public static long TKNANO_GPIO_SENSOR_2
Constructor Detail |
---|
public TrackClientPacketHandler()
Method Detail |
---|
public void sessionStarted(java.net.InetAddress inetAddr, boolean isTCP, boolean isText)
sessionStarted
in interface ClientPacketHandler
sessionStarted
in class AbstractClientPacketHandler
inetAddr
- The host IP addressisTCP
- True if the connection is TCPisText
- True if the connection is textpublic void sessionTerminated(java.lang.Throwable err, long readCount, long writeCount)
sessionTerminated
in interface ClientPacketHandler
sessionTerminated
in class AbstractClientPacketHandler
public int getActualPacketLength(byte[] packet, int packetLen)
getActualPacketLength
in interface ClientPacketHandler
getActualPacketLength
in class AbstractClientPacketHandler
public byte[] getHandlePacket(byte[] pktBytes)
getHandlePacket
in interface ClientPacketHandler
getHandlePacket
in class AbstractClientPacketHandler
pktBytes
- The packet
public static void configInit()
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |