29 lines
1.0 KiB
C
29 lines
1.0 KiB
C
/*---------------------------------------------------------------------------
|
|
M O D B U S T C P . H
|
|
|
|
Modbus functions designed for use with the WEST4100 Temperature Controller.
|
|
|
|
Paul Barron, 2008
|
|
----------------------------------------------------------------------------*/
|
|
|
|
#ifndef MODBUSTCP
|
|
#define MODBUSTCP
|
|
#include "rs232controller.h"
|
|
|
|
// Own Codes
|
|
#define MODBUSTCP_BadFunction -8001
|
|
#define MODBUSTCP_BadDataAddress -8002
|
|
#define MODBUSTCP_IllegalFunction -8011
|
|
#define MODBUSTCP_IllegalDataAddress -8012
|
|
#define MODBUSTCP_IllegalDataValue -8013
|
|
#define MODBUSTCP_UnsupportedError -8014 // Device returned a modbus error that is not 81, 82 or 83
|
|
#define MODBUSTCP_TCPError -8016 // Repsonse Transaction and Protocol Identifier do no match query
|
|
#define MODBUSTCP_UnknownError -8017
|
|
|
|
|
|
/*---------------------------------------------------------------------------*/
|
|
|
|
int transactModbusTCP(prs232 self, unsigned char *query, int queryLength, unsigned char *response, int responseLength);
|
|
|
|
#endif
|