Module: cppModuleTemplate

Executive Summary

This is a very basic dummy C++ Basilisk module that can be used as a template to create other C++ modules. It mimics the functionality of Module: cModuleTemplate. See that module for a more complete discussion of how to write the RST module documentation file.

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

Module I/O Messages

Msg Variable Name

Msg Type

Description

dataInMsg

CModuleTemplateMsgPayload

(optional) Input message description. Note here if this message is optional, and what the default behavior is if this message is not provided.

dataOutMsg

CModuleTemplateMsgPayload

Output message description.


class CppModuleTemplate : public SysModel
#include <cppModuleTemplate.h>

basic Basilisk C++ module class

Public Functions

CppModuleTemplate()

This is the constructor for the module class. It sets default variable values and initializes the various parts of the model

~CppModuleTemplate()

Module Destructor.

void Reset(uint64_t CurrentSimNanos)

This method is used to reset the module.

Returns:

void

void UpdateState(uint64_t CurrentSimNanos)

This is the main method that gets called every time the module is updated. Provide an appropriate description.

Returns:

void

void setDummy(double value)

setter for dummy property

inline double getDummy() const

getter for dummy property

void setDumVector(std::array<double, 3> value)

setter for dumVector property

inline std::array<double, 3> getDumVector() const

getter for dumVector property

Public Members

Message<CModuleTemplateMsgPayload> dataOutMsg

attitude navigation output msg

ReadFunctor<CModuleTemplateMsgPayload> dataInMsg

translation navigation output msg

BSKLogger bskLogger

BSK Logging.

Private Members

double dummy = {}

[units] sample module variable declaration

std::array<double, 3> dumVector = {}

[units] sample vector variable