35 if (packet == NULL|| chain == NULL) {
44 *((uint16_t *)(link_packet.
data)) = packet->
size;
45 offset =
sizeof(packet->
size);
46 *((uint16_t *)(link_packet.
data + offset)) = packet->
seq_nr;
47 offset +=
sizeof(packet->
seq_nr);
48 *((uint16_t *)(link_packet.
data + offset)) = packet->
seq_len;
66 if (packet == NULL|| chain == NULL) {
76 packet->
size = *((uint16_t *)link_packet.
data);
77 offset =
sizeof(packet->
size);
78 packet->
seq_nr = *((uint16_t *)(link_packet.
data + offset));
79 offset +=
sizeof(packet->
seq_nr);
80 packet->
seq_len = *((uint16_t *)(link_packet.
data + offset));
81 offset +=
sizeof(packet->
seq_len);
82 packet->
data = link_packet.
data + offset;
91 static const uint16_t internal_offset =
sizeof(packet->
size) +
sizeof(packet->
seq_len)
95 *offset = internal_offset;
98 return internal_offset;
fpc_com_result_t fpc_com_transport_transmit(fpc_com_packet_tsp_t *packet, fpc_com_chain_t *chain)
Transmit a transport layer packet.
uint16_t(* tsp_overhead_get)(uint16_t *offset)
uint8_t * phy_mtu_buffer[2]
fpc_com_result_t fpc_com_link_receive(fpc_com_packet_link_t *packet, fpc_com_chain_t *chain)
Receives a packet from the physical link.
fpc_com_channel_t channel
fpc_com_result_t fpc_com_link_transmit(fpc_com_packet_link_t *packet, fpc_com_chain_t *chain)
Sends a packet over the physical link in blocking mode.
fpc_com_result_t fpc_com_transport_receive(fpc_com_packet_tsp_t *packet, fpc_com_chain_t *chain)
Receive a transport layer packet.
fpc_com_channel_t channel
uint16_t(* link_overhead_get)(uint16_t *offset)
Communication transport interface.
Communication link interface.
uint16_t fpc_com_transport_get_overhead(uint16_t *offset)
Returns the overhead of the layer.