I am developing a simple radio transmission network using B-L072Z-LRWAN1 boards. The network structure is formed by:
- One board acting as a gateway (where data is received).
- Multiple boards acting as nodes (which send data to the gateway).
The packet payload sent by nodes is N bytes long and I want to store this packet's information in case gateway stops working and nodes cannot communicate with it. I want to keep data that could not be sent by the node and send it once the gateway is active again.
Let's say I want to keep the last M messages that node could not send to the gateway. The buffer size should be M*N bytes long, but how do I implement this type of buffer in C?
Thank you in advance!
Best Answer