![]() |
SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
|
Mission specific generic callback service. More...
#include <mission.hpp>
Public Member Functions | |
| void | pre_init () const |
| This method is called before the satnogs::comms::lib::board::init(). | |
| void | register_pre_init (etl::delegate< void(void)> callback) |
| Registers a callback for the pre_init(). | |
| void | post_init () const |
| This method is called after the satnogs::comms::lib::board::init(). | |
| void | register_post_init (etl::delegate< void(void)> callback) |
| Registers a callback for the post_init(). | |
| void | start () const |
| This method is called at the end of the startup::start(). | |
| void | register_start (etl::delegate< void(void)> callback) |
| Registers a callback for the start(). | |
| void | register_msg_parser (etl::delegate< bool(msg_arbiter::msg &msg)> callback) |
| Registers a callback for the msg_parser(). | |
| void | register_sp_msg_parser (etl::delegate< bool(msg_arbiter::msg &msg)> callback) |
| bool | msg_parser (msg_arbiter::msg &msg, bool is_sp) |
| This method is called inside the msg_arbiter, in case an incoming message was not parsed by the default telecommand set of SatNOGS-COMMS. This method can actually serve as the mission specific telecommand parsing. Responses can be issued using the msg_arbiter::fwd() method. | |
| mission (mission const &)=delete | |
| void | operator= (mission const &)=delete |
Static Public Member Functions | |
| static mission & | get_instance () |
| Get a singleton access to the mission subsystem. | |
Mission specific generic callback service.
This class provides a convenient way to register mission specific functionality executed in strategically selected places. This minimizes the effort of the mission integration and avoid mission implementation to significantly divert from the original codebase, thus simplifying the maintenance of the code.
If there is no need for any of some of the available hooks, users may just ignore them and the underlying implementation will ensure that nothing will be executed.
Each hook is defines as an etl::delegate allowing any type of C++ method to be passed (e.g method of an object, static method, C function etc).
Definition at line 55 of file mission.hpp.
|
delete |
|
inlinestatic |
Get a singleton access to the mission subsystem.
Definition at line 91 of file mission.hpp.
| bool satnogs::comms::mission::msg_parser | ( | msg_arbiter::msg & | msg, |
| bool | is_sp ) |
This method is called inside the msg_arbiter, in case an incoming message was not parsed by the default telecommand set of SatNOGS-COMMS. This method can actually serve as the mission specific telecommand parsing. Responses can be issued using the msg_arbiter::fwd() method.
| msg | the incoming message to parse |
| is_sp | true if the msg contains a valid CCSDS Space Packet, false otherwise |
Definition at line 122 of file mission.cpp.
|
delete |
| void satnogs::comms::mission::post_init | ( | ) | const |
This method is called after the satnogs::comms::lib::board::init().
Definition at line 53 of file mission.cpp.
| void satnogs::comms::mission::pre_init | ( | ) | const |
This method is called before the satnogs::comms::lib::board::init().
Definition at line 32 of file mission.cpp.
| void satnogs::comms::mission::register_msg_parser | ( | etl::delegate< bool(msg_arbiter::msg &msg)> | callback | ) |
Registers a callback for the msg_parser().
| callback | a valid callback |
Definition at line 96 of file mission.cpp.
| void satnogs::comms::mission::register_post_init | ( | etl::delegate< void(void)> | callback | ) |
Registers a callback for the post_init().
| callback | a valid callback |
Definition at line 64 of file mission.cpp.
| void satnogs::comms::mission::register_pre_init | ( | etl::delegate< void(void)> | callback | ) |
Registers a callback for the pre_init().
| callback | a valid callback |
Definition at line 43 of file mission.cpp.
| void satnogs::comms::mission::register_sp_msg_parser | ( | etl::delegate< bool(msg_arbiter::msg &msg)> | callback | ) |
Definition at line 103 of file mission.cpp.
| void satnogs::comms::mission::register_start | ( | etl::delegate< void(void)> | callback | ) |
Registers a callback for the start().
| callback | a valid callback |
Definition at line 85 of file mission.cpp.
| void satnogs::comms::mission::start | ( | ) | const |
This method is called at the end of the startup::start().
Definition at line 74 of file mission.cpp.