This structure contains pointers to data handlers.
More...
#include <modbus.h>
|
| uint16_t(* | InputRead )(uint16_t idx, uint16_t len, mb_pdu_t *resp_pdu) |
| | A pointer to a function that reads discrete inputs corresponding to the given index.
|
| uint16_t(* | CoilRead )(uint16_t idx, uint16_t len, mb_pdu_t *resp_pdu) |
| | A pointer to a function that reads coils corresponding to the given index.
|
| uint16_t(* | CoilWrite )(uint16_t idx, uint16_t len, uint8_t *val) |
| | A pointer to a function that writes a coil corresponding to the given address.
|
| uint16_t(* | InRegRead )(uint16_t idx, uint16_t len, mb_pdu_t *resp_pdu) |
| | A pointer to a function that reads input registers corresponding to the given address.
|
| uint16_t(* | HRegRead )(uint16_t idx, uint16_t len, mb_pdu_t *resp_pdu) |
| | A pointer to a function that reads a holding register corresponding to the given address.
|
| uint16_t(* | HRegWrite )(uint16_t idx, uint16_t len, uint8_t *val) |
| | A pointer to a function that writes a holding register corresponding to the given address.
|
This structure contains pointers to data handlers.
◆ CoilRead
| uint16_t(* mb_data_handlers_t::CoilRead) (uint16_t idx, uint16_t len, mb_pdu_t *resp_pdu) |
A pointer to a function that reads coils corresponding to the given index.
- Parameters
-
| [in] | idx | index of the first coil to read. |
| [in] | len | number of coils to read. |
| [out] | data | data that has been read. |
- Returns
0 if all was ok, a different value otherwise.
◆ CoilWrite
| uint16_t(* mb_data_handlers_t::CoilWrite) (uint16_t idx, uint16_t len, uint8_t *val) |
A pointer to a function that writes a coil corresponding to the given address.
- Parameters
-
| [in] | idx | index of the first coil to write. |
| [in] | len | number of coils to write. |
| [in] | val | coil values to write. |
- Returns
0 if all was ok, a different value otherwise.
◆ HRegRead
| uint16_t(* mb_data_handlers_t::HRegRead) (uint16_t idx, uint16_t len, mb_pdu_t *resp_pdu) |
A pointer to a function that reads a holding register corresponding to the given address.
- Parameters
-
| [in] | idx | index of the first holding register to read. |
| [out] | data | value that has been read. |
- Returns
0 if all was ok, a different value otherwise.
◆ HRegWrite
| uint16_t(* mb_data_handlers_t::HRegWrite) (uint16_t idx, uint16_t len, uint8_t *val) |
A pointer to a function that writes a holding register corresponding to the given address.
- Parameters
-
| [in] | idx | index of the first holding register to write. |
| [in] | len | number of register values to write. |
| [in] | val | register values to write. |
- Returns
0 if all was ok, a different value otherwise.
◆ InputRead
| uint16_t(* mb_data_handlers_t::InputRead) (uint16_t idx, uint16_t len, mb_pdu_t *resp_pdu) |
A pointer to a function that reads discrete inputs corresponding to the given index.
- Parameters
-
| [in] | idx | index of the first discrete input to read. |
| [in] | len | number of discrete inputs to read. |
| [out] | data | data that has been read. |
- Returns
0 if all was ok, a different value otherwise.
◆ InRegRead
| uint16_t(* mb_data_handlers_t::InRegRead) (uint16_t idx, uint16_t len, mb_pdu_t *resp_pdu) |
A pointer to a function that reads input registers corresponding to the given address.
- Parameters
-
| [in] | idx | index of the first input register to read. |
| [in] | len | number of input registers to read. |
| [out] | data | data that has been read. |
- Returns
0 if all was ok, a different value otherwise.
The documentation for this struct was generated from the following file: