SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::mission Class Reference

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 missionget_instance ()
 Get a singleton access to the mission subsystem.

Detailed Description

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).

Note
During your mission development, if a special need for a mission specific hook comes up, please raise an issue and contribute back with the appropriate merge request.

Definition at line 55 of file mission.hpp.

Constructor & Destructor Documentation

◆ mission()

satnogs::comms::mission::mission ( mission const & )
delete

Member Function Documentation

◆ get_instance()

mission & satnogs::comms::mission::get_instance ( )
inlinestatic

Get a singleton access to the mission subsystem.

Returns
mission& singleton access to the mission subsystem

Definition at line 91 of file mission.hpp.

◆ msg_parser()

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.

Parameters
msgthe incoming message to parse
is_sptrue if the msg contains a valid CCSDS Space Packet, false otherwise
Returns
true if the parsing was successful
false if the parsing was not successful

Definition at line 122 of file mission.cpp.

◆ operator=()

void satnogs::comms::mission::operator= ( mission const & )
delete

◆ post_init()

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.

◆ pre_init()

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.

◆ register_msg_parser()

void satnogs::comms::mission::register_msg_parser ( etl::delegate< bool(msg_arbiter::msg &msg)> callback)

Registers a callback for the msg_parser().

Parameters
callbacka valid callback

Definition at line 96 of file mission.cpp.

◆ register_post_init()

void satnogs::comms::mission::register_post_init ( etl::delegate< void(void)> callback)

Registers a callback for the post_init().

Parameters
callbacka valid callback

Definition at line 64 of file mission.cpp.

◆ register_pre_init()

void satnogs::comms::mission::register_pre_init ( etl::delegate< void(void)> callback)

Registers a callback for the pre_init().

Parameters
callbacka valid callback

Definition at line 43 of file mission.cpp.

◆ register_sp_msg_parser()

void satnogs::comms::mission::register_sp_msg_parser ( etl::delegate< bool(msg_arbiter::msg &msg)> callback)

Definition at line 103 of file mission.cpp.

◆ register_start()

void satnogs::comms::mission::register_start ( etl::delegate< void(void)> callback)

Registers a callback for the start().

Parameters
callbacka valid callback

Definition at line 85 of file mission.cpp.

◆ start()

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.


The documentation for this class was generated from the following files: