Class for asyn port clients to communicate on the asynOctet interface.
More...
#include <asynPortClient.h>
List of all members.
Public Member Functions |
| asynOctetClient (const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT) |
| Constructor for asynOctetClient class.
|
virtual | ~asynOctetClient () |
| Destructor for asynOctetClient class.
|
virtual asynStatus | write (const char *buffer, size_t bufferLen, size_t *nActual) |
| Writes a char buffer to the port driver.
|
virtual asynStatus | read (char *buffer, size_t bufferLen, size_t *nActual, int *eomReason) |
| Reads a char buffer from the port driver.
|
virtual asynStatus | writeRead (const char *writeBuffer, size_t writeBufferLen, char *readBuffer, size_t readBufferLen, size_t *nBytesOut, size_t *nBytesIn, int *eomReason) |
| Writes a char buffer to the port driver and reads the response as an atomic operation.
|
virtual asynStatus | flush () |
| Flushes the input buffer in the port driver.
|
virtual asynStatus | setInputEos (const char *eos, int eosLen) |
| Sets the input end-of-string terminator in the driver.
|
virtual asynStatus | getInputEos (char *eos, int eosSize, int *eosLen) |
| Gets the input end-of-string terminator from the driver.
|
virtual asynStatus | setOutputEos (const char *eos, int eosLen) |
| Sets the output end-of-string terminator in the driver.
|
virtual asynStatus | getOutputEos (char *eos, int eosSize, int *eosLen) |
| Gets the output end-of-string terminator from the driver.
|
virtual asynStatus | registerInterruptUser (interruptCallbackOctet pCallback) |
| Registers an interruptCallbackOctet function that the driver will call when there is a new value.
|
Detailed Description
Class for asyn port clients to communicate on the asynOctet interface.
Constructor & Destructor Documentation
asynOctetClient::asynOctetClient |
( |
const char * |
portName, |
|
|
int |
addr, |
|
|
const char * |
drvInfo, |
|
|
double |
timeout = DEFAULT_TIMEOUT |
|
) |
| [inline] |
Constructor for asynOctetClient class.
- Parameters:
-
[in] | portName | The name of the asyn port to connect to |
[in] | addr | The address on the asyn port to connect to |
[in] | drvInfo | The drvInfo string to identify which property of the port is being connected to |
[in] | timeout | The default timeout for all communications between the client and the port driver |
virtual asynOctetClient::~asynOctetClient |
( |
| ) |
[inline, virtual] |
Destructor for asynOctetClient class.
Disconnects from port, frees resources.
Member Function Documentation
virtual asynStatus asynOctetClient::flush |
( |
| ) |
[inline, virtual] |
Flushes the input buffer in the port driver.
virtual asynStatus asynOctetClient::getInputEos |
( |
char * |
eos, |
|
|
int |
eosSize, |
|
|
int * |
eosLen |
|
) |
| [inline, virtual] |
Gets the input end-of-string terminator from the driver.
- Parameters:
-
[out] | eos | The input EOS string |
[out] | eosSize | The maximum size of the EOS string |
[out] | eosLen | The actual size of the EOS string |
virtual asynStatus asynOctetClient::getOutputEos |
( |
char * |
eos, |
|
|
int |
eosSize, |
|
|
int * |
eosLen |
|
) |
| [inline, virtual] |
Gets the output end-of-string terminator from the driver.
- Parameters:
-
[out] | eos | The output EOS string |
[out] | eosSize | The maximum size of the EOS string |
[out] | eosLen | The actual size of the EOS string |
virtual asynStatus asynOctetClient::read |
( |
char * |
buffer, |
|
|
size_t |
bufferLen, |
|
|
size_t * |
nActual, |
|
|
int * |
eomReason |
|
) |
| [inline, virtual] |
Reads a char buffer from the port driver.
- Parameters:
-
[out] | buffer | The characters read from the port driver |
[in] | bufferLen | The size of the buffer |
[out] | nActual | The number of characters actually read |
[out] | eomReason | The end of message reason, i.e. why the read terminated |
virtual asynStatus asynOctetClient::registerInterruptUser |
( |
interruptCallbackOctet |
pCallback | ) |
[inline, virtual] |
Registers an interruptCallbackOctet function that the driver will call when there is a new value.
- Parameters:
-
[in] | pCallback | The address of the callback function |
virtual asynStatus asynOctetClient::setInputEos |
( |
const char * |
eos, |
|
|
int |
eosLen |
|
) |
| [inline, virtual] |
Sets the input end-of-string terminator in the driver.
- Parameters:
-
[in] | eos | The input EOS string |
[in] | eosLen | The size of the EOS string |
virtual asynStatus asynOctetClient::setOutputEos |
( |
const char * |
eos, |
|
|
int |
eosLen |
|
) |
| [inline, virtual] |
Sets the output end-of-string terminator in the driver.
- Parameters:
-
[in] | eos | The output EOS string |
[in] | eosLen | The size of the EOS string |
virtual asynStatus asynOctetClient::write |
( |
const char * |
buffer, |
|
|
size_t |
bufferLen, |
|
|
size_t * |
nActual |
|
) |
| [inline, virtual] |
Writes a char buffer to the port driver.
- Parameters:
-
[in] | buffer | The characters to write to the port driver |
[in] | bufferLen | The size of the buffer |
[out] | nActual | The number of characters actually written |
virtual asynStatus asynOctetClient::writeRead |
( |
const char * |
writeBuffer, |
|
|
size_t |
writeBufferLen, |
|
|
char * |
readBuffer, |
|
|
size_t |
readBufferLen, |
|
|
size_t * |
nBytesOut, |
|
|
size_t * |
nBytesIn, |
|
|
int * |
eomReason |
|
) |
| [inline, virtual] |
Writes a char buffer to the port driver and reads the response as an atomic operation.
- Parameters:
-
[in] | writeBuffer | The characters to write to the port driver |
[in] | writeBufferLen | The size of the write buffer |
[out] | readBuffer | The characters read from the port driver |
[in] | readBufferLen | The size of the read buffer |
[out] | nBytesOut | The number of characters actually written |
[out] | nBytesIn | The number of characters actually read |
[out] | eomReason | The end of message reason, i.e. why the read terminated |
The documentation for this class was generated from the following file: