14 this->m_currPacketId = 0;
15 this->m_invocations = 0;
16 this->m_buffsSent = 0;
17 this->m_errorsInjected = 0;
18 this->m_injectError =
false;
19 this->m_sendPackets =
false;
20 this->m_currPacketId = 0;
21 this->m_firstPacketSent =
false;
22 this->m_state = SendBuff_ActiveState::SEND_IDLE;
27 void SendBuffImpl::SchedIn_handler(
FwIndexType portNum, U32 context) {
30 MsgDispatchStatus stat = MSG_DISPATCH_OK;
32 while (MSG_DISPATCH_OK == stat) {
33 stat = this->doDispatch();
37 if (this->m_sendPackets) {
39 if (this->m_firstPacketSent) {
40 this->m_firstPacketSent =
false;
41 this->log_ACTIVITY_HI_FirstPacketSent(this->m_currPacketId);
42 this->tlmWrite_NumErrorsInjected(this->m_errorsInjected);
50 this->m_currPacketId++;
53 this->tlmWrite_PacketsSent(this->m_buffsSent);
57 memset(testData, 0xFF, static_cast<size_t>(dataSize));
60 for (U32 byte = 0; byte < dataSize; byte++) {
61 csum += testData[byte];
64 if (this->m_injectError) {
65 this->m_injectError =
false;
66 this->m_errorsInjected++;
68 this->log_WARNING_HI_PacketErrorInserted(this->m_currPacketId - 1);
77 this->Data_out(0, this->m_testBuff);
80 this->m_invocations++;
82 this->tlmWrite_SendState(this->m_state);
85 void SendBuffImpl::SB_START_PKTS_cmdHandler(
FwOpcodeType opCode, U32 cmdSeq) {
86 this->m_sendPackets =
true;
87 this->m_state = SendBuff_ActiveState::SEND_ACTIVE;
91 void SendBuffImpl::SB_INJECT_PKT_ERROR_cmdHandler(
FwOpcodeType opCode, U32 cmdSeq) {
92 this->m_injectError =
true;
96 void SendBuffImpl::SB_GEN_FATAL_cmdHandler(
FwOpcodeType opCode,
102 this->log_FATAL_SendBuffFatal(arg1, arg2, arg3);
108 void SendBuffImpl::SB_GEN_ASSERT_cmdHandler(
FwOpcodeType opCode,
117 FW_ASSERT(0, arg1, arg2, arg3, arg4, arg5, arg6);
121 void SendBuffImpl::parameterUpdated(
FwPrmIdType id) {
122 this->log_ACTIVITY_LO_BuffSendParameterUpdated(
id);
125 case PARAMID_PARAMETER3: {
126 U8 val = this->paramGet_parameter3(valid);
127 this->tlmWrite_Parameter3(val);
130 case PARAMID_PARAMETER4: {
131 F32 val = this->paramGet_parameter4(valid);
132 this->tlmWrite_Parameter4(val);
Serialization/Deserialization operation was successful.
FwIdType FwOpcodeType
The type of a command opcode.
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
PlatformSizeType FwSizeType
SendBuffImpl(const char *compName)
constructor
FwIdType FwPrmIdType
The type of a parameter identifier.
SerializeStatus
forward declaration for string
float F32
32-bit floating point
~SendBuffImpl()
destructor
void resetSer() override
Reset serialization pointer to beginning of buffer.
Command successfully executed.
uint8_t U8
8-bit unsigned integer
PlatformIndexType FwIndexType
Enum representing parameter validity.