|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gtosoft.libvoyager.session.CommandSession
public class CommandSession
This class defines methods and procedures for sending commands on the SWCAN Network.
Field Summary | |
---|---|
static int |
STATE_READY
|
static int |
STATE_UNINITIALIZED
|
Constructor Summary | |
---|---|
CommandSession(ELMBT bt,
DashDB dashDB)
Default Constructor. |
Method Summary | |
---|---|
void |
doVoyagerVMorseCode()
This method sends a command to the network which invokes the audio system and plays a "V" in Morse code, representative of Voyager command session having successfully connected. |
int |
getCurrentState()
Lets others know our internal state! |
GeneralStats |
getStats()
|
boolean |
isIODoneTrying()
|
void |
registerMsgCallback(EventCallback eCallback)
Call this method to register your very own callback to receive messages from this class! |
void |
registerStateChangeCallback(EventCallback newStateChangeCallback)
|
boolean |
resume()
Perform any actions necessary to resume from a suspend. |
boolean |
sendCommand_SYNC(java.lang.String commandName)
synchronously (not in a separate thread thread) send the specified command. |
void |
sendCommand(java.lang.String commandName)
Send a command over the network asynchronously. |
boolean |
setHeaders(java.lang.String fourByteHeader)
|
void |
setIOReconnectNOW()
Will kick the I/O Layer into trying to connect again. |
void |
setKeepalives(boolean onOrOff)
With this method you can set whether or not we shall send keepalive messages to the bluetooth peer. |
void |
shutdown()
|
boolean |
suspend()
Suspend operations by this class/session and return the network to a usable state for others. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STATE_UNINITIALIZED
public static final int STATE_READY
Constructor Detail |
---|
public CommandSession(ELMBT bt, DashDB dashDB)
bt
- - a reference to the ElmBT object which we should use to connect to the command network.
Please initialize bt before passint it to us.Method Detail |
---|
public void doVoyagerVMorseCode()
public void registerStateChangeCallback(EventCallback newStateChangeCallback)
public int getCurrentState()
public void setKeepalives(boolean onOrOff)
onOrOff
- - true to turn them on, false turns them off.public void shutdown()
public void registerMsgCallback(EventCallback eCallback)
eCallback
- - this is an instance of com.gtosoft.dash.EventCallback with the newMsg method overridden with your own code.public void sendCommand(java.lang.String commandName)
commandName
- public boolean sendCommand_SYNC(java.lang.String commandName)
commandName
-
public boolean setHeaders(java.lang.String fourByteHeader)
public boolean isIODoneTrying()
public void setIOReconnectNOW()
public GeneralStats getStats()
public boolean suspend()
public boolean resume()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |