MySensors Library & Examples  2.3.2
Macros | Functions
+ Collaboration diagram for MyGatewayTransport:

Detailed Description

API declaration for MyGatewayTransport.

Gateway transport-related log messages, format: [!]SYSTEM:[SUB SYSTEM:]MESSAGE

Gateway transport debug log messages :

E SYS SUB Message Comment
GWT TIN CONNECTING... Connecting to router
GWT TIN IP=%s IP address [%s] obtained
! GWT TIN DHCP FAIL DHCP request failed
GWT TIN ETH OK Connected to network
! GWT TIN ETH FAIL Connection failed
GWT TPS TOPIC=%s,MSG SENT MQTT message sent on topic [%s]
GWT TPS ETH OK Connected to network
! GWT TPS ETH FAIL Connection failed
GWT IMQ TOPIC=%s,MSG RECEIVE MQTT message received on topic [%s]
GWT RMQ CONNECTING... Connecting to MQTT broker
GWT RMQ OK Connected to MQTT broker
! GWT RMQ FAIL Connection to MQTT broker failed
GWT TPC CONNECTING... Obtaining IP address
GWT TPC IP=%s IP address [%s] obtained
! GWT TPC DHCP FAIL DHCP request failed
GWT RFC C=%d,MSG=%s Received message [%s] from client [%d]
! GWT RFC C=%d,MSG TOO LONG Received message from client [%d] too long
GWT TSA UDP MSG=%s Received UDP message [%s]
GWT TSA ETH OK Connected to network
! GWT TSA ETH FAIL Connection failed
GWT TSA C=d,DISCONNECTED Client [%d] disconnected
GWT TSA C=d,CONNECTED Client [%d] connected
! GWT TSA NO FREE SLOT No free slot for client
! GWT TRC IP RENEW FAIL IP renewal failed

Macros

#define MSG_GW_STARTUP_COMPLETE   "Gateway startup complete."
 Gateway startup message.
 
#define GATEWAY_DEBUG(x, ...)   DEBUG_OUTPUT(x, ##__VA_ARGS__)
 debug output
 

Functions

void gatewayTransportProcess (void)
 Process gateway-related messages.
 
bool gatewayTransportInit (void)
 Initialize gateway transport driver. More...
 
bool gatewayTransportSend (MyMessage &message)
 Send message to controller. More...
 
bool gatewayTransportAvailable (void)
 Check if a new message is available from controller. More...
 
MyMessagegatewayTransportReceive (void)
 Pick up last message received from controller. More...
 

Function Documentation

◆ gatewayTransportAvailable()

bool gatewayTransportAvailable ( void  )

Check if a new message is available from controller.

Returns
true if message available

◆ gatewayTransportInit()

bool gatewayTransportInit ( void  )

Initialize gateway transport driver.

Returns
true if transport initialized

◆ gatewayTransportReceive()

MyMessage& gatewayTransportReceive ( void  )

Pick up last message received from controller.

Returns
message

◆ gatewayTransportSend()

bool gatewayTransportSend ( MyMessage message)

Send message to controller.

Parameters
messageto send
Returns
true if message delivered