F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencerDirectives.cpp
Go to the documentation of this file.
1 #include <cmath>
2 #include "Fw/Com/ComPacket.hpp"
4 
5 namespace Svc {
6 
7 void FpySequencer::sendSignal(Signal signal) {
8  switch (signal) {
11  break;
12  }
15  break;
16  }
19  break;
20  }
23  break;
24  }
25  default: {
26  FW_ASSERT(0, static_cast<FwAssertArgType>(signal));
27  }
28  }
29 }
30 
31 I64& FpySequencer::reg(U8 idx) {
32  return this->m_runtime.regs[idx];
33 }
34 
38  this->sendSignal(this->waitRel_directiveHandler(directive, error));
39  this->m_tlm.lastDirectiveError = error;
40 }
41 
45  this->sendSignal(this->waitAbs_directiveHandler(directive, error));
46  this->m_tlm.lastDirectiveError = error;
47 }
48 
52  this->sendSignal(this->setSerReg_directiveHandler(directive, error));
53  this->m_tlm.lastDirectiveError = error;
54 }
55 
59  this->sendSignal(this->goto_directiveHandler(directive, error));
60  this->m_tlm.lastDirectiveError = error;
61 }
62 
66  this->sendSignal(this->if_directiveHandler(directive, error));
67  this->m_tlm.lastDirectiveError = error;
68 }
69 
73  this->sendSignal(this->noOp_directiveHandler(directive, error));
74  this->m_tlm.lastDirectiveError = error;
75 }
76 
80  this->sendSignal(this->getTlm_directiveHandler(directive, error));
81  this->m_tlm.lastDirectiveError = error;
82 }
83 
87  this->sendSignal(this->getPrm_directiveHandler(directive, error));
88  this->m_tlm.lastDirectiveError = error;
89 }
90 
94  this->sendSignal(this->cmd_directiveHandler(directive, error));
95  this->m_tlm.lastDirectiveError = error;
96 }
97 
100  const Svc::FpySequencer_DeserSerRegDirective& directive) {
102  this->sendSignal(this->deserSerReg_directiveHandler(directive, error));
103  this->m_tlm.lastDirectiveError = error;
104 }
105 
109  this->sendSignal(this->setReg_directiveHandler(directive, error));
110  this->m_tlm.lastDirectiveError = error;
111 }
112 
116  this->sendSignal(this->binaryRegOp_directiveHandler(directive, error));
117  this->m_tlm.lastDirectiveError = error;
118 }
119 
120 
124  this->sendSignal(this->unaryRegOp_directiveHandler(directive, error));
125  this->m_tlm.lastDirectiveError = error;
126 }
127 
131  this->sendSignal(this->exit_directiveHandler(directive, error));
132  this->m_tlm.lastDirectiveError = error;
133 }
134 
136 Signal FpySequencer::waitRel_directiveHandler(const FpySequencer_WaitRelDirective& directive, DirectiveError& error) {
137  Fw::Time wakeupTime = this->getTime();
138 
139  wakeupTime.add(directive.getseconds(), directive.getuSeconds());
140  this->m_runtime.wakeupTime = wakeupTime;
142 }
143 
145 Signal FpySequencer::waitAbs_directiveHandler(const FpySequencer_WaitAbsDirective& directive, DirectiveError& error) {
146  this->m_runtime.wakeupTime = directive.getwakeupTime();
148 }
149 
151 Signal FpySequencer::setSerReg_directiveHandler(const FpySequencer_SetSerRegDirective& directive,
152  DirectiveError& error) {
153  if (directive.getindex() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
156  }
157  // coding error. should have checked this when we were deserializing the directive. prefer to crash
158  // rather than just fail the sequence
159  FW_ASSERT(directive.get_valueSize() <= Fpy::MAX_SERIALIZABLE_REGISTER_SIZE,
160  static_cast<FwAssertArgType>(directive.get_valueSize()),
161  static_cast<FwAssertArgType>(Fpy::MAX_SERIALIZABLE_REGISTER_SIZE));
162 
163  this->m_runtime.serRegs[directive.getindex()].valueSize = directive.get_valueSize();
164 
165  (void)memcpy(this->m_runtime.serRegs[directive.getindex()].value, directive.getvalue(),
166  static_cast<size_t>(directive.get_valueSize()));
167 
169 }
170 
172 Signal FpySequencer::goto_directiveHandler(const FpySequencer_GotoDirective& directive, DirectiveError& error) {
173  // check within sequence bounds, or at EOF (we allow == case cuz this just ends the sequence)
174  if (directive.getstatementIndex() > m_sequenceObj.getheader().getstatementCount()) {
177  }
178  m_runtime.nextStatementIndex = directive.getstatementIndex();
180 }
181 
183 Signal FpySequencer::if_directiveHandler(const FpySequencer_IfDirective& directive, DirectiveError& error) {
184  if (directive.getconditionalReg() >= Fpy::NUM_REGISTERS) {
187  }
188  // check within sequence bounds, or at EOF (we allow == case cuz this just ends the sequence)
189  if (directive.getfalseGotoStmtIndex() > m_sequenceObj.getheader().getstatementCount()) {
192  }
193 
194  if (reg(directive.getconditionalReg())) {
195  // proceed to next instruction
197  }
198 
199  // conditional false case
200  this->m_runtime.nextStatementIndex = directive.getfalseGotoStmtIndex();
202 }
203 
204 Signal FpySequencer::noOp_directiveHandler(const FpySequencer_NoOpDirective& directive, DirectiveError& error) {
206 }
207 
208 Signal FpySequencer::getTlm_directiveHandler(const FpySequencer_GetTlmDirective& directive, DirectiveError& error) {
209  if (directive.getvalueDestSerReg() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
212  }
213  if (directive.gettimeDestSerReg() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
216  }
217  if (!this->isConnected_getTlmChan_OutputPort(0)) {
220  }
221  Fw::Time tlmTime;
222  Fw::TlmBuffer tlmValue;
223  Fw::TlmValid valid = this->getTlmChan_out(0, directive.getchanId(), tlmTime, tlmValue);
224 
225  if (valid != Fw::TlmValid::VALID) {
226  // could not find this tlm chan
229  }
230 
231  // this is an assert in the hpp, the buf should never be bigger than TLM_BUF_MAX
233  static_cast<FwAssertArgType>(tlmValue.getBuffLength()));
234 
235  // copy value into serReg
236  Runtime::SerializableReg& valueSerReg = this->m_runtime.serRegs[directive.getvalueDestSerReg()];
237  memcpy(valueSerReg.value, tlmValue.getBuffAddr(), static_cast<size_t>(tlmValue.getBuffLength()));
238  valueSerReg.valueSize = tlmValue.getBuffLength();
239 
240  // serialize time into serReg
241  Runtime::SerializableReg& timeSerReg = this->m_runtime.serRegs[directive.gettimeDestSerReg()];
242  // clear the serReg in case of early return
243  timeSerReg.valueSize = 0;
245  Fw::SerializeStatus stat = esb.serialize(tlmTime);
246 
248  // failed to serialize Fw::Time into the serReg
251  }
252 
253  timeSerReg.valueSize = esb.getBuffLength();
255 }
256 
257 Signal FpySequencer::getPrm_directiveHandler(const FpySequencer_GetPrmDirective& directive, DirectiveError& error) {
258  if (directive.getdestSerRegIndex() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
261  }
262  if (!this->isConnected_prmGet_OutputPort(0)) {
265  }
266  Fw::ParamBuffer prmValue;
267  // set buff len to 0 before call so we can detect if we failed to get it
268  prmValue.setBuffLen(0);
269  Fw::ParamValid valid = this->getParam_out(0, directive.getprmId(), prmValue);
270 
271  if (valid != Fw::ParamValid::VALID) {
272  // could not find this prm in the DB
275  }
276 
278  // cannot setReg the prm value in the serReg
281  }
282  // copy value into serReg
283  Runtime::SerializableReg& serReg = this->m_runtime.serRegs[directive.getdestSerRegIndex()];
284  memcpy(serReg.value, prmValue.getBuffAddr(), static_cast<size_t>(prmValue.getBuffLength()));
285  serReg.valueSize = prmValue.getBuffLength();
287 }
288 
289 Signal FpySequencer::cmd_directiveHandler(const FpySequencer_CmdDirective& directive, DirectiveError& error) {
290  Fw::ComBuffer cmdBuf;
291  Fw::SerializeStatus stat = cmdBuf.serialize(Fw::ComPacketType::FW_PACKET_COMMAND);
292  // TODO should I assert here? this really shouldn't fail, I should just add a static assert
293  // on com buf size and then assert here
297  }
298  stat = cmdBuf.serialize(directive.getopCode());
302  }
303  stat = cmdBuf.serialize(directive.getargBuf(), directive.get_argBufSize(), Fw::Serialization::OMIT_LENGTH);
307  }
308 
309  // calculate the unique command identifier:
310  // cmd UID is formatted like XXYY, where XX are the first two bytes of the m_sequencesStarted counter
311  // and YY are the first two bytes of the m_statementsDispatched counter.
312  // this way, we know when we get a cmd back A) whether or not it's from this sequence (modulo 2^16) and B)
313  // whether or not it's this specific instance of the cmd in the sequence, and not another one with the same opcode
314  // somewhere else in the file.
315  // if we put this uid in the context we send to the cmdDisp, we will get it back when the cmd returns
316  U32 cmdUid =
317  static_cast<U32>(((this->m_sequencesStarted & 0xFFFF) << 16) | (this->m_statementsDispatched & 0xFFFF));
318 
319  // little note--theoretically this could produce a cmdResponse before we send the
320  // dispatchSuccess signal. however b/c of priorities the dispatchSuccess signal will
321  // always get processed first, leaving us in the right state for the cmdresponse
322  this->cmdOut_out(0, cmdBuf, cmdUid);
323 
324  // now tell the SM to wait some more until we get the cmd response back
326 }
327 
328 Signal FpySequencer::deserSerReg_directiveHandler(const FpySequencer_DeserSerRegDirective& directive,
329  DirectiveError& error) {
330  if (directive.getsrcSerRegIdx() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
333  }
334  if (directive.getdestReg() >= Fpy::NUM_REGISTERS) {
337  }
338  Runtime::SerializableReg& serReg = this->m_runtime.serRegs[directive.getsrcSerRegIdx()];
339  if (directive.getsrcOffset() + directive.get_deserSize() > serReg.valueSize) {
342  }
343 
344  // TODO can I use htons/htonl? this code could be way simpler
345  Fw::ExternalSerializeBuffer esb(serReg.value, serReg.valueSize);
346  esb.setBuffLen(serReg.valueSize);
347  FW_ASSERT(esb.deserializeSkip(directive.getsrcOffset()) == Fw::SerializeStatus::FW_SERIALIZE_OK);
348 
349  I8 oneByte;
350  I16 twoBytes;
351  I32 fourBytes;
352  I64 eightBytes;
353 
354  switch (directive.get_deserSize()) {
355  case 1: {
356  // all these desers should succeed as we've already checked the size above
357  FW_ASSERT(esb.deserialize(oneByte) == Fw::SerializeStatus::FW_SERIALIZE_OK);
358  reg(directive.getdestReg()) = oneByte;
359  break;
360  }
361  case 2: {
362  FW_ASSERT(esb.deserialize(twoBytes) == Fw::SerializeStatus::FW_SERIALIZE_OK);
363  reg(directive.getdestReg()) = twoBytes;
364  break;
365  }
366  case 4: {
367  FW_ASSERT(esb.deserialize(fourBytes) == Fw::SerializeStatus::FW_SERIALIZE_OK);
368  reg(directive.getdestReg()) = fourBytes;
369  break;
370  }
371  case 8: {
372  FW_ASSERT(esb.deserialize(eightBytes) == Fw::SerializeStatus::FW_SERIALIZE_OK);
373  reg(directive.getdestReg()) = eightBytes;
374  break;
375  }
376  default: {
377  FW_ASSERT(0, static_cast<FwAssertArgType>(directive.get_deserSize()));
379  }
380  }
381 
383 }
384 
385 Signal FpySequencer::setReg_directiveHandler(const FpySequencer_SetRegDirective& directive, DirectiveError& error) {
386  if (directive.getdest() >= Fpy::NUM_REGISTERS) {
389  }
390  reg(directive.getdest()) = directive.getvalue();
392 }
393 
394 I8 floatCmp(F64 lhs, F64 rhs) {
395  if (std::isunordered(lhs, rhs)) {
396  // nan is one of the args
397  // always fail a comparison if nan
398  return -2;
399  } else if (std::isgreater(lhs, rhs)) {
400  return 1;
401  } else if (std::isless(lhs, rhs)) {
402  return -1;
403  }
404  return 0;
405 }
406 
407 I64 FpySequencer::binaryRegOp_or(I64 lhs, I64 rhs) {
408  return lhs | rhs;
409 }
410 I64 FpySequencer::binaryRegOp_and(I64 lhs, I64 rhs) {
411  return lhs & rhs;
412 }
413 I64 FpySequencer::binaryRegOp_ieq(I64 lhs, I64 rhs) {
414  return lhs == rhs;
415 }
416 I64 FpySequencer::binaryRegOp_ine(I64 lhs, I64 rhs) {
417  return lhs != rhs;
418 }
419 I64 FpySequencer::binaryRegOp_ult(I64 lhs, I64 rhs) {
420  return static_cast<U64>(lhs) < static_cast<U64>(rhs);
421 }
422 I64 FpySequencer::binaryRegOp_ule(I64 lhs, I64 rhs) {
423  return static_cast<U64>(lhs) <= static_cast<U64>(rhs);
424 }
425 I64 FpySequencer::binaryRegOp_ugt(I64 lhs, I64 rhs) {
426  return static_cast<U64>(lhs) > static_cast<U64>(rhs);
427 }
428 I64 FpySequencer::binaryRegOp_uge(I64 lhs, I64 rhs) {
429  return static_cast<U64>(lhs) >= static_cast<U64>(rhs);
430 }
431 I64 FpySequencer::binaryRegOp_slt(I64 lhs, I64 rhs) {
432  return lhs < rhs;
433 }
434 I64 FpySequencer::binaryRegOp_sle(I64 lhs, I64 rhs) {
435  return lhs <= rhs;
436 }
437 I64 FpySequencer::binaryRegOp_sgt(I64 lhs, I64 rhs) {
438  return lhs > rhs;
439 }
440 I64 FpySequencer::binaryRegOp_sge(I64 lhs, I64 rhs) {
441  return lhs >= rhs;
442 }
443 I64 FpySequencer::binaryRegOp_feq(I64 lhs, I64 rhs) {
444  F64 left;
445  memcpy(&left, &lhs, sizeof(left));
446  F64 right;
447  memcpy(&right, &rhs, sizeof(right));
448  return floatCmp(left, right) == 0;
449 }
450 I64 FpySequencer::binaryRegOp_fne(I64 lhs, I64 rhs) {
451  F64 left;
452  memcpy(&left, &lhs, sizeof(left));
453  F64 right;
454  memcpy(&right, &rhs, sizeof(right));
455  I8 cmp = floatCmp(left, right);
456  // ne is true if they are not equal and neither is nan
457  return cmp != 0 && cmp != -2;
458 }
459 I64 FpySequencer::binaryRegOp_flt(I64 lhs, I64 rhs) {
460  F64 left;
461  memcpy(&left, &lhs, sizeof(left));
462  F64 right;
463  memcpy(&right, &rhs, sizeof(right));
464  return floatCmp(left, right) == -1;
465 }
466 I64 FpySequencer::binaryRegOp_fle(I64 lhs, I64 rhs) {
467  F64 left;
468  memcpy(&left, &lhs, sizeof(left));
469  F64 right;
470  memcpy(&right, &rhs, sizeof(right));
471  I8 cmp = floatCmp(left, right);
472  return cmp == 0 || cmp == -1;
473 }
474 I64 FpySequencer::binaryRegOp_fgt(I64 lhs, I64 rhs) {
475  F64 left;
476  memcpy(&left, &lhs, sizeof(left));
477  F64 right;
478  memcpy(&right, &rhs, sizeof(right));
479  return floatCmp(left, right) == 1;
480 }
481 I64 FpySequencer::binaryRegOp_fge(I64 lhs, I64 rhs) {
482  F64 left;
483  memcpy(&left, &lhs, sizeof(left));
484  F64 right;
485  memcpy(&right, &rhs, sizeof(right));
486  I8 cmp = floatCmp(left, right);
487  return cmp == 0 || cmp == 1;
488 }
489 
490 Signal FpySequencer::binaryRegOp_directiveHandler(const FpySequencer_BinaryRegOpDirective& directive,
491  DirectiveError& error) {
492  // coding error, should not have gotten to this binary reg op handler
493  FW_ASSERT(directive.get_op() >= Fpy::DirectiveId::OR && directive.get_op() <= Fpy::DirectiveId::FGE,
494  static_cast<FwAssertArgType>(directive.get_op()));
495 
496  if (directive.getlhs() >= Fpy::NUM_REGISTERS || directive.getrhs() >= Fpy::NUM_REGISTERS ||
497  directive.getres() >= Fpy::NUM_REGISTERS) {
500  }
501 
502  I64 lhs = reg(directive.getlhs());
503  I64 rhs = reg(directive.getrhs());
504  I64& res = reg(directive.getres());
505 
506  switch (directive.get_op()) {
508  res = this->binaryRegOp_or(lhs, rhs);
509  break;
511  res = this->binaryRegOp_and(lhs, rhs);
512  break;
514  res = this->binaryRegOp_ieq(lhs, rhs);
515  break;
517  res = this->binaryRegOp_ine(lhs, rhs);
518  break;
520  res = this->binaryRegOp_ult(lhs, rhs);
521  break;
523  res = this->binaryRegOp_ule(lhs, rhs);
524  break;
526  res = this->binaryRegOp_ugt(lhs, rhs);
527  break;
529  res = this->binaryRegOp_uge(lhs, rhs);
530  break;
532  res = this->binaryRegOp_slt(lhs, rhs);
533  break;
535  res = this->binaryRegOp_sle(lhs, rhs);
536  break;
538  res = this->binaryRegOp_sgt(lhs, rhs);
539  break;
541  res = this->binaryRegOp_sge(lhs, rhs);
542  break;
544  res = this->binaryRegOp_feq(lhs, rhs);
545  break;
547  res = this->binaryRegOp_fne(lhs, rhs);
548  break;
550  res = this->binaryRegOp_flt(lhs, rhs);
551  break;
553  res = this->binaryRegOp_fle(lhs, rhs);
554  break;
556  res = this->binaryRegOp_fgt(lhs, rhs);
557  break;
559  res = this->binaryRegOp_fge(lhs, rhs);
560  break;
561  default:
562  FW_ASSERT(0, directive.get_op());
563  break;
564  }
566 }
567 I64 FpySequencer::unaryRegOp_not(I64 src) {
568  return ~src;
569 }
570 I64 FpySequencer::unaryRegOp_fpext(I64 src) {
571  // convert F32 to F64
572  // first get the first 32 bits of src
573  I32 trunc = static_cast<I32>(src);
574  // then interpret as float
575  F32 fsrc;
576  memcpy(&fsrc, &trunc, sizeof(fsrc));
577  // then cast to F64
578  F64 ext = static_cast<F64>(fsrc);
579  // then return bits as I64
580  I64 iext;
581  memcpy(&iext, &ext, sizeof(iext));
582  return iext;
583 }
584 I64 FpySequencer::unaryRegOp_fptrunc(I64 src) {
585  // convert F64 to F32
586  // first interpret as F64
587  F64 fsrc;
588  memcpy(&fsrc, &src, sizeof(fsrc));
589  // then cast to F32
590  F32 trunc = static_cast<F32>(fsrc);
591  // then interpret bits as I32
592  I32 itrunc;
593  memcpy(&itrunc, &trunc, sizeof(itrunc));
594  // then extend to I64
595  return static_cast<I64>(itrunc);
596 }
597 
598 Signal FpySequencer::unaryRegOp_directiveHandler(const FpySequencer_UnaryRegOpDirective& directive, DirectiveError& error) {
599  // coding error, should not have gotten to this unary reg op handler
600  FW_ASSERT(directive.get_op() >= Fpy::DirectiveId::NOT && directive.get_op() <= Fpy::DirectiveId::FPTRUNC,
601  static_cast<FwAssertArgType>(directive.get_op()));
602 
603  if (directive.getsrc() >= Fpy::NUM_REGISTERS || directive.getres() >= Fpy::NUM_REGISTERS) {
606  }
607 
608  I64 src = reg(directive.getsrc());
609  I64& res = reg(directive.getres());
610 
611  switch (directive.get_op()) {
613  res = this->unaryRegOp_not(src);
614  break;
616  res = this->unaryRegOp_fpext(src);
617  break;
619  res = this->unaryRegOp_fptrunc(src);
620  break;
621  default:
622  FW_ASSERT(0, directive.get_op());
623  break;
624  }
626 }
627 
628 Signal FpySequencer::exit_directiveHandler(const FpySequencer_ExitDirective& directive, DirectiveError& error) {
629  if (directive.getsuccess()) {
630  // just goto the end of the sequence
631  this->m_runtime.nextStatementIndex = this->m_sequenceObj.getheader().getstatementCount();
633  }
634  // otherwise, kill the sequence here
637 }
638 } // namespace Svc
Serialization/Deserialization operation was successful.
U8 * getBuffAddr()
gets buffer address for data filling
Definition: PrmBuffer.cpp:40
Definition: Time.hpp:9
Svc::Fpy::Header & getheader()
Get member header.
void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive) override
Internal interface handler for directive_if.
I8 floatCmp(F64 lhs, F64 rhs)
called when statement successfully executed. only raised in the RUNNING.AWAITING_CMD_RESPONSE state ...
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
performs a unary reg operation on src reg, and stores in res reg
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke output port getTlmChan.
void directive_getPrm_internalInterfaceHandler(const Svc::FpySequencer_GetPrmDirective &directive) override
Internal interface handler for directive_getPrm.
void directive_binaryRegOp_internalInterfaceHandler(const Svc::FpySequencer_BinaryRegOpDirective &directive) override
Internal interface handler for directive_binaryRegOp.
int8_t I8
8-bit signed integer
Definition: BasicTypes.h:53
void directive_cmd_internalInterfaceHandler(const Svc::FpySequencer_CmdDirective &directive) override
Internal interface handler for directive_cmd.
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
void directive_setReg_internalInterfaceHandler(const Svc::FpySequencer_SetRegDirective &directive) override
Internal interface handler for directive_setReg.
void directive_getTlm_internalInterfaceHandler(const Svc::FpySequencer_GetTlmDirective &directive) override
Internal interface handler for directive_getTlm.
SerializeStatus
forward declaration for string
float F32
32-bit floating point
Definition: BasicTypes.h:86
void directive_waitRel_internalInterfaceHandler(const FpySequencer_WaitRelDirective &directive) override
Internal interface handler for directive_waitRel.
void directive_noOp_internalInterfaceHandler(const Svc::FpySequencer_NoOpDirective &directive) override
Internal interface handler for directive_noOp.
void directive_unaryRegOp_internalInterfaceHandler(const Svc::FpySequencer_UnaryRegOpDirective &directive) override
Internal interface handler for directive_unaryRegOp.
Serializable::SizeType getBuffLength() const
returns current buffer size
FpySequencer_DirectiveErrorCode DirectiveError
void directive_deserSerReg_internalInterfaceHandler(const Svc::FpySequencer_DeserSerRegDirective &directive) override
Internal interface handler for directive_deserSerReg.
void directive_exit_internalInterfaceHandler(const Svc::FpySequencer_ExitDirective &directive) override
Internal interface handler for directive_exit.
External serialize buffer with no copy semantics.
U16 getstatementCount() const
Get member statementCount.
void directive_waitAbs_internalInterfaceHandler(const FpySequencer_WaitAbsDirective &directive) override
Internal interface handler for directive_waitAbs.
U8 * getBuffAddr()
gets buffer address for data filling
Definition: TlmBuffer.cpp:40
void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive) override
Internal interface handler for directive_goto.
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:56
static Time add(const Time &a, const Time &b)
Definition: Time.cpp:193
void sequencer_sendSignal_stmtResponse_keepWaiting()
Send signal stmtResponse_keepWaiting to state machine sequencer.
Omit length from serialization.
called when the statement unsuccessfully executed. only raised in the RUNNING.AWAITING_CMD_RESPONSE s...
performs a binary reg operation on the lhs and rhs regs, and stores the result in the third register ...
double F64
64-bit floating point (double). Required for compiler-supplied double promotion.
Definition: BasicTypes.h:88
bool isConnected_prmGet_OutputPort(FwIndexType portNum)
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port cmdOut.
RateGroupDivider component implementation.
Enum representing parameter validity.
void directive_setSerReg_internalInterfaceHandler(const FpySequencer_SetSerRegDirective &directive) override
Internal interface handler for directive_setSerReg.
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Invoke output port getParam.
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum)
called when the statement is telling the sequencer to await a later stmt response ...
FpySequencer_SequencerStateMachineStateMachineBase::Signal Signal
#define FW_ASSERT(...)
Definition: Assert.hpp:14
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
SerializeStatus setBuffLen(Serializable::SizeType length)
sets buffer length manually after filling with data
#define U64(C)
Definition: sha.h:180