F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpCompressProcComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpCompressProcComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for DpCompressProc component base class
5 // ======================================================================
6 
7 #include "Fw/Types/Assert.hpp"
9 #if FW_ENABLE_TEXT_LOGGING
10 #include "Fw/Types/String.hpp"
11 #endif
13 
14 namespace Svc {
15 
16  // ----------------------------------------------------------------------
17  // Types for data products
18  // ----------------------------------------------------------------------
19 
22  FwDpIdType id,
23  const Fw::Buffer& buffer,
24  FwDpIdType baseId
25  ) :
26  Fw::DpContainer(id, buffer),
27  m_baseId(baseId)
28  {
29 
30  }
31 
34  Fw::DpContainer(),
35  m_baseId(0)
36  {
37 
38  }
39 
42  const U8* array,
43  FwSizeType size
44  )
45  {
46  FW_ASSERT(array != nullptr);
47  // Compute the size delta
48  const FwSizeType sizeDelta =
49  sizeof(FwDpIdType) +
50  sizeof(FwSizeStoreType) +
51  size * sizeof(U8);
52  // Serialize the elements if they will fit
54  if ((this->m_dataBuffer.getSize() + sizeDelta) <= this->m_dataBuffer.getCapacity()) {
55  const FwDpIdType id = this->m_baseId + RecordId::CompressionRecord;
56  status = this->m_dataBuffer.serializeFrom(id);
57  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
58  status = this->m_dataBuffer.serializeSize(size);
59  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
60  status = this->m_dataBuffer.serializeFrom(array, size, Fw::Serialization::OMIT_LENGTH);
61  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
62  this->m_dataSize += sizeDelta;
63  }
64  else {
66  }
67  return status;
68  }
69 
70  // ----------------------------------------------------------------------
71  // Component initialization
72  // ----------------------------------------------------------------------
73 
76  {
77  // Initialize base class
79 
80 #if !FW_DIRECT_PORT_CALLS
81  // Connect input port cmdIn
82  for (
83  FwIndexType port = 0;
84  port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
85  port++
86  ) {
87  this->m_cmdIn_InputPort[port].init();
88  this->m_cmdIn_InputPort[port].addCallComp(
89  this,
90  m_p_cmdIn_in
91  );
92  this->m_cmdIn_InputPort[port].setPortNum(port);
93 
94 #if FW_OBJECT_NAMES == 1
95  Fw::ObjectName portName;
96  portName.format(
97  "%s_cmdIn_InputPort[%" PRI_FwIndexType "]",
98  this->m_objName.toChar(),
99  port
100  );
101  this->m_cmdIn_InputPort[port].setObjName(portName.toChar());
102 #endif
103  }
104 #endif
105 
106 #if !FW_DIRECT_PORT_CALLS
107  // Connect input port procRequest
108  for (
109  FwIndexType port = 0;
110  port < static_cast<FwIndexType>(this->getNum_procRequest_InputPorts());
111  port++
112  ) {
113  this->m_procRequest_InputPort[port].init();
114  this->m_procRequest_InputPort[port].addCallComp(
115  this,
116  m_p_procRequest_in
117  );
118  this->m_procRequest_InputPort[port].setPortNum(port);
119 
120 #if FW_OBJECT_NAMES == 1
121  Fw::ObjectName portName;
122  portName.format(
123  "%s_procRequest_InputPort[%" PRI_FwIndexType "]",
124  this->m_objName.toChar(),
125  port
126  );
127  this->m_procRequest_InputPort[port].setObjName(portName.toChar());
128 #endif
129  }
130 #endif
131 
132 #if !FW_DIRECT_PORT_CALLS
133  // Connect output port cmdRegOut
134  for (
135  FwIndexType port = 0;
136  port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
137  port++
138  ) {
139  this->m_cmdRegOut_OutputPort[port].init();
140 
141 #if FW_OBJECT_NAMES == 1
142  Fw::ObjectName portName;
143  portName.format(
144  "%s_cmdRegOut_OutputPort[%" PRI_FwIndexType "]",
145  this->m_objName.toChar(),
146  port
147  );
148  this->m_cmdRegOut_OutputPort[port].setObjName(portName.toChar());
149 #endif
150  }
151 #endif
152 
153 #if !FW_DIRECT_PORT_CALLS
154  // Connect output port cmdResponseOut
155  for (
156  FwIndexType port = 0;
157  port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
158  port++
159  ) {
160  this->m_cmdResponseOut_OutputPort[port].init();
161 
162 #if FW_OBJECT_NAMES == 1
163  Fw::ObjectName portName;
164  portName.format(
165  "%s_cmdResponseOut_OutputPort[%" PRI_FwIndexType "]",
166  this->m_objName.toChar(),
167  port
168  );
169  this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar());
170 #endif
171  }
172 #endif
173 
174 #if !FW_DIRECT_PORT_CALLS
175  // Connect output port dpGet
176  for (
177  FwIndexType port = 0;
178  port < static_cast<FwIndexType>(this->getNum_dpGet_OutputPorts());
179  port++
180  ) {
181  this->m_dpGet_OutputPort[port].init();
182 
183 #if FW_OBJECT_NAMES == 1
184  Fw::ObjectName portName;
185  portName.format(
186  "%s_dpGet_OutputPort[%" PRI_FwIndexType "]",
187  this->m_objName.toChar(),
188  port
189  );
190  this->m_dpGet_OutputPort[port].setObjName(portName.toChar());
191 #endif
192  }
193 #endif
194 
195 #if !FW_DIRECT_PORT_CALLS
196  // Connect output port dpSend
197  for (
198  FwIndexType port = 0;
199  port < static_cast<FwIndexType>(this->getNum_dpSend_OutputPorts());
200  port++
201  ) {
202  this->m_dpSend_OutputPort[port].init();
203 
204 #if FW_OBJECT_NAMES == 1
205  Fw::ObjectName portName;
206  portName.format(
207  "%s_dpSend_OutputPort[%" PRI_FwIndexType "]",
208  this->m_objName.toChar(),
209  port
210  );
211  this->m_dpSend_OutputPort[port].setObjName(portName.toChar());
212 #endif
213  }
214 #endif
215 
216 #if !FW_DIRECT_PORT_CALLS
217  // Connect output port logOut
218  for (
219  FwIndexType port = 0;
220  port < static_cast<FwIndexType>(this->getNum_logOut_OutputPorts());
221  port++
222  ) {
223  this->m_logOut_OutputPort[port].init();
224 
225 #if FW_OBJECT_NAMES == 1
226  Fw::ObjectName portName;
227  portName.format(
228  "%s_logOut_OutputPort[%" PRI_FwIndexType "]",
229  this->m_objName.toChar(),
230  port
231  );
232  this->m_logOut_OutputPort[port].setObjName(portName.toChar());
233 #endif
234  }
235 #endif
236 
237 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING
238  // Connect output port logTextOut
239  for (
240  FwIndexType port = 0;
241  port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
242  port++
243  ) {
244  this->m_logTextOut_OutputPort[port].init();
245 
246 #if FW_OBJECT_NAMES == 1
247  Fw::ObjectName portName;
248  portName.format(
249  "%s_logTextOut_OutputPort[%" PRI_FwIndexType "]",
250  this->m_objName.toChar(),
251  port
252  );
253  this->m_logTextOut_OutputPort[port].setObjName(portName.toChar());
254 #endif
255  }
256 #endif
257 
258 #if !FW_DIRECT_PORT_CALLS
259  // Connect output port prmGetOut
260  for (
261  FwIndexType port = 0;
262  port < static_cast<FwIndexType>(this->getNum_prmGetOut_OutputPorts());
263  port++
264  ) {
265  this->m_prmGetOut_OutputPort[port].init();
266 
267 #if FW_OBJECT_NAMES == 1
268  Fw::ObjectName portName;
269  portName.format(
270  "%s_prmGetOut_OutputPort[%" PRI_FwIndexType "]",
271  this->m_objName.toChar(),
272  port
273  );
274  this->m_prmGetOut_OutputPort[port].setObjName(portName.toChar());
275 #endif
276  }
277 #endif
278 
279 #if !FW_DIRECT_PORT_CALLS
280  // Connect output port prmSetOut
281  for (
282  FwIndexType port = 0;
283  port < static_cast<FwIndexType>(this->getNum_prmSetOut_OutputPorts());
284  port++
285  ) {
286  this->m_prmSetOut_OutputPort[port].init();
287 
288 #if FW_OBJECT_NAMES == 1
289  Fw::ObjectName portName;
290  portName.format(
291  "%s_prmSetOut_OutputPort[%" PRI_FwIndexType "]",
292  this->m_objName.toChar(),
293  port
294  );
295  this->m_prmSetOut_OutputPort[port].setObjName(portName.toChar());
296 #endif
297  }
298 #endif
299 
300 #if !FW_DIRECT_PORT_CALLS
301  // Connect output port timeCaller
302  for (
303  FwIndexType port = 0;
304  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
305  port++
306  ) {
307  this->m_timeCaller_OutputPort[port].init();
308 
309 #if FW_OBJECT_NAMES == 1
310  Fw::ObjectName portName;
311  portName.format(
312  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
313  this->m_objName.toChar(),
314  port
315  );
316  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
317 #endif
318  }
319 #endif
320 
321 #if !FW_DIRECT_PORT_CALLS
322  // Connect output port compressChunk
323  for (
324  FwIndexType port = 0;
325  port < static_cast<FwIndexType>(this->getNum_compressChunk_OutputPorts());
326  port++
327  ) {
328  this->m_compressChunk_OutputPort[port].init();
329 
330 #if FW_OBJECT_NAMES == 1
331  Fw::ObjectName portName;
332  portName.format(
333  "%s_compressChunk_OutputPort[%" PRI_FwIndexType "]",
334  this->m_objName.toChar(),
335  port
336  );
337  this->m_compressChunk_OutputPort[port].setObjName(portName.toChar());
338 #endif
339  }
340 #endif
341  }
342 
343 #if !FW_DIRECT_PORT_CALLS
344 
345  // ----------------------------------------------------------------------
346  // Getters for special input ports
347  // ----------------------------------------------------------------------
348 
351  {
352  FW_ASSERT(
353  (0 <= portNum) && (portNum < this->getNum_cmdIn_InputPorts()),
354  static_cast<FwAssertArgType>(portNum)
355  );
356 
357  return &this->m_cmdIn_InputPort[portNum];
358  }
359 
360 #endif
361 
362 #if !FW_DIRECT_PORT_CALLS
363 
364  // ----------------------------------------------------------------------
365  // Getters for typed input ports
366  // ----------------------------------------------------------------------
367 
370  {
371  FW_ASSERT(
372  (0 <= portNum) && (portNum < this->getNum_procRequest_InputPorts()),
373  static_cast<FwAssertArgType>(portNum)
374  );
375 
376  return &this->m_procRequest_InputPort[portNum];
377  }
378 
379 #endif
380 
381 #if !FW_DIRECT_PORT_CALLS
382 
383  // ----------------------------------------------------------------------
384  // Connect input ports to special output ports
385  // ----------------------------------------------------------------------
386 
389  FwIndexType portNum,
390  Fw::InputCmdRegPort* port
391  )
392  {
393  FW_ASSERT(
394  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
395  static_cast<FwAssertArgType>(portNum)
396  );
397 
398  this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
399  }
400 
403  FwIndexType portNum,
405  )
406  {
407  FW_ASSERT(
408  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
409  static_cast<FwAssertArgType>(portNum)
410  );
411 
412  this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
413  }
414 
417  FwIndexType portNum,
418  Fw::InputDpGetPort* port
419  )
420  {
421  FW_ASSERT(
422  (0 <= portNum) && (portNum < this->getNum_dpGet_OutputPorts()),
423  static_cast<FwAssertArgType>(portNum)
424  );
425 
426  this->m_dpGet_OutputPort[portNum].addCallPort(port);
427  }
428 
431  FwIndexType portNum,
432  Fw::InputDpSendPort* port
433  )
434  {
435  FW_ASSERT(
436  (0 <= portNum) && (portNum < this->getNum_dpSend_OutputPorts()),
437  static_cast<FwAssertArgType>(portNum)
438  );
439 
440  this->m_dpSend_OutputPort[portNum].addCallPort(port);
441  }
442 
445  FwIndexType portNum,
446  Fw::InputLogPort* port
447  )
448  {
449  FW_ASSERT(
450  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
451  static_cast<FwAssertArgType>(portNum)
452  );
453 
454  this->m_logOut_OutputPort[portNum].addCallPort(port);
455  }
456 
457 #if FW_ENABLE_TEXT_LOGGING == 1
458 
459  void DpCompressProcComponentBase ::
460  set_logTextOut_OutputPort(
461  FwIndexType portNum,
463  )
464  {
465  FW_ASSERT(
466  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
467  static_cast<FwAssertArgType>(portNum)
468  );
469 
470  this->m_logTextOut_OutputPort[portNum].addCallPort(port);
471  }
472 
473 #endif
474 
477  FwIndexType portNum,
478  Fw::InputPrmGetPort* port
479  )
480  {
481  FW_ASSERT(
482  (0 <= portNum) && (portNum < this->getNum_prmGetOut_OutputPorts()),
483  static_cast<FwAssertArgType>(portNum)
484  );
485 
486  this->m_prmGetOut_OutputPort[portNum].addCallPort(port);
487  }
488 
491  FwIndexType portNum,
492  Fw::InputPrmSetPort* port
493  )
494  {
495  FW_ASSERT(
496  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
497  static_cast<FwAssertArgType>(portNum)
498  );
499 
500  this->m_prmSetOut_OutputPort[portNum].addCallPort(port);
501  }
502 
505  FwIndexType portNum,
506  Fw::InputTimePort* port
507  )
508  {
509  FW_ASSERT(
510  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
511  static_cast<FwAssertArgType>(portNum)
512  );
513 
514  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
515  }
516 
517 #endif
518 
519 #if !FW_DIRECT_PORT_CALLS
520 
521  // ----------------------------------------------------------------------
522  // Connect typed input ports to typed output ports
523  // ----------------------------------------------------------------------
524 
527  FwIndexType portNum,
529  )
530  {
531  FW_ASSERT(
532  (0 <= portNum) && (portNum < this->getNum_compressChunk_OutputPorts()),
533  static_cast<FwAssertArgType>(portNum)
534  );
535 
536  this->m_compressChunk_OutputPort[portNum].addCallPort(port);
537  }
538 
539 #endif
540 
541 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
542 
543  // ----------------------------------------------------------------------
544  // Connect serial input ports to special output ports
545  // ----------------------------------------------------------------------
546 
549  FwIndexType portNum,
550  Fw::InputSerializePort* port
551  )
552  {
553  FW_ASSERT(
554  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
555  static_cast<FwAssertArgType>(portNum)
556  );
557 
558  this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
559  }
560 
563  FwIndexType portNum,
564  Fw::InputSerializePort* port
565  )
566  {
567  FW_ASSERT(
568  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
569  static_cast<FwAssertArgType>(portNum)
570  );
571 
572  this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
573  }
574 
577  FwIndexType portNum,
578  Fw::InputSerializePort* port
579  )
580  {
581  FW_ASSERT(
582  (0 <= portNum) && (portNum < this->getNum_dpSend_OutputPorts()),
583  static_cast<FwAssertArgType>(portNum)
584  );
585 
586  this->m_dpSend_OutputPort[portNum].registerSerialPort(port);
587  }
588 
591  FwIndexType portNum,
592  Fw::InputSerializePort* port
593  )
594  {
595  FW_ASSERT(
596  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
597  static_cast<FwAssertArgType>(portNum)
598  );
599 
600  this->m_logOut_OutputPort[portNum].registerSerialPort(port);
601  }
602 
603 #if FW_ENABLE_TEXT_LOGGING == 1
604 
605  void DpCompressProcComponentBase ::
606  set_logTextOut_OutputPort(
607  FwIndexType portNum,
608  Fw::InputSerializePort* port
609  )
610  {
611  FW_ASSERT(
612  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
613  static_cast<FwAssertArgType>(portNum)
614  );
615 
616  this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
617  }
618 
619 #endif
620 
623  FwIndexType portNum,
624  Fw::InputSerializePort* port
625  )
626  {
627  FW_ASSERT(
628  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
629  static_cast<FwAssertArgType>(portNum)
630  );
631 
632  this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
633  }
634 
637  FwIndexType portNum,
638  Fw::InputSerializePort* port
639  )
640  {
641  FW_ASSERT(
642  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
643  static_cast<FwAssertArgType>(portNum)
644  );
645 
646  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
647  }
648 
649 #endif
650 
651  // ----------------------------------------------------------------------
652  // Command registration
653  // ----------------------------------------------------------------------
654 
657  {
659 
660  this->cmdRegOut_out(
661  0,
663  );
664 
665  this->cmdRegOut_out(
666  0,
668  );
669 
670  this->cmdRegOut_out(
671  0,
672  this->getIdBase() + OPCODE_ENABLE_SET
673  );
674 
675  this->cmdRegOut_out(
676  0,
677  this->getIdBase() + OPCODE_ENABLE_SAVE
678  );
679  }
680 
681  // ----------------------------------------------------------------------
682  // Parameter loading
683  // ----------------------------------------------------------------------
684 
687  {
689  const FwPrmIdType _baseId = static_cast<FwPrmIdType>(this->getIdBase());
691 
692  FwPrmIdType _id{};
693  Fw::ParamBuffer _paramBuffer;
694 
695  _id = _baseId + PARAMID_CHUNK_SIZE;
696 
697  // Get serialized parameter CHUNK_SIZE
698  this->m_param_CHUNK_SIZE_valid = this->prmGetOut_out(
699  0,
700  _id,
701  _paramBuffer
702  );
703 
704  this->m_paramLock.lock();
705 
706  // Deserialize parameter or use default value
707  if (this->m_param_CHUNK_SIZE_valid == Fw::ParamValid::VALID) {
708  _stat = _paramBuffer.deserializeTo(this->m_CHUNK_SIZE);
709  if (_stat != Fw::FW_SERIALIZE_OK) {
710  this->m_param_CHUNK_SIZE_valid = Fw::ParamValid::DEFAULT;
711  }
712  }
713  else {
714  this->m_param_CHUNK_SIZE_valid = Fw::ParamValid::DEFAULT;
715  }
716  if (this->m_param_CHUNK_SIZE_valid == Fw::ParamValid::DEFAULT) {
717  this->m_CHUNK_SIZE = 32768;
718  }
719 
720  this->m_paramLock.unlock();
721 
722  _id = _baseId + PARAMID_ENABLE;
723 
724  // Get serialized parameter ENABLE
725  this->m_param_ENABLE_valid = this->prmGetOut_out(
726  0,
727  _id,
728  _paramBuffer
729  );
730 
731  this->m_paramLock.lock();
732 
733  // Deserialize parameter or use default value
734  if (this->m_param_ENABLE_valid == Fw::ParamValid::VALID) {
735  _stat = _paramBuffer.deserializeTo(this->m_ENABLE);
736  if (_stat != Fw::FW_SERIALIZE_OK) {
737  this->m_param_ENABLE_valid = Fw::ParamValid::DEFAULT;
738  }
739  }
740  else {
741  this->m_param_ENABLE_valid = Fw::ParamValid::DEFAULT;
742  }
743  if (this->m_param_ENABLE_valid == Fw::ParamValid::DEFAULT) {
744  this->m_ENABLE = Fw::Enabled::ENABLED;
745  }
746 
747  this->m_paramLock.unlock();
748 
749  // Call notifier
750  this->parametersLoaded();
751  }
752 
753  // ----------------------------------------------------------------------
754  // Component construction and destruction
755  // ----------------------------------------------------------------------
756 
758  DpCompressProcComponentBase(const char* compName) :
759  Fw::PassiveComponentBase(compName)
760  {
761  this->m_DidNotCompressThrottle = 0;
762  this->m_InvalidHeaderThrottle = 0;
763  this->m_BufferTooSmallForPacketThrottle = 0;
764  this->m_ContainerTooLargeThrottle = 0;
765  }
766 
769  {
770 
771  }
772 
773 #if !FW_DIRECT_PORT_CALLS
774 
775  // ----------------------------------------------------------------------
776  // Connection status queries for special output ports
777  // ----------------------------------------------------------------------
778 
781  {
782  FW_ASSERT(
783  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
784  static_cast<FwAssertArgType>(portNum)
785  );
786 
787  return this->m_cmdRegOut_OutputPort[portNum].isConnected();
788  }
789 
792  {
793  FW_ASSERT(
794  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
795  static_cast<FwAssertArgType>(portNum)
796  );
797 
798  return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
799  }
800 
803  {
804  FW_ASSERT(
805  (0 <= portNum) && (portNum < this->getNum_dpGet_OutputPorts()),
806  static_cast<FwAssertArgType>(portNum)
807  );
808 
809  return this->m_dpGet_OutputPort[portNum].isConnected();
810  }
811 
814  {
815  FW_ASSERT(
816  (0 <= portNum) && (portNum < this->getNum_dpSend_OutputPorts()),
817  static_cast<FwAssertArgType>(portNum)
818  );
819 
820  return this->m_dpSend_OutputPort[portNum].isConnected();
821  }
822 
825  {
826  FW_ASSERT(
827  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
828  static_cast<FwAssertArgType>(portNum)
829  );
830 
831  return this->m_logOut_OutputPort[portNum].isConnected();
832  }
833 
834 #if FW_ENABLE_TEXT_LOGGING == 1
835 
836  bool DpCompressProcComponentBase ::
837  isConnected_logTextOut_OutputPort(FwIndexType portNum) const
838  {
839  FW_ASSERT(
840  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
841  static_cast<FwAssertArgType>(portNum)
842  );
843 
844  return this->m_logTextOut_OutputPort[portNum].isConnected();
845  }
846 
847 #endif
848 
851  {
852  FW_ASSERT(
853  (0 <= portNum) && (portNum < this->getNum_prmGetOut_OutputPorts()),
854  static_cast<FwAssertArgType>(portNum)
855  );
856 
857  return this->m_prmGetOut_OutputPort[portNum].isConnected();
858  }
859 
862  {
863  FW_ASSERT(
864  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
865  static_cast<FwAssertArgType>(portNum)
866  );
867 
868  return this->m_prmSetOut_OutputPort[portNum].isConnected();
869  }
870 
873  {
874  FW_ASSERT(
875  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
876  static_cast<FwAssertArgType>(portNum)
877  );
878 
879  return this->m_timeCaller_OutputPort[portNum].isConnected();
880  }
881 
882 #endif
883 
884 #if !FW_DIRECT_PORT_CALLS
885 
886  // ----------------------------------------------------------------------
887  // Connection status queries for typed output ports
888  // ----------------------------------------------------------------------
889 
892  {
893  FW_ASSERT(
894  (0 <= portNum) && (portNum < this->getNum_compressChunk_OutputPorts()),
895  static_cast<FwAssertArgType>(portNum)
896  );
897 
898  return this->m_compressChunk_OutputPort[portNum].isConnected();
899  }
900 
901 #endif
902 
903  // ----------------------------------------------------------------------
904  // Port handler base-class functions for special input ports
905  //
906  // Call these functions directly to bypass the corresponding ports
907  // ----------------------------------------------------------------------
908 
911  FwIndexType portNum,
912  FwOpcodeType opCode,
913  U32 cmdSeq,
914  Fw::CmdArgBuffer& args
915  )
916  {
917 
918  const U32 idBase = this->getIdBase();
919  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
920 
921  // Select base class function based on opcode
922  switch (opCode - idBase) {
923  case OPCODE_CHUNK_SIZE_SET: {
924  Fw::CmdResponse _cstat = this->paramSet_CHUNK_SIZE(args);
925  this->cmdResponse_out(
926  opCode,
927  cmdSeq,
928  _cstat
929  );
930  break;
931  }
932 
933  case OPCODE_CHUNK_SIZE_SAVE: {
934  Fw::CmdResponse _cstat = this->paramSave_CHUNK_SIZE();
935  this->cmdResponse_out(
936  opCode,
937  cmdSeq,
938  _cstat
939  );
940  break;
941  }
942 
943  case OPCODE_ENABLE_SET: {
944  Fw::CmdResponse _cstat = this->paramSet_ENABLE(args);
945  this->cmdResponse_out(
946  opCode,
947  cmdSeq,
948  _cstat
949  );
950  break;
951  }
952 
953  case OPCODE_ENABLE_SAVE: {
954  Fw::CmdResponse _cstat = this->paramSave_ENABLE();
955  this->cmdResponse_out(
956  opCode,
957  cmdSeq,
958  _cstat
959  );
960  break;
961  }
962  default:
963  // Unknown opcode: ignore it
964  break;
965  }
966  }
967 
968  // ----------------------------------------------------------------------
969  // Port handler base-class functions for typed input ports
970  //
971  // Call these functions directly to bypass the corresponding ports
972  // ----------------------------------------------------------------------
973 
976  FwIndexType portNum,
977  Fw::Buffer& fwBuffer
978  )
979  {
980  // Make sure port number is valid
981  FW_ASSERT(
982  (0 <= portNum) && (portNum < this->getNum_procRequest_InputPorts()),
983  static_cast<FwAssertArgType>(portNum)
984  );
985 
986  // Call handler function
987  this->procRequest_handler(
988  portNum,
989  fwBuffer
990  );
991  }
992 
993 #if !FW_DIRECT_PORT_CALLS
994 
995  // ----------------------------------------------------------------------
996  // Invocation functions for typed output ports
997  // ----------------------------------------------------------------------
998 
1001  FwIndexType portNum,
1002  Fw::Buffer& buffer,
1003  FwSizeType min_compression,
1004  FwSizeType write_offset
1005  ) const
1006  {
1007  FW_ASSERT(
1008  (0 <= portNum) && (portNum < this->getNum_compressChunk_OutputPorts()),
1009  static_cast<FwAssertArgType>(portNum)
1010  );
1011 
1012  FW_ASSERT(
1013  this->m_compressChunk_OutputPort[portNum].isConnected(),
1014  static_cast<FwAssertArgType>(portNum)
1015  );
1016  return this->m_compressChunk_OutputPort[portNum].invoke(
1017  buffer,
1018  min_compression,
1019  write_offset
1020  );
1021  }
1022 
1023 #endif
1024 
1025  // ----------------------------------------------------------------------
1026  // Command response
1027  // ----------------------------------------------------------------------
1028 
1031  FwOpcodeType opCode,
1032  U32 cmdSeq,
1033  Fw::CmdResponse response
1034  )
1035  {
1037  this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1038  }
1039 
1040  // ----------------------------------------------------------------------
1041  // Event logging functions
1042  // ----------------------------------------------------------------------
1043 
1046  FwDpIdType dp_id,
1047  FwSizeType initial_size,
1048  FwSizeType final_size
1049  ) const
1050  {
1051  // Get the time
1052  Fw::Time _logTime;
1053  if (this->isConnected_timeCaller_OutputPort(0)) {
1054  this->timeCaller_out(0, _logTime);
1055  }
1056 
1057  const FwEventIdType _id = this->getIdBase() + EVENTID_COMPRESSIONCOMPLETE;
1058 
1059  // Emit the event on the log port
1060  if (this->isConnected_logOut_OutputPort(0)) {
1061  Fw::LogBuffer _logBuff;
1063 
1064 #if FW_AMPCS_COMPATIBLE
1065  // Serialize the number of arguments
1066  _status = _logBuff.serializeFrom(static_cast<U8>(3));
1067  FW_ASSERT(
1068  _status == Fw::FW_SERIALIZE_OK,
1069  static_cast<FwAssertArgType>(_status)
1070  );
1071 #endif
1072 
1073 #if FW_AMPCS_COMPATIBLE
1074  // Serialize the argument size
1075  _status = _logBuff.serializeFrom(
1076  static_cast<U8>(sizeof(FwDpIdType))
1077  );
1078  FW_ASSERT(
1079  _status == Fw::FW_SERIALIZE_OK,
1080  static_cast<FwAssertArgType>(_status)
1081  );
1082 #endif
1083  _status = _logBuff.serializeFrom(dp_id);
1084  FW_ASSERT(
1085  _status == Fw::FW_SERIALIZE_OK,
1086  static_cast<FwAssertArgType>(_status)
1087  );
1088 
1089 #if FW_AMPCS_COMPATIBLE
1090  // Serialize the argument size
1091  _status = _logBuff.serializeFrom(
1092  static_cast<U8>(sizeof(FwSizeType))
1093  );
1094  FW_ASSERT(
1095  _status == Fw::FW_SERIALIZE_OK,
1096  static_cast<FwAssertArgType>(_status)
1097  );
1098 #endif
1099  _status = _logBuff.serializeFrom(initial_size);
1100  FW_ASSERT(
1101  _status == Fw::FW_SERIALIZE_OK,
1102  static_cast<FwAssertArgType>(_status)
1103  );
1104 
1105 #if FW_AMPCS_COMPATIBLE
1106  // Serialize the argument size
1107  _status = _logBuff.serializeFrom(
1108  static_cast<U8>(sizeof(FwSizeType))
1109  );
1110  FW_ASSERT(
1111  _status == Fw::FW_SERIALIZE_OK,
1112  static_cast<FwAssertArgType>(_status)
1113  );
1114 #endif
1115  _status = _logBuff.serializeFrom(final_size);
1116  FW_ASSERT(
1117  _status == Fw::FW_SERIALIZE_OK,
1118  static_cast<FwAssertArgType>(_status)
1119  );
1120 
1121  this->logOut_out(
1122  0,
1123  _id,
1124  _logTime,
1126  _logBuff
1127  );
1128  }
1129 
1130  // Emit the event on the text log port
1131 #if FW_ENABLE_TEXT_LOGGING
1132  if (this->isConnected_logTextOut_OutputPort(0)) {
1133 #if FW_OBJECT_NAMES == 1
1134  const char* _formatString =
1135  "(%s) %s: Compressed Data Product %" PRIu32 " from %" PRIu64 " to %" PRIu64 " bytes";
1136 #else
1137  const char* _formatString =
1138  "%s: Compressed Data Product %" PRIu32 " from %" PRIu64 " to %" PRIu64 " bytes";
1139 #endif
1140 
1141  Fw::TextLogString _logString;
1142  (void) _logString.format(
1143  _formatString,
1144 #if FW_OBJECT_NAMES == 1
1145  this->m_objName.toChar(),
1146 #endif
1147  "CompressionComplete ",
1148  dp_id,
1149  initial_size,
1150  final_size
1151  );
1152 
1153  this->logTextOut_out(
1154  0,
1155  _id,
1156  _logTime,
1158  _logString
1159  );
1160  }
1161 #endif
1162  }
1163 
1166  FwDpIdType dp_id,
1167  FwSizeType data_size
1168  )
1169  {
1170  // Check throttle value
1171  if (this->m_DidNotCompressThrottle >= EVENTID_DIDNOTCOMPRESS_THROTTLE) {
1172  return;
1173  }
1174  else {
1175  this->m_DidNotCompressThrottle++;
1176  }
1177 
1178  // Get the time
1179  Fw::Time _logTime;
1180  if (this->isConnected_timeCaller_OutputPort(0)) {
1181  this->timeCaller_out(0, _logTime);
1182  }
1183 
1184  const FwEventIdType _id = this->getIdBase() + EVENTID_DIDNOTCOMPRESS;
1185 
1186  // Emit the event on the log port
1187  if (this->isConnected_logOut_OutputPort(0)) {
1188  Fw::LogBuffer _logBuff;
1190 
1191 #if FW_AMPCS_COMPATIBLE
1192  // Serialize the number of arguments
1193  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1194  FW_ASSERT(
1195  _status == Fw::FW_SERIALIZE_OK,
1196  static_cast<FwAssertArgType>(_status)
1197  );
1198 #endif
1199 
1200 #if FW_AMPCS_COMPATIBLE
1201  // Serialize the argument size
1202  _status = _logBuff.serializeFrom(
1203  static_cast<U8>(sizeof(FwDpIdType))
1204  );
1205  FW_ASSERT(
1206  _status == Fw::FW_SERIALIZE_OK,
1207  static_cast<FwAssertArgType>(_status)
1208  );
1209 #endif
1210  _status = _logBuff.serializeFrom(dp_id);
1211  FW_ASSERT(
1212  _status == Fw::FW_SERIALIZE_OK,
1213  static_cast<FwAssertArgType>(_status)
1214  );
1215 
1216 #if FW_AMPCS_COMPATIBLE
1217  // Serialize the argument size
1218  _status = _logBuff.serializeFrom(
1219  static_cast<U8>(sizeof(FwSizeType))
1220  );
1221  FW_ASSERT(
1222  _status == Fw::FW_SERIALIZE_OK,
1223  static_cast<FwAssertArgType>(_status)
1224  );
1225 #endif
1226  _status = _logBuff.serializeFrom(data_size);
1227  FW_ASSERT(
1228  _status == Fw::FW_SERIALIZE_OK,
1229  static_cast<FwAssertArgType>(_status)
1230  );
1231 
1232  this->logOut_out(
1233  0,
1234  _id,
1235  _logTime,
1237  _logBuff
1238  );
1239  }
1240 
1241  // Emit the event on the text log port
1242 #if FW_ENABLE_TEXT_LOGGING
1243  if (this->isConnected_logTextOut_OutputPort(0)) {
1244 #if FW_OBJECT_NAMES == 1
1245  const char* _formatString =
1246  "(%s) %s: Unable to reduce size of Data Product %" PRIu32 ". Uncompressed size %" PRIu64 "";
1247 #else
1248  const char* _formatString =
1249  "%s: Unable to reduce size of Data Product %" PRIu32 ". Uncompressed size %" PRIu64 "";
1250 #endif
1251 
1252  Fw::TextLogString _logString;
1253  (void) _logString.format(
1254  _formatString,
1255 #if FW_OBJECT_NAMES == 1
1256  this->m_objName.toChar(),
1257 #endif
1258  "DidNotCompress ",
1259  dp_id,
1260  data_size
1261  );
1262 
1263  this->logTextOut_out(
1264  0,
1265  _id,
1266  _logTime,
1268  _logString
1269  );
1270  }
1271 #endif
1272  }
1273 
1276  FwSizeType buffer_size,
1277  U32 error_code
1278  )
1279  {
1280  // Check throttle value
1281  if (this->m_InvalidHeaderThrottle >= EVENTID_INVALIDHEADER_THROTTLE) {
1282  return;
1283  }
1284  else {
1285  this->m_InvalidHeaderThrottle++;
1286  }
1287 
1288  // Get the time
1289  Fw::Time _logTime;
1290  if (this->isConnected_timeCaller_OutputPort(0)) {
1291  this->timeCaller_out(0, _logTime);
1292  }
1293 
1294  const FwEventIdType _id = this->getIdBase() + EVENTID_INVALIDHEADER;
1295 
1296  // Emit the event on the log port
1297  if (this->isConnected_logOut_OutputPort(0)) {
1298  Fw::LogBuffer _logBuff;
1300 
1301 #if FW_AMPCS_COMPATIBLE
1302  // Serialize the number of arguments
1303  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1304  FW_ASSERT(
1305  _status == Fw::FW_SERIALIZE_OK,
1306  static_cast<FwAssertArgType>(_status)
1307  );
1308 #endif
1309 
1310 #if FW_AMPCS_COMPATIBLE
1311  // Serialize the argument size
1312  _status = _logBuff.serializeFrom(
1313  static_cast<U8>(sizeof(FwSizeType))
1314  );
1315  FW_ASSERT(
1316  _status == Fw::FW_SERIALIZE_OK,
1317  static_cast<FwAssertArgType>(_status)
1318  );
1319 #endif
1320  _status = _logBuff.serializeFrom(buffer_size);
1321  FW_ASSERT(
1322  _status == Fw::FW_SERIALIZE_OK,
1323  static_cast<FwAssertArgType>(_status)
1324  );
1325 
1326 #if FW_AMPCS_COMPATIBLE
1327  // Serialize the argument size
1328  _status = _logBuff.serializeFrom(
1329  static_cast<U8>(sizeof(U32))
1330  );
1331  FW_ASSERT(
1332  _status == Fw::FW_SERIALIZE_OK,
1333  static_cast<FwAssertArgType>(_status)
1334  );
1335 #endif
1336  _status = _logBuff.serializeFrom(error_code);
1337  FW_ASSERT(
1338  _status == Fw::FW_SERIALIZE_OK,
1339  static_cast<FwAssertArgType>(_status)
1340  );
1341 
1342  this->logOut_out(
1343  0,
1344  _id,
1345  _logTime,
1347  _logBuff
1348  );
1349  }
1350 
1351  // Emit the event on the text log port
1352 #if FW_ENABLE_TEXT_LOGGING
1353  if (this->isConnected_logTextOut_OutputPort(0)) {
1354 #if FW_OBJECT_NAMES == 1
1355  const char* _formatString =
1356  "(%s) %s: Received buffer of size %" PRIu64 "; deserialization of container header failed with error code %" PRIu32 "";
1357 #else
1358  const char* _formatString =
1359  "%s: Received buffer of size %" PRIu64 "; deserialization of container header failed with error code %" PRIu32 "";
1360 #endif
1361 
1362  Fw::TextLogString _logString;
1363  (void) _logString.format(
1364  _formatString,
1365 #if FW_OBJECT_NAMES == 1
1366  this->m_objName.toChar(),
1367 #endif
1368  "InvalidHeader ",
1369  buffer_size,
1370  error_code
1371  );
1372 
1373  this->logTextOut_out(
1374  0,
1375  _id,
1376  _logTime,
1378  _logString
1379  );
1380  }
1381 #endif
1382  }
1383 
1386  FwSizeType buffer_size,
1387  FwSizeType min_size
1388  )
1389  {
1390  // Check throttle value
1391  if (this->m_BufferTooSmallForPacketThrottle >= EVENTID_BUFFERTOOSMALLFORPACKET_THROTTLE) {
1392  return;
1393  }
1394  else {
1395  this->m_BufferTooSmallForPacketThrottle++;
1396  }
1397 
1398  // Get the time
1399  Fw::Time _logTime;
1400  if (this->isConnected_timeCaller_OutputPort(0)) {
1401  this->timeCaller_out(0, _logTime);
1402  }
1403 
1405 
1406  // Emit the event on the log port
1407  if (this->isConnected_logOut_OutputPort(0)) {
1408  Fw::LogBuffer _logBuff;
1410 
1411 #if FW_AMPCS_COMPATIBLE
1412  // Serialize the number of arguments
1413  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1414  FW_ASSERT(
1415  _status == Fw::FW_SERIALIZE_OK,
1416  static_cast<FwAssertArgType>(_status)
1417  );
1418 #endif
1419 
1420 #if FW_AMPCS_COMPATIBLE
1421  // Serialize the argument size
1422  _status = _logBuff.serializeFrom(
1423  static_cast<U8>(sizeof(FwSizeType))
1424  );
1425  FW_ASSERT(
1426  _status == Fw::FW_SERIALIZE_OK,
1427  static_cast<FwAssertArgType>(_status)
1428  );
1429 #endif
1430  _status = _logBuff.serializeFrom(buffer_size);
1431  FW_ASSERT(
1432  _status == Fw::FW_SERIALIZE_OK,
1433  static_cast<FwAssertArgType>(_status)
1434  );
1435 
1436 #if FW_AMPCS_COMPATIBLE
1437  // Serialize the argument size
1438  _status = _logBuff.serializeFrom(
1439  static_cast<U8>(sizeof(FwSizeType))
1440  );
1441  FW_ASSERT(
1442  _status == Fw::FW_SERIALIZE_OK,
1443  static_cast<FwAssertArgType>(_status)
1444  );
1445 #endif
1446  _status = _logBuff.serializeFrom(min_size);
1447  FW_ASSERT(
1448  _status == Fw::FW_SERIALIZE_OK,
1449  static_cast<FwAssertArgType>(_status)
1450  );
1451 
1452  this->logOut_out(
1453  0,
1454  _id,
1455  _logTime,
1457  _logBuff
1458  );
1459  }
1460 
1461  // Emit the event on the text log port
1462 #if FW_ENABLE_TEXT_LOGGING
1463  if (this->isConnected_logTextOut_OutputPort(0)) {
1464 #if FW_OBJECT_NAMES == 1
1465  const char* _formatString =
1466  "(%s) %s: Received buffer has size %" PRIu64 "; minimum required size is %" PRIu64 "";
1467 #else
1468  const char* _formatString =
1469  "%s: Received buffer has size %" PRIu64 "; minimum required size is %" PRIu64 "";
1470 #endif
1471 
1472  Fw::TextLogString _logString;
1473  (void) _logString.format(
1474  _formatString,
1475 #if FW_OBJECT_NAMES == 1
1476  this->m_objName.toChar(),
1477 #endif
1478  "BufferTooSmallForPacket ",
1479  buffer_size,
1480  min_size
1481  );
1482 
1483  this->logTextOut_out(
1484  0,
1485  _id,
1486  _logTime,
1488  _logString
1489  );
1490  }
1491 #endif
1492  }
1493 
1496  FwDpIdType dp_id,
1497  FwSizeType data_size
1498  )
1499  {
1500  // Check throttle value
1501  if (this->m_ContainerTooLargeThrottle >= EVENTID_CONTAINERTOOLARGE_THROTTLE) {
1502  return;
1503  }
1504  else {
1505  this->m_ContainerTooLargeThrottle++;
1506  }
1507 
1508  // Get the time
1509  Fw::Time _logTime;
1510  if (this->isConnected_timeCaller_OutputPort(0)) {
1511  this->timeCaller_out(0, _logTime);
1512  }
1513 
1514  const FwEventIdType _id = this->getIdBase() + EVENTID_CONTAINERTOOLARGE;
1515 
1516  // Emit the event on the log port
1517  if (this->isConnected_logOut_OutputPort(0)) {
1518  Fw::LogBuffer _logBuff;
1520 
1521 #if FW_AMPCS_COMPATIBLE
1522  // Serialize the number of arguments
1523  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1524  FW_ASSERT(
1525  _status == Fw::FW_SERIALIZE_OK,
1526  static_cast<FwAssertArgType>(_status)
1527  );
1528 #endif
1529 
1530 #if FW_AMPCS_COMPATIBLE
1531  // Serialize the argument size
1532  _status = _logBuff.serializeFrom(
1533  static_cast<U8>(sizeof(FwDpIdType))
1534  );
1535  FW_ASSERT(
1536  _status == Fw::FW_SERIALIZE_OK,
1537  static_cast<FwAssertArgType>(_status)
1538  );
1539 #endif
1540  _status = _logBuff.serializeFrom(dp_id);
1541  FW_ASSERT(
1542  _status == Fw::FW_SERIALIZE_OK,
1543  static_cast<FwAssertArgType>(_status)
1544  );
1545 
1546 #if FW_AMPCS_COMPATIBLE
1547  // Serialize the argument size
1548  _status = _logBuff.serializeFrom(
1549  static_cast<U8>(sizeof(FwSizeType))
1550  );
1551  FW_ASSERT(
1552  _status == Fw::FW_SERIALIZE_OK,
1553  static_cast<FwAssertArgType>(_status)
1554  );
1555 #endif
1556  _status = _logBuff.serializeFrom(data_size);
1557  FW_ASSERT(
1558  _status == Fw::FW_SERIALIZE_OK,
1559  static_cast<FwAssertArgType>(_status)
1560  );
1561 
1562  this->logOut_out(
1563  0,
1564  _id,
1565  _logTime,
1567  _logBuff
1568  );
1569  }
1570 
1571  // Emit the event on the text log port
1572 #if FW_ENABLE_TEXT_LOGGING
1573  if (this->isConnected_logTextOut_OutputPort(0)) {
1574 #if FW_OBJECT_NAMES == 1
1575  const char* _formatString =
1576  "(%s) %s: Data Product %" PRIu32 " has data size %" PRIu64 ", too large for a record size field";
1577 #else
1578  const char* _formatString =
1579  "%s: Data Product %" PRIu32 " has data size %" PRIu64 ", too large for a record size field";
1580 #endif
1581 
1582  Fw::TextLogString _logString;
1583  (void) _logString.format(
1584  _formatString,
1585 #if FW_OBJECT_NAMES == 1
1586  this->m_objName.toChar(),
1587 #endif
1588  "ContainerTooLarge ",
1589  dp_id,
1590  data_size
1591  );
1592 
1593  this->logTextOut_out(
1594  0,
1595  _id,
1596  _logTime,
1598  _logString
1599  );
1600  }
1601 #endif
1602  }
1603 
1604  // ----------------------------------------------------------------------
1605  // Event throttle reset functions
1606  // ----------------------------------------------------------------------
1607 
1610  {
1611  // Reset throttle counter
1612  this->m_DidNotCompressThrottle = 0;
1613  }
1614 
1617  {
1618  // Reset throttle counter
1619  this->m_InvalidHeaderThrottle = 0;
1620  }
1621 
1624  {
1625  // Reset throttle counter
1626  this->m_BufferTooSmallForPacketThrottle = 0;
1627  }
1628 
1631  {
1632  // Reset throttle counter
1633  this->m_ContainerTooLargeThrottle = 0;
1634  }
1635 
1636  // ----------------------------------------------------------------------
1637  // Parameter hook functions
1638  // ----------------------------------------------------------------------
1639 
1642  {
1643  // Do nothing by default
1644  }
1645 
1648  {
1649  // Do nothing by default
1650  }
1651 
1652  // ----------------------------------------------------------------------
1653  // Parameter get functions
1654  // ----------------------------------------------------------------------
1655 
1658  {
1659  FwSizeStoreType _local{};
1660  this->m_paramLock.lock();
1661  valid = this->m_param_CHUNK_SIZE_valid;
1662  if ((valid == Fw::ParamValid::VALID) || (valid == Fw::ParamValid::DEFAULT)) {
1663  _local = this->m_CHUNK_SIZE;
1664  }
1665  this->m_paramLock.unlock();
1666  return _local;
1667  }
1668 
1671  {
1672  Fw::Enabled _local{};
1673  this->m_paramLock.lock();
1674  valid = this->m_param_ENABLE_valid;
1675  if ((valid == Fw::ParamValid::VALID) || (valid == Fw::ParamValid::DEFAULT)) {
1676  _local = this->m_ENABLE;
1677  }
1678  this->m_paramLock.unlock();
1679  return _local;
1680  }
1681 
1682  // ----------------------------------------------------------------------
1683  // Functions for managing data products
1684  // ----------------------------------------------------------------------
1685 
1688  DpContainer& container,
1689  Fw::Time timeTag
1690  )
1691  {
1692  // Update the time tag
1693  if (timeTag == Fw::ZERO_TIME) {
1694  // Get the time from the time port
1695  timeTag = this->getTime();
1696  }
1697  container.setTimeTag(timeTag);
1698  // Serialize the header into the packet
1699  container.serializeHeader();
1700  // Update the size of the buffer according to the data size
1701  const FwSizeType packetSize = container.getPacketSize();
1702  Fw::Buffer buffer = container.getBuffer();
1703  FW_ASSERT(packetSize <= buffer.getSize(), static_cast<FwAssertArgType>(packetSize),
1704  static_cast<FwAssertArgType>(buffer.getSize()));
1705  buffer.setSize(static_cast<U32>(packetSize));
1706  // Invalidate the buffer in the container, so it can't be reused
1707  container.invalidateBuffer();
1708  // Send the buffer
1709  this->dpSend_out(0, container.getId(), buffer);
1710  }
1711 
1712  // ----------------------------------------------------------------------
1713  // Time
1714  // ----------------------------------------------------------------------
1715 
1717  getTime() const
1718  {
1719  if (this->isConnected_timeCaller_OutputPort(0)) {
1720  Fw::Time _time;
1721  this->timeCaller_out(0, _time);
1722  return _time;
1723  }
1724  else {
1725  return Fw::Time(TimeBase::TB_NONE, 0, 0);
1726  }
1727  }
1728 
1729  // ----------------------------------------------------------------------
1730  // Calls for messages received on special input ports
1731  // ----------------------------------------------------------------------
1732 
1733  void DpCompressProcComponentBase ::
1734  m_p_cmdIn_in(
1735  Fw::PassiveComponentBase* callComp,
1736  FwIndexType portNum,
1737  FwOpcodeType opCode,
1738  U32 cmdSeq,
1739  Fw::CmdArgBuffer& args
1740  )
1741  {
1742  FW_ASSERT(callComp != nullptr);
1743  DpCompressProcComponentBase* compPtr = static_cast<DpCompressProcComponentBase*>(callComp);
1744  compPtr->cmdIn_handlerBase(
1745  portNum,
1746  opCode,
1747  cmdSeq,
1748  args
1749  );
1750  }
1751 
1752  // ----------------------------------------------------------------------
1753  // Calls for messages received on typed input ports
1754  // ----------------------------------------------------------------------
1755 
1756  void DpCompressProcComponentBase ::
1757  m_p_procRequest_in(
1758  Fw::PassiveComponentBase* callComp,
1759  FwIndexType portNum,
1760  Fw::Buffer& fwBuffer
1761  )
1762  {
1763  FW_ASSERT(callComp != nullptr);
1764  DpCompressProcComponentBase* compPtr = static_cast<DpCompressProcComponentBase*>(callComp);
1765  compPtr->procRequest_handlerBase(
1766  portNum,
1767  fwBuffer
1768  );
1769  }
1770 
1771 #if !FW_DIRECT_PORT_CALLS
1772 
1773  // ----------------------------------------------------------------------
1774  // Invocation functions for special output ports
1775  // ----------------------------------------------------------------------
1776 
1777  void DpCompressProcComponentBase ::
1778  cmdRegOut_out(
1779  FwIndexType portNum,
1780  FwOpcodeType opCode
1781  ) const
1782  {
1783  FW_ASSERT(
1784  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
1785  static_cast<FwAssertArgType>(portNum)
1786  );
1787 
1788  FW_ASSERT(
1789  this->m_cmdRegOut_OutputPort[portNum].isConnected(),
1790  static_cast<FwAssertArgType>(portNum)
1791  );
1792  this->m_cmdRegOut_OutputPort[portNum].invoke(
1793  opCode
1794  );
1795  }
1796 
1797  void DpCompressProcComponentBase ::
1798  cmdResponseOut_out(
1799  FwIndexType portNum,
1800  FwOpcodeType opCode,
1801  U32 cmdSeq,
1802  const Fw::CmdResponse& response
1803  ) const
1804  {
1805  FW_ASSERT(
1806  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
1807  static_cast<FwAssertArgType>(portNum)
1808  );
1809 
1810  FW_ASSERT(
1811  this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
1812  static_cast<FwAssertArgType>(portNum)
1813  );
1814  this->m_cmdResponseOut_OutputPort[portNum].invoke(
1815  opCode,
1816  cmdSeq,
1817  response
1818  );
1819  }
1820 
1821  Fw::Success DpCompressProcComponentBase ::
1822  dpGet_out(
1823  FwIndexType portNum,
1824  FwDpIdType id,
1825  FwSizeType dataSize,
1826  Fw::Buffer& buffer
1827  ) const
1828  {
1829  FW_ASSERT(
1830  (0 <= portNum) && (portNum < this->getNum_dpGet_OutputPorts()),
1831  static_cast<FwAssertArgType>(portNum)
1832  );
1833 
1834  FW_ASSERT(
1835  this->m_dpGet_OutputPort[portNum].isConnected(),
1836  static_cast<FwAssertArgType>(portNum)
1837  );
1838  return this->m_dpGet_OutputPort[portNum].invoke(
1839  id,
1840  dataSize,
1841  buffer
1842  );
1843  }
1844 
1845  void DpCompressProcComponentBase ::
1846  dpSend_out(
1847  FwIndexType portNum,
1848  FwDpIdType id,
1849  const Fw::Buffer& buffer
1850  ) const
1851  {
1852  FW_ASSERT(
1853  (0 <= portNum) && (portNum < this->getNum_dpSend_OutputPorts()),
1854  static_cast<FwAssertArgType>(portNum)
1855  );
1856 
1857  FW_ASSERT(
1858  this->m_dpSend_OutputPort[portNum].isConnected(),
1859  static_cast<FwAssertArgType>(portNum)
1860  );
1861  this->m_dpSend_OutputPort[portNum].invoke(
1862  id,
1863  buffer
1864  );
1865  }
1866 
1867  void DpCompressProcComponentBase ::
1868  logOut_out(
1869  FwIndexType portNum,
1870  FwEventIdType id,
1871  Fw::Time& timeTag,
1872  const Fw::LogSeverity& severity,
1873  Fw::LogBuffer& args
1874  ) const
1875  {
1876  FW_ASSERT(
1877  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
1878  static_cast<FwAssertArgType>(portNum)
1879  );
1880 
1881  FW_ASSERT(
1882  this->m_logOut_OutputPort[portNum].isConnected(),
1883  static_cast<FwAssertArgType>(portNum)
1884  );
1885  this->m_logOut_OutputPort[portNum].invoke(
1886  id,
1887  timeTag,
1888  severity,
1889  args
1890  );
1891  }
1892 
1893 #if FW_ENABLE_TEXT_LOGGING
1894 
1895  void DpCompressProcComponentBase ::
1896  logTextOut_out(
1897  FwIndexType portNum,
1898  FwEventIdType id,
1899  Fw::Time& timeTag,
1900  const Fw::LogSeverity& severity,
1901  Fw::TextLogString& text
1902  ) const
1903  {
1904  FW_ASSERT(
1905  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1906  static_cast<FwAssertArgType>(portNum)
1907  );
1908 
1909  FW_ASSERT(
1910  this->m_logTextOut_OutputPort[portNum].isConnected(),
1911  static_cast<FwAssertArgType>(portNum)
1912  );
1913  this->m_logTextOut_OutputPort[portNum].invoke(
1914  id,
1915  timeTag,
1916  severity,
1917  text
1918  );
1919  }
1920 
1921 #endif
1922 
1923  Fw::ParamValid DpCompressProcComponentBase ::
1924  prmGetOut_out(
1925  FwIndexType portNum,
1926  FwPrmIdType id,
1927  Fw::ParamBuffer& val
1928  ) const
1929  {
1930  FW_ASSERT(
1931  (0 <= portNum) && (portNum < this->getNum_prmGetOut_OutputPorts()),
1932  static_cast<FwAssertArgType>(portNum)
1933  );
1934 
1935  FW_ASSERT(
1936  this->m_prmGetOut_OutputPort[portNum].isConnected(),
1937  static_cast<FwAssertArgType>(portNum)
1938  );
1939  return this->m_prmGetOut_OutputPort[portNum].invoke(
1940  id,
1941  val
1942  );
1943  }
1944 
1945  void DpCompressProcComponentBase ::
1946  prmSetOut_out(
1947  FwIndexType portNum,
1948  FwPrmIdType id,
1949  Fw::ParamBuffer& val
1950  ) const
1951  {
1952  FW_ASSERT(
1953  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
1954  static_cast<FwAssertArgType>(portNum)
1955  );
1956 
1957  FW_ASSERT(
1958  this->m_prmSetOut_OutputPort[portNum].isConnected(),
1959  static_cast<FwAssertArgType>(portNum)
1960  );
1961  this->m_prmSetOut_OutputPort[portNum].invoke(
1962  id,
1963  val
1964  );
1965  }
1966 
1967  void DpCompressProcComponentBase ::
1968  timeCaller_out(
1969  FwIndexType portNum,
1970  Fw::Time& time
1971  ) const
1972  {
1973  FW_ASSERT(
1974  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
1975  static_cast<FwAssertArgType>(portNum)
1976  );
1977 
1978  FW_ASSERT(
1979  this->m_timeCaller_OutputPort[portNum].isConnected(),
1980  static_cast<FwAssertArgType>(portNum)
1981  );
1982  this->m_timeCaller_OutputPort[portNum].invoke(
1983  time
1984  );
1985  }
1986 
1987 #endif
1988 
1989  // ----------------------------------------------------------------------
1990  // Parameter set functions
1991  // ----------------------------------------------------------------------
1992 
1993  Fw::CmdResponse DpCompressProcComponentBase ::
1994  paramSet_CHUNK_SIZE(Fw::SerialBufferBase& val)
1995  {
1996  FwSizeStoreType _localVal{};
1997  const Fw::SerializeStatus _stat = val.deserializeTo(_localVal);
1998  if (_stat != Fw::FW_SERIALIZE_OK) {
2000  }
2001 
2002  // Assign value only if successfully deserialized
2003  this->m_paramLock.lock();
2004  this->m_CHUNK_SIZE = _localVal;
2005  this->m_param_CHUNK_SIZE_valid = Fw::ParamValid::VALID;
2006  this->m_paramLock.unlock();
2007 
2008  // Call notifier
2010  return Fw::CmdResponse::OK;
2011  }
2012 
2013  Fw::CmdResponse DpCompressProcComponentBase ::
2014  paramSet_ENABLE(Fw::SerialBufferBase& val)
2015  {
2016  Fw::Enabled _localVal{};
2017  const Fw::SerializeStatus _stat = val.deserializeTo(_localVal);
2018  if (_stat != Fw::FW_SERIALIZE_OK) {
2020  }
2021 
2022  // Assign value only if successfully deserialized
2023  this->m_paramLock.lock();
2024  this->m_ENABLE = _localVal;
2025  this->m_param_ENABLE_valid = Fw::ParamValid::VALID;
2026  this->m_paramLock.unlock();
2027 
2028  // Call notifier
2030  return Fw::CmdResponse::OK;
2031  }
2032 
2033  // ----------------------------------------------------------------------
2034  // Parameter save functions
2035  // ----------------------------------------------------------------------
2036 
2037  Fw::CmdResponse DpCompressProcComponentBase ::
2038  paramSave_CHUNK_SIZE()
2039  {
2040  if (!this->isConnected_prmSetOut_OutputPort(0)) {
2042  }
2043  Fw::ParamBuffer _paramBuffer;
2044  const FwIdType idBase = this->getIdBase();
2046  // Serialize the parameter
2047  this->m_paramLock.lock();
2048  if ((this->m_param_CHUNK_SIZE_valid == Fw::ParamValid::VALID) || (this->m_param_CHUNK_SIZE_valid == Fw::ParamValid::DEFAULT)) {
2049  _stat = _paramBuffer.serializeFrom(m_CHUNK_SIZE);
2050  }
2051  this->m_paramLock.unlock();
2052  if (_stat != Fw::FW_SERIALIZE_OK) {
2054  }
2055  // Save the parameter
2056  this->prmSetOut_out(
2057  0,
2058  static_cast<FwPrmIdType>(idBase + PARAMID_CHUNK_SIZE),
2059  _paramBuffer
2060  );
2061  // Return the command response
2062  return Fw::CmdResponse::OK;
2063  }
2064 
2065  Fw::CmdResponse DpCompressProcComponentBase ::
2066  paramSave_ENABLE()
2067  {
2068  if (!this->isConnected_prmSetOut_OutputPort(0)) {
2070  }
2071  Fw::ParamBuffer _paramBuffer;
2072  const FwIdType idBase = this->getIdBase();
2074  // Serialize the parameter
2075  this->m_paramLock.lock();
2076  if ((this->m_param_ENABLE_valid == Fw::ParamValid::VALID) || (this->m_param_ENABLE_valid == Fw::ParamValid::DEFAULT)) {
2077  _stat = _paramBuffer.serializeFrom(m_ENABLE);
2078  }
2079  this->m_paramLock.unlock();
2080  if (_stat != Fw::FW_SERIALIZE_OK) {
2082  }
2083  // Save the parameter
2084  this->prmSetOut_out(
2085  0,
2086  static_cast<FwPrmIdType>(idBase + PARAMID_ENABLE),
2087  _paramBuffer
2088  );
2089  // Return the command response
2090  return Fw::CmdResponse::OK;
2091  }
2092 
2093  // ----------------------------------------------------------------------
2094  // Private data product handling functions
2095  // ----------------------------------------------------------------------
2096 
2097  Fw::Success::T DpCompressProcComponentBase ::
2098  dpGet(
2099  ContainerId::T containerId,
2100  FwSizeType dataSize,
2101  FwDpPriorityType priority,
2102  DpContainer& container
2103  )
2104  {
2105  const FwDpIdType baseId = this->getIdBase();
2106  const FwDpIdType globalId = baseId + containerId;
2107  const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize);
2108  Fw::Buffer buffer;
2109  const Fw::Success::T status = this->dpGet_out(0, globalId, size, buffer);
2110  if (status == Fw::Success::SUCCESS) {
2111  // Assign a fresh DpContainer into container
2112  // This action clears out all the container state
2113  container = DpContainer(globalId, buffer, baseId);
2114  container.setPriority(priority);
2115  }
2116  return status;
2117  }
2118 
2119 }
Serialization/Deserialization operation was successful.
Error occurred when deserializing the container header.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:157
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_BufferTooSmallForPacket(FwSizeType buffer_size, FwSizeType min_size)
void setTimeTag(Fw::Time timeTag)
Set the time tag.
FwIdType FwOpcodeType
The type of a command opcode.
static constexpr FwIndexType getNum_dpSend_OutputPorts()
virtual void parametersLoaded()
Called whenever parameters are loaded.
static constexpr FwIndexType getNum_compressChunk_OutputPorts()
void set_compressChunk_OutputPort(FwIndexType portNum, Svc::InputCompressChunkPort *port)
Connect port to compressChunk[portNum].
static constexpr FwIndexType getNum_prmGetOut_OutputPorts()
void init()
Initialization function.
Representing success.
PlatformSizeType FwSizeType
U32 FwDpPriorityType
The type of a data product priority.
void log_WARNING_HI_InvalidHeader(FwSizeType buffer_size, U32 error_code)
I32 FwEnumStoreType
void addCallPort(InputDpSendPort *callPort)
Register an input port.
void setSize(FwSizeType size)
Definition: Buffer.cpp:131
Enabled state.
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum) const
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void init()
Initialization function.
Definition: CmdPortAc.cpp:89
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
FwIdType FwPrmIdType
The type of a parameter identifier.
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_procRequest_InputPorts()
No room left in the buffer to serialize data.
void dpSend(DpContainer &container, Fw::Time timeTag=Fw::ZERO_TIME)
Send a data product.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
const Time ZERO_TIME
Definition: Time.cpp:5
Number of bytes to use in a compression chunk.
Fw::SerializeStatus serializeRecord_CompressionRecord(const U8 *array, FwSizeType size)
PassiveComponentBase(const char *name)
Named constructor.
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum) const
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Enum representing a command response.
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
No time base has been established (Required)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
bool isConnected_compressChunk_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
Software diagnostic events.
void addCallPort(InputPrmGetPort *callPort)
Register an input port.
void init()
Object initializer.
Definition: ObjBase.cpp:24
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
Received buffer is too small to hold a data product packet.
SerializeStatus
forward declaration for string
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CmdPortAc.cpp:95
virtual SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG)=0
Deserialize an 8-bit unsigned integer value.
static constexpr FwIndexType getNum_dpGet_OutputPorts()
void addCallPort(InputCompressChunkPort *callPort)
Register an input port.
void unlock()
alias for unLock to meet BasicLockable requirements
Definition: Mutex.hpp:64
void log_ACTIVITY_LO_DidNotCompress(FwDpIdType dp_id, FwSizeType data_size)
Log event DidNotCompress.
U16 FwSizeStoreType
The type used to serialize a size value.
FwIdType FwEventIdType
The type of an event identifier.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
DpCompressProcComponentBase(const char *compName="")
Construct DpCompressProcComponentBase object.
bool isConnected_dpSend_OutputPort(FwIndexType portNum) const
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:40
Auto-generated base for DpCompressProc component.
void init()
Initialization function.
Definition: TimePortAc.cpp:151
Data was the wrong format (e.g. wrong packet type)
static constexpr FwIndexType getNum_logOut_OutputPorts()
Less important informational events.
Fw::ParamValid invoke(FwPrmIdType id, Fw::ParamBuffer &val) const
Omit length from serialization.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
Fw::InputBufferSendPort * get_procRequest_InputPort(FwIndexType portNum)
void init()
Initialization function.
Svc::CompressionAlgorithm compressChunk_out(FwIndexType portNum, Fw::Buffer &buffer, FwSizeType min_compression, FwSizeType write_offset) const
Invoke output port compressChunk.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void set_dpGet_OutputPort(FwIndexType portNum, Fw::InputDpGetPort *port)
Connect port to dpGet[portNum].
void procRequest_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port procRequest.
void invoke(Fw::Time &time) const
Invoke a port connection.
Definition: TimePortAc.cpp:170
static constexpr FwIndexType getNum_prmSetOut_OutputPorts()
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
void log_WARNING_HI_ContainerTooLarge_ThrottleClear()
Reset throttle value for ContainerTooLarge.
void invalidateBuffer()
Invalidate the packet buffer.
T
The raw enum type.
void log_WARNING_HI_BufferTooSmallForPacket_ThrottleClear()
Reset throttle value for BufferTooSmallForPacket.
void log_DIAGNOSTIC_CompressionComplete(FwDpIdType dp_id, FwSizeType initial_size, FwSizeType final_size) const
Log event CompressionComplete.
Chunk size to use when passing data to the compression backend.
A serious but recoverable event.
static constexpr FwSizeType getPacketSizeForDataSize(FwSizeType dataSize)
Get the packet size for a given data size.
const char * toChar() const
Convert to a C-style char*.
bool isConnected() const
Definition: PortBase.cpp:38
Enum representing event severity.
virtual ~DpCompressProcComponentBase()
Destroy DpCompressProcComponentBase object.
FwSizeType getPacketSize() const
Get the packet size corresponding to the data size.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
Fw::Buffer getBuffer() const
#define PRI_FwIndexType
Enabled and disabled states.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:58
void init()
Initialization function.
Definition: LogPortAc.cpp:180
Command successfully executed.
void log_ACTIVITY_LO_DidNotCompress_ThrottleClear()
Reset throttle value for DidNotCompress.
DpContainer()
Constructor with default initialization.
void setPortNum(FwIndexType portNum)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void init()
Initialization function.
FwSizeType getSize() const
Definition: Buffer.cpp:90
Svc::CompressionAlgorithm invoke(Fw::Buffer &buffer, FwSizeType min_compression, FwSizeType write_offset) const
Command had execution error.
FwIdType FwDpIdType
The type of a data product identifier.
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Definition: LogPortAc.cpp:199
FwSizeStoreType paramGet_CHUNK_SIZE(Fw::ParamValid &valid)
Fw::Success invoke(FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer) const
PlatformIndexType FwIndexType
void serializeHeader()
Definition: DpContainer.cpp:89
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void addCallPort(InputDpGetPort *callPort)
Register an input port.
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:186
void init()
Initialization function.
Command failed validation.
RateGroupDivider component implementation.
bool isConnected_dpGet_OutputPort(FwIndexType portNum) const
Enum representing parameter validity.
void set_dpSend_OutputPort(FwIndexType portNum, Fw::InputDpSendPort *port)
Connect port to dpSend[portNum].
void invoke(FwPrmIdType id, Fw::ParamBuffer &val) const
Invoke a port connection.
Input CompressChunk port.
virtual void procRequest_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port procRequest.
FwDpIdType getId() const
Implementation of malloc based allocator.
void log_WARNING_HI_ContainerTooLarge(FwDpIdType dp_id, FwSizeType data_size)
void loadParameters()
Load the parameters from a parameter source.
void regCommands()
Register commands with the Command Dispatcher.
Received container is too large for its size to be stored in a record size field. ...
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void init()
Initialization function.
void log_WARNING_HI_InvalidHeader_ThrottleClear()
Reset throttle value for InvalidHeader.
Fw::Enabled paramGet_ENABLE(Fw::ParamValid &valid)
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void init()
Initialization function.
void invoke(FwDpIdType id, const Fw::Buffer &buffer) const
Invoke a port connection.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void init()
Initialization function.
Success/Failure.
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void lock()
lock the mutex and assert success
Definition: Mutex.cpp:34
U32 FwIdType
The id type.