|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gtosoft.libvoyager.session.HybridSession
public class HybridSession
Presently, the PIDDecoder is tightly woven with just one device. So if instantiating multiple devices, it's necessary to instantiate new PIDDecoder instances. For example, the new passive network detection, it locks in the GLOBAL NetworkID variable in PIDDecoder, so other device types won't work in that instance.
Nested Class Summary | |
---|---|
static class |
HybridSession.OOBMessageTypes
|
Field Summary | |
---|---|
static int |
SESSION_TYPE_COMMAND
|
static int |
SESSION_TYPE_MONITOR
|
static int |
SESSION_TYPE_OBD2
|
static int |
SESSION_TYPE_UNDEFINED
|
Constructor Summary | |
---|---|
HybridSession(BluetoothAdapter btAdapter,
java.lang.String btAddr,
DashDB dashDB,
EventCallback OOBEventCallback)
Constructor. |
Method Summary | |
---|---|
boolean |
collectChildStats()
Possibly not a fast method... |
java.lang.String |
getAllStatsAsString()
|
ELMBT |
getEBT()
|
MonitorSession |
getMonitorSession()
|
OBD2Session |
getOBDSession()
|
PIDDecoder |
getPIDDecoder()
|
RoutineScan |
getRoutineScan()
|
GeneralStats |
getStats()
Collect child stats and our own and return it all rolled up into a single genstats instance. |
java.util.HashMap<java.lang.String,java.lang.String> |
getStatsAsHashMap()
|
boolean |
isHardwareSniffable()
returns true if the hardware supports sniffing. |
boolean |
isHardwareSWCAN()
|
boolean |
isReady()
Returns true if we're ready for use. |
boolean |
registerDPArrivedCallback(EventCallback DPArrivedCallback)
Just for testing - registers a dp handler which just sends new DPNs through the msg() system for display. |
boolean |
registerMsgCallback(EventCallback ecbMsg)
|
void |
registerOOBHandler(EventCallback newOOBHandler)
Allow upper layers to register an event listener to be notified of out of band information. |
void |
runAsynchronousSessionDetection()
this kicks off an asynchronous thread which starts a LOOP of session detection, ending when session is detected. |
boolean |
runSessionDetection()
given an open I/O layer, this method should sequence through each session type, and try and get it spun up on the connection. |
boolean |
setActiveSession(int newSession)
Use this method to switch from one session to another. |
void |
shutdown()
Call this method to tell us you want to get rid of this instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SESSION_TYPE_UNDEFINED
public static final int SESSION_TYPE_COMMAND
public static final int SESSION_TYPE_OBD2
public static final int SESSION_TYPE_MONITOR
Constructor Detail |
---|
public HybridSession(BluetoothAdapter btAdapter, java.lang.String btAddr, DashDB dashDB, EventCallback OOBEventCallback)
btAdapter
- - a reference to the bluetooth adapter.btAddr
- - Bluetooth address of the peer we want to connect to.dashDB
- - an instance of DashDB.Method Detail |
---|
public boolean collectChildStats()
public GeneralStats getStats()
public java.util.HashMap<java.lang.String,java.lang.String> getStatsAsHashMap()
public void shutdown()
public boolean registerDPArrivedCallback(EventCallback DPArrivedCallback)
public void runAsynchronousSessionDetection()
public boolean isReady()
public boolean isHardwareSWCAN()
public boolean runSessionDetection()
public RoutineScan getRoutineScan()
public boolean setActiveSession(int newSession)
public boolean registerMsgCallback(EventCallback ecbMsg)
public void registerOOBHandler(EventCallback newOOBHandler)
newOOBHandler
- public java.lang.String getAllStatsAsString()
public ELMBT getEBT()
public OBD2Session getOBDSession()
public PIDDecoder getPIDDecoder()
public MonitorSession getMonitorSession()
public boolean isHardwareSniffable()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |