IGSTK
|
Class Communication is the base class for communication between the tracker class and the hardware tracking device. More...
#include <igstkCommunication.h>
Public Member Functions | |
virtual ResultType | CloseCommunication (void) |
The method CloseCommunication closes the communication. More... | |
virtual void | SetTimeoutPeriod (unsigned int _arg) |
The method SetTimeoutPeriod sets the amount of time, in milliseconds to wait on a reply from the device before generating a timeout event. More... | |
virtual unsigned int | GetTimeoutPeriod () |
virtual void | SetReadTerminationCharacter (char _arg) |
The method SetReadTerminationCharacter sets a special character that the device uses to mark the end of a reply (defaults to end-of-file character, ascii 255). More... | |
virtual char | GetReadTerminationCharacter () |
virtual void | SetUseReadTerminationCharacter (bool _arg) |
The method SetUseReadTerminationCharacter sets whether to use the termination character, or not use a termination character. More... | |
virtual bool | GetUseReadTerminationCharacter () |
virtual ResultType | Write (const char *, unsigned int) |
Write method sends the string via communication link. More... | |
virtual ResultType | Read (char *, unsigned int, unsigned int &) |
Read method receives string via communication link. More... | |
![]() | |
virtual const char * | GetNameOfClass () const |
void | SetLogger (LoggerType *logger) |
Connect the Logger for this class. More... | |
void | RemoveObserver (unsigned long tag) const |
Protected Member Functions | |
Communication (void) | |
Constructor is protected in order to enforce the use of the New() operator. More... | |
virtual | ~Communication (void) |
virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const |
Print object information. More... | |
![]() | |
LoggerType * | GetLogger () const |
Object (void) | |
Constructor is protected in order to enforce the use of the New() operator. More... | |
virtual | ~Object (void) |
void | RegisterObservedObject (const ::igstk::Object *object, unsigned long tag) |
Register observed objects in an internal array so that they can be disconnected upon destruction. More... | |
void | RemoveFromObservedObjects () |
Remove observers that this object may have connected to other objects. More... | |
Additional Inherited Members | |
![]() | |
typedef Object | Self |
General Typedefs. More... | |
typedef ::itk::Object | Superclass |
typedef ::itk::SmartPointer< Self > | Pointer |
typedef ::itk::SmartPointer < const Self > | ConstPointer |
typedef igstk::Logger | LoggerType |
![]() | |
static Pointer | New (void) |
Class Communication is the base class for communication between the tracker class and the hardware tracking device.
This communication may be established via serial port, parallel port, ethernet, or an offline communication (through a file or class emulating tracker response). Classes specific to each such communication would be derived from this base Communication class.
Definition at line 37 of file igstkCommunication.h.
|
protected |
Constructor is protected in order to enforce the use of the New() operator.
|
protectedvirtual |
|
virtual |
The method CloseCommunication closes the communication.
Reimplemented in igstk::SerialCommunication.
|
virtual |
The method SetTimeoutPeriod sets the amount of time, in milliseconds to wait on a reply from the device before generating a timeout event.
The default will vary depending on the communication method that is used..
|
virtual |
|
virtual |
The method SetReadTerminationCharacter sets a special character that the device uses to mark the end of a reply (defaults to end-of-file character, ascii 255).
|
virtual |
|
virtual |
The method SetUseReadTerminationCharacter sets whether to use the termination character, or not use a termination character.
|
virtual |
|
inlinevirtual |
Write method sends the string via communication link.
Reimplemented in igstk::SerialCommunication.
Definition at line 80 of file igstkCommunication.h.
|
inlinevirtual |
Read method receives string via communication link.
Reimplemented in igstk::SerialCommunication.
Definition at line 84 of file igstkCommunication.h.
|
protectedvirtual |
Print object information.
Reimplemented from igstk::Object.
Reimplemented in igstk::SerialCommunication, igstk::SerialCommunicationForWindows, igstk::SerialCommunicationSimulator, and igstk::SerialCommunicationForPosix.