|
IGSTK
|
This class implements Posix specific methods for 32-bit communication over a Serial Port(RS-232 connection). More...
#include <igstkSerialCommunicationForPosix.h>


Protected Member Functions | |
| SerialCommunicationForPosix () | |
| Macro with standard traits declarations. More... | |
| ~SerialCommunicationForPosix () | |
| Destructor. More... | |
| virtual ResultType | InternalOpenPort (void) |
| Opens serial port for communication;. More... | |
| virtual ResultType | InternalUpdateParameters (void) |
| Set communication on the open port as per the communication parameters. More... | |
| virtual ResultType | InternalClosePort (void) |
| Closes serial port. More... | |
| virtual ResultType | InternalSendBreak (void) |
| Send a serial break. More... | |
| virtual void | InternalSleep (unsigned int milliseconds) |
| Sleep for the specified number of milliseconds. More... | |
| virtual ResultType | InternalPurgeBuffers (void) |
| Purge the input and output buffers. More... | |
| virtual ResultType | InternalWrite (const char *message, unsigned int numberOfBytes) |
| Write data. More... | |
| virtual ResultType | InternalRead (char *data, unsigned int numberOfBytes, unsigned int &bytesRead) |
| Read data. More... | |
| virtual ResultType | InternalSetRTS (unsigned int signal) |
| Set the RTS (ready-to-send) value 0 : Clear the RTS (request-to-send) signal 1 : Sends the RTS signal. More... | |
| virtual void | PrintSelf (std::ostream &os, itk::Indent indent) const |
| Print object information. More... | |
Protected Member Functions inherited from igstk::SerialCommunication | |
| LoggerType * | GetLogger () const |
| Declarations related to the Logger. More... | |
| SerialCommunication () | |
| ~SerialCommunication () | |
Protected Member Functions inherited from igstk::Communication | |
| Communication (void) | |
| Constructor is protected in order to enforce the use of the New() operator. More... | |
| virtual | ~Communication (void) |
Protected Member Functions inherited from igstk::Object | |
| 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 | |
Public Types inherited from igstk::SerialCommunication | |
| enum | PortNumberType { PortNumber0 = 0, PortNumber1 = 1, PortNumber2 = 2, PortNumber3 = 3, PortNumber4 = 4, PortNumber5 = 5, PortNumber6 = 6, PortNumber7 = 7 } |
| Available port numbers. More... | |
| enum | BaudRateType { BaudRate9600 = 9600, BaudRate19200 = 19200, BaudRate38400 = 38400, BaudRate57600 = 57600, BaudRate115200 = 115200 } |
| Available baud rates. More... | |
| enum | DataBitsType { DataBits7 = 7, DataBits8 = 8 } |
| Available data bits settings. More... | |
| enum | ParityType { NoParity = 'N', OddParity = 'O', EvenParity = 'E' } |
| Available parity settings. More... | |
| enum | StopBitsType { StopBits1 = 1, StopBits2 = 2 } |
| Available stop bits settings. More... | |
| enum | HandshakeType { HandshakeOff = 0, HandshakeOn = 1 } |
| Available hardware handshaking settings. More... | |
| typedef Communication::ResultType | ResultType |
Public Types inherited from igstk::Object | |
| 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 |
Public Member Functions inherited from igstk::SerialCommunication | |
| igstkStandardClassBasicTraitsMacro (SerialCommunication, Communication) | |
| Standard traits of a basic class. More... | |
| virtual void | SetPortNumber (PortNumberType _arg) |
| Specify which serial port to use. More... | |
| virtual PortNumberType | GetPortNumber () |
| Get the serial port, where the ports are numbered 0 through 3. More... | |
| virtual void | SetBaudRate (BaudRateType _arg) |
| Set the baud rate to use. More... | |
| virtual BaudRateType | GetBaudRate () |
| Get the baud rate. More... | |
| virtual void | SetDataBits (DataBitsType _arg) |
| Set the number of bits per character. More... | |
| virtual DataBitsType | GetDataBits () |
| Get the number of bits per character. More... | |
| virtual void | SetParity (ParityType _arg) |
| Set the parity. More... | |
| virtual ParityType | GetParity () |
| Get the parity. More... | |
| virtual void | SetStopBits (StopBitsType _arg) |
| Set the number of stop bits. More... | |
| virtual StopBitsType | GetStopBits () |
| Get the number of stop bits. More... | |
| virtual void | SetHardwareHandshake (HandshakeType _arg) |
| Set whether to use hardware handshaking. More... | |
| virtual HandshakeType | GetHardwareHandshake () |
| Get whether hardware handshaking is enabled. More... | |
| void | SetCaptureFileName (const char *filename) |
| Set the name of the file into which the data stream is recorded. More... | |
| const char * | GetCaptureFileName () const |
| Get the filename into which the data stream is recorded. More... | |
| virtual void | SetCapture (bool _arg) |
| Set whether to record the data. More... | |
| virtual bool | GetCapture () |
| Get whether the data is being recorded. More... | |
| ResultType | UpdateParameters (void) |
| Update the communication parameters, in case you need to change the baud rate, handshaking, timeout, etc. More... | |
| ResultType | OpenCommunication (void) |
| The method OpenCommunication sets up communication as per the data provided. More... | |
| ResultType | CloseCommunication (void) |
| The method CloseCommunication closes the communication. More... | |
| ResultType | SetRTS (unsigned int signal) |
| Set the RTS value 0 : Clear the RTS (request-to-send) signal 1 : Sends the RTS signal. More... | |
| ResultType | Write (const char *message, unsigned int numberOfBytes) |
| Write method sends the string via the communication link. More... | |
| ResultType | Read (char *data, unsigned int numberOfBytes, unsigned int &bytesRead) |
| Read method receives the string via the communication link. More... | |
| ResultType | SendBreak (void) |
| Send a break in the serial communication, which by definition is a series of zeroes that lasts for a 0.3 second duration. More... | |
| ResultType | PurgeBuffers (void) |
| Purge the contents of the buffers. More... | |
| void | Sleep (unsigned int milliseconds) |
| Sleep for the specified number of milliseconds. More... | |
| void | ExportStateMachineDescription (OutputStreamType &ostr, bool skipLoops=false) const |
| Declarations related to the State Machine. More... | |
| void | SetLogger (LoggerType *logger) |
Public Member Functions inherited from igstk::Communication | |
| 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 () |
Public Member Functions inherited from igstk::Object | |
| virtual const char * | GetNameOfClass () const |
| void | SetLogger (LoggerType *logger) |
| Connect the Logger for this class. More... | |
| void | RemoveObserver (unsigned long tag) const |
Static Public Member Functions inherited from igstk::SerialCommunication | |
| static Pointer | New (void) |
| Customized New method that will return the implementation of SerialCommunication that is appropriate for this platform. More... | |
Static Public Member Functions inherited from igstk::Object | |
| static Pointer | New (void) |
This class implements Posix specific methods for 32-bit communication over a Serial Port(RS-232 connection).
"SerialCommunicationForPosix State Machine Diagram" "SerialCommunicationForPosix State Machine Diagram"
Definition at line 41 of file igstkSerialCommunicationForPosix.h.
|
protected |
Macro with standard traits declarations.
Return value type for interface functions Constructor
|
protected |
Destructor.
|
protectedvirtual |
Opens serial port for communication;.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Set communication on the open port as per the communication parameters.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Closes serial port.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Send a serial break.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Sleep for the specified number of milliseconds.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Purge the input and output buffers.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Write data.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Read data.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Set the RTS (ready-to-send) value 0 : Clear the RTS (request-to-send) signal 1 : Sends the RTS signal.
Reimplemented from igstk::SerialCommunication.
|
protectedvirtual |
Print object information.
Reimplemented from igstk::SerialCommunication.
1.8.6