Module: mappingInstrument
Executive Summary
This module receives a vector of accessMsgPayloads and outputs a vector of DataNodeUsageMsgPayloads for each accessible point. This module is meant to keep track of which points have been imaged, and which have not, passing the output messages to a Module: partitionedStorageUnit module.
Module Assumptions and Limitations
This module assumes a single baudRate for all mapping points. This module provides a zero baudRate for points that are not accessible.
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.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
accessInMsgs |
vector of ground location input access messages |
|
dataNodeOutMsgs |
vector of data node output messages |
User Guide
To use this module, the user must first instantiate the module
mapInstrument = mappingInstrument.mappingInstrument()
mapInstrument.ModelTag = "mapInstrument"
The user must then set the nodeBaudRate, in bits/second, within the module. This is a required parameter.
mapInstrument.nodeBaudRate = 1
The mapping points and names should then be added to the module one at a time. The access message is the accessMsg
associated with the point. The pointName
is the name of the point.
mapInstrument.addMappingPoint(accessMsg, pointName)
Finally, logs for every mapping point can be created as follows. In this example, N = 1:
dataLogs = []
for idx in range(0, N):
dataLogs.append(mapInstrument.dataNodeOutMsgs[idx].recorder())
scSim.AddModelToTask(simTaskName, dataLogs[idx])
-
class MappingInstrument : public SysModel
- #include <mappingInstrument.h>
This module receives a vector of accessMsgPayloads and outputs a vector of DataNodeUsageMsgPayloads for each accessible point.
Public Functions
-
MappingInstrument()
This is the constructor for the module class. It sets default variable values and initializes the various parts of the model
-
~MappingInstrument()
Module Destructor
-
void Reset(uint64_t CurrentSimNanos)
This method is used to reset the module. The nodeBaudRate is checked for a non-zero value.
- Parameters:
CurrentSimNanos –
- Returns:
void
-
void UpdateState(uint64_t CurrentSimNanos)
This method updates the state by reading messages, calling computeDataStatus, and writing messages
- Parameters:
CurrentSimNanos –
- Returns:
void
-
void addMappingPoint(Message<AccessMsgPayload> *tmpAccessMsg, std::string dataName)
connects accessMsgPayload to instrument
Adds a mapping point (access message and name) to the module
- Returns:
void
Public Members
-
std::vector<Message<DataNodeUsageMsgPayload>*> dataNodeOutMsgs
vector of data node output messages
-
std::vector<ReadFunctor<AccessMsgPayload>> accessInMsgs
vector of ground location access messages
-
BSKLogger bskLogger
— BSK Logging
-
double nodeBaudRate = -1
[baud] Data provided (+).
Private Members
-
std::vector<std::string> mappingPoints
-
std::vector<DataNodeUsageMsgPayload> dataNodeOutMsgBuffer
buffer of data node output data
-
MappingInstrument()