asyn
4-44-2
|
Class for asyn port clients to communicate on the asynOctet interface. More...
#include <asynPortClient.h>
Public Member Functions | |
asynOctetClient (const char *portName, int addr, const char *drvInfo, double timeout=DEFAULT_TIMEOUT) | |
Constructor for asynOctetClient class. More... | |
asynOctetClient (const char *portName, const char *drvInfo, int addr=0, double timeout=DEFAULT_TIMEOUT) | |
virtual | ~asynOctetClient () |
Destructor for asynOctetClient class. More... | |
virtual asynStatus | write (const char *buffer, size_t bufferLen, size_t *nActual) |
Writes a char buffer to the port driver. More... | |
virtual asynStatus | write (const char *buffer) |
Writes a char buffer to the port driver. More... | |
virtual asynStatus | read (char *buffer, size_t bufferLen, size_t *nActual, int *eomReason) |
Reads a char buffer from the port driver. More... | |
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. More... | |
virtual asynStatus | flush () |
Flushes the input buffer in the port driver. More... | |
virtual asynStatus | setInputEos (const char *eos, int eosLen) |
Sets the input end-of-string terminator in the driver. More... | |
virtual asynStatus | getInputEos (char *eos, int eosSize, int *eosLen) |
Gets the input end-of-string terminator from the driver. More... | |
virtual asynStatus | setOutputEos (const char *eos, int eosLen) |
Sets the output end-of-string terminator in the driver. More... | |
virtual asynStatus | getOutputEos (char *eos, int eosSize, int *eosLen) |
Gets the output end-of-string terminator from the driver. More... | |
virtual asynStatus | registerInterruptUser (interruptCallbackOctet pCallback, void *userPvt=0) |
Registers an interruptCallbackOctet function that the driver will call when there is a new value. More... | |
Public Member Functions inherited from asynParamClient | |
asynParamClient (const char *portName, int addr, const char *asynInterfaceType, const char *drvInfo, double timeout) | |
Constructor for asynParamClient class. More... | |
virtual | ~asynParamClient () |
Destructor for asynParamClient class Frees all allocated resources. More... | |
void | setTimeout (double timeout) |
void | report (FILE *fp, int details) |
Reports the properties of this client. More... | |
char * | getPortName () |
char * | getAsynInterfaceType () |
Additional Inherited Members | |
Protected Attributes inherited from asynParamClient | |
asynUser * | pasynUser_ |
asynUser * | pasynUserSyncIO_ |
asynInterface * | pasynInterface_ |
double | timeout_ |
char * | portName_ |
int | addr_ |
char * | asynInterfaceType_ |
char * | drvInfo_ |
void * | drvPvt |
void * | interruptPvt_ |
Class for asyn port clients to communicate on the asynOctet interface.
|
inline |
Constructor for asynOctetClient class.
[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 |
|
inline |
|
inlinevirtual |
Destructor for asynOctetClient class.
Disconnects from port, frees resources.
|
inlinevirtual |
Flushes the input buffer in the port driver.
|
inlinevirtual |
Gets the input end-of-string terminator from the driver.
[out] | eos | The input EOS string |
[out] | eosSize | The maximum size of the EOS string |
[out] | eosLen | The actual size of the EOS string |
|
inlinevirtual |
Gets the output end-of-string terminator from the driver.
[out] | eos | The output EOS string |
[out] | eosSize | The maximum size of the EOS string |
[out] | eosLen | The actual size of the EOS string |
|
inlinevirtual |
Reads a char buffer from the port driver.
[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 |
|
inlinevirtual |
Registers an interruptCallbackOctet function that the driver will call when there is a new value.
[in] | pCallback | The address of the callback function |
[in] | userPvt | The user-defined pointer to be passed to the callback function |
|
inlinevirtual |
Sets the input end-of-string terminator in the driver.
[in] | eos | The input EOS string |
[in] | eosLen | The size of the EOS string |
|
inlinevirtual |
Sets the output end-of-string terminator in the driver.
[in] | eos | The output EOS string |
[in] | eosLen | The size of the EOS string |
|
inlinevirtual |
Writes a char buffer to the port driver.
[in] | buffer | The characters to write to the port driver |
|
inlinevirtual |
Writes a char buffer to the port driver.
[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 |
|
inlinevirtual |
Writes a char buffer to the port driver and reads the response as an atomic operation.
[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 |