Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
watney committed Apr 9, 2024
1 parent 5138aab commit 70867a8
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Svc/FPManager/CommandOpcodes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ namespace Svc {
namespace OPCODES {

enum Opcodes {
CMD_NO_OP = 0x500,
CMD_CLEAR_TRACKING = 0x503,
CMD_NO_OP = 0x500,
CMD_TEST_CMD_1 = 0x502,
};

Expand Down
8 changes: 4 additions & 4 deletions Svc/FPManager/CommandSerializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace Svc {


Fw::SerializeStatus
CMD_NO_OP(
CMD_CLEAR_TRACKING(
Fw::ComBuffer& comBuffer
)
{
Expand All @@ -41,7 +41,7 @@ namespace Svc {
status = comBuffer.serialize(descriptor);
// Serialize the opcode
if (status == Fw::FW_SERIALIZE_OK) {
FwOpcodeType opcode = OPCODES::CMD_NO_OP;
FwOpcodeType opcode = OPCODES::CMD_CLEAR_TRACKING;
status = comBuffer.serialize(opcode);
}
// Serialize arguments
Expand All @@ -50,7 +50,7 @@ namespace Svc {


Fw::SerializeStatus
CMD_CLEAR_TRACKING(
CMD_NO_OP(
Fw::ComBuffer& comBuffer
)
{
Expand All @@ -62,7 +62,7 @@ namespace Svc {
status = comBuffer.serialize(descriptor);
// Serialize the opcode
if (status == Fw::FW_SERIALIZE_OK) {
FwOpcodeType opcode = OPCODES::CMD_CLEAR_TRACKING;
FwOpcodeType opcode = OPCODES::CMD_NO_OP;
status = comBuffer.serialize(opcode);
}
// Serialize arguments
Expand Down
8 changes: 4 additions & 4 deletions Svc/FPManager/CommandSerializer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ namespace Svc {
namespace CommandSerializer {


//! Serialize a CMD_NO_OP command
//! Serialize a CMD_CLEAR_TRACKING command
//! return The serialization status
Fw::SerializeStatus CMD_NO_OP (
Fw::SerializeStatus CMD_CLEAR_TRACKING (
Fw::ComBuffer& comBuffer //!< The result
);


//! Serialize a CMD_CLEAR_TRACKING command
//! Serialize a CMD_NO_OP command
//! return The serialization status
Fw::SerializeStatus CMD_CLEAR_TRACKING (
Fw::SerializeStatus CMD_NO_OP (
Fw::ComBuffer& comBuffer //!< The result
);

Expand Down
6 changes: 3 additions & 3 deletions Svc/FPManager/test/ut/ResponseExecutionRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ void IndicateRESP_1DroppedExecuting::action(Tester& tester) {


// Check telemetry response indication counter
tester.assertTlm_size(__FILE__, __LINE__, 3);
tester.assertTlm_size(__FILE__, __LINE__, 4);
// Count should now be 2.
tester.assertTlm_FP_RESP_1AlertCount(__FILE__, __LINE__, 0, 2);
tester.assertTlm_FP_LastResponseAlert(__FILE__, __LINE__, 0, FPResponses::RESP_1);
Expand Down Expand Up @@ -741,7 +741,7 @@ void IndicateRESP_2DroppedExecuting::action(Tester& tester) {


// Check telemetry response indication counter
tester.assertTlm_size(__FILE__, __LINE__, 3);
tester.assertTlm_size(__FILE__, __LINE__, 4);
// Count should now be 2.
tester.assertTlm_FP_RESP_2AlertCount(__FILE__, __LINE__, 0, 2);
tester.assertTlm_FP_LastResponseAlert(__FILE__, __LINE__, 0, FPResponses::RESP_2);
Expand Down Expand Up @@ -1064,7 +1064,7 @@ void IndicateSAFINGDroppedExecuting::action(Tester& tester) {


// Check telemetry response indication counter
tester.assertTlm_size(__FILE__, __LINE__, 3);
tester.assertTlm_size(__FILE__, __LINE__, 4);
// Count should now be 2.
tester.assertTlm_FP_SAFINGAlertCount(__FILE__, __LINE__, 0, 2);
tester.assertTlm_FP_LastResponseAlert(__FILE__, __LINE__, 0, FPResponses::SAFING);
Expand Down
2 changes: 1 addition & 1 deletion Svc/FPManager/test/ut/ResponseExecutionRules.cpp.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ void Indicate$(resp)DroppedExecuting::action(Tester& tester) {


// Check telemetry response indication counter
tester.assertTlm_size(__FILE__, __LINE__, 3);
tester.assertTlm_size(__FILE__, __LINE__, 4);
// Count should now be 2.
tester.assertTlm_FP_$(resp)AlertCount(__FILE__, __LINE__, 0, 2);
tester.assertTlm_FP_LastResponseAlert(__FILE__, __LINE__, 0, FPResponses::$resp.upper());
Expand Down
2 changes: 1 addition & 1 deletion Svc/FPManager/test/ut/TestRules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void PackedTlm::action(Tester& tester) {
U32 expectedTlmVal = pow(2, static_cast<int>(FPResponses::NUMBER_RESPONSES)) - 1;

// Check packed telemetry
tester.assertTlm_size(__FILE__, __LINE__, 2);
tester.assertTlm_size(__FILE__, __LINE__, 3);
tester.assertTlm_FP_ResponsePackedState(__FILE__, __LINE__, 0, expectedTlmVal);


Expand Down

0 comments on commit 70867a8

Please sign in to comment.