IPC@CHIP Modbus library – API Documentation

Header image

Main page

int mbRTU_slv_loop ( MbHandle  handle,
u16  delayMs 

This function executes cyclic at an endless loop:
1: Waits for incoming Modbus master request and
2: calls the corresponding user-specific callback function (see mbRTU_slv_init()) and
3: sends the result (returned by the callback function) as a Modbus reply
back to the master.

This function can be called as Modbus slave service at a separate task. Calling mbRTU_slv_loop_stop() from outside of the task will force an exit of the loop.

[in] handle : Handle returned by mbRTU_slv_init()
[in] delayMs,: Number of milliseconds the task will sleep after each loop.
-2: Invalid port parameter
else 0 (if stopped by mbRTU_slv_loop_stop())

Top of page | Main page

Copyright © 2017 Beck IPC GmbH
Generated on Thu Mar 9 18:00:33 2017 by Doxygen 1.6.1