File tree Expand file tree Collapse file tree 5 files changed +20
-13
lines changed
Expand file tree Collapse file tree 5 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,18 @@ void Burnwire ::stop_handler(FwIndexType portNum) {
2828// Handler implementations for commands
2929// ----------------------------------------------------------------------
3030
31- void Burnwire ::START_BURNWIRE_cmdHandler (FwOpcodeType opCode, U32 cmdSeq, Fw::On burnwire_state) {
32- // TODO
31+ void Burnwire ::START_BURNWIRE_cmdHandler (FwOpcodeType opCode, U32 cmdSeq) {
32+ // update private member variable
33+ this ->m_state = Fw::On::ON;
34+ // send event
35+ this ->log_ACTIVITY_HI_SetBurnwireState (Fw::On::ON);
36+ // confirm response
3337 this ->cmdResponse_out (opCode, cmdSeq, Fw::CmdResponse::OK);
3438}
3539
36- void Burnwire ::STOP_BURNWIRE_cmdHandler (FwOpcodeType opCode, U32 cmdSeq, Fw::On burnwire_state) {
37- // TODO
40+ void Burnwire ::STOP_BURNWIRE_cmdHandler (FwOpcodeType opCode, U32 cmdSeq) {
41+ this ->m_state = Fw::On::OFF;
42+ this ->log_ACTIVITY_HI_SetBurnwireState (Fw::On::OFF);
3843 this ->cmdResponse_out (opCode, cmdSeq, Fw::CmdResponse::OK);
3944}
4045
Original file line number Diff line number Diff line change @@ -8,18 +8,17 @@ module Components {
88
99 # @ Examplesync command
1010 sync command START_BURNWIRE(
11- burnwire_state: Fw.On
1211 )
12+
1313 sync command STOP_BURNWIRE(
14- burnwire_state: Fw.On
1514 )
1615
1716 # @ Example telemetry counter
1817 # telemetry ExampleCounter: U64
1918
2019 # @ Example event
2120 # event ExampleStateEvent(example_state: Fw.On) severity activity high id 0 format " State set to {}"
22- event SetBlinkingState (burnwire_state: Fw.On) \
21+ event SetBurnwireState (burnwire_state: Fw.On) \
2322 severity activity high \
2423 format " Burnwire State: {}"
2524
Original file line number Diff line number Diff line change @@ -41,14 +41,12 @@ class Burnwire final : public BurnwireComponentBase {
4141 // ----------------------------------------------------------------------
4242
4343 // ! Handler implementation for command START_BURNWIRE
44- void START_BURNWIRE_cmdHandler (FwOpcodeType opCode, // !< The opcode
45- U32 cmdSeq, // !< The command sequence number
46- Fw::On burnwire_state) override ;
44+ void START_BURNWIRE_cmdHandler (FwOpcodeType opCode, U32 cmdSeq) override ;
4745
4846 // ! Handler implementation for command STOP_BURNWIRE
49- void STOP_BURNWIRE_cmdHandler (FwOpcodeType opCode, // !< The opcode
50- U32 cmdSeq, // !< The command sequence number
51- Fw::On burnwire_state) override ;
47+ void STOP_BURNWIRE_cmdHandler (FwOpcodeType opCode, U32 cmdSeq) override ;
48+
49+ Fw::On m_state = Fw::On::OFF; // keeps track if burnwire is on or off
5250};
5351
5452} // namespace Components
Original file line number Diff line number Diff line change 11module ReferenceDeployment {
22
3+
34 # ----------------------------------------------------------------------
45 # Base ID Convention
56 # ----------------------------------------------------------------------
@@ -63,4 +64,7 @@ module ReferenceDeployment {
6364 instance gpioDriver: Zephyr.ZephyrGpioDriver base id 0x10015000
6465
6566 instance watchdog: Components.Watchdog base id 0x10016000
67+
68+ instance burnwire: Components.Burnwire base id 0x10017000
69+
6670}
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ module ReferenceDeployment {
2929 instance gpioDriver
3030 instance watchdog
3131 instance prmDb
32+ instance burnwire
3233
3334 # ----------------------------------------------------------------------
3435 # Pattern graph specifiers
You can’t perform that action at this time.
0 commit comments