9#ifndef RH_TcpProtocol_h
10#define RH_TcpProtocol_h
12#define RH_TCP_MESSAGE_TYPE_NOP 0
13#define RH_TCP_MESSAGE_TYPE_THISADDRESS 1
14#define RH_TCP_MESSAGE_TYPE_PACKET 2
17#define RH_TCP_MAX_PAYLOAD_LEN 255
21#define RH_TCP_HEADER_LEN 4
25#define RH_TCP_MAX_MESSAGE_LEN (RH_TCP_MAX_PAYLOAD_LEN - RH_TCP_HEADER_LEN)
33 uint8_t payload[RH_TCP_MAX_PAYLOAD_LEN + 1];
41 uint8_t payload[RH_TCP_MAX_PAYLOAD_LEN];
62 uint8_t payload[RH_TCP_MAX_MESSAGE_LEN];
Generic RH_TCP simulator message structure.
Definition RHTcpProtocol.h:31
uint32_t length
Number of octets following, in network byte order.
Definition RHTcpProtocol.h:32
RH_TCP radio message passed to or from the simulator.
Definition RHTcpProtocol.h:54
uint8_t id
Message sequence number.
Definition RHTcpProtocol.h:60
uint8_t from
Node address of the sender.
Definition RHTcpProtocol.h:59
uint32_t length
Number of octets following, in network byte order.
Definition RHTcpProtocol.h:55
uint8_t to
Node address of the recipient.
Definition RHTcpProtocol.h:58
uint8_t flags
Message flags.
Definition RHTcpProtocol.h:61
uint8_t type
== RH_TCP_MESSAGE_TYPE_PACKET
Definition RHTcpProtocol.h:57
RH_TCP message Notifies the server of thisAddress of this client.
Definition RHTcpProtocol.h:46
uint32_t length
Number of octets following, in network byte order.
Definition RHTcpProtocol.h:47
uint8_t type
== RH_TCP_MESSAGE_TYPE_THISADDRESS
Definition RHTcpProtocol.h:48
uint8_t thisAddress
Node address.
Definition RHTcpProtocol.h:49
Generic RH_TCP message structure with message type.
Definition RHTcpProtocol.h:38
uint8_t type
One of RH_TCP_MESSAGE_TYPE_*.
Definition RHTcpProtocol.h:40
uint32_t length
Number of octets following, in network byte order.
Definition RHTcpProtocol.h:39