Implementation of the UDPCL. More...
Implementation of the UDPCL.
Sends bundles via UDP, according to the legacy UDPCL. This legacy UDPCL literally sends the bundles directly as UDP payload.
To use this, call bplib_cla_udp_start(). Addresses will be taken from the NC (Node Config) wrapper tables, so bplib_contact_set_out_addr() and bplib_contact_set_in_addr() need to be configured before. Now the CLA is ready to receive but bplib does not know this contact is active, so you also have to call BPLib_CLA_ContactSetup() and BPLib_CLA_ContactStart().
Files | |
| file | bplib_cla_udp.h |
| UDPCL implementation. | |
Data Structures | |
| struct | bplib_cla_udp_t |
| Holds an instance of a UDP CLA, including its stacks. More... | |
Macros | |
| #define | CONFIG_BPLIB_CLA_UDP_BUFLEN (1024) |
| Size of the send AND receive buffer, each. | |
| #define | CONFIG_BPLIB_CLA_UDP_TIMEOUT (10000) |
| The CLA polling from the socket and from bplib is stopped after this time [ms]. | |
| #define | BPLIB_CLA_UDP_RX_STACK_SIZE (THREAD_STACKSIZE_MEDIUM + CONFIG_BPLIB_CLA_UDP_BUFLEN) |
| RX stack size, including receive buffer. | |
| #define | BPLIB_CLA_UDP_TX_STACK_SIZE (THREAD_STACKSIZE_MEDIUM + CONFIG_BPLIB_CLA_UDP_BUFLEN) |
| TX stack size, including egress buffer. | |
Functions | |
| int | bplib_cla_udp_start (bplib_cla_udp_t *cla, uint32_t contact_id) |
| Starts the UDP CLA. | |
| void | bplib_cla_udp_stop (bplib_cla_udp_t *cla) |
| Stops the CLA. | |
| #define BPLIB_CLA_UDP_RX_STACK_SIZE (THREAD_STACKSIZE_MEDIUM + CONFIG_BPLIB_CLA_UDP_BUFLEN) |
RX stack size, including receive buffer.
Definition at line 54 of file bplib_cla_udp.h.
| #define BPLIB_CLA_UDP_TX_STACK_SIZE (THREAD_STACKSIZE_MEDIUM + CONFIG_BPLIB_CLA_UDP_BUFLEN) |
TX stack size, including egress buffer.
Definition at line 56 of file bplib_cla_udp.h.
| #define CONFIG_BPLIB_CLA_UDP_BUFLEN (1024) |
Size of the send AND receive buffer, each.
Definition at line 43 of file bplib_cla_udp.h.
| #define CONFIG_BPLIB_CLA_UDP_TIMEOUT (10000) |
The CLA polling from the socket and from bplib is stopped after this time [ms].
Definition at line 50 of file bplib_cla_udp.h.
| int bplib_cla_udp_start | ( | bplib_cla_udp_t * | cla, |
| uint32_t | contact_id ) |
Starts the UDP CLA.
Should be called BEFORE starting the CLA on bplib's side, with BPLib_CLA_ContactSetup() and BPLib_CLA_ContactStart().
| cla | Instance struct, will be initialized. Has to be available during the lifetime of the CLA, until bplib_cla_udp_stop() is called. |
| contact_id | The index of the contact in the contact table. |
| void bplib_cla_udp_stop | ( | bplib_cla_udp_t * | cla | ) |
Stops the CLA.
Since the ingress and egress threads are running and waiting for data of the UDP socket or bplib, the CLA can only be guaranteed to stop only when the timeouts expire, after BPLIC_CLA_UDP_TIMEOUT ms. The instance should still be valid during this time.
Should be called AFTER stopping the CLA on bplib's side, with BPLib_CLA_ContactStop() and BPLib_CLA_ContactTeardown()
| cla | The instance of the UDP CLA. |