#include <AnnotatorComm.h>
Inheritance diagram for AnnotatorComm::AnnotatorComm:
Public Member Functions | |
AnnotatorComm (InputStream *in, OutputStream *out) | |
virtual | ~AnnotatorComm () |
virtual void | close () throw (IOException) |
virtual void | signal (ResponseMessage &rsp) |
virtual void | addTimestampListener (TimestampListener *listener) |
virtual void | removeTimestampListener (TimestampListener *listener) |
virtual vector< TimestampListener * > | getTimestampListeners () |
virtual void | addTextMessageListener (TextMessageListener *listener) |
virtual void | removeTextMessageListener (TextMessageListener *listener) |
virtual vector< TextMessageListener * > | getTextMessageListeners () |
void | noop () throw (IOException) |
DeviceId | getDeviceId () throw (IOException) |
FirmwareVersion | getFirmwareVersion () throw (IOException) |
string | getFirmwareTimestamp () throw (IOException) |
int | getSerialNumber () throw (IOException) |
void | setSerialNumber (int serialno, int key) throw (IOException) |
string | getDeviceName () throw (IOException) |
void | setDeviceName (string name) throw (IOException) |
vector< TimeSource > | getSupportedTimeSources () throw (IOException) |
TimeSource | getTimeSource () throw (IOException) |
void | setTimeSource (TimeSource &source) throw (IOException) |
MicrosecondTimestamp | getCurrentTime () throw (IOException) |
void | setCurrentTime (MicrosecondTimestamp timestamp) throw (IOException) |
TimeSourceLockStatus | getTimeSourceLockStatus () throw (IOException) |
void | setTimeSourceTimestampMode (bool isEnabled) throw (IOException) |
bool | isTimeSourceTimestampMode () throw (IOException) |
void | saveOptions () throw (IOException) |
Static Public Member Functions | |
static string | getLibAnnotatorCommVersion () |
Static Public Attributes | |
static const string | VERSION |
static const unsigned int | MAX_NAME_LEN |
static const int | STX |
static const int | ETX |
Protected Member Functions | |
virtual ResponseMessage | sendRecv (CommandMessage &msg) throw (IOException) |
virtual void | signalTimestampListeners (Timestamp ×tamp) |
virtual void | signalSynchronousResponse (ResponseMessage &rsp) |
Definition at line 46 of file AnnotatorComm.h.
AnnotatorComm::AnnotatorComm::AnnotatorComm | ( | InputStream * | in, | |
OutputStream * | out | |||
) |
virtual AnnotatorComm::AnnotatorComm::~AnnotatorComm | ( | ) | [virtual] |
AnnotatorComm
destructor
virtual void AnnotatorComm::AnnotatorComm::addTextMessageListener | ( | TextMessageListener * | listener | ) | [virtual] |
Add a text message listener to be notified when a text message is received.
listener | text message listener to notify |
virtual void AnnotatorComm::AnnotatorComm::addTimestampListener | ( | TimestampListener * | listener | ) | [virtual] |
Add a timestamp listener to be notified when a timestamp is received.
listener | timestamp listener to notify |
virtual void AnnotatorComm::AnnotatorComm::close | ( | ) | throw (IOException) [virtual] |
Close I/O streams attached to the Annotator.
IOException | failure to close streams |
Reimplemented in AnnotatorComm::AnnotatorJr::AnnotatorJr.
MicrosecondTimestamp AnnotatorComm::AnnotatorComm::getCurrentTime | ( | ) | throw (IOException) |
Get the Annotator's current time.
IOException | failure to get current time |
DeviceId AnnotatorComm::AnnotatorComm::getDeviceId | ( | ) | throw (IOException) |
Get the device's ID. Determine which type of Annotator is present.
IOException | failure to get the device's ID |
string AnnotatorComm::AnnotatorComm::getDeviceName | ( | ) | throw (IOException) |
string AnnotatorComm::AnnotatorComm::getFirmwareTimestamp | ( | ) | throw (IOException) |
Get the firmware build time and date stamp.
IOException | failure to get firmware build time |
FirmwareVersion AnnotatorComm::AnnotatorComm::getFirmwareVersion | ( | ) | throw (IOException) |
Get the device's version number.
IOException | failure to get device firmware version |
static string AnnotatorComm::AnnotatorComm::getLibAnnotatorCommVersion | ( | ) | [static] |
Get libAnnotatorComm's version.
int AnnotatorComm::AnnotatorComm::getSerialNumber | ( | ) | throw (IOException) |
Get the device's serial number.
IOException | failure to get serial number |
vector<TimeSource> AnnotatorComm::AnnotatorComm::getSupportedTimeSources | ( | ) | throw (IOException) |
Get the supported time sources. The device can be set to decode any of the returned time sources.
IOException | failure to get supported time sources |
virtual vector<TextMessageListener*> AnnotatorComm::AnnotatorComm::getTextMessageListeners | ( | ) | [virtual] |
Get current text message listeners.
TimeSource AnnotatorComm::AnnotatorComm::getTimeSource | ( | ) | throw (IOException) |
Get the time source currently being decoded.
IOException | failiure to get current time source |
TimeSourceLockStatus AnnotatorComm::AnnotatorComm::getTimeSourceLockStatus | ( | ) | throw (IOException) |
Get the time source lock status.
IOException | failure to get lock status |
virtual vector<TimestampListener*> AnnotatorComm::AnnotatorComm::getTimestampListeners | ( | ) | [virtual] |
Get current timestamp listeners.
bool AnnotatorComm::AnnotatorComm::isTimeSourceTimestampMode | ( | ) | throw (IOException) |
Get the time source timestamp mode.
IOException | failure to get mode |
void AnnotatorComm::AnnotatorComm::noop | ( | ) | throw (IOException) |
virtual void AnnotatorComm::AnnotatorComm::removeTextMessageListener | ( | TextMessageListener * | listener | ) | [virtual] |
Remove a text message listener.
listener | text message listener to remove |
virtual void AnnotatorComm::AnnotatorComm::removeTimestampListener | ( | TimestampListener * | listener | ) | [virtual] |
Remove a timestamp listener.
listener | timestamp listener to remove |
void AnnotatorComm::AnnotatorComm::saveOptions | ( | ) | throw (IOException) |
Save current options as the default to flash memory. When the device is reset, the options will be restored from flash. Device name and other options specially marked are not affected by this command.
IOException | failure to save options |
virtual ResponseMessage AnnotatorComm::AnnotatorComm::sendRecv | ( | CommandMessage & | msg | ) | throw (IOException) [protected, virtual] |
Send a command and return its response.
msg | command message to send |
IOException | failure to send and receive |
void AnnotatorComm::AnnotatorComm::setCurrentTime | ( | MicrosecondTimestamp | timestamp | ) | throw (IOException) |
Set the Annotator's current time.
timestamp | current time |
IOException | failure to set current time |
void AnnotatorComm::AnnotatorComm::setDeviceName | ( | string | name | ) | throw (IOException) |
Set the device's name.
name | device name |
IOException | failure to set device name |
void AnnotatorComm::AnnotatorComm::setSerialNumber | ( | int | serialno, | |
int | key | |||
) | throw (IOException) |
Set the device's serial number. This method is for factory use only and requires a security key to function.
serialno | serial number | |
key | security key |
IOException |
void AnnotatorComm::AnnotatorComm::setTimeSource | ( | TimeSource & | source | ) | throw (IOException) |
Set the time source to be decoded.
source | time source to decode |
IOException | failure to set time source |
void AnnotatorComm::AnnotatorComm::setTimeSourceTimestampMode | ( | bool | isEnabled | ) | throw (IOException) |
Set the time source timestamp mode. When enabled, the Annotator will stream time source timestamps back across the AnnotatorComm link.
isEnabled | enabled status |
IOException | failure to set mode |
virtual void AnnotatorComm::AnnotatorComm::signal | ( | ResponseMessage & | rsp | ) | [virtual] |
Signal that a response message has been read and needs tending. Override this method to provide device specific response message functionality. This method is called by ResponseReader
.
rsp | new response message |
Reimplemented in AnnotatorComm::AnnotatorJr::AnnotatorJr.
virtual void AnnotatorComm::AnnotatorComm::signalSynchronousResponse | ( | ResponseMessage & | rsp | ) | [protected, virtual] |
Signal that a response message has been received.
rsp | reponse message received |
virtual void AnnotatorComm::AnnotatorComm::signalTimestampListeners | ( | Timestamp & | timestamp | ) | [protected, virtual] |
Signal timestamp listeners that a timestamp has been received.
timestamp | timestamp received |
const int AnnotatorComm::AnnotatorComm::ETX [static] |
End of Transmission Marker
Definition at line 67 of file AnnotatorComm.h.
const unsigned int AnnotatorComm::AnnotatorComm::MAX_NAME_LEN [static] |
Maximum length of an Annotator name
Definition at line 57 of file AnnotatorComm.h.
const int AnnotatorComm::AnnotatorComm::STX [static] |
Start of Transmission Marker
Definition at line 62 of file AnnotatorComm.h.
const string AnnotatorComm::AnnotatorComm::VERSION [static] |
libAnnotatorComm version
Definition at line 52 of file AnnotatorComm.h.