liblightmodbus  2.0
A lightweight, cross-platform Modbus RTU library
Data Fields
modbusSlaveUserFunction Struct Reference

Associates user defined parser function with the function ID. More...

#include <slave.h>

Data Fields

uint8_t function
 The function code. More...
 
ModbusError(* handler )(struct modbusSlave *status, ModbusParser *parser)
 Pointer to the user defined function. More...
 

Detailed Description

Associates user defined parser function with the function ID.

Note
Requires SLAVE_USER_FUNCTIONS module (see Building liblightmodbus)
See also
user-functions

Field Documentation

◆ function

uint8_t modbusSlaveUserFunction::function

The function code.

◆ handler

ModbusError( * modbusSlaveUserFunction::handler) (struct modbusSlave *status, ModbusParser *parser)

Pointer to the user defined function.

Parameters
statusSlave structure to work with
parserThe parser structure containing frame data
Returns
A ModbusError error code

The documentation for this struct was generated from the following file: