Skip to content

Commit

Permalink
Adding additional SCALAR types testing (#3189)
Browse files Browse the repository at this point in the history
* Adding additional SCALAR types testing

* sp
  • Loading branch information
LeStarch authored Feb 6, 2025
1 parent 875fa11 commit 9b9fff1
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ getcontext
getdata
getdefaultencoding
getextern
getf
geti
getinput
getm
getquaternion
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cmake-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
export CMAKE_INSTALL_DIRECTORY="${GITHUB_WORKSPACE}/tools-override"
export PATH="${CMAKE_INSTALL_DIRECTORY}/bin:${PATH}"
cmake --version
pytest
pytest -s
13 changes: 12 additions & 1 deletion Ref/Top/RefPackets.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<packets name="RefPackets" namespace="Ref" size="111">
<packets name="RefPackets" namespace="Ref" size="191">

<import_topology>Ref/Top/RefTopologyAppAi.xml</import_topology>

Expand Down Expand Up @@ -162,6 +162,17 @@
<channel name="Ref.typeDemo.Float2Ch"/>
<channel name="Ref.typeDemo.Float3Ch"/>
<channel name="Ref.typeDemo.FloatSet"/>
<channel name="Ref.typeDemo.ScalarStructCh"/>
<channel name="Ref.typeDemo.ScalarU8Ch"/>
<channel name="Ref.typeDemo.ScalarU16Ch"/>
<channel name="Ref.typeDemo.ScalarU32Ch"/>
<channel name="Ref.typeDemo.ScalarU64Ch"/>
<channel name="Ref.typeDemo.ScalarI8Ch"/>
<channel name="Ref.typeDemo.ScalarI16Ch"/>
<channel name="Ref.typeDemo.ScalarI32Ch"/>
<channel name="Ref.typeDemo.ScalarI64Ch"/>
<channel name="Ref.typeDemo.ScalarF32Ch"/>
<channel name="Ref.typeDemo.ScalarF64Ch"/>
</packet>

<packet name="DataProducts" id="21" level="3">
Expand Down
11 changes: 11 additions & 0 deletions Ref/TypeDemo/TypeDemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,17 @@ void TypeDemo ::DUMP_FLOATS_cmdHandler(const FwOpcodeType opCode, const U32 cmdS

void TypeDemo ::SEND_SCALARS_cmdHandler(const FwOpcodeType opCode, const U32 cmdSeq, Ref::ScalarStruct scalar_input) {
this->log_ACTIVITY_HI_ScalarStructEv(scalar_input);
this->tlmWrite_ScalarStructCh(scalar_input);
this->tlmWrite_ScalarU8Ch(scalar_input.getu8());
this->tlmWrite_ScalarU16Ch(scalar_input.getu16());
this->tlmWrite_ScalarU32Ch(scalar_input.getu32());
this->tlmWrite_ScalarU64Ch(scalar_input.getu64());
this->tlmWrite_ScalarI8Ch(scalar_input.geti8());
this->tlmWrite_ScalarI16Ch(scalar_input.geti16());
this->tlmWrite_ScalarI32Ch(scalar_input.geti32());
this->tlmWrite_ScalarI64Ch(scalar_input.geti64());
this->tlmWrite_ScalarF32Ch(scalar_input.getf32());
this->tlmWrite_ScalarF64Ch(scalar_input.getf64());
this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
}

Expand Down
36 changes: 34 additions & 2 deletions Ref/TypeDemo/TypeDemo.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ module Ref {

@ Set of floating points to emit
array FloatSet = [3] F32;
@ All scalar inputs

@ All scalar inputs
struct ScalarStruct {
i8: I8,
i16: I16,
Expand Down Expand Up @@ -240,6 +240,38 @@ module Ref {
event ScalarStructEv(scalar_argument: ScalarStruct) severity activity high \
format "ScalarStruct: {}"

@ Scalar struct channel
telemetry ScalarStructCh: ScalarStruct

@ Scalar U8 channel
telemetry ScalarU8Ch: U8

@ Scalar U16 channel
telemetry ScalarU16Ch: U16

@ Scalar U32 channel
telemetry ScalarU32Ch: U32

@ Scalar U64 channel
telemetry ScalarU64Ch: U64

@ Scalar I8 channel
telemetry ScalarI8Ch: I8

@ Scalar I16 channel
telemetry ScalarI16Ch: I16

@ Scalar I32 channel
telemetry ScalarI32Ch: I32

@ Scalar I64 channel
telemetry ScalarI64Ch: I64

@ Scalar F32 channel
telemetry ScalarF32Ch: F32

@ Scalar F64 channel
telemetry ScalarF64Ch: F64


# ----------------------------------------------------------------------
Expand Down

0 comments on commit 9b9fff1

Please sign in to comment.