rllib  1
rlmodbusclient.h
Go to the documentation of this file.
1 /***************************************************************************
2  rlmodbusclient.h - description
3  -------------------
4  begin : Wed Jan 07 2004
5  copyright : (C) 2004 by R. Lehrig
6  email : lehrig@t-online.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as *
13  * published by the Free Software Foundation *
14  * *
15  ***************************************************************************/
16 #ifndef _RL_MODBUS_CLIENT_H_
17 #define _RL_MODBUS_CLIENT_H_
18 
19 #include "rldefine.h"
20 #include "rlmodbus.h"
21 #include "rlmailbox.h"
22 #include "rlsharedmemory.h"
23 
28 class rlModbusClient : public rlMailbox, public rlSharedMemory
29 {
30  public:
31  rlModbusClient(const char *mbxname, const char *shmname, int shmsize);
32  virtual ~rlModbusClient();
33  int write(int slave, int function, const unsigned char *data, int len);
34  int writeSingleCoil(int slave, int adr, int value);
35  int writeMultipleCoils(int slave, int adr, const unsigned char *values, int num_coils);
36  int writePresetSingleRegister(int slave, int adr, int value);
37  int writePresetMultipleRegisters(int slave, int adr, const int *values, int num_values);
38  int readBit(int offset, int number);
39  int readByte(int offset, int number);
40  int readShort(int offset, int number);
41 };
42 
43 #endif
44 
int writePresetMultipleRegisters(int slave, int adr, const int *values, int num_values)
int writeMultipleCoils(int slave, int adr, const unsigned char *values, int num_coils)
int writeSingleCoil(int slave, int adr, int value)
virtual ~rlModbusClient()
int readByte(int offset, int number)
int readBit(int offset, int number)
int write(int slave, int function, const unsigned char *data, int len)
int readShort(int offset, int number)
int writePresetSingleRegister(int slave, int adr, int value)
rlModbusClient(const char *mbxname, const char *shmname, int shmsize)