fpc_com_transport.c File Reference

Communication transport layer implementation. More...

`#include <stdlib.h>`
`#include <string.h>`
`#include "fpc_com_link.h"`
`#include "fpc_com_transport.h"`
Include dependency graph for fpc_com_transport.c:

Go to the source code of this file.

## Functions

fpc_com_result_t | fpc_com_transport_transmit (fpc_com_packet_tsp_t *packet, fpc_com_chain_t *chain)
| Transmit a transport layer packet. More...
fpc_com_result_t | fpc_com_transport_receive (fpc_com_packet_tsp_t *packet, fpc_com_chain_t *chain)
| Receive a transport layer packet. More...
uint16_t | fpc_com_transport_get_overhead (uint16_t *offset)
| Returns the overhead of the layer. More...

## Detailed Description

Communication transport layer implementation.

Definition in file fpc_com_transport.c.

## Function Documentation

uint16_t fpc_com_transport_get_overhead | ( | uint16_t * | offset | ) |

Returns the overhead of the layer.

Parameters

  [out] | offset | The offset to the packet data.

Returns
  Overhead size in bytes.

Definition at line 88 of file fpc_com_transport.c.

References fpc_com_packet_transport::seq_len, fpc_com_packet_transport::seq_nr, and fpc_com_packet_transport::size.

fpc_com_result_t fpc_com_transport_receive | ( | fpc_com_packet_tsp_t * | packet,
|  | fpc_com_chain_t * | chain
| ) |  |

Receive a transport layer packet.

Parameters

  [in,out] | packet | The packet to populate.
  [in] | chain | The chain to use.

Returns
  fpc_com_result_t

Definition at line 60 of file fpc_com_transport.c.

References fpc_com_packet_transport::data, fpc_com_packet_link::data, fpc_com_link_receive(), FPC_COM_RESULT_INVALID_ARGUMENT, FPC_COM_RESULT_OK, fpc_com_packet_transport::seq_len, fpc_com_packet_transport::seq_nr, and fpc_com_packet_transport::size.

Here is the call graph for this function:

fpc_com_result_t fpc_com_transport_transmit | ( | fpc_com_packet_tsp_t * | packet,
|  | fpc_com_chain_t * | chain
| ) |  |

Transmit a transport layer packet.

Parameters

  [in] | packet | The packet to transmit.
  [in] | chain | The chain to use.

Returns
  fpc_com_result_t

Definition at line 28 of file fpc_com_transport.c.

References fpc_com_packet_link::channel, fpc_com_chain::channel, fpc_com_packet_link::data, FPC_COM_CHAIN_TX, fpc_com_link_transmit(), FPC_COM_RESULT_INVALID_ARGUMENT, fpc_com_chain::link_overhead_get, fpc_com_chain::phy_mtu_buffer, fpc_com_packet_transport::seq_len, fpc_com_packet_transport::seq_nr, fpc_com_packet_transport::size, fpc_com_packet_link::size, and fpc_com_chain::tsp_overhead_get.

Here is the call graph for this function: