rllib
1
|
#include <rlmodbusclient.h>
Public Member Functions | |
rlModbusClient (const char *mbxname, const char *shmname, int shmsize) | |
virtual | ~rlModbusClient () |
int | write (int slave, int function, const unsigned char *data, int len) |
int | writeSingleCoil (int slave, int adr, int value) |
int | writeMultipleCoils (int slave, int adr, const unsigned char *values, int num_coils) |
int | writePresetSingleRegister (int slave, int adr, int value) |
int | writePresetMultipleRegisters (int slave, int adr, const int *values, int num_values) |
int | readBit (int offset, int number) |
int | readByte (int offset, int number) |
int | readShort (int offset, int number) |
Public Member Functions inherited from rlMailbox | |
rlMailbox (const char *name) | |
virtual | ~rlMailbox () |
int | write (const void *buf, int len) |
int | printf (const char *format,...) |
int | read (void *buf, int maxlen, int wait=WAIT) |
int | setReadBufferSize (int size) |
const char * | read (int wait=WAIT) |
int | write (const char *message) |
void | clear () |
Public Member Functions inherited from rlSharedMemory | |
rlSharedMemory (const char *name, unsigned long size, int rwmode=0600) | |
virtual | ~rlSharedMemory () |
int | deleteSharedMemory () |
int | write (unsigned long offset, const void *buf, int len) |
int | read (unsigned long offset, void *buf, int len) |
int | readInt (unsigned long offset, int index) |
int | readShort (unsigned long offset, int index) |
int | readByte (unsigned long offset, int index) |
float | readFloat (unsigned long offset, int index) |
int | writeInt (unsigned long offset, int index, int val) |
int | writeShort (unsigned long offset, int index, int val) |
int | writeByte (unsigned long offset, int index, unsigned char val) |
int | writeFloat (unsigned long offset, int index, float val) |
void * | getUserAdr () |
int | shmKey () |
int | shmId () |
unsigned long | size () |
Additional Inherited Members | |
Public Types inherited from rlMailbox | |
enum | MailboxEnum { MAILBOX_ERROR = -1, MAILBOX_FULL = -2, WAIT = 1, NOWAIT = 0, MAX_MAILBOX = 256*256, OK = 2, COULD_NOT_CREATE_MAILBOX = 3, COULD_NOT_GET_KEY = 4, COULD_NOT_GET_CHAN_ID = 5 } |
Public Types inherited from rlSharedMemory | |
enum | SharedMemoryEnum { OK = 0, ERROR_FILE, ERROR_SHMGET, ERROR_SHMAT, ERROR_SHMCTL } |
Public Attributes inherited from rlMailbox | |
int | status |
char * | name |
Public Attributes inherited from rlSharedMemory | |
int | status |
char * | name |
This class is for data aqusition over a modbus daemon as created by pvdevelop. It communicates over a shared memory and a mailbox according to the pvbrowser principle.
Definition at line 28 of file rlmodbusclient.h.
rlModbusClient::rlModbusClient | ( | const char * | mbxname, |
const char * | shmname, | ||
int | shmsize | ||
) |
Definition at line 18 of file rlmodbusclient.cpp.
|
virtual |
Definition at line 23 of file rlmodbusclient.cpp.
int rlModbusClient::readBit | ( | int | offset, |
int | number | ||
) |
Definition at line 100 of file rlmodbusclient.cpp.
int rlModbusClient::readByte | ( | int | offset, |
int | number | ||
) |
Definition at line 142 of file rlmodbusclient.cpp.
int rlModbusClient::readShort | ( | int | offset, |
int | number | ||
) |
Definition at line 153 of file rlmodbusclient.cpp.
int rlModbusClient::write | ( | int | slave, |
int | function, | ||
const unsigned char * | data, | ||
int | len | ||
) |
Definition at line 27 of file rlmodbusclient.cpp.
int rlModbusClient::writeMultipleCoils | ( | int | slave, |
int | adr, | ||
const unsigned char * | values, | ||
int | num_coils | ||
) |
Definition at line 57 of file rlmodbusclient.cpp.
int rlModbusClient::writePresetMultipleRegisters | ( | int | slave, |
int | adr, | ||
const int * | values, | ||
int | num_values | ||
) |
Definition at line 84 of file rlmodbusclient.cpp.
int rlModbusClient::writePresetSingleRegister | ( | int | slave, |
int | adr, | ||
int | value | ||
) |
Definition at line 75 of file rlmodbusclient.cpp.
int rlModbusClient::writeSingleCoil | ( | int | slave, |
int | adr, | ||
int | value | ||
) |
Definition at line 47 of file rlmodbusclient.cpp.