F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PrmDbComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title PrmDbComponentAc.cpp
3 // \author Auto-generated
4 // \brief cpp file for PrmDb component base class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #include <stdio.h>
14 #include <FpConfig.hpp>
16 #include <Fw/Types/Assert.hpp>
17 #if FW_ENABLE_TEXT_LOGGING
19 #endif
20 
21 
22 namespace Svc {
23 
24  // ----------------------------------------------------------------------
25  // Anonymous namespace to prevent name collisions
26  // ----------------------------------------------------------------------
27 
28  namespace {
29 
30  typedef enum {
32  SETPRM_PRMSET,
33  PINGIN_PING,
34  CMD_PRM_SAVE_FILE
35  } MsgTypeEnum;
36 
37  // Get the max size by doing a union of the input port serialization sizes.
38 
39  typedef union {
43  } BuffUnion;
44 
45  // Define a message buffer class large enough to handle all the
46  // asynchronous inputs to the component
47 
48  class ComponentIpcSerializableBuffer :
50  {
51 
52  public:
53 
54  enum {
55  // Max. message size = size of data + message id + port
56  SERIALIZATION_SIZE =
57  sizeof(BuffUnion) +
58  sizeof(NATIVE_INT_TYPE) +
59  sizeof(NATIVE_INT_TYPE)
60  };
61 
62  NATIVE_UINT_TYPE getBuffCapacity(void) const {
63  return sizeof(m_buff);
64  }
65 
66  U8* getBuffAddr(void) {
67  return m_buff;
68  }
69 
70  const U8* getBuffAddr(void) const {
71  return m_buff;
72  }
73 
74  private:
75  // Should be the max of all the input ports serialized sizes...
76  U8 m_buff[SERIALIZATION_SIZE];
77 
78  };
79 
80  }
81 
82  // ----------------------------------------------------------------------
83  // Getters for numbers of input ports
84  // ----------------------------------------------------------------------
85 
88  {
89  FW_ASSERT(portNum < this->getNum_getPrm_InputPorts(),static_cast<AssertArg>(portNum));
90  return &this->m_getPrm_InputPort[portNum];
91  }
92 
95  {
96  FW_ASSERT(portNum < this->getNum_setPrm_InputPorts(),static_cast<AssertArg>(portNum));
97  return &this->m_setPrm_InputPort[portNum];
98  }
99 
102  {
103  FW_ASSERT(portNum < this->getNum_pingIn_InputPorts(),static_cast<AssertArg>(portNum));
104  return &this->m_pingIn_InputPort[portNum];
105  }
106 
109  {
110  FW_ASSERT(portNum < this->getNum_CmdDisp_InputPorts(),static_cast<AssertArg>(portNum));
111  return &this->m_CmdDisp_InputPort[portNum];
112  }
113 
114  // ----------------------------------------------------------------------
115  // Typed connectors for output ports
116  // ----------------------------------------------------------------------
117 
120  NATIVE_INT_TYPE portNum,
121  Svc::InputPingPort* port
122  )
123  {
124  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
125  this->m_pingOut_OutputPort[portNum].addCallPort(port);
126  }
127 
130  NATIVE_INT_TYPE portNum,
132  )
133  {
134  FW_ASSERT(portNum < this->getNum_CmdStatus_OutputPorts(),static_cast<AssertArg>(portNum));
136  }
137 
140  NATIVE_INT_TYPE portNum,
141  Fw::InputCmdRegPort* port
142  )
143  {
144  FW_ASSERT(portNum < this->getNum_CmdReg_OutputPorts(),static_cast<AssertArg>(portNum));
146  }
147 
150  NATIVE_INT_TYPE portNum,
151  Fw::InputTimePort* port
152  )
153  {
154  FW_ASSERT(portNum < this->getNum_Time_OutputPorts(),static_cast<AssertArg>(portNum));
156  }
157 
160  NATIVE_INT_TYPE portNum,
161  Fw::InputLogPort* port
162  )
163  {
164  FW_ASSERT(portNum < this->getNum_Log_OutputPorts(),static_cast<AssertArg>(portNum));
165  this->m_Log_OutputPort[portNum].addCallPort(port);
166  }
167 
168 #if FW_ENABLE_TEXT_LOGGING == 1
169  void PrmDbComponentBase ::
170  set_LogText_OutputPort(
171  NATIVE_INT_TYPE portNum,
173  )
174  {
175  FW_ASSERT(portNum < this->getNum_LogText_OutputPorts(),static_cast<AssertArg>(portNum));
176  this->m_LogText_OutputPort[portNum].addCallPort(port);
177  }
178 #endif
179 
180  // ----------------------------------------------------------------------
181  // Serialization connectors for output ports
182  // ----------------------------------------------------------------------
183 
184 #if FW_PORT_SERIALIZATION
185 
188  NATIVE_INT_TYPE portNum,
189  Fw::InputSerializePort *port
190  )
191  {
192  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
193  return this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
194  }
195 
198  NATIVE_INT_TYPE portNum,
199  Fw::InputSerializePort *port
200  )
201  {
202  FW_ASSERT(portNum < this->getNum_CmdStatus_OutputPorts(),static_cast<AssertArg>(portNum));
203  return this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
204  }
205 
208  NATIVE_INT_TYPE portNum,
209  Fw::InputSerializePort *port
210  )
211  {
212  FW_ASSERT(portNum < this->getNum_CmdReg_OutputPorts(),static_cast<AssertArg>(portNum));
213  return this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
214  }
215 
218  NATIVE_INT_TYPE portNum,
219  Fw::InputSerializePort *port
220  )
221  {
222  FW_ASSERT(portNum < this->getNum_Time_OutputPorts(),static_cast<AssertArg>(portNum));
223  return this->m_Time_OutputPort[portNum].registerSerialPort(port);
224  }
225 
228  NATIVE_INT_TYPE portNum,
229  Fw::InputSerializePort *port
230  )
231  {
232  FW_ASSERT(portNum < this->getNum_Log_OutputPorts(),static_cast<AssertArg>(portNum));
233  return this->m_Log_OutputPort[portNum].registerSerialPort(port);
234  }
235 
236 #if FW_ENABLE_TEXT_LOGGING == 1
237  void PrmDbComponentBase ::
238  set_LogText_OutputPort(
239  NATIVE_INT_TYPE portNum,
240  Fw::InputSerializePort *port
241  )
242  {
243  FW_ASSERT(portNum < this->getNum_LogText_OutputPorts(),static_cast<AssertArg>(portNum));
244  return this->m_LogText_OutputPort[portNum].registerSerialPort(port);
245  }
246 #endif
247 
248 #endif
249 
250  // ----------------------------------------------------------------------
251  // Command registration
252  // ----------------------------------------------------------------------
253 
255  regCommands(void)
256  {
257  FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
258  this->m_CmdReg_OutputPort[0].invoke(
259  this->getIdBase() + OPCODE_PRM_SAVE_FILE
260  );
261  }
262 
263  // ----------------------------------------------------------------------
264  // Component construction, initialization, and destruction
265  // ----------------------------------------------------------------------
266 
268 #if FW_OBJECT_NAMES == 1
269  PrmDbComponentBase(const char* compName) :
270  Fw::ActiveComponentBase(compName)
271 #else
273  Fw::ActiveComponentBase()
274 #endif
275  {
276 
277 
278  this->m_PrmIdNotFoundThrottle = 0;
279 
280  }
281 
283  init(
284  NATIVE_INT_TYPE queueDepth,
285  NATIVE_INT_TYPE instance
286  )
287  {
288 
289  // Initialize base class
291 
292  // Connect input port getPrm
293  for (
294  NATIVE_INT_TYPE port = 0;
295  port < this->getNum_getPrm_InputPorts();
296  port++
297  ) {
298 
299  this->m_getPrm_InputPort[port].init();
300  this->m_getPrm_InputPort[port].addCallComp(
301  this,
302  m_p_getPrm_in
303  );
304  this->m_getPrm_InputPort[port].setPortNum(port);
305 
306 #if FW_OBJECT_NAMES == 1
307  char portName[120];
308  (void) snprintf(
309  portName,
310  sizeof(portName),
311  "%s_getPrm_InputPort[%d]",
312  this->m_objName,
313  port
314  );
315  this->m_getPrm_InputPort[port].setObjName(portName);
316 #endif
317 
318  }
319 
320  // Connect input port setPrm
321  for (
322  NATIVE_INT_TYPE port = 0;
323  port < this->getNum_setPrm_InputPorts();
324  port++
325  ) {
326 
327  this->m_setPrm_InputPort[port].init();
328  this->m_setPrm_InputPort[port].addCallComp(
329  this,
331  );
332  this->m_setPrm_InputPort[port].setPortNum(port);
333 
334 #if FW_OBJECT_NAMES == 1
335  char portName[120];
336  (void) snprintf(
337  portName,
338  sizeof(portName),
339  "%s_setPrm_InputPort[%d]",
340  this->m_objName,
341  port
342  );
343  this->m_setPrm_InputPort[port].setObjName(portName);
344 #endif
345 
346  }
347 
348  // Connect input port pingIn
349  for (
350  NATIVE_INT_TYPE port = 0;
351  port < this->getNum_pingIn_InputPorts();
352  port++
353  ) {
354 
355  this->m_pingIn_InputPort[port].init();
356  this->m_pingIn_InputPort[port].addCallComp(
357  this,
359  );
360  this->m_pingIn_InputPort[port].setPortNum(port);
361 
362 #if FW_OBJECT_NAMES == 1
363  char portName[120];
364  (void) snprintf(
365  portName,
366  sizeof(portName),
367  "%s_pingIn_InputPort[%d]",
368  this->m_objName,
369  port
370  );
371  this->m_pingIn_InputPort[port].setObjName(portName);
372 #endif
373 
374  }
375 
376  // Connect input port CmdDisp
377  for (
378  NATIVE_INT_TYPE port = 0;
379  port < this->getNum_CmdDisp_InputPorts();
380  port++
381  ) {
382 
383  this->m_CmdDisp_InputPort[port].init();
384  this->m_CmdDisp_InputPort[port].addCallComp(
385  this,
387  );
388  this->m_CmdDisp_InputPort[port].setPortNum(port);
389 
390 #if FW_OBJECT_NAMES == 1
391  char portName[120];
392  (void) snprintf(
393  portName,
394  sizeof(portName),
395  "%s_CmdDisp_InputPort[%d]",
396  this->m_objName,
397  port
398  );
399  this->m_CmdDisp_InputPort[port].setObjName(portName);
400 #endif
401 
402  }
403 
404  // Initialize output port pingOut
405  for (
406  NATIVE_INT_TYPE port = 0;
407  port < this->getNum_pingOut_OutputPorts();
408  port++
409  ) {
410  this->m_pingOut_OutputPort[port].init();
411 
412 #if FW_OBJECT_NAMES == 1
413  char portName[120];
414  (void) snprintf(
415  portName,
416  sizeof(portName),
417  "%s_pingOut_OutputPort[%d]",
418  this->m_objName,
419  port
420  );
421  this->m_pingOut_OutputPort[port].setObjName(portName);
422 #endif
423 
424  }
425 
426  // Initialize output port CmdStatus
427  for (
428  NATIVE_INT_TYPE port = 0;
429  port < this->getNum_CmdStatus_OutputPorts();
430  port++
431  ) {
432  this->m_CmdStatus_OutputPort[port].init();
433 
434 #if FW_OBJECT_NAMES == 1
435  char portName[120];
436  (void) snprintf(
437  portName,
438  sizeof(portName),
439  "%s_CmdStatus_OutputPort[%d]",
440  this->m_objName,
441  port
442  );
443  this->m_CmdStatus_OutputPort[port].setObjName(portName);
444 #endif
445 
446  }
447 
448  // Initialize output port CmdReg
449  for (
450  NATIVE_INT_TYPE port = 0;
451  port < this->getNum_CmdReg_OutputPorts();
452  port++
453  ) {
454  this->m_CmdReg_OutputPort[port].init();
455 
456 #if FW_OBJECT_NAMES == 1
457  char portName[120];
458  (void) snprintf(
459  portName,
460  sizeof(portName),
461  "%s_CmdReg_OutputPort[%d]",
462  this->m_objName,
463  port
464  );
465  this->m_CmdReg_OutputPort[port].setObjName(portName);
466 #endif
467 
468  }
469 
470  // Initialize output port Time
471  for (
472  NATIVE_INT_TYPE port = 0;
473  port < this->getNum_Time_OutputPorts();
474  port++
475  ) {
476  this->m_Time_OutputPort[port].init();
477 
478 #if FW_OBJECT_NAMES == 1
479  char portName[120];
480  (void) snprintf(
481  portName,
482  sizeof(portName),
483  "%s_Time_OutputPort[%d]",
484  this->m_objName,
485  port
486  );
487  this->m_Time_OutputPort[port].setObjName(portName);
488 #endif
489 
490  }
491 
492  // Initialize output port Log
493  for (
494  NATIVE_INT_TYPE port = 0;
495  port < this->getNum_Log_OutputPorts();
496  port++
497  ) {
498  this->m_Log_OutputPort[port].init();
499 
500 #if FW_OBJECT_NAMES == 1
501  char portName[120];
502  (void) snprintf(
503  portName,
504  sizeof(portName),
505  "%s_Log_OutputPort[%d]",
506  this->m_objName,
507  port
508  );
509  this->m_Log_OutputPort[port].setObjName(portName);
510 #endif
511 
512  }
513 
514  // Initialize output port LogText
515 #if FW_ENABLE_TEXT_LOGGING == 1
516  for (
517  NATIVE_INT_TYPE port = 0;
518  port < this->getNum_LogText_OutputPorts();
519  port++
520  ) {
521  this->m_LogText_OutputPort[port].init();
522 
523 #if FW_OBJECT_NAMES == 1
524  char portName[120];
525  (void) snprintf(
526  portName,
527  sizeof(portName),
528  "%s_LogText_OutputPort[%d]",
529  this->m_objName,
530  port
531  );
532  this->m_LogText_OutputPort[port].setObjName(portName);
533 #endif
534 
535  }
536 #endif
537 
538  Os::Queue::QueueStatus qStat =
539  this->createQueue(
540  queueDepth,
541  ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
542  );
543  FW_ASSERT(
544  Os::Queue::QUEUE_OK == qStat,
545  static_cast<AssertArg>(qStat)
546  );
547 
548  }
549 
552 
553  }
554 
555  // ----------------------------------------------------------------------
556  // Invocation functions for output ports
557  // ----------------------------------------------------------------------
558 
559  void PrmDbComponentBase ::
560  pingOut_out(
561  NATIVE_INT_TYPE portNum,
562  U32 key
563  )
564  {
565  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
566  this->m_pingOut_OutputPort[portNum].invoke(key);
567  }
568 
569  // ----------------------------------------------------------------------
570  // Getters for numbers of ports
571  // ----------------------------------------------------------------------
572 
573  NATIVE_INT_TYPE PrmDbComponentBase ::
574  getNum_getPrm_InputPorts(void)
575  {
577  this->m_getPrm_InputPort
578  );
579  }
580 
583  {
585  this->m_setPrm_InputPort
586  );
587  }
588 
591  {
593  this->m_pingIn_InputPort
594  );
595  }
596 
597  NATIVE_INT_TYPE PrmDbComponentBase ::
598  getNum_pingOut_OutputPorts(void)
599  {
601  this->m_pingOut_OutputPort
602  );
603  }
604 
607  {
609  this->m_CmdDisp_InputPort
610  );
611  }
612 
615  {
618  );
619  }
620 
623  {
625  this->m_CmdReg_OutputPort
626  );
627  }
628 
631  {
633  this->m_Time_OutputPort
634  );
635  }
636 
639  {
641  this->m_Log_OutputPort
642  );
643  }
644 
645 #if FW_ENABLE_TEXT_LOGGING == 1
646  NATIVE_INT_TYPE PrmDbComponentBase ::
647  getNum_LogText_OutputPorts(void)
648  {
650  this->m_LogText_OutputPort
651  );
652  }
653 #endif
654 
655  // ----------------------------------------------------------------------
656  // Port connection status queries
657  // ----------------------------------------------------------------------
658 
659  bool PrmDbComponentBase ::
660  isConnected_pingOut_OutputPort(NATIVE_INT_TYPE portNum)
661  {
662  FW_ASSERT(
663  portNum < this->getNum_pingOut_OutputPorts(),
664  static_cast<AssertArg>(portNum)
665  );
666  return this->m_pingOut_OutputPort[portNum].isConnected();
667  }
668 
671  {
672  FW_ASSERT(
673  portNum < this->getNum_CmdStatus_OutputPorts(),
674  static_cast<AssertArg>(portNum)
675  );
677  }
678 
681  {
682  FW_ASSERT(
683  portNum < this->getNum_CmdReg_OutputPorts(),
684  static_cast<AssertArg>(portNum)
685  );
686  return this->m_CmdReg_OutputPort[portNum].isConnected();
687  }
688 
691  {
692  FW_ASSERT(
693  portNum < this->getNum_Time_OutputPorts(),
694  static_cast<AssertArg>(portNum)
695  );
696  return this->m_Time_OutputPort[portNum].isConnected();
697  }
698 
701  {
702  FW_ASSERT(
703  portNum < this->getNum_Log_OutputPorts(),
704  static_cast<AssertArg>(portNum)
705  );
706  return this->m_Log_OutputPort[portNum].isConnected();
707  }
708 
709 #if FW_ENABLE_TEXT_LOGGING == 1
710  bool PrmDbComponentBase ::
711  isConnected_LogText_OutputPort(NATIVE_INT_TYPE portNum)
712  {
713  FW_ASSERT(
714  portNum < this->getNum_LogText_OutputPorts(),
715  static_cast<AssertArg>(portNum)
716  );
717  return this->m_LogText_OutputPort[portNum].isConnected();
718  }
719 #endif
720 
721  // ----------------------------------------------------------------------
722  // Calls for messages received on command input ports
723  // ----------------------------------------------------------------------
724 
727  Fw::PassiveComponentBase* callComp,
728  NATIVE_INT_TYPE portNum,
729  FwOpcodeType opCode,
730  U32 cmdSeq,
731  Fw::CmdArgBuffer &args
732  )
733  {
734 
735  // Select base class function based on opcode
736  FW_ASSERT(callComp);
737  PrmDbComponentBase* compPtr =
738  (PrmDbComponentBase*) callComp;
739 
740  const U32 idBase = callComp->getIdBase();
741  FW_ASSERT(opCode >= idBase, opCode, idBase);
742  switch (opCode - idBase) {
743 
744  case OPCODE_PRM_SAVE_FILE:
745  compPtr->PRM_SAVE_FILE_cmdHandlerBase(
746  opCode,
747  cmdSeq,
748  args
749  );
750  break;
751 
752  default: {
753  compPtr->cmdResponse_out(
754  opCode,cmdSeq,
756  );
757  break;
758  }
759 
760  }
761 
762  }
763 
764  void PrmDbComponentBase ::
765  cmdResponse_out(
766  FwOpcodeType opCode,
767  U32 cmdSeq,
768  Fw::CommandResponse response
769  )
770  {
771  FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
772  this->m_CmdStatus_OutputPort[0].invoke(opCode,cmdSeq,response);
773  }
774 
775  // ----------------------------------------------------------------------
776  // Base class command functions
777  // ----------------------------------------------------------------------
778 
779  void PrmDbComponentBase ::
780  PRM_SAVE_FILE_cmdHandlerBase(
781  FwOpcodeType opCode,
782  U32 cmdSeq,
783  Fw::CmdArgBuffer &args
784  )
785  {
786 
787  // Call pre-message hook
788  this->PRM_SAVE_FILE_preMsgHook(opCode,cmdSeq);
789 
790  // Defer deserializing arguments to the message dispatcher
791  // to avoid deserializing and reserializing just for IPC
792  ComponentIpcSerializableBuffer msg;
794 
795  // Serialize for IPC
796  _status = msg.serialize((NATIVE_INT_TYPE)CMD_PRM_SAVE_FILE);
797  FW_ASSERT (
798  _status == Fw::FW_SERIALIZE_OK,
799  static_cast<AssertArg>(_status)
800  );
801 
802  // Fake port number to make message dequeue work
803  NATIVE_INT_TYPE port = 0;
804  _status = msg.serialize(port);
805  FW_ASSERT (
806  _status == Fw::FW_SERIALIZE_OK,
807  static_cast<AssertArg>(_status)
808  );
809 
810  _status = msg.serialize(opCode);
811  FW_ASSERT (
812  _status == Fw::FW_SERIALIZE_OK,
813  static_cast<AssertArg>(_status)
814  );
815 
816  _status = msg.serialize(cmdSeq);
817  FW_ASSERT (
818  _status == Fw::FW_SERIALIZE_OK,
819  static_cast<AssertArg>(_status)
820  );
821 
822  _status = msg.serialize(args);
823  FW_ASSERT (
824  _status == Fw::FW_SERIALIZE_OK,
825  static_cast<AssertArg>(_status)
826  );
827 
828  // send message
829  Os::Queue::QueueBlocking _block =
831  Os::Queue::QueueStatus qStatus =
832  this->m_queue.send(msg, 0,_block);
833  FW_ASSERT(
834  qStatus == Os::Queue::QUEUE_OK,
835  static_cast<AssertArg>(qStatus)
836  );
837 
838  }
839 
840  void PrmDbComponentBase::
841  PRM_SAVE_FILE_preMsgHook(
842  FwOpcodeType opCode,
843  U32 cmdSeq
844  )
845  {
846  // Defaults to no-op; can be overridden
847  }
848 
849  // ----------------------------------------------------------------------
850  // Time
851  // ----------------------------------------------------------------------
852 
853  Fw::Time PrmDbComponentBase ::
854  getTime(void)
855  {
856  if (this->m_Time_OutputPort[0].isConnected()) {
857  Fw::Time _time;
858  this->m_Time_OutputPort[0].invoke(_time);
859  return _time;
860  } else {
861  return Fw::Time(TB_NONE,0,0);
862  }
863  }
864 
865  // ----------------------------------------------------------------------
866  // Event handling functions
867  // ----------------------------------------------------------------------
868 
869  void PrmDbComponentBase ::
870  log_WARNING_LO_PrmIdNotFound(
871  U32 Id
872  )
873  {
874 
875  // check throttle value
876  if (this->m_PrmIdNotFoundThrottle >= EVENTID_PRMIDNOTFOUND_THROTTLE) {
877  return;
878  } else {
879  this->m_PrmIdNotFoundThrottle++;
880  }
881 
882  // Get the time
883  Fw::Time _logTime;
884  if (this->m_Time_OutputPort[0].isConnected()) {
885  this->m_Time_OutputPort[0].invoke( _logTime);
886  }
887 
888  FwEventIdType _id = static_cast<FwEventIdType>(0);
889 
890  _id = this->getIdBase() + EVENTID_PRMIDNOTFOUND;
891 
892  // Emit the event on the log port
893  if (this->m_Log_OutputPort[0].isConnected()) {
894 
895  Fw::LogBuffer _logBuff;
897 
898 #if FW_AMPCS_COMPATIBLE
899  // Serialize the number of arguments
900  _status = _logBuff.serialize(static_cast<U8>(1));
901  FW_ASSERT(
902  _status == Fw::FW_SERIALIZE_OK,
903  static_cast<AssertArg>(_status)
904  );
905 #endif
906 
907 #if FW_AMPCS_COMPATIBLE
908  // Serialize the argument size
909  _status = _logBuff.serialize(
910  static_cast<U8>(sizeof(Id))
911  );
912  FW_ASSERT(
913  _status == Fw::FW_SERIALIZE_OK,
914  static_cast<AssertArg>(_status)
915  );
916 #endif
917 
918  _status = _logBuff.serialize(Id);
919  FW_ASSERT(
920  _status == Fw::FW_SERIALIZE_OK,
921  static_cast<AssertArg>(_status)
922  );
923 
924 
925  this->m_Log_OutputPort[0].invoke(
926  _id,
927  _logTime,Fw::LOG_WARNING_LO,
928  _logBuff
929  );
930 
931  }
932 
933  // Emit the event on the text log port
934 #if FW_ENABLE_TEXT_LOGGING
935  if (this->m_LogText_OutputPort[0].isConnected()) {
936 
937 #if FW_OBJECT_NAMES == 1
938  const char* _formatString =
939  "(%s) %s: Parameter ID 0x%08X not found";
940 #else
941  const char* _formatString =
942  "%s: Parameter ID 0x%08X not found";
943 #endif
944 
945  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
946 
947  (void) snprintf(
948  _textBuffer,
950  _formatString,
951 #if FW_OBJECT_NAMES == 1
952  this->m_objName,
953 #endif
954  "PrmIdNotFound "
955  , Id
956  );
957 
958  // Null terminate
959  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
960  Fw::TextLogString _logString = _textBuffer;
961  this->m_LogText_OutputPort[0].invoke(
962  _id,
963  _logTime,Fw::TEXT_LOG_WARNING_LO,
964  _logString
965  );
966 
967  }
968 #endif
969 
970  }
971 
973  // reset throttle counter
974  this->m_PrmIdNotFoundThrottle = 0;
975  }
976 
979  U32 Id
980  )
981  {
982 
983 
984  // Get the time
985  Fw::Time _logTime;
986  if (this->m_Time_OutputPort[0].isConnected()) {
987  this->m_Time_OutputPort[0].invoke( _logTime);
988  }
989 
990  FwEventIdType _id = static_cast<FwEventIdType>(0);
991 
992  _id = this->getIdBase() + EVENTID_PRMIDUPDATED;
993 
994  // Emit the event on the log port
995  if (this->m_Log_OutputPort[0].isConnected()) {
996 
997  Fw::LogBuffer _logBuff;
999 
1000 #if FW_AMPCS_COMPATIBLE
1001  // Serialize the number of arguments
1002  _status = _logBuff.serialize(static_cast<U8>(1));
1003  FW_ASSERT(
1004  _status == Fw::FW_SERIALIZE_OK,
1005  static_cast<AssertArg>(_status)
1006  );
1007 #endif
1008 
1009 #if FW_AMPCS_COMPATIBLE
1010  // Serialize the argument size
1011  _status = _logBuff.serialize(
1012  static_cast<U8>(sizeof(Id))
1013  );
1014  FW_ASSERT(
1015  _status == Fw::FW_SERIALIZE_OK,
1016  static_cast<AssertArg>(_status)
1017  );
1018 #endif
1019 
1020  _status = _logBuff.serialize(Id);
1021  FW_ASSERT(
1022  _status == Fw::FW_SERIALIZE_OK,
1023  static_cast<AssertArg>(_status)
1024  );
1025 
1026 
1027  this->m_Log_OutputPort[0].invoke(
1028  _id,
1029  _logTime,Fw::LOG_ACTIVITY_HI,
1030  _logBuff
1031  );
1032 
1033  }
1034 
1035  // Emit the event on the text log port
1036 #if FW_ENABLE_TEXT_LOGGING
1037  if (this->m_LogText_OutputPort[0].isConnected()) {
1038 
1039 #if FW_OBJECT_NAMES == 1
1040  const char* _formatString =
1041  "(%s) %s: Parameter ID 0x%08X updated";
1042 #else
1043  const char* _formatString =
1044  "%s: Parameter ID 0x%08X updated";
1045 #endif
1046 
1047  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1048 
1049  (void) snprintf(
1050  _textBuffer,
1052  _formatString,
1053 #if FW_OBJECT_NAMES == 1
1054  this->m_objName,
1055 #endif
1056  "PrmIdUpdated "
1057  , Id
1058  );
1059 
1060  // Null terminate
1061  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1062  Fw::TextLogString _logString = _textBuffer;
1063  this->m_LogText_OutputPort[0].invoke(
1064  _id,
1065  _logTime,Fw::TEXT_LOG_ACTIVITY_HI,
1066  _logString
1067  );
1068 
1069  }
1070 #endif
1071 
1072  }
1073 
1074 
1077  U32 Id
1078  )
1079  {
1080 
1081 
1082  // Get the time
1083  Fw::Time _logTime;
1084  if (this->m_Time_OutputPort[0].isConnected()) {
1085  this->m_Time_OutputPort[0].invoke( _logTime);
1086  }
1087 
1088  FwEventIdType _id = static_cast<FwEventIdType>(0);
1089 
1090  _id = this->getIdBase() + EVENTID_PRMDBFULL;
1091 
1092  // Emit the event on the log port
1093  if (this->m_Log_OutputPort[0].isConnected()) {
1094 
1095  Fw::LogBuffer _logBuff;
1097 
1098 #if FW_AMPCS_COMPATIBLE
1099  // Serialize the number of arguments
1100  _status = _logBuff.serialize(static_cast<U8>(1+1));
1101  FW_ASSERT(
1102  _status == Fw::FW_SERIALIZE_OK,
1103  static_cast<AssertArg>(_status)
1104  );
1105  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
1106  _status = _logBuff.serialize(static_cast<U8>(4));
1107  FW_ASSERT(
1108  _status == Fw::FW_SERIALIZE_OK,
1109  static_cast<AssertArg>(_status)
1110  );
1111  _status = _logBuff.serialize(static_cast<U32>(0));
1112  FW_ASSERT(
1113  _status == Fw::FW_SERIALIZE_OK,
1114  static_cast<AssertArg>(_status)
1115  );
1116 #endif
1117 
1118 #if FW_AMPCS_COMPATIBLE
1119  // Serialize the argument size
1120  _status = _logBuff.serialize(
1121  static_cast<U8>(sizeof(Id))
1122  );
1123  FW_ASSERT(
1124  _status == Fw::FW_SERIALIZE_OK,
1125  static_cast<AssertArg>(_status)
1126  );
1127 #endif
1128 
1129  _status = _logBuff.serialize(Id);
1130  FW_ASSERT(
1131  _status == Fw::FW_SERIALIZE_OK,
1132  static_cast<AssertArg>(_status)
1133  );
1134 
1135 
1136  this->m_Log_OutputPort[0].invoke(
1137  _id,
1138  _logTime,Fw::LOG_FATAL,
1139  _logBuff
1140  );
1141 
1142  }
1143 
1144  // Emit the event on the text log port
1145 #if FW_ENABLE_TEXT_LOGGING
1146  if (this->m_LogText_OutputPort[0].isConnected()) {
1147 
1148 #if FW_OBJECT_NAMES == 1
1149  const char* _formatString =
1150  "(%s) %s: Parameter DB full when adding ID 0x%08X";
1151 #else
1152  const char* _formatString =
1153  "%s: Parameter DB full when adding ID 0x%08X";
1154 #endif
1155 
1156  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1157 
1158  (void) snprintf(
1159  _textBuffer,
1161  _formatString,
1162 #if FW_OBJECT_NAMES == 1
1163  this->m_objName,
1164 #endif
1165  "PrmDbFull "
1166  , Id
1167  );
1168 
1169  // Null terminate
1170  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1171  Fw::TextLogString _logString = _textBuffer;
1172  this->m_LogText_OutputPort[0].invoke(
1173  _id,
1174  _logTime,Fw::TEXT_LOG_FATAL,
1175  _logString
1176  );
1177 
1178  }
1179 #endif
1180 
1181  }
1182 
1183 
1186  U32 Id
1187  )
1188  {
1189 
1190 
1191  // Get the time
1192  Fw::Time _logTime;
1193  if (this->m_Time_OutputPort[0].isConnected()) {
1194  this->m_Time_OutputPort[0].invoke( _logTime);
1195  }
1196 
1197  FwEventIdType _id = static_cast<FwEventIdType>(0);
1198 
1199  _id = this->getIdBase() + EVENTID_PRMIDADDED;
1200 
1201  // Emit the event on the log port
1202  if (this->m_Log_OutputPort[0].isConnected()) {
1203 
1204  Fw::LogBuffer _logBuff;
1206 
1207 #if FW_AMPCS_COMPATIBLE
1208  // Serialize the number of arguments
1209  _status = _logBuff.serialize(static_cast<U8>(1));
1210  FW_ASSERT(
1211  _status == Fw::FW_SERIALIZE_OK,
1212  static_cast<AssertArg>(_status)
1213  );
1214 #endif
1215 
1216 #if FW_AMPCS_COMPATIBLE
1217  // Serialize the argument size
1218  _status = _logBuff.serialize(
1219  static_cast<U8>(sizeof(Id))
1220  );
1221  FW_ASSERT(
1222  _status == Fw::FW_SERIALIZE_OK,
1223  static_cast<AssertArg>(_status)
1224  );
1225 #endif
1226 
1227  _status = _logBuff.serialize(Id);
1228  FW_ASSERT(
1229  _status == Fw::FW_SERIALIZE_OK,
1230  static_cast<AssertArg>(_status)
1231  );
1232 
1233 
1234  this->m_Log_OutputPort[0].invoke(
1235  _id,
1236  _logTime,Fw::LOG_ACTIVITY_HI,
1237  _logBuff
1238  );
1239 
1240  }
1241 
1242  // Emit the event on the text log port
1243 #if FW_ENABLE_TEXT_LOGGING
1244  if (this->m_LogText_OutputPort[0].isConnected()) {
1245 
1246 #if FW_OBJECT_NAMES == 1
1247  const char* _formatString =
1248  "(%s) %s: Parameter ID 0x%08X added";
1249 #else
1250  const char* _formatString =
1251  "%s: Parameter ID 0x%08X added";
1252 #endif
1253 
1254  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1255 
1256  (void) snprintf(
1257  _textBuffer,
1259  _formatString,
1260 #if FW_OBJECT_NAMES == 1
1261  this->m_objName,
1262 #endif
1263  "PrmIdAdded "
1264  , Id
1265  );
1266 
1267  // Null terminate
1268  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1269  Fw::TextLogString _logString = _textBuffer;
1270  this->m_LogText_OutputPort[0].invoke(
1271  _id,
1272  _logTime,Fw::TEXT_LOG_ACTIVITY_HI,
1273  _logString
1274  );
1275 
1276  }
1277 #endif
1278 
1279  }
1280 
1281 
1284  PrmWriteError stage, I32 record, I32 error
1285  )
1286  {
1287 
1288 
1289  // Get the time
1290  Fw::Time _logTime;
1291  if (this->m_Time_OutputPort[0].isConnected()) {
1292  this->m_Time_OutputPort[0].invoke( _logTime);
1293  }
1294 
1295  FwEventIdType _id = static_cast<FwEventIdType>(0);
1296 
1297  _id = this->getIdBase() + EVENTID_PRMFILEWRITEERROR;
1298 
1299  // Emit the event on the log port
1300  if (this->m_Log_OutputPort[0].isConnected()) {
1301 
1302  Fw::LogBuffer _logBuff;
1304 
1305 #if FW_AMPCS_COMPATIBLE
1306  // Serialize the number of arguments
1307  _status = _logBuff.serialize(static_cast<U8>(3));
1308  FW_ASSERT(
1309  _status == Fw::FW_SERIALIZE_OK,
1310  static_cast<AssertArg>(_status)
1311  );
1312 #endif
1313 
1314 #if FW_AMPCS_COMPATIBLE
1315  // Serialize the argument size
1316  _status = _logBuff.serialize(static_cast<U8>(sizeof(FwEnumStoreType)));
1317  FW_ASSERT(
1318  _status == Fw::FW_SERIALIZE_OK,
1319  static_cast<AssertArg>(_status)
1320  );
1321 #endif
1322 
1323  _status = _logBuff.serialize(
1324  static_cast<FwEnumStoreType>(stage)
1325  );
1326  FW_ASSERT(
1327  _status == Fw::FW_SERIALIZE_OK,
1328  static_cast<AssertArg>(_status)
1329  );
1330 
1331 #if FW_AMPCS_COMPATIBLE
1332  // Serialize the argument size
1333  _status = _logBuff.serialize(
1334  static_cast<U8>(sizeof(record))
1335  );
1336  FW_ASSERT(
1337  _status == Fw::FW_SERIALIZE_OK,
1338  static_cast<AssertArg>(_status)
1339  );
1340 #endif
1341 
1342  _status = _logBuff.serialize(record);
1343  FW_ASSERT(
1344  _status == Fw::FW_SERIALIZE_OK,
1345  static_cast<AssertArg>(_status)
1346  );
1347 
1348 #if FW_AMPCS_COMPATIBLE
1349  // Serialize the argument size
1350  _status = _logBuff.serialize(
1351  static_cast<U8>(sizeof(error))
1352  );
1353  FW_ASSERT(
1354  _status == Fw::FW_SERIALIZE_OK,
1355  static_cast<AssertArg>(_status)
1356  );
1357 #endif
1358 
1359  _status = _logBuff.serialize(error);
1360  FW_ASSERT(
1361  _status == Fw::FW_SERIALIZE_OK,
1362  static_cast<AssertArg>(_status)
1363  );
1364 
1365 
1366  this->m_Log_OutputPort[0].invoke(
1367  _id,
1368  _logTime,Fw::LOG_WARNING_HI,
1369  _logBuff
1370  );
1371 
1372  }
1373 
1374  // Emit the event on the text log port
1375 #if FW_ENABLE_TEXT_LOGGING
1376  if (this->m_LogText_OutputPort[0].isConnected()) {
1377 
1378 #if FW_OBJECT_NAMES == 1
1379  const char* _formatString =
1380  "(%s) %s: Parameter write failed in stage %d with record %d and error %d";
1381 #else
1382  const char* _formatString =
1383  "%s: Parameter write failed in stage %d with record %d and error %d";
1384 #endif
1385 
1386  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1387 
1388  (void) snprintf(
1389  _textBuffer,
1391  _formatString,
1392 #if FW_OBJECT_NAMES == 1
1393  this->m_objName,
1394 #endif
1395  "PrmFileWriteError "
1396  , stage
1397  , record
1398  , error
1399  );
1400 
1401  // Null terminate
1402  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1403  Fw::TextLogString _logString = _textBuffer;
1404  this->m_LogText_OutputPort[0].invoke(
1405  _id,
1406  _logTime,Fw::TEXT_LOG_WARNING_HI,
1407  _logString
1408  );
1409 
1410  }
1411 #endif
1412 
1413  }
1414 
1415 
1418  U32 records
1419  )
1420  {
1421 
1422 
1423  // Get the time
1424  Fw::Time _logTime;
1425  if (this->m_Time_OutputPort[0].isConnected()) {
1426  this->m_Time_OutputPort[0].invoke( _logTime);
1427  }
1428 
1429  FwEventIdType _id = static_cast<FwEventIdType>(0);
1430 
1431  _id = this->getIdBase() + EVENTID_PRMFILESAVECOMPLETE;
1432 
1433  // Emit the event on the log port
1434  if (this->m_Log_OutputPort[0].isConnected()) {
1435 
1436  Fw::LogBuffer _logBuff;
1438 
1439 #if FW_AMPCS_COMPATIBLE
1440  // Serialize the number of arguments
1441  _status = _logBuff.serialize(static_cast<U8>(1));
1442  FW_ASSERT(
1443  _status == Fw::FW_SERIALIZE_OK,
1444  static_cast<AssertArg>(_status)
1445  );
1446 #endif
1447 
1448 #if FW_AMPCS_COMPATIBLE
1449  // Serialize the argument size
1450  _status = _logBuff.serialize(
1451  static_cast<U8>(sizeof(records))
1452  );
1453  FW_ASSERT(
1454  _status == Fw::FW_SERIALIZE_OK,
1455  static_cast<AssertArg>(_status)
1456  );
1457 #endif
1458 
1459  _status = _logBuff.serialize(records);
1460  FW_ASSERT(
1461  _status == Fw::FW_SERIALIZE_OK,
1462  static_cast<AssertArg>(_status)
1463  );
1464 
1465 
1466  this->m_Log_OutputPort[0].invoke(
1467  _id,
1468  _logTime,Fw::LOG_ACTIVITY_HI,
1469  _logBuff
1470  );
1471 
1472  }
1473 
1474  // Emit the event on the text log port
1475 #if FW_ENABLE_TEXT_LOGGING
1476  if (this->m_LogText_OutputPort[0].isConnected()) {
1477 
1478 #if FW_OBJECT_NAMES == 1
1479  const char* _formatString =
1480  "(%s) %s: Parameter file save completed. Wrote %d records.";
1481 #else
1482  const char* _formatString =
1483  "%s: Parameter file save completed. Wrote %d records.";
1484 #endif
1485 
1486  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1487 
1488  (void) snprintf(
1489  _textBuffer,
1491  _formatString,
1492 #if FW_OBJECT_NAMES == 1
1493  this->m_objName,
1494 #endif
1495  "PrmFileSaveComplete "
1496  , records
1497  );
1498 
1499  // Null terminate
1500  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1501  Fw::TextLogString _logString = _textBuffer;
1502  this->m_LogText_OutputPort[0].invoke(
1503  _id,
1504  _logTime,Fw::TEXT_LOG_ACTIVITY_HI,
1505  _logString
1506  );
1507 
1508  }
1509 #endif
1510 
1511  }
1512 
1513 
1516  PrmReadError stage, I32 record, I32 error
1517  )
1518  {
1519 
1520 
1521  // Get the time
1522  Fw::Time _logTime;
1523  if (this->m_Time_OutputPort[0].isConnected()) {
1524  this->m_Time_OutputPort[0].invoke( _logTime);
1525  }
1526 
1527  FwEventIdType _id = static_cast<FwEventIdType>(0);
1528 
1529  _id = this->getIdBase() + EVENTID_PRMFILEREADERROR;
1530 
1531  // Emit the event on the log port
1532  if (this->m_Log_OutputPort[0].isConnected()) {
1533 
1534  Fw::LogBuffer _logBuff;
1536 
1537 #if FW_AMPCS_COMPATIBLE
1538  // Serialize the number of arguments
1539  _status = _logBuff.serialize(static_cast<U8>(3));
1540  FW_ASSERT(
1541  _status == Fw::FW_SERIALIZE_OK,
1542  static_cast<AssertArg>(_status)
1543  );
1544 #endif
1545 
1546 #if FW_AMPCS_COMPATIBLE
1547  // Serialize the argument size
1548  _status = _logBuff.serialize(static_cast<U8>(sizeof(FwEnumStoreType)));
1549  FW_ASSERT(
1550  _status == Fw::FW_SERIALIZE_OK,
1551  static_cast<AssertArg>(_status)
1552  );
1553 #endif
1554 
1555  _status = _logBuff.serialize(
1556  static_cast<FwEnumStoreType>(stage)
1557  );
1558  FW_ASSERT(
1559  _status == Fw::FW_SERIALIZE_OK,
1560  static_cast<AssertArg>(_status)
1561  );
1562 
1563 #if FW_AMPCS_COMPATIBLE
1564  // Serialize the argument size
1565  _status = _logBuff.serialize(
1566  static_cast<U8>(sizeof(record))
1567  );
1568  FW_ASSERT(
1569  _status == Fw::FW_SERIALIZE_OK,
1570  static_cast<AssertArg>(_status)
1571  );
1572 #endif
1573 
1574  _status = _logBuff.serialize(record);
1575  FW_ASSERT(
1576  _status == Fw::FW_SERIALIZE_OK,
1577  static_cast<AssertArg>(_status)
1578  );
1579 
1580 #if FW_AMPCS_COMPATIBLE
1581  // Serialize the argument size
1582  _status = _logBuff.serialize(
1583  static_cast<U8>(sizeof(error))
1584  );
1585  FW_ASSERT(
1586  _status == Fw::FW_SERIALIZE_OK,
1587  static_cast<AssertArg>(_status)
1588  );
1589 #endif
1590 
1591  _status = _logBuff.serialize(error);
1592  FW_ASSERT(
1593  _status == Fw::FW_SERIALIZE_OK,
1594  static_cast<AssertArg>(_status)
1595  );
1596 
1597 
1598  this->m_Log_OutputPort[0].invoke(
1599  _id,
1600  _logTime,Fw::LOG_WARNING_HI,
1601  _logBuff
1602  );
1603 
1604  }
1605 
1606  // Emit the event on the text log port
1607 #if FW_ENABLE_TEXT_LOGGING
1608  if (this->m_LogText_OutputPort[0].isConnected()) {
1609 
1610 #if FW_OBJECT_NAMES == 1
1611  const char* _formatString =
1612  "(%s) %s: Parameter file read failed in stage %d with record %d and error %d";
1613 #else
1614  const char* _formatString =
1615  "%s: Parameter file read failed in stage %d with record %d and error %d";
1616 #endif
1617 
1618  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1619 
1620  (void) snprintf(
1621  _textBuffer,
1623  _formatString,
1624 #if FW_OBJECT_NAMES == 1
1625  this->m_objName,
1626 #endif
1627  "PrmFileReadError "
1628  , stage
1629  , record
1630  , error
1631  );
1632 
1633  // Null terminate
1634  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1635  Fw::TextLogString _logString = _textBuffer;
1636  this->m_LogText_OutputPort[0].invoke(
1637  _id,
1638  _logTime,Fw::TEXT_LOG_WARNING_HI,
1639  _logString
1640  );
1641 
1642  }
1643 #endif
1644 
1645  }
1646 
1647 
1650  U32 records
1651  )
1652  {
1653 
1654 
1655  // Get the time
1656  Fw::Time _logTime;
1657  if (this->m_Time_OutputPort[0].isConnected()) {
1658  this->m_Time_OutputPort[0].invoke( _logTime);
1659  }
1660 
1661  FwEventIdType _id = static_cast<FwEventIdType>(0);
1662 
1663  _id = this->getIdBase() + EVENTID_PRMFILELOADCOMPLETE;
1664 
1665  // Emit the event on the log port
1666  if (this->m_Log_OutputPort[0].isConnected()) {
1667 
1668  Fw::LogBuffer _logBuff;
1670 
1671 #if FW_AMPCS_COMPATIBLE
1672  // Serialize the number of arguments
1673  _status = _logBuff.serialize(static_cast<U8>(1));
1674  FW_ASSERT(
1675  _status == Fw::FW_SERIALIZE_OK,
1676  static_cast<AssertArg>(_status)
1677  );
1678 #endif
1679 
1680 #if FW_AMPCS_COMPATIBLE
1681  // Serialize the argument size
1682  _status = _logBuff.serialize(
1683  static_cast<U8>(sizeof(records))
1684  );
1685  FW_ASSERT(
1686  _status == Fw::FW_SERIALIZE_OK,
1687  static_cast<AssertArg>(_status)
1688  );
1689 #endif
1690 
1691  _status = _logBuff.serialize(records);
1692  FW_ASSERT(
1693  _status == Fw::FW_SERIALIZE_OK,
1694  static_cast<AssertArg>(_status)
1695  );
1696 
1697 
1698  this->m_Log_OutputPort[0].invoke(
1699  _id,
1700  _logTime,Fw::LOG_ACTIVITY_HI,
1701  _logBuff
1702  );
1703 
1704  }
1705 
1706  // Emit the event on the text log port
1707 #if FW_ENABLE_TEXT_LOGGING
1708  if (this->m_LogText_OutputPort[0].isConnected()) {
1709 
1710 #if FW_OBJECT_NAMES == 1
1711  const char* _formatString =
1712  "(%s) %s: Parameter file load completed. Read %d records.";
1713 #else
1714  const char* _formatString =
1715  "%s: Parameter file load completed. Read %d records.";
1716 #endif
1717 
1718  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1719 
1720  (void) snprintf(
1721  _textBuffer,
1723  _formatString,
1724 #if FW_OBJECT_NAMES == 1
1725  this->m_objName,
1726 #endif
1727  "PrmFileLoadComplete "
1728  , records
1729  );
1730 
1731  // Null terminate
1732  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1733  Fw::TextLogString _logString = _textBuffer;
1734  this->m_LogText_OutputPort[0].invoke(
1735  _id,
1736  _logTime,Fw::TEXT_LOG_ACTIVITY_HI,
1737  _logString
1738  );
1739 
1740  }
1741 #endif
1742 
1743  }
1744 
1745 
1746  // ----------------------------------------------------------------------
1747  // Mutex functions for guarded ports
1748  // ----------------------------------------------------------------------
1749 
1750  void PrmDbComponentBase ::
1751  lock(void)
1752  {
1753  this->m_guardedPortMutex.lock();
1754  }
1755 
1757  unLock(void)
1758  {
1759  this->m_guardedPortMutex.unLock();
1760  }
1761 
1762  // ----------------------------------------------------------------------
1763  // Calls for invocations received on typed input ports
1764  // ----------------------------------------------------------------------
1765 
1766  Fw::ParamValid PrmDbComponentBase ::
1767  m_p_getPrm_in(
1768  Fw::PassiveComponentBase* callComp,
1769  NATIVE_INT_TYPE portNum,
1770  FwPrmIdType id, Fw::ParamBuffer &val
1771  )
1772  {
1773  FW_ASSERT(callComp);
1774  PrmDbComponentBase* compPtr =
1775  (PrmDbComponentBase*) callComp;
1776  return compPtr->getPrm_handlerBase(portNum, id, val);
1777  }
1778 
1781  Fw::PassiveComponentBase* callComp,
1782  NATIVE_INT_TYPE portNum,
1783  FwPrmIdType id, Fw::ParamBuffer &val
1784  )
1785  {
1786  FW_ASSERT(callComp);
1787  PrmDbComponentBase* compPtr =
1788  (PrmDbComponentBase*) callComp;
1789  compPtr->setPrm_handlerBase(portNum, id, val);
1790  }
1791 
1794  Fw::PassiveComponentBase* callComp,
1795  NATIVE_INT_TYPE portNum,
1796  U32 key
1797  )
1798  {
1799  FW_ASSERT(callComp);
1800  PrmDbComponentBase* compPtr =
1801  (PrmDbComponentBase*) callComp;
1802  compPtr->pingIn_handlerBase(portNum, key);
1803  }
1804 
1805  // ----------------------------------------------------------------------
1806  // Port handler base-class functions for typed input ports
1807  // ----------------------------------------------------------------------
1808 
1809  Fw::ParamValid PrmDbComponentBase ::
1810  getPrm_handlerBase(
1811  NATIVE_INT_TYPE portNum,
1812  FwPrmIdType id, Fw::ParamBuffer &val
1813  )
1814  {
1815 
1816  // Make sure port number is valid
1817  FW_ASSERT(portNum < this->getNum_getPrm_InputPorts(),static_cast<AssertArg>(portNum));
1818  Fw::ParamValid retVal;
1819 
1820  // Lock guard mutex before calling
1821  this->lock();
1822 
1823  // Down call to pure virtual handler method implemented in Impl class
1824  retVal = this->getPrm_handler(portNum, id, val);
1825 
1826  // Unlock guard mutex
1827  this->unLock();
1828 
1829  return retVal;
1830 
1831  }
1832 
1835  NATIVE_INT_TYPE portNum,
1836  FwPrmIdType id, Fw::ParamBuffer &val
1837  )
1838  {
1839 
1840  // Make sure port number is valid
1841  FW_ASSERT(portNum < this->getNum_setPrm_InputPorts(),static_cast<AssertArg>(portNum));
1842 
1843  // Call pre-message hook
1844  setPrm_preMsgHook(
1845  portNum,
1846  id, val
1847  );
1848 
1849  ComponentIpcSerializableBuffer msg;
1851 
1852  _status = msg.serialize(
1853  static_cast<NATIVE_INT_TYPE>(SETPRM_PRMSET)
1854  );
1855  FW_ASSERT (
1856  _status == Fw::FW_SERIALIZE_OK,
1857  static_cast<AssertArg>(_status)
1858  );
1859 
1860  _status = msg.serialize(portNum);
1861  FW_ASSERT (
1862  _status == Fw::FW_SERIALIZE_OK,
1863  static_cast<AssertArg>(_status)
1864  );
1865 
1866  // Serialize argument id
1867  _status = msg.serialize(id);
1868  FW_ASSERT(
1869  _status == Fw::FW_SERIALIZE_OK,
1870  static_cast<AssertArg>(_status)
1871  );
1872 
1873  // Serialize argument val
1874  _status = msg.serialize(val);
1875  FW_ASSERT(
1876  _status == Fw::FW_SERIALIZE_OK,
1877  static_cast<AssertArg>(_status)
1878  );
1879 
1880 
1881  // send message
1882  Os::Queue::QueueBlocking _block =
1884  Os::Queue::QueueStatus qStatus =
1885  this->m_queue.send(msg, 0,_block);
1886  FW_ASSERT(
1887  qStatus == Os::Queue::QUEUE_OK,
1888  static_cast<AssertArg>(qStatus)
1889  );
1890 
1891  }
1892 
1895  NATIVE_INT_TYPE portNum,
1896  U32 key
1897  )
1898  {
1899 
1900  // Make sure port number is valid
1901  FW_ASSERT(portNum < this->getNum_pingIn_InputPorts(),static_cast<AssertArg>(portNum));
1902 
1903  // Call pre-message hook
1905  portNum,
1906  key
1907  );
1908 
1909  ComponentIpcSerializableBuffer msg;
1911 
1912  _status = msg.serialize(
1913  static_cast<NATIVE_INT_TYPE>(PINGIN_PING)
1914  );
1915  FW_ASSERT (
1916  _status == Fw::FW_SERIALIZE_OK,
1917  static_cast<AssertArg>(_status)
1918  );
1919 
1920  _status = msg.serialize(portNum);
1921  FW_ASSERT (
1922  _status == Fw::FW_SERIALIZE_OK,
1923  static_cast<AssertArg>(_status)
1924  );
1925 
1926  // Serialize argument key
1927  _status = msg.serialize(key);
1928  FW_ASSERT(
1929  _status == Fw::FW_SERIALIZE_OK,
1930  static_cast<AssertArg>(_status)
1931  );
1932 
1933 
1934  // send message
1935  Os::Queue::QueueBlocking _block =
1937  Os::Queue::QueueStatus qStatus =
1938  this->m_queue.send(msg, 0,_block);
1939  FW_ASSERT(
1940  qStatus == Os::Queue::QUEUE_OK,
1941  static_cast<AssertArg>(qStatus)
1942  );
1943 
1944  }
1945 
1946  // ----------------------------------------------------------------------
1947  // Pre-message hooks for async input ports
1948  // ----------------------------------------------------------------------
1949 
1950  void PrmDbComponentBase ::
1951  setPrm_preMsgHook(
1952  NATIVE_INT_TYPE portNum,
1953  FwPrmIdType id, Fw::ParamBuffer &val
1954  )
1955  {
1956  // Default: no-op
1957  }
1958 
1961  NATIVE_INT_TYPE portNum,
1962  U32 key
1963  )
1964  {
1965  // Default: no-op
1966  }
1967 
1968  // ----------------------------------------------------------------------
1969  // Message dispatch method for active and queued components. Called
1970  // by active component thread or implementation code for queued components
1971  // ----------------------------------------------------------------------
1972 
1974  doDispatch(void)
1975  {
1976  ComponentIpcSerializableBuffer msg;
1977  NATIVE_INT_TYPE priority;
1978 
1979  Os::Queue::QueueStatus msgStatus = this->m_queue.receive(msg,priority,Os::Queue::QUEUE_BLOCKING);
1980  FW_ASSERT(
1981  msgStatus == Os::Queue::QUEUE_OK,
1982  static_cast<AssertArg>(msgStatus)
1983  );
1984 
1985  // Reset to beginning of buffer
1986  msg.resetDeser();
1987 
1988  NATIVE_INT_TYPE desMsg;
1989  Fw::SerializeStatus deserStatus = msg.deserialize(desMsg);
1990  FW_ASSERT(
1991  deserStatus == Fw::FW_SERIALIZE_OK,
1992  static_cast<AssertArg>(deserStatus)
1993  );
1994 
1995  MsgTypeEnum msgType = static_cast<MsgTypeEnum>(desMsg);
1996 
1997  if (msgType == PRMDB_COMPONENT_EXIT) {
1998  return MSG_DISPATCH_EXIT;
1999  }
2000 
2002  deserStatus = msg.deserialize(portNum);
2003  FW_ASSERT(
2004  deserStatus == Fw::FW_SERIALIZE_OK,
2005  static_cast<AssertArg>(deserStatus)
2006  );
2007 
2008  switch (msgType) {
2009 
2010  // Handle async input port setPrm
2011  case SETPRM_PRMSET: {
2012 
2013  // Deserialize argument id
2014  FwPrmIdType id;
2015  deserStatus = msg.deserialize(id);
2016  FW_ASSERT(
2017  deserStatus == Fw::FW_SERIALIZE_OK,
2018  static_cast<AssertArg>(deserStatus)
2019  );
2020 
2021  // Deserialize argument val
2023  deserStatus = msg.deserialize(val);
2024  FW_ASSERT(
2025  deserStatus == Fw::FW_SERIALIZE_OK,
2026  static_cast<AssertArg>(deserStatus)
2027  );
2028 
2029  // Call handler function
2030  this->setPrm_handler(
2031  portNum,
2032  id, val
2033  );
2034 
2035  break;
2036 
2037  }
2038 
2039  // Handle async input port pingIn
2040  case PINGIN_PING: {
2041 
2042  // Deserialize argument key
2043  U32 key;
2044  deserStatus = msg.deserialize(key);
2045  FW_ASSERT(
2046  deserStatus == Fw::FW_SERIALIZE_OK,
2047  static_cast<AssertArg>(deserStatus)
2048  );
2049 
2050  // Call handler function
2051  this->pingIn_handler(
2052  portNum,
2053  key
2054  );
2055 
2056  break;
2057 
2058  }
2059 
2060  // Handle command PRM_SAVE_FILE
2061  case CMD_PRM_SAVE_FILE: {
2062  // Deserialize opcode
2063  FwOpcodeType opCode;
2064  deserStatus = msg.deserialize(opCode);
2065  FW_ASSERT (
2066  deserStatus == Fw::FW_SERIALIZE_OK,
2067  static_cast<AssertArg>(deserStatus)
2068  );
2069 
2070  // Deserialize command sequence
2071  U32 cmdSeq;
2072  deserStatus = msg.deserialize(cmdSeq);
2073  FW_ASSERT (
2074  deserStatus == Fw::FW_SERIALIZE_OK,
2075  static_cast<AssertArg>(deserStatus)
2076  );
2077 
2078  // Deserialize command argument buffer
2080  deserStatus = msg.deserialize(args);
2081  FW_ASSERT (
2082  deserStatus == Fw::FW_SERIALIZE_OK,
2083  static_cast<AssertArg>(deserStatus)
2084  );
2085 
2086  // Reset buffer
2087  args.resetDeser();
2088 
2089  // Make sure there was no data left over.
2090  // That means the argument buffer size was incorrect.
2091 #if FW_CMD_CHECK_RESIDUAL
2092  if (args.getBuffLeft() != 0) {
2093  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2094  this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_FORMAT_ERROR);
2095  }
2096  // Don't crash the task if bad arguments were passed from the ground
2097  break;
2098  }
2099 #endif
2100  // Call handler function
2101  this->PRM_SAVE_FILE_cmdHandler(opCode, cmdSeq);
2102 
2103  break;
2104 
2105  }
2106 
2107  default:
2108  return MSG_DISPATCH_ERROR;
2109 
2110  }
2111 
2112  return MSG_DISPATCH_OK;
2113 
2114  }
2115 
2116 } // end namespace Svc
Fw::TEXT_LOG_ACTIVITY_HI
@ TEXT_LOG_ACTIVITY_HI
Definition: LogTextPortAc.hpp:31
Fw::OutputCmdRegPort::init
void init(void)
Definition: CmdRegPortAc.cpp:89
Svc::PrmDbComponentBase::get_setPrm_InputPort
Fw::InputPrmSetPort * get_setPrm_InputPort(NATIVE_INT_TYPE portNum)
Definition: PrmDbComponentAc.cpp:94
Fw::TextLogString
Definition: TextLogString.hpp:11
Fw::InputTimePort
Definition: TimePortAc.hpp:28
Fw::InputPrmSetPort::init
void init(void)
initialization function
Definition: PrmSetPortAc.cpp:38
Svc::InputPingPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: PingPortAc.hpp:30
Fw::PassiveComponentBase::getIdBase
U32 getIdBase(void) const
Definition: PassiveComponentBase.cpp:40
cmdPort
BYTE cmdPort[Fw::InputCmdPort::SERIALIZED_SIZE]
Definition: PrmDbComponentAc.cpp:42
Svc::PrmDbComponentBase::log_ACTIVITY_HI_PrmFileSaveComplete
void log_ACTIVITY_HI_PrmFileSaveComplete(U32 records)
Definition: PrmDbComponentAc.cpp:1417
Fw::Time
Definition: Time.hpp:10
Fw::QueuedComponentBase::doDispatch
virtual MsgDispatchStatus doDispatch(void)=0
method to dispatch a single message in the queue.
Svc::PrmDbComponentBase::regCommands
void regCommands(void)
Register commands with the Command Dispatcher.
Definition: PrmDbComponentAc.cpp:255
Fw::OutputCmdResponsePort::addCallPort
void addCallPort(InputCmdResponsePort *callPort)
Definition: CmdResponsePortAc.cpp:105
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
Fw::CommandResponse
CommandResponse
Definition: CmdResponsePortAc.hpp:24
Svc::PrmDbComponentBase
Auto-generated base for PrmDb component.
Definition: PrmDbComponentAc.hpp:48
Svc::PrmDbComponentBase::get_CmdDisp_InputPort
Fw::InputCmdPort * get_CmdDisp_InputPort(NATIVE_INT_TYPE portNum)
Definition: PrmDbComponentAc.cpp:108
Fw::SerializeBufferBase::resetDeser
void resetDeser(void)
reset deserialization to beginning
Definition: Serializable.cpp:575
Fw::PortBase::isConnected
bool isConnected(void)
Definition: PortBase.cpp:40
Svc::PrmDbComponentBase::args
PROTECTED U32 Fw::CmdArgBuffer & args
Definition: PrmDbComponentAc.hpp:561
Fw::OutputLogPort::invoke
void invoke(FwEventIdType id, Fw::Time &timeTag, LogSeverity severity, LogBuffer &args)
Definition: LogPortAc.cpp:121
Fw::OutputCmdRegPort::addCallPort
void addCallPort(InputCmdRegPort *callPort)
Definition: CmdRegPortAc.cpp:93
Fw::LOG_WARNING_HI
@ LOG_WARNING_HI
Definition: LogPortAc.hpp:28
Svc::PrmDbComponentBase::isConnected_CmdReg_OutputPort
bool isConnected_CmdReg_OutputPort(NATIVE_INT_TYPE portNum)
Definition: PrmDbComponentAc.cpp:680
Fw::InputPrmSetPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: PrmSetPortAc.cpp:42
Svc::PrmDbComponentBase::getNum_pingIn_InputPorts
NATIVE_INT_TYPE getNum_pingIn_InputPorts(void)
Definition: PrmDbComponentAc.cpp:590
FW_OBJECT_NAMES
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
Definition: FpConfig.hpp:91
Fw::SerializeBufferBase::serialize
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Definition: Serializable.cpp:67
Svc::PrmDbComponentBase::m_p_setPrm_in
static void m_p_setPrm_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Definition: PrmDbComponentAc.cpp:1780
Svc::PrmDbComponentBase::EVENTID_PRMIDADDED
PROTECTED EVENTID_PRMIDADDED
Definition: PrmDbComponentAc.hpp:587
Fw::LOG_WARNING_LO
@ LOG_WARNING_LO
Definition: LogPortAc.hpp:29
FW_NUM_ARRAY_ELEMENTS
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.hpp:103
Fw::LOG_FATAL
@ LOG_FATAL
Definition: LogPortAc.hpp:27
Svc::PrmDbComponentBase::m_setPrm_InputPort
Fw::InputPrmSetPort m_setPrm_InputPort[NUM_SETPRM_INPUT_PORTS]
Definition: PrmDbComponentAc.hpp:737
U8
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.hpp:76
Svc::PrmDbComponentBase::EVENTID_PRMIDNOTFOUND_THROTTLE
@ EVENTID_PRMIDNOTFOUND_THROTTLE
Definition: PrmDbComponentAc.hpp:599
Svc::InputPingPort::init
void init(void)
initialization function
Definition: PingPortAc.cpp:38
FwEnumStoreType
#define FwEnumStoreType
Type representation for an enumeration value.
Definition: FpConfig.hpp:84
Fw::InputCmdRegPort
Definition: CmdRegPortAc.hpp:27
Os::Queue::QueueStatus
QueueStatus
Definition: Queue.hpp:27
Fw::COMMAND_FORMAT_ERROR
@ COMMAND_FORMAT_ERROR
Definition: CmdResponsePortAc.hpp:28
Fw::QueuedComponentBase::m_queue
Os::Queue m_queue
queue object for active component
Definition: QueuedComponentBase.hpp:36
Svc::PrmDbComponentBase::get_pingIn_InputPort
Svc::InputPingPort * get_pingIn_InputPort(NATIVE_INT_TYPE portNum)
Definition: PrmDbComponentAc.cpp:101
Fw::LogBuffer
Definition: LogBuffer.hpp:22
Svc::PrmDbComponentBase::set_Log_OutputPort
void set_Log_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputLogPort *port)
Definition: PrmDbComponentAc.cpp:159
Svc::PrmDbComponentBase::getNum_CmdStatus_OutputPorts
NATIVE_INT_TYPE getNum_CmdStatus_OutputPorts(void)
Definition: PrmDbComponentAc.cpp:614
Svc::PrmDbComponentBase::m_Log_OutputPort
Fw::OutputLogPort m_Log_OutputPort[NUM_LOG_OUTPUT_PORTS]
Definition: PrmDbComponentAc.hpp:771
Svc::PrmDbComponentBase::id
PROTECTED FwPrmIdType id
Definition: PrmDbComponentAc.hpp:268
Svc::PrmDbComponentBase::EVENTID_PRMFILEWRITEERROR
PROTECTED EVENTID_PRMFILEWRITEERROR
Definition: PrmDbComponentAc.hpp:588
Svc::PrmDbComponentBase::response
PROTECTED U32 Fw::CommandResponse response
Definition: PrmDbComponentAc.hpp:575
Fw::InputCmdPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: CmdPortAc.cpp:42
Svc::PrmDbComponentBase::log_WARNING_LO_PrmIdNotFound_ThrottleClear
void log_WARNING_LO_PrmIdNotFound_ThrottleClear(void)
Definition: PrmDbComponentAc.cpp:972
Svc::PrmDbComponentBase::log_ACTIVITY_HI_PrmFileLoadComplete
void log_ACTIVITY_HI_PrmFileLoadComplete(U32 records)
Definition: PrmDbComponentAc.cpp:1649
port1
BYTE port1[Fw::InputPrmSetPort::SERIALIZED_SIZE]
Definition: PrmDbComponentAc.cpp:40
Fw::TEXT_LOG_WARNING_HI
@ TEXT_LOG_WARNING_HI
Definition: LogTextPortAc.hpp:28
Assert.hpp
Svc::PrmDbComponentBase::isConnected_CmdStatus_OutputPort
bool isConnected_CmdStatus_OutputPort(NATIVE_INT_TYPE portNum)
Definition: PrmDbComponentAc.cpp:670
Fw::FW_SERIALIZE_OK
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
Definition: Serializable.hpp:15
Os::Queue::send
QueueStatus send(const Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE priority, QueueBlocking block)
send a message
Definition: QueueCommon.cpp:13
Svc::PrmDbComponentBase::isConnected_Log_OutputPort
bool isConnected_Log_OutputPort(NATIVE_INT_TYPE portNum)
Definition: PrmDbComponentAc.cpp:700
Svc::PrmDbComponentBase::m_CmdDisp_InputPort
Fw::InputCmdPort m_CmdDisp_InputPort[NUM_CMDDISP_INPUT_PORTS]
Definition: PrmDbComponentAc.hpp:745
Svc::PrmDbComponentBase::m_pingIn_InputPort
Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS]
Definition: PrmDbComponentAc.hpp:741
Fw::SerializeBufferBase::getBuffLeft
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
Definition: Serializable.cpp:619
Fw::InputCmdPort::init
void init(void)
initialization function
Definition: CmdPortAc.cpp:38
EightyCharString.hpp
Fw::PassiveComponentBase
Definition: PassiveComponentBase.hpp:10
Fw::OutputLogPort::init
void init(void)
Definition: LogPortAc.cpp:107
PrmDbComponentAc.hpp
Fw::OutputTimePort::init
void init(void)
Definition: TimePortAc.cpp:89
Fw::ObjBase::init
void init(void)
Object initializer.
Definition: ObjBase.cpp:26
Os::Queue::QueueBlocking
QueueBlocking
Definition: Queue.hpp:40
Fw::QueuedComponentBase::MSG_DISPATCH_OK
@ MSG_DISPATCH_OK
Dispatch was normal.
Definition: QueuedComponentBase.hpp:26
BYTE
U8 BYTE
byte type
Definition: BasicTypes.hpp:77
Os::Queue::receive
QueueStatus receive(Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE &priority, QueueBlocking block)
receive a message
Definition: QueueCommon.cpp:22
Svc::PrmDbComponentBase::setPrm_handler
virtual void setPrm_handler(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val)=0
Handler for input port setPrm.
Svc::PrmDbComponentBase::pingIn_preMsgHook
virtual void pingIn_preMsgHook(NATIVE_INT_TYPE portNum, U32 key)
Definition: PrmDbComponentAc.cpp:1960
Fw::TEXT_LOG_WARNING_LO
@ TEXT_LOG_WARNING_LO
Definition: LogTextPortAc.hpp:29
Svc::InputPingPort
Definition: PingPortAc.hpp:27
Svc::PrmDbComponentBase::cmdSeq
PROTECTED U32 cmdSeq
Definition: PrmDbComponentAc.hpp:529
Fw::OutputCmdRegPort::invoke
void invoke(FwOpcodeType opCode)
Definition: CmdRegPortAc.cpp:103
Svc::PrmDbComponentBase::m_Time_OutputPort
Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS]
Definition: PrmDbComponentAc.hpp:767
Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Definition: ActiveComponentBase.hpp:27
Svc::PrmDbComponentBase::get_getPrm_InputPort
Fw::InputPrmGetPort * get_getPrm_InputPort(NATIVE_INT_TYPE portNum)
Definition: PrmDbComponentAc.cpp:87
Svc::PrmDbComponentBase::set_pingOut_OutputPort
void set_pingOut_OutputPort(NATIVE_INT_TYPE portNum, Svc::InputPingPort *port)
Definition: PrmDbComponentAc.cpp:119
Svc::PrmDbComponentBase::pingIn_handler
virtual void pingIn_handler(NATIVE_INT_TYPE portNum, U32 key)=0
Handler for input port pingIn.
Svc::PrmDbComponentBase::EVENTID_PRMFILELOADCOMPLETE
PROTECTED EVENTID_PRMFILELOADCOMPLETE
Definition: PrmDbComponentAc.hpp:591
FwOpcodeType
#define FwOpcodeType
Type representation for a command opcode.
Definition: FpConfig.hpp:62
Svc::PrmDbComponentBase::getNum_CmdReg_OutputPorts
NATIVE_INT_TYPE getNum_CmdReg_OutputPorts(void)
Definition: PrmDbComponentAc.cpp:622
Fw::QueuedComponentBase::MsgDispatchStatus
MsgDispatchStatus
Definition: QueuedComponentBase.hpp:25
port2
BYTE port2[Svc::InputPingPort::SERIALIZED_SIZE]
Definition: PrmDbComponentAc.cpp:41
Svc::PrmDbComponentBase::setPrm_handlerBase
void setPrm_handlerBase(NATIVE_INT_TYPE portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Definition: PrmDbComponentAc.cpp:1834
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:30
Fw::OutputTimePort::invoke
void invoke(Fw::Time &time)
Definition: TimePortAc.cpp:103
Svc::PrmDbComponentBase::log_ACTIVITY_HI_PrmIdAdded
void log_ACTIVITY_HI_PrmIdAdded(U32 Id)
Definition: PrmDbComponentAc.cpp:1185
Svc::PrmDbComponentBase::pingIn_handlerBase
void pingIn_handlerBase(NATIVE_INT_TYPE portNum, U32 key)
Definition: PrmDbComponentAc.cpp:1894
Svc::PrmDbComponentBase::set_CmdReg_OutputPort
void set_CmdReg_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputCmdRegPort *port)
Definition: PrmDbComponentAc.cpp:139
Fw::CmdArgBuffer
Definition: CmdArgBuffer.hpp:22
Svc::PrmDbComponentBase::log_WARNING_HI_PrmFileReadError
void log_WARNING_HI_PrmFileReadError(PrmReadError stage, I32 record, I32 error)
Definition: PrmDbComponentAc.cpp:1515
Svc::PrmDbComponentBase::log_FATAL_PrmDbFull
void log_FATAL_PrmDbFull(U32 Id)
Definition: PrmDbComponentAc.cpp:1076
Fw::OutputCmdResponsePort::init
void init(void)
Definition: CmdResponsePortAc.cpp:101
Fw::COMMAND_INVALID_OPCODE
@ COMMAND_INVALID_OPCODE
Definition: CmdResponsePortAc.hpp:26
FW_ASSERT
#define FW_ASSERT(...)
Definition: Assert.hpp:9
Svc::PrmDbComponentBase::val
PROTECTED FwPrmIdType Fw::ParamBuffer & val
Definition: PrmDbComponentAc.hpp:270
Svc::PrmDbComponentBase::PrmReadError
PrmReadError
Definition: PrmDbComponentAc.hpp:621
Svc::PrmDbComponentBase::~PrmDbComponentBase
virtual ~PrmDbComponentBase(void)
Definition: PrmDbComponentAc.cpp:551
Fw::OutputCmdResponsePort::invoke
void invoke(FwOpcodeType opCode, U32 cmdSeq, CommandResponse response)
Definition: CmdResponsePortAc.cpp:115
Fw::TEXT_LOG_FATAL
@ TEXT_LOG_FATAL
Definition: LogTextPortAc.hpp:27
Svc::PrmDbComponentBase::m_CmdStatus_OutputPort
Fw::OutputCmdResponsePort m_CmdStatus_OutputPort[NUM_CMDSTATUS_OUTPUT_PORTS]
Definition: PrmDbComponentAc.hpp:759
Fw::ParamBuffer
Definition: PrmBuffer.hpp:22
Fw::QueuedComponentBase::MSG_DISPATCH_ERROR
@ MSG_DISPATCH_ERROR
Errors dispatching messages.
Definition: QueuedComponentBase.hpp:28
Fw::LOG_ACTIVITY_HI
@ LOG_ACTIVITY_HI
Definition: LogPortAc.hpp:31
Os::Queue::QUEUE_OK
@ QUEUE_OK
message sent/received okay
Definition: Queue.hpp:28
Svc::PrmDbComponentBase::m_p_CmdDisp_in
static void m_p_CmdDisp_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Definition: PrmDbComponentAc.cpp:726
Fw::InputCmdPort
Definition: CmdPortAc.hpp:28
Svc::PrmDbComponentBase::getNum_CmdDisp_InputPorts
NATIVE_INT_TYPE getNum_CmdDisp_InputPorts(void)
Definition: PrmDbComponentAc.cpp:606
FpConfig.hpp
ISF configuration file.
Fw::InputPortBase::setPortNum
void setPortNum(NATIVE_INT_TYPE portNum)
Definition: InputPortBase.cpp:25
Fw::OutputLogPort::addCallPort
void addCallPort(InputLogPort *callPort)
Definition: LogPortAc.cpp:111
Svc::PrmDbComponentBase::log_ACTIVITY_HI_PrmIdUpdated
void log_ACTIVITY_HI_PrmIdUpdated(U32 Id)
Definition: PrmDbComponentAc.cpp:978
Svc::PrmDbComponentBase::getNum_Log_OutputPorts
NATIVE_INT_TYPE getNum_Log_OutputPorts(void)
Definition: PrmDbComponentAc.cpp:638
Fw::InputPrmGetPort
Definition: PrmGetPortAc.hpp:36
Fw::QueuedComponentBase::MSG_DISPATCH_EXIT
@ MSG_DISPATCH_EXIT
A message was sent requesting an exit of the loop.
Definition: QueuedComponentBase.hpp:29
Svc::PrmDbComponentBase::EVENTID_PRMFILESAVECOMPLETE
PROTECTED EVENTID_PRMFILESAVECOMPLETE
Definition: PrmDbComponentAc.hpp:589
Svc::PrmDbComponentBase::getNum_setPrm_InputPorts
NATIVE_INT_TYPE getNum_setPrm_InputPorts(void)
Definition: PrmDbComponentAc.cpp:582
Svc::PrmDbComponentBase::portNum
PRIVATE NATIVE_INT_TYPE portNum
Definition: PrmDbComponentAc.hpp:789
Fw::InputPrmSetPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: PrmSetPortAc.hpp:31
Svc
Definition: ActiveLoggerComponentAc.cpp:22
Svc::PrmDbComponentBase::isConnected_Time_OutputPort
bool isConnected_Time_OutputPort(NATIVE_INT_TYPE portNum)
Definition: PrmDbComponentAc.cpp:690
Svc::PrmDbComponentBase::unLock
virtual void unLock(void)
Definition: PrmDbComponentAc.cpp:1757
Os::Queue::QUEUE_NONBLOCKING
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
Definition: Queue.hpp:42
Fw::InputCmdResponsePort
Definition: CmdResponsePortAc.hpp:37
Svc::PrmDbComponentBase::m_p_pingIn_in
static void m_p_pingIn_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, U32 key)
Definition: PrmDbComponentAc.cpp:1793
FwPrmIdType
#define FwPrmIdType
Type representation for a parameter id.
Definition: FpConfig.hpp:74
Fw::ParamValid
ParamValid
Definition: PrmGetPortAc.hpp:25
Svc::PrmDbComponentBase::getNum_Time_OutputPorts
NATIVE_INT_TYPE getNum_Time_OutputPorts(void)
Definition: PrmDbComponentAc.cpp:630
Fw::InputLogPort
Definition: LogPortAc.hpp:40
Svc::PrmDbComponentBase::set_Time_OutputPort
void set_Time_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputTimePort *port)
Definition: PrmDbComponentAc.cpp:149
Svc::PrmDbComponentBase::EVENTID_PRMDBFULL
PROTECTED EVENTID_PRMDBFULL
Definition: PrmDbComponentAc.hpp:586
Svc::PrmDbComponentBase::key
PROTECTED U32 key
Definition: PrmDbComponentAc.hpp:354
FwEventIdType
#define FwEventIdType
Type representation for a event id.
Definition: FpConfig.hpp:70
Svc::PrmDbComponentBase::log_WARNING_HI_PrmFileWriteError
void log_WARNING_HI_PrmFileWriteError(PrmWriteError stage, I32 record, I32 error)
Definition: PrmDbComponentAc.cpp:1283
Svc::PrmDbComponentBase::EVENTID_PRMIDUPDATED
PROTECTED EVENTID_PRMIDUPDATED
Definition: PrmDbComponentAc.hpp:585
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
AssertArg
#define AssertArg
Definition: FpConfig.hpp:51
Fw::InputPrmSetPort
Definition: PrmSetPortAc.hpp:28
Svc::PrmDbComponentBase::EVENTID_PRMFILEREADERROR
PROTECTED EVENTID_PRMFILEREADERROR
Definition: PrmDbComponentAc.hpp:590
Fw::QueuedComponentBase::createQueue
Os::Queue::QueueStatus createQueue(NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize)
Definition: QueuedComponentBase.cpp:29
TB_NONE
@ TB_NONE
No time base has been established.
Definition: FpConfig.hpp:324
Svc::PrmDbComponentBase::m_CmdReg_OutputPort
Fw::OutputCmdRegPort m_CmdReg_OutputPort[NUM_CMDREG_OUTPUT_PORTS]
Definition: PrmDbComponentAc.hpp:763
Svc::PrmDbComponentBase::set_CmdStatus_OutputPort
void set_CmdStatus_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputCmdResponsePort *port)
Definition: PrmDbComponentAc.cpp:129
Fw::InputCmdPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: CmdPortAc.hpp:31
Fw
Definition: BufferGetPortAc.cpp:6
Fw::OutputTimePort::addCallPort
void addCallPort(InputTimePort *callPort)
Definition: TimePortAc.cpp:93
FW_LOG_TEXT_BUFFER_SIZE
#define FW_LOG_TEXT_BUFFER_SIZE
Max size of string for text log message.
Definition: FpConfig.hpp:291
Os::Queue::QUEUE_BLOCKING
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
Definition: Queue.hpp:41
Fw::InputLogTextPort
Definition: LogTextPortAc.hpp:40
Svc::InputPingPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: PingPortAc.cpp:42