Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ case class ComponentCommands (
sortedCmds.map((_, cmd) =>
lines(
s"""|this->${portVariableName(cmdRegPort.get)}[0].invoke(
| this->getIdBase() + ${commandConstantName(cmd)}
| static_cast<FwOpcodeType>(this->getIdBase()) + ${commandConstantName(cmd)}
|);
|"""
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ case class ComponentEvents (
|
|FwEventIdType _id = static_cast<FwEventIdType>(0);
|
|_id = this->getIdBase() + ${eventIdConstantName(event.getName)};
|_id = static_cast<FwEventIdType>(this->getIdBase()) + ${eventIdConstantName(event.getName)};
|"""
),
writeLogBody(id, event),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ case class ComponentTelemetry (
|
|FwChanIdType _id;
|
|_id = this->getIdBase() + ${channelIdConstantName(channel.getName)};
|_id = static_cast<FwChanIdType>(this->getIdBase()) + ${channelIdConstantName(channel.getName)};
|
|this->${portVariableName(tlmPort.get)}[0].invoke(
| _id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ case class ComponentHistory(
wrapInScope(
"struct TextLogEntry {",
lines(
"""|U32 id;
"""|FwEventIdType id;
|Fw::Time timeTag;
|Fw::LogSeverity severity;
|Fw::TextLogString text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -769,8 +769,8 @@ case class ComponentTesterBaseWriter(
lines(
s"""|// Call output command port
|FwOpcodeType _opcode;
|const U32 idBase = this->getIdBase();
|_opcode = $className::${commandConstantName(cmd)} + idBase;
|const FwIdType idBase = this->getIdBase();
|_opcode = $className::${commandConstantName(cmd)} + static_cast<FwOpcodeType>(idBase);
|"""
),
cmdPortInvocation
Expand Down Expand Up @@ -818,8 +818,8 @@ case class ComponentTesterBaseWriter(
CppDoc.Type("void"),
List.concat(
lines(
s"""|const U32 idBase = this->getIdBase();
|FwOpcodeType _opcode = opCode + idBase;
s"""|const FwIdType idBase = this->getIdBase();
|FwOpcodeType _opcode = opCode + static_cast<FwOpcodeType>(idBase);
|
|"""
),
Expand Down Expand Up @@ -1005,7 +1005,7 @@ case class ComponentTesterBaseWriter(
lines(
"""|args.resetDeser();
|
|const U32 idBase = this->getIdBase();
|const FwIdType idBase = this->getIdBase();
|FW_ASSERT(
| id >= idBase,
| static_cast<FwAssertArgType>(id),
Expand Down Expand Up @@ -1157,7 +1157,7 @@ case class ComponentTesterBaseWriter(
lines(
"""|val.resetDeser();
|
|const U32 idBase = this->getIdBase();
|const FwIdType idBase = this->getIdBase();
|FW_ASSERT(
| id >= idBase,
| static_cast<FwAssertArgType>(id),
Expand Down Expand Up @@ -1279,8 +1279,8 @@ case class ComponentTesterBaseWriter(
| args.serialize(this->$paramVar) == Fw::FW_SERIALIZE_OK
|);
|
|const U32 idBase = this->getIdBase();
|FwOpcodeType _prmOpcode = $className::$constantName + idBase;
|const FwIdType idBase = this->getIdBase();
|FwOpcodeType _prmOpcode = $className::$constantName + static_cast<FwOpcodeType>(idBase);
|
|if (not this->$portVar[0].isConnected()) {
| printf("Test Command Output port not connected!\\n");
Expand Down Expand Up @@ -1313,8 +1313,8 @@ case class ComponentTesterBaseWriter(
val varName = testerPortVariableName(cmdRecvPort.get)
lines(
s"""|Fw::CmdArgBuffer args;
|const U32 idBase = this->getIdBase();
|FwOpcodeType _prmOpcode = $className::$constantName + idBase;
|const FwIdType idBase = this->getIdBase();
|FwOpcodeType _prmOpcode = $className::$constantName + static_cast<FwOpcodeType>(idBase);
|
|if (not this->$varName[0].isConnected()) {
| printf("Test Command Output port not connected!\\n");
Expand Down Expand Up @@ -1347,7 +1347,7 @@ case class ComponentTesterBaseWriter(
s"""|Fw::ParamValid _ret = Fw::ParamValid::VALID;
|$value.resetSer();
|
|const U32 idBase = _testerBase->getIdBase();
|const FwIdType idBase = _testerBase->getIdBase();
|FW_ASSERT(
| $id >= idBase,
| static_cast<FwAssertArgType>($id),
Expand Down Expand Up @@ -1401,7 +1401,7 @@ case class ComponentTesterBaseWriter(
guardedList (hasParameters) (lines("Fw::SerializeStatus _status;")),
lines(
s"""|
|const U32 idBase = _testerBase->getIdBase();
|const FwIdType idBase = _testerBase->getIdBase();
|FW_ASSERT(
| $id >= idBase,
| static_cast<FwAssertArgType>($id),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1518,71 +1518,71 @@ void ActiveCommandsComponentBase ::
FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_SYNC
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_SYNC
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_SYNC_PRIMITIVE
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_SYNC_PRIMITIVE
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_SYNC_STRING
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_SYNC_STRING
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_SYNC_ENUM
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_SYNC_ENUM
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_SYNC_ARRAY
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_SYNC_ARRAY
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_SYNC_STRUCT
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_SYNC_STRUCT
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_GUARDED
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_GUARDED
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_GUARDED_PRIMITIVE
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_GUARDED_PRIMITIVE
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_GUARDED_STRING
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_GUARDED_STRING
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_GUARDED_ENUM
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_GUARDED_ENUM
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_GUARDED_ARRAY
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_GUARDED_ARRAY
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_GUARDED_STRUCT
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_GUARDED_STRUCT
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_ASYNC
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_ASYNC
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_PRIORITY
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_PRIORITY
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_PARAMS_PRIORITY
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_PARAMS_PRIORITY
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_DROP
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_DROP
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_PARAMS_PRIORITY_DROP
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_PARAMS_PRIORITY_DROP
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3202,7 +3202,7 @@ void ActiveEventsComponentBase ::

FwEventIdType _id = static_cast<FwEventIdType>(0);

_id = this->getIdBase() + EVENTID_EVENTACTIVITYHIGH;
_id = static_cast<FwEventIdType>(this->getIdBase()) + EVENTID_EVENTACTIVITYHIGH;

// Emit the event on the log port
if (this->m_eventOut_OutputPort[0].isConnected()) {
Expand Down Expand Up @@ -3279,7 +3279,7 @@ void ActiveEventsComponentBase ::

FwEventIdType _id = static_cast<FwEventIdType>(0);

_id = this->getIdBase() + EVENTID_EVENTACTIVITYLOWTHROTTLED;
_id = static_cast<FwEventIdType>(this->getIdBase()) + EVENTID_EVENTACTIVITYLOWTHROTTLED;

// Emit the event on the log port
if (this->m_eventOut_OutputPort[0].isConnected()) {
Expand Down Expand Up @@ -3398,7 +3398,7 @@ void ActiveEventsComponentBase ::

FwEventIdType _id = static_cast<FwEventIdType>(0);

_id = this->getIdBase() + EVENTID_EVENTCOMMAND;
_id = static_cast<FwEventIdType>(this->getIdBase()) + EVENTID_EVENTCOMMAND;

// Emit the event on the log port
if (this->m_eventOut_OutputPort[0].isConnected()) {
Expand Down Expand Up @@ -3477,7 +3477,7 @@ void ActiveEventsComponentBase ::

FwEventIdType _id = static_cast<FwEventIdType>(0);

_id = this->getIdBase() + EVENTID_EVENTDIAGNOSTIC;
_id = static_cast<FwEventIdType>(this->getIdBase()) + EVENTID_EVENTDIAGNOSTIC;

// Emit the event on the log port
if (this->m_eventOut_OutputPort[0].isConnected()) {
Expand Down Expand Up @@ -3570,7 +3570,7 @@ void ActiveEventsComponentBase ::

FwEventIdType _id = static_cast<FwEventIdType>(0);

_id = this->getIdBase() + EVENTID_EVENTFATALTHROTTLED;
_id = static_cast<FwEventIdType>(this->getIdBase()) + EVENTID_EVENTFATALTHROTTLED;

// Emit the event on the log port
if (this->m_eventOut_OutputPort[0].isConnected()) {
Expand Down Expand Up @@ -3668,7 +3668,7 @@ void ActiveEventsComponentBase ::

FwEventIdType _id = static_cast<FwEventIdType>(0);

_id = this->getIdBase() + EVENTID_EVENTWARNINGHIGH;
_id = static_cast<FwEventIdType>(this->getIdBase()) + EVENTID_EVENTWARNINGHIGH;

// Emit the event on the log port
if (this->m_eventOut_OutputPort[0].isConnected()) {
Expand Down Expand Up @@ -3761,7 +3761,7 @@ void ActiveEventsComponentBase ::

FwEventIdType _id = static_cast<FwEventIdType>(0);

_id = this->getIdBase() + EVENTID_EVENTWARNINGLOWTHROTTLED;
_id = static_cast<FwEventIdType>(this->getIdBase()) + EVENTID_EVENTWARNINGLOWTHROTTLED;

// Emit the event on the log port
if (this->m_eventOut_OutputPort[0].isConnected()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1513,51 +1513,51 @@ void ActiveExternalParamsComponentBase ::
FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMI32EXT_SET
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMI32EXT_SET
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMI32EXT_SAVE
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMI32EXT_SAVE
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMF64EXT_SET
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMF64EXT_SET
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMF64EXT_SAVE
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMF64EXT_SAVE
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMSTRINGEXT_SET
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMSTRINGEXT_SET
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMSTRINGEXT_SAVE
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMSTRINGEXT_SAVE
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMENUMEXT_SET
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMENUMEXT_SET
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMENUMEXT_SAVE
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMENUMEXT_SAVE
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMARRAYEXT_SET
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMARRAYEXT_SET
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMARRAYEXT_SAVE
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMARRAYEXT_SAVE
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMSTRUCTEXT_SET
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMSTRUCTEXT_SET
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_PARAMSTRUCTEXT_SAVE
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_PARAMSTRUCTEXT_SAVE
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,11 +753,11 @@ void ActiveOverflowComponentBase ::
FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_HOOK
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_HOOK
);

this->m_cmdRegOut_OutputPort[0].invoke(
this->getIdBase() + OPCODE_CMD_PARAMS_PRIORITY_HOOK
static_cast<FwOpcodeType>(this->getIdBase()) + OPCODE_CMD_PARAMS_PRIORITY_HOOK
);
}

Expand Down
Loading