Receiving Data in C++#
This how-to guide describes the concepts of receiving data from other satellites. It is recommended to read through the implementation how-to of satellites in C++ in order to get a solid understanding of the state machine and data transmission mechanism.
Receiving Data#
The ReceiverSatellite
base class provides functions to receive
data. To use it the inheritance can simply be changed from Satellite
.
To receive data, the receive_bor()
,
receive_data()
and
receive_eor()
methods have to be implemented.
A running()
method must not be implemented. Files on disk
should be opened in the starting()
method and closed in the
stopping()
method.
While receiving data, the receiver should also store the tags in the of the messages header. They can be retrieved via
data_message.getHeader().getTags()
. Data always arrives sequentially, so file locking is not required.