GaIA BIOS Library
Loading...
Searching...
No Matches
modbus_tcp_slave_platform.h File Reference

Modbus/TCP platform-dependent function prototypes. More...

#include <stdint.h>
#include <modbus_tcp/modbus_tcp.h>
#include <modbus_tcp/modbus_tcp_slave.h>

Functions

int mb_close_connection_and_relisten (mb_tcp_config_t *conf, uintptr_t socket, uint16_t tcp_port)
 Closes the connection on the given socket and listens for a new one on the specified port.

Detailed Description

Modbus/TCP platform-dependent function prototypes.

These functions normally have different implementations for a specific RTOS and TCP/IP library.

Author
Tecnologix, 2021

Function Documentation

◆ mb_close_connection_and_relisten()

int mb_close_connection_and_relisten ( mb_tcp_config_t * conf,
uintptr_t socket,
uint16_t tcp_port )

Closes the connection on the given socket and listens for a new one on the specified port.

Parameters
confmodbus slave configuration.
socketsocket in a connected state.
tcp_portport to listen on.
Returns
MB_TCP_NO_ERROR if no error occurs.