Protocols#
constellation::protocol
Namespace#
-
enum class constellation::protocol::Protocol : std::uint8_t#
Protocol Enum (excluding CHIRP)
Values:
-
enumerator CSCP1#
Constellation Satellite Control Protocol v1
-
enumerator CMDP1#
Constellation Monitoring Distribution Protocol v1
-
enumerator CDTP1#
Constellation Data Transmission Protocol v1
-
enumerator CHP1#
Constellation Heartbeat Protocol v1
-
enumerator CSCP1#
-
std::string_view constellation::protocol::get_protocol_identifier(Protocol protocol)#
Get protocol identifier string for CSCP, CMDP and CDTP protocols
- Parameters:
protocol – Protocol
- Returns:
Protocol identifier string in message header
-
Protocol constellation::protocol::get_protocol(std::string_view protocol_identifier)#
Get protocol from a protocol identifier string
- Parameters:
protocol_identifier – Protocol identifier string
- Returns:
Protocol
-
inline std::string constellation::protocol::get_readable_protocol(std::string_view protocol_identifier)#
Get human-readable protocol identifier string for CSCP, CMDP and CDTP protocols
- Parameters:
protocol_identifier – Protocol identifier string
- Returns:
Protocol identifier string with byte version replaced to human-readable version
constellation::protocol::CSCP
Namespace#
-
enum class constellation::protocol::CSCP::State : std::uint8_t#
Possible Satellite FSM states
Values:
-
enumerator NEW#
-
enumerator initializing#
-
enumerator INIT#
-
enumerator launching#
-
enumerator ORBIT#
-
enumerator landing#
-
enumerator reconfiguring#
-
enumerator starting#
-
enumerator RUN#
-
enumerator stopping#
-
enumerator interrupting#
-
enumerator SAFE#
-
enumerator ERROR#
-
enumerator NEW#
-
enum class constellation::protocol::CSCP::Transition : std::uint8_t#
Possible FSM transitions
Values:
-
enumerator initialize#
-
enumerator initialized#
-
enumerator launch#
-
enumerator launched#
-
enumerator land#
-
enumerator landed#
-
enumerator reconfigure#
-
enumerator reconfigured#
-
enumerator start#
-
enumerator started#
-
enumerator stop#
-
enumerator stopped#
-
enumerator interrupt#
-
enumerator interrupted#
-
enumerator failure#
-
enumerator initialize#
-
enum class constellation::protocol::CSCP::TransitionCommand : std::underlying_type_t<Transition>#
Possible transition commands via CSCP
Values:
-
enumerator initialize#
-
enumerator launch#
-
enumerator land#
-
enumerator reconfigure#
-
enumerator start#
-
enumerator stop#
-
enumerator initialize#
-
enum class constellation::protocol::CSCP::StandardCommand : std::underlying_type_t<TransitionCommand>#
Possible standard (non-transition) commands via CSCP
Values:
-
enumerator get_name#
-
enumerator get_version#
-
enumerator get_commands#
-
enumerator get_state#
-
enumerator get_status#
-
enumerator get_config#
-
enumerator get_run_id#
-
enumerator shutdown#
-
enumerator get_name#
-
bool constellation::protocol::CSCP::is_shutdown_allowed(State state)#
Check if the CSCP shutdown command is allowed from a given state.
Shutdown is only allowed from NEW, INIT, SAFE and ERROR.
-
template<State... states>
bool constellation::protocol::CSCP::is_one_of_states(State state)# Check if given state is in one of template states list.
- Parameters:
state – State to check
- Returns:
True if
state
equals one of the states given in the template parameters
-
template<State... states>
static bool constellation::protocol::CSCP::is_not_one_of_states(State state)# Check if given state is not in one of template states list.
- Parameters:
state – State to check
- Returns:
True if
state
equals none of the states given in the template parameters
-
inline bool constellation::protocol::CSCP::is_valid_satellite_name(const std::string &satellite_name)#
Checks if a satellite name is valid.
A satellite name may contain alphanumeric characters and underscores and may not be empty.
-
inline bool constellation::protocol::CSCP::is_valid_run_id(const std::string &run_id)#
Checks if a run ID is valid.
A run ID may contain alphanumeric characters, underscores or dashes and may not be empty.
-
inline bool constellation::protocol::CSCP::is_valid_command_name(const std::string &command_name)#
Checks if a command name is valid.
A command may contain alphanumeric characters or underscores, and may not be empty or start with a digit.
constellation::protocol::CHP
Namespace#
-
static std::uint8_t constellation::protocol::CHP::Lives = 3#
Default lives for a remote on detection/replenishment