Modbus Master and Slave for Arduino  1.2
Arduino library for implementing a Modbus Master or Slave through Serial port
Functions
Modbus Buffer Management

Functions

uint16_t Modbus::getInCnt ()
 number of incoming messages More...
 
uint16_t Modbus::getOutCnt ()
 number of outcoming messages More...
 
uint16_t Modbus::getErrCnt ()
 error counter More...
 
uint8_t Modbus::getState ()
 
uint8_t Modbus::getLastError ()
 get last error message More...
 

Detailed Description

Function Documentation

uint16_t Modbus::getErrCnt ( )

error counter

Get errors counter value This can be useful to diagnose communication.

Returns
errors counter

Definition at line 386 of file ModbusRtu.h.

uint16_t Modbus::getInCnt ( )

number of incoming messages

Get input messages counter value This can be useful to diagnose communication.

Returns
input messages counter

Definition at line 362 of file ModbusRtu.h.

uint8_t Modbus::getLastError ( )

get last error message

Get the last error in the protocol processor

NO_REPLY = 255 Time-out

Returns
EXC_FUNC_CODE = 1 Function code not available
EXC_ADDR_RANGE = 2 Address beyond available space for Modbus registers
EXC_REGS_QUANT = 3 Coils or registers number beyond the available space

Definition at line 409 of file ModbusRtu.h.

uint16_t Modbus::getOutCnt ( )

number of outcoming messages

Get transmitted messages counter value This can be useful to diagnose communication.

Returns
transmitted messages counter

Definition at line 374 of file ModbusRtu.h.

uint8_t Modbus::getState ( )

Get modbus master state

Returns
= 0 IDLE, = 1 WAITING FOR ANSWER

Definition at line 396 of file ModbusRtu.h.