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 
115  const Svc::FpySequencer_BinaryRegOpDirective& directive) {
117  this->sendSignal(this->binaryRegOp_directiveHandler(directive, error));
118  this->m_tlm.lastDirectiveError = error;
119 }
120 
123  const Svc::FpySequencer_UnaryRegOpDirective& directive) {
125  this->sendSignal(this->unaryRegOp_directiveHandler(directive, error));
126  this->m_tlm.lastDirectiveError = error;
127 }
128 
132  this->sendSignal(this->exit_directiveHandler(directive, error));
133  this->m_tlm.lastDirectiveError = error;
134 }
135 
137 Signal FpySequencer::waitRel_directiveHandler(const FpySequencer_WaitRelDirective& directive, DirectiveError& error) {
138  Fw::Time wakeupTime = this->getTime();
139 
140  wakeupTime.add(directive.get_seconds(), directive.get_uSeconds());
141  this->m_runtime.wakeupTime = wakeupTime;
143 }
144 
146 Signal FpySequencer::waitAbs_directiveHandler(const FpySequencer_WaitAbsDirective& directive, DirectiveError& error) {
147  this->m_runtime.wakeupTime = directive.get_wakeupTime();
149 }
150 
152 Signal FpySequencer::setSerReg_directiveHandler(const FpySequencer_SetSerRegDirective& directive,
153  DirectiveError& error) {
154  if (directive.get_index() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
157  }
158  // coding error. should have checked this when we were deserializing the directive. prefer to crash
159  // rather than just fail the sequence
160  FW_ASSERT(directive.get__valueSize() <= Fpy::MAX_SERIALIZABLE_REGISTER_SIZE,
161  static_cast<FwAssertArgType>(directive.get__valueSize()),
162  static_cast<FwAssertArgType>(Fpy::MAX_SERIALIZABLE_REGISTER_SIZE));
163 
164  this->m_runtime.serRegs[directive.get_index()].valueSize = directive.get__valueSize();
165 
166  (void)memcpy(this->m_runtime.serRegs[directive.get_index()].value, directive.get_value(),
167  static_cast<size_t>(directive.get__valueSize()));
168 
170 }
171 
173 Signal FpySequencer::goto_directiveHandler(const FpySequencer_GotoDirective& directive, DirectiveError& error) {
174  // check within sequence bounds, or at EOF (we allow == case cuz this just ends the sequence)
175  if (directive.get_statementIndex() > m_sequenceObj.get_header().get_statementCount()) {
178  }
179  m_runtime.nextStatementIndex = directive.get_statementIndex();
181 }
182 
184 Signal FpySequencer::if_directiveHandler(const FpySequencer_IfDirective& directive, DirectiveError& error) {
185  if (directive.get_conditionalReg() >= Fpy::NUM_REGISTERS) {
188  }
189  // check within sequence bounds, or at EOF (we allow == case cuz this just ends the sequence)
190  if (directive.get_falseGotoStmtIndex() > m_sequenceObj.get_header().get_statementCount()) {
193  }
194 
195  if (reg(directive.get_conditionalReg())) {
196  // proceed to next instruction
198  }
199 
200  // conditional false case
201  this->m_runtime.nextStatementIndex = directive.get_falseGotoStmtIndex();
203 }
204 
205 Signal FpySequencer::noOp_directiveHandler(const FpySequencer_NoOpDirective& directive, DirectiveError& error) {
207 }
208 
209 Signal FpySequencer::getTlm_directiveHandler(const FpySequencer_GetTlmDirective& directive, DirectiveError& error) {
210  if (directive.get_valueDestSerReg() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
213  }
214  if (directive.get_timeDestSerReg() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
217  }
218  if (!this->isConnected_getTlmChan_OutputPort(0)) {
221  }
222  Fw::Time tlmTime;
223  Fw::TlmBuffer tlmValue;
224  Fw::TlmValid valid = this->getTlmChan_out(0, directive.get_chanId(), tlmTime, tlmValue);
225 
226  if (valid != Fw::TlmValid::VALID) {
227  // could not find this tlm chan
230  }
231 
232  // this is an assert in the hpp, the buf should never be bigger than TLM_BUF_MAX
234  static_cast<FwAssertArgType>(tlmValue.getBuffLength()));
235 
236  // copy value into serReg
237  Runtime::SerializableReg& valueSerReg = this->m_runtime.serRegs[directive.get_valueDestSerReg()];
238  memcpy(valueSerReg.value, tlmValue.getBuffAddr(), static_cast<size_t>(tlmValue.getBuffLength()));
239  valueSerReg.valueSize = tlmValue.getBuffLength();
240 
241  // serialize time into serReg
242  Runtime::SerializableReg& timeSerReg = this->m_runtime.serRegs[directive.get_timeDestSerReg()];
243  // clear the serReg in case of early return
244  timeSerReg.valueSize = 0;
246  Fw::SerializeStatus stat = esb.serialize(tlmTime);
247 
249  // failed to serialize Fw::Time into the serReg
252  }
253 
254  timeSerReg.valueSize = esb.getBuffLength();
256 }
257 
258 Signal FpySequencer::getPrm_directiveHandler(const FpySequencer_GetPrmDirective& directive, DirectiveError& error) {
259  if (directive.get_destSerRegIndex() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
262  }
263  if (!this->isConnected_prmGet_OutputPort(0)) {
266  }
267  Fw::ParamBuffer prmValue;
268  // set buff len to 0 before call so we can detect if we failed to get it
269  prmValue.setBuffLen(0);
270  Fw::ParamValid valid = this->getParam_out(0, directive.get_prmId(), prmValue);
271 
272  if (valid != Fw::ParamValid::VALID) {
273  // could not find this prm in the DB
276  }
277 
279  // cannot setReg the prm value in the serReg
282  }
283  // copy value into serReg
284  Runtime::SerializableReg& serReg = this->m_runtime.serRegs[directive.get_destSerRegIndex()];
285  memcpy(serReg.value, prmValue.getBuffAddr(), static_cast<size_t>(prmValue.getBuffLength()));
286  serReg.valueSize = prmValue.getBuffLength();
288 }
289 
290 Signal FpySequencer::cmd_directiveHandler(const FpySequencer_CmdDirective& directive, DirectiveError& error) {
291  Fw::ComBuffer cmdBuf;
292  Fw::SerializeStatus stat = cmdBuf.serialize(Fw::ComPacketType::FW_PACKET_COMMAND);
293  // TODO should I assert here? this really shouldn't fail, I should just add a static assert
294  // on com buf size and then assert here
298  }
299  stat = cmdBuf.serialize(directive.get_opCode());
303  }
304  stat = cmdBuf.serialize(directive.get_argBuf(), directive.get__argBufSize(), Fw::Serialization::OMIT_LENGTH);
308  }
309 
310  // calculate the unique command identifier:
311  // cmd UID is formatted like XXYY, where XX are the first two bytes of the m_sequencesStarted counter
312  // and YY are the first two bytes of the m_statementsDispatched counter.
313  // this way, we know when we get a cmd back A) whether or not it's from this sequence (modulo 2^16) and B)
314  // whether or not it's this specific instance of the cmd in the sequence, and not another one with the same opcode
315  // somewhere else in the file.
316  // if we put this uid in the context we send to the cmdDisp, we will get it back when the cmd returns
317  U32 cmdUid =
318  static_cast<U32>(((this->m_sequencesStarted & 0xFFFF) << 16) | (this->m_statementsDispatched & 0xFFFF));
319 
320  // little note--theoretically this could produce a cmdResponse before we send the
321  // dispatchSuccess signal. however b/c of priorities the dispatchSuccess signal will
322  // always get processed first, leaving us in the right state for the cmdresponse
323  this->cmdOut_out(0, cmdBuf, cmdUid);
324 
325  // now tell the SM to wait some more until we get the cmd response back
327 }
328 
329 Signal FpySequencer::deserSerReg_directiveHandler(const FpySequencer_DeserSerRegDirective& directive,
330  DirectiveError& error) {
331  if (directive.get_srcSerRegIdx() >= Fpy::NUM_SERIALIZABLE_REGISTERS) {
334  }
335  if (directive.get_destReg() >= Fpy::NUM_REGISTERS) {
338  }
339  Runtime::SerializableReg& serReg = this->m_runtime.serRegs[directive.get_srcSerRegIdx()];
340  if (directive.get_srcOffset() + directive.get__deserSize() > serReg.valueSize) {
343  }
344 
345  // TODO can I use htons/htonl? this code could be way simpler
346  Fw::ExternalSerializeBuffer esb(serReg.value, serReg.valueSize);
347  esb.setBuffLen(serReg.valueSize);
348  FW_ASSERT(esb.deserializeSkip(directive.get_srcOffset()) == Fw::SerializeStatus::FW_SERIALIZE_OK);
349 
350  I8 oneByte;
351  I16 twoBytes;
352  I32 fourBytes;
353  I64 eightBytes;
354 
355  switch (directive.get__deserSize()) {
356  case 1: {
357  // all these desers should succeed as we've already checked the size above
358  FW_ASSERT(esb.deserialize(oneByte) == Fw::SerializeStatus::FW_SERIALIZE_OK);
359  reg(directive.get_destReg()) = oneByte;
360  break;
361  }
362  case 2: {
363  FW_ASSERT(esb.deserialize(twoBytes) == Fw::SerializeStatus::FW_SERIALIZE_OK);
364  reg(directive.get_destReg()) = twoBytes;
365  break;
366  }
367  case 4: {
368  FW_ASSERT(esb.deserialize(fourBytes) == Fw::SerializeStatus::FW_SERIALIZE_OK);
369  reg(directive.get_destReg()) = fourBytes;
370  break;
371  }
372  case 8: {
373  FW_ASSERT(esb.deserialize(eightBytes) == Fw::SerializeStatus::FW_SERIALIZE_OK);
374  reg(directive.get_destReg()) = eightBytes;
375  break;
376  }
377  default: {
378  FW_ASSERT(0, static_cast<FwAssertArgType>(directive.get__deserSize()));
380  }
381  }
382 
384 }
385 
386 Signal FpySequencer::setReg_directiveHandler(const FpySequencer_SetRegDirective& directive, DirectiveError& error) {
387  if (directive.get_dest() >= Fpy::NUM_REGISTERS) {
390  }
391  reg(directive.get_dest()) = directive.get_value();
393 }
394 
395 I8 floatCmp(F64 lhs, F64 rhs) {
396  if (std::isunordered(lhs, rhs)) {
397  // nan is one of the args
398  // always fail a comparison if nan
399  return -2;
400  } else if (std::isgreater(lhs, rhs)) {
401  return 1;
402  } else if (std::isless(lhs, rhs)) {
403  return -1;
404  }
405  return 0;
406 }
407 
408 I64 FpySequencer::binaryRegOp_or(I64 lhs, I64 rhs) {
409  return lhs | rhs;
410 }
411 I64 FpySequencer::binaryRegOp_and(I64 lhs, I64 rhs) {
412  return lhs & rhs;
413 }
414 I64 FpySequencer::binaryRegOp_ieq(I64 lhs, I64 rhs) {
415  return lhs == rhs;
416 }
417 I64 FpySequencer::binaryRegOp_ine(I64 lhs, I64 rhs) {
418  return lhs != rhs;
419 }
420 I64 FpySequencer::binaryRegOp_ult(I64 lhs, I64 rhs) {
421  return static_cast<U64>(lhs) < static_cast<U64>(rhs);
422 }
423 I64 FpySequencer::binaryRegOp_ule(I64 lhs, I64 rhs) {
424  return static_cast<U64>(lhs) <= static_cast<U64>(rhs);
425 }
426 I64 FpySequencer::binaryRegOp_ugt(I64 lhs, I64 rhs) {
427  return static_cast<U64>(lhs) > static_cast<U64>(rhs);
428 }
429 I64 FpySequencer::binaryRegOp_uge(I64 lhs, I64 rhs) {
430  return static_cast<U64>(lhs) >= static_cast<U64>(rhs);
431 }
432 I64 FpySequencer::binaryRegOp_slt(I64 lhs, I64 rhs) {
433  return lhs < rhs;
434 }
435 I64 FpySequencer::binaryRegOp_sle(I64 lhs, I64 rhs) {
436  return lhs <= rhs;
437 }
438 I64 FpySequencer::binaryRegOp_sgt(I64 lhs, I64 rhs) {
439  return lhs > rhs;
440 }
441 I64 FpySequencer::binaryRegOp_sge(I64 lhs, I64 rhs) {
442  return lhs >= rhs;
443 }
444 I64 FpySequencer::binaryRegOp_feq(I64 lhs, I64 rhs) {
445  F64 left;
446  memcpy(&left, &lhs, sizeof(left));
447  F64 right;
448  memcpy(&right, &rhs, sizeof(right));
449  return floatCmp(left, right) == 0;
450 }
451 I64 FpySequencer::binaryRegOp_fne(I64 lhs, I64 rhs) {
452  F64 left;
453  memcpy(&left, &lhs, sizeof(left));
454  F64 right;
455  memcpy(&right, &rhs, sizeof(right));
456  I8 cmp = floatCmp(left, right);
457  // ne is true if they are not equal and neither is nan
458  return cmp != 0 && cmp != -2;
459 }
460 I64 FpySequencer::binaryRegOp_flt(I64 lhs, I64 rhs) {
461  F64 left;
462  memcpy(&left, &lhs, sizeof(left));
463  F64 right;
464  memcpy(&right, &rhs, sizeof(right));
465  return floatCmp(left, right) == -1;
466 }
467 I64 FpySequencer::binaryRegOp_fle(I64 lhs, I64 rhs) {
468  F64 left;
469  memcpy(&left, &lhs, sizeof(left));
470  F64 right;
471  memcpy(&right, &rhs, sizeof(right));
472  I8 cmp = floatCmp(left, right);
473  return cmp == 0 || cmp == -1;
474 }
475 I64 FpySequencer::binaryRegOp_fgt(I64 lhs, I64 rhs) {
476  F64 left;
477  memcpy(&left, &lhs, sizeof(left));
478  F64 right;
479  memcpy(&right, &rhs, sizeof(right));
480  return floatCmp(left, right) == 1;
481 }
482 I64 FpySequencer::binaryRegOp_fge(I64 lhs, I64 rhs) {
483  F64 left;
484  memcpy(&left, &lhs, sizeof(left));
485  F64 right;
486  memcpy(&right, &rhs, sizeof(right));
487  I8 cmp = floatCmp(left, right);
488  return cmp == 0 || cmp == 1;
489 }
490 
491 Signal FpySequencer::binaryRegOp_directiveHandler(const FpySequencer_BinaryRegOpDirective& directive,
492  DirectiveError& error) {
493  // coding error, should not have gotten to this binary reg op handler
494  FW_ASSERT(directive.get__op() >= Fpy::DirectiveId::OR && directive.get__op() <= Fpy::DirectiveId::FGE,
495  static_cast<FwAssertArgType>(directive.get__op()));
496 
497  if (directive.get_lhs() >= Fpy::NUM_REGISTERS || directive.get_rhs() >= Fpy::NUM_REGISTERS ||
498  directive.get_res() >= Fpy::NUM_REGISTERS) {
501  }
502 
503  I64 lhs = reg(directive.get_lhs());
504  I64 rhs = reg(directive.get_rhs());
505  I64& res = reg(directive.get_res());
506 
507  switch (directive.get__op()) {
509  res = this->binaryRegOp_or(lhs, rhs);
510  break;
512  res = this->binaryRegOp_and(lhs, rhs);
513  break;
515  res = this->binaryRegOp_ieq(lhs, rhs);
516  break;
518  res = this->binaryRegOp_ine(lhs, rhs);
519  break;
521  res = this->binaryRegOp_ult(lhs, rhs);
522  break;
524  res = this->binaryRegOp_ule(lhs, rhs);
525  break;
527  res = this->binaryRegOp_ugt(lhs, rhs);
528  break;
530  res = this->binaryRegOp_uge(lhs, rhs);
531  break;
533  res = this->binaryRegOp_slt(lhs, rhs);
534  break;
536  res = this->binaryRegOp_sle(lhs, rhs);
537  break;
539  res = this->binaryRegOp_sgt(lhs, rhs);
540  break;
542  res = this->binaryRegOp_sge(lhs, rhs);
543  break;
545  res = this->binaryRegOp_feq(lhs, rhs);
546  break;
548  res = this->binaryRegOp_fne(lhs, rhs);
549  break;
551  res = this->binaryRegOp_flt(lhs, rhs);
552  break;
554  res = this->binaryRegOp_fle(lhs, rhs);
555  break;
557  res = this->binaryRegOp_fgt(lhs, rhs);
558  break;
560  res = this->binaryRegOp_fge(lhs, rhs);
561  break;
562  default:
563  FW_ASSERT(0, directive.get__op());
564  break;
565  }
567 }
568 I64 FpySequencer::unaryRegOp_not(I64 src) {
569  if (src) {
570  return static_cast<I64>(false);
571  }
572  return static_cast<I64>(true);
573 }
574 I64 FpySequencer::unaryRegOp_fpext(I64 src) {
575  // convert F32 to F64
576  // first get the first 32 bits of src
577  I32 trunc = static_cast<I32>(src);
578  // then interpret as float
579  F32 fsrc;
580  memcpy(&fsrc, &trunc, sizeof(fsrc));
581  // then cast to F64
582  F64 ext = static_cast<F64>(fsrc);
583  // then return bits as I64
584  I64 iext;
585  memcpy(&iext, &ext, sizeof(iext));
586  return iext;
587 }
588 I64 FpySequencer::unaryRegOp_fptrunc(I64 src) {
589  // convert F64 to F32
590  // first interpret as F64
591  F64 fsrc;
592  memcpy(&fsrc, &src, sizeof(fsrc));
593  // then cast to F32
594  F32 trunc = static_cast<F32>(fsrc);
595  // then interpret bits as I32
596  I32 itrunc;
597  memcpy(&itrunc, &trunc, sizeof(itrunc));
598  // then extend to I64
599  return static_cast<I64>(itrunc);
600 }
601 I64 FpySequencer::unaryRegOp_fptosi(I64 src) {
602  // first interpret as F64
603  F64 fsrc;
604  memcpy(&fsrc, &src, sizeof(fsrc));
605  // then static cast to int
606  return static_cast<I64>(fsrc);
607 }
608 I64 FpySequencer::unaryRegOp_sitofp(I64 src) {
609  // first static cast to float
610  F64 fsrc = static_cast<F64>(src);
611  // then return bits as I64
612  I64 res;
613  memcpy(&res, &fsrc, sizeof(res));
614  return res;
615 }
616 I64 FpySequencer::unaryRegOp_fptoui(I64 src) {
617  // first interpret as F64
618  F64 fsrc;
619  memcpy(&fsrc, &src, sizeof(fsrc));
620  // then static cast to unsigned int
621  // then return as a signed int
622  return static_cast<I64>(static_cast<U64>(fsrc));
623 }
624 I64 FpySequencer::unaryRegOp_uitofp(I64 src) {
625  // first static cast to unsigned, then to float
626  F64 fsrc = static_cast<F64>(static_cast<U64>(src));
627  // then return bits as I64
628  I64 res;
629  memcpy(&res, &fsrc, sizeof(res));
630  return res;
631 }
632 Signal FpySequencer::unaryRegOp_directiveHandler(const FpySequencer_UnaryRegOpDirective& directive,
633  DirectiveError& error) {
634  // coding error, should not have gotten to this unary reg op handler
635  FW_ASSERT(directive.get__op() >= Fpy::DirectiveId::NOT && directive.get__op() <= Fpy::DirectiveId::UITOFP,
636  static_cast<FwAssertArgType>(directive.get__op()));
637 
638  if (directive.get_src() >= Fpy::NUM_REGISTERS || directive.get_res() >= Fpy::NUM_REGISTERS) {
641  }
642 
643  I64 src = reg(directive.get_src());
644  I64& res = reg(directive.get_res());
645 
646  switch (directive.get__op()) {
648  res = this->unaryRegOp_not(src);
649  break;
651  res = this->unaryRegOp_fpext(src);
652  break;
654  res = this->unaryRegOp_fptrunc(src);
655  break;
657  res = this->unaryRegOp_fptosi(src);
658  break;
660  res = this->unaryRegOp_fptoui(src);
661  break;
663  res = this->unaryRegOp_sitofp(src);
664  break;
666  res = this->unaryRegOp_uitofp(src);
667  break;
668  default:
669  FW_ASSERT(0, directive.get__op());
670  break;
671  }
673 }
674 
675 Signal FpySequencer::exit_directiveHandler(const FpySequencer_ExitDirective& directive, DirectiveError& error) {
676  if (directive.get_success()) {
677  // just goto the end of the sequence
678  this->m_runtime.nextStatementIndex = this->m_sequenceObj.get_header().get_statementCount();
680  }
681  // otherwise, kill the sequence here
684 }
685 } // namespace Svc
Serialization/Deserialization operation was successful.
U8 * getBuffAddr()
gets buffer address for data filling
Definition: PrmBuffer.cpp:38
U16 get_statementCount() const
Get member statementCount.
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)
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:50
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:83
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
Svc::Fpy::Header & get_header()
Get member header.
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.
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:38
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:53
static Time add(const Time &a, const Time &b)
Definition: Time.cpp:132
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:85
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