F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ComLoggerDpComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ComLoggerDpComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for ComLoggerDp component base class
5 // ======================================================================
6 
7 #ifndef Svc_ComLoggerDpComponentAc_HPP
8 #define Svc_ComLoggerDpComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
15 #include "Fw/Cmd/CmdString.hpp"
16 #include "Fw/Com/ComPortAc.hpp"
18 #include "Fw/Dp/DpContainer.hpp"
19 #include "Fw/Dp/DpGetPortAc.hpp"
20 #include "Fw/Dp/DpSendPortAc.hpp"
21 #include "Fw/FPrimeBasicTypes.hpp"
22 #include "Fw/Log/LogPortAc.hpp"
23 #include "Fw/Log/LogString.hpp"
24 #include "Fw/Log/LogTextPortAc.hpp"
25 #if !FW_DIRECT_PORT_CALLS
27 #endif
28 #if !FW_DIRECT_PORT_CALLS
30 #endif
31 #include "Fw/Time/TimePortAc.hpp"
32 #include "Fw/Tlm/TlmPortAc.hpp"
33 #include "Fw/Tlm/TlmString.hpp"
38 #include "Svc/Ping/PingPortAc.hpp"
42 
43 namespace Svc {
44 
51  {
52 
53  // ----------------------------------------------------------------------
54  // Friend classes
55  // ----------------------------------------------------------------------
56 
58  friend class ComLoggerDpTesterBase;
60  friend class ComLoggerDpTester;
61 
62  protected:
63 
64  // ----------------------------------------------------------------------
65  // Constants
66  // ----------------------------------------------------------------------
67 
69  enum {
71  };
72 
74  enum {
80  };
81 
83  enum {
92  };
93 
95  enum {
97  };
98 
100  enum {
105  };
106 
108  enum {
115  };
116 
118  enum {
120  };
121 
123  enum {
128  };
129 
132  return sizeof(FwDpIdType) + sizeof(FwSizeStoreType) + arraySize * sizeof(U8);
133  }
134 
135  protected:
136 
137  // ----------------------------------------------------------------------
138  // Types for data products
139  // ----------------------------------------------------------------------
140 
142  struct ContainerId {
143  enum T : FwDpIdType {
145  };
146  };
147 
152  };
153  };
154 
156  struct RecordId {
157  enum T : FwDpIdType {
159  };
160  };
161 
163  class DpContainer :
164  public Fw::DpContainer
165  {
166 
167  public:
168 
170  DpContainer(
171  FwDpIdType id,
172  const Fw::Buffer& buffer,
173  FwDpIdType baseId
174  );
175 
177  DpContainer();
178 
179  public:
180 
184  const U8* array,
185  FwSizeType size
186  );
187 
188  FwDpIdType getBaseId() const { return this->m_baseId; }
189 
190  void setBaseId(FwDpIdType baseId) { this->m_baseId = baseId; }
191 
192  private:
193 
195  FwDpIdType m_baseId;
196 
197  };
198 
199  public:
200 
201  // ----------------------------------------------------------------------
202  // Component initialization
203  // ----------------------------------------------------------------------
204 
206  void init(
207  FwSizeType queueDepth,
208  FwEnumStoreType instance = 0
209  );
210 
211 #if !FW_DIRECT_PORT_CALLS
212 
213  public:
214 
215  // ----------------------------------------------------------------------
216  // Getters for special input ports
217  // ----------------------------------------------------------------------
218 
223  FwIndexType portNum
224  );
225 
226 #endif
227 
228 #if !FW_DIRECT_PORT_CALLS
229 
230  public:
231 
232  // ----------------------------------------------------------------------
233  // Getters for typed input ports
234  // ----------------------------------------------------------------------
235 
240  FwIndexType portNum
241  );
242 
247  FwIndexType portNum
248  );
249 
254  FwIndexType portNum
255  );
256 
261  FwIndexType portNum
262  );
263 
268  FwIndexType portNum
269  );
270 
271 #endif
272 
273 #if !FW_DIRECT_PORT_CALLS
274 
275  public:
276 
277  // ----------------------------------------------------------------------
278  // Connect input ports to special output ports
279  // ----------------------------------------------------------------------
280 
281 #if FW_ENABLE_TEXT_LOGGING == 1
282 
284  void set_LogText_OutputPort(
285  FwIndexType portNum,
286  Fw::InputLogTextPort* port
287  );
288 
289 #endif
290 
293  FwIndexType portNum,
294  Fw::InputCmdRegPort* port
295  );
296 
299  FwIndexType portNum,
301  );
302 
305  FwIndexType portNum,
306  Fw::InputLogPort* port
307  );
308 
311  FwIndexType portNum,
312  Fw::InputDpGetPort* port
313  );
314 
317  FwIndexType portNum,
318  Fw::InputDpSendPort* port
319  );
320 
323  FwIndexType portNum,
324  Fw::InputTimePort* port
325  );
326 
329  FwIndexType portNum,
330  Fw::InputTlmPort* port
331  );
332 
333 #endif
334 
335 #if !FW_DIRECT_PORT_CALLS
336 
337  public:
338 
339  // ----------------------------------------------------------------------
340  // Connect typed input ports to typed output ports
341  // ----------------------------------------------------------------------
342 
345  FwIndexType portNum,
346  Svc::InputPingPort* port
347  );
348 
349 #endif
350 
351 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
352 
353  public:
354 
355  // ----------------------------------------------------------------------
356  // Connect serial input ports to special output ports
357  // ----------------------------------------------------------------------
358 
359 #if FW_ENABLE_TEXT_LOGGING == 1
360 
362  void set_LogText_OutputPort(
363  FwIndexType portNum,
364  Fw::InputSerializePort* port
365  );
366 
367 #endif
368 
371  FwIndexType portNum,
372  Fw::InputSerializePort* port
373  );
374 
377  FwIndexType portNum,
378  Fw::InputSerializePort* port
379  );
380 
383  FwIndexType portNum,
384  Fw::InputSerializePort* port
385  );
386 
389  FwIndexType portNum,
390  Fw::InputSerializePort* port
391  );
392 
395  FwIndexType portNum,
396  Fw::InputSerializePort* port
397  );
398 
401  FwIndexType portNum,
402  Fw::InputSerializePort* port
403  );
404 
405 #endif
406 
407 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
408 
409  public:
410 
411  // ----------------------------------------------------------------------
412  // Connect serial input ports to typed output ports
413  // ----------------------------------------------------------------------
414 
417  FwIndexType portNum,
418  Fw::InputSerializePort* port
419  );
420 
421 #endif
422 
423  public:
424 
425  // ----------------------------------------------------------------------
426  // Command registration
427  // ----------------------------------------------------------------------
428 
432  void regCommands();
433 
434  protected:
435 
436  // ----------------------------------------------------------------------
437  // Component construction and destruction
438  // ----------------------------------------------------------------------
439 
442  const char* compName = ""
443  );
444 
446  virtual ~ComLoggerDpComponentBase();
447 
448  protected:
449 
450  // ----------------------------------------------------------------------
451  // Getters for numbers of special input ports
452  // ----------------------------------------------------------------------
453 
458  return NUM_CMDIN_INPUT_PORTS;
459  }
460 
461  protected:
462 
463  // ----------------------------------------------------------------------
464  // Getters for numbers of typed input ports
465  // ----------------------------------------------------------------------
466 
471  return NUM_COMIN_INPUT_PORTS;
472  }
473 
478  return NUM_PINGIN_INPUT_PORTS;
479  }
480 
486  }
487 
493  }
494 
500  }
501 
502  protected:
503 
504  // ----------------------------------------------------------------------
505  // Getters for numbers of special output ports
506  // ----------------------------------------------------------------------
507 
508 #if FW_ENABLE_TEXT_LOGGING == 1
509 
513  static constexpr FwIndexType getNum_LogText_OutputPorts() {
515  }
516 
517 #endif
518 
524  }
525 
531  }
532 
538  }
539 
545  }
546 
552  }
553 
559  }
560 
566  }
567 
568  protected:
569 
570  // ----------------------------------------------------------------------
571  // Getters for numbers of typed output ports
572  // ----------------------------------------------------------------------
573 
579  }
580 
581  protected:
582 
583  // ----------------------------------------------------------------------
584  // Connection status queries for special output ports
585  // ----------------------------------------------------------------------
586 
587 #if FW_ENABLE_TEXT_LOGGING == 1
588 
592  bool isConnected_LogText_OutputPort(
593  FwIndexType portNum
594  ) const;
595 
596 #endif
597 
602  FwIndexType portNum
603  ) const;
604 
609  FwIndexType portNum
610  ) const;
611 
616  FwIndexType portNum
617  ) const;
618 
623  FwIndexType portNum
624  ) const;
625 
630  FwIndexType portNum
631  ) const;
632 
637  FwIndexType portNum
638  ) const;
639 
644  FwIndexType portNum
645  ) const;
646 
647  protected:
648 
649  // ----------------------------------------------------------------------
650  // Connection status queries for typed output ports
651  // ----------------------------------------------------------------------
652 
657  FwIndexType portNum
658  ) const;
659 
660 #if FW_DIRECT_PORT_CALLS
661  public:
662 #else
663  protected:
664 #endif
665 
666  // ----------------------------------------------------------------------
667  // Port handler base-class functions for special input ports
668  //
669  // Call these functions directly to bypass the corresponding ports
670  // ----------------------------------------------------------------------
671 
673  void cmdIn_handlerBase(
674  FwIndexType portNum,
675  FwOpcodeType opCode,
676  U32 cmdSeq,
677  Fw::CmdArgBuffer& args
678  );
679 
680  protected:
681 
682  // ----------------------------------------------------------------------
683  // Handlers to implement for typed input ports
684  // ----------------------------------------------------------------------
685 
687  virtual void comIn_handler(
688  FwIndexType portNum,
689  Fw::ComBuffer& data,
690  U32 context
691  ) = 0;
692 
694  virtual void pingIn_handler(
695  FwIndexType portNum,
696  U32 key
697  ) = 0;
698 
700  virtual void schedIn_handler(
701  FwIndexType portNum,
702  U32 context
703  ) = 0;
704 
706  virtual void startRecordingIn_handler(
707  FwIndexType portNum,
708  FwSizeType packetsPerContainer,
709  FwDpPriorityType priority
710  ) = 0;
711 
713  virtual void stopRecordingIn_handler(
714  FwIndexType portNum
715  ) = 0;
716 
717 #if FW_DIRECT_PORT_CALLS
718  public:
719 #else
720  protected:
721 #endif
722 
723  // ----------------------------------------------------------------------
724  // Port handler base-class functions for typed input ports
725  //
726  // Call these functions directly to bypass the corresponding ports
727  // ----------------------------------------------------------------------
728 
730  void comIn_handlerBase(
731  FwIndexType portNum,
732  Fw::ComBuffer& data,
733  U32 context
734  );
735 
737  void pingIn_handlerBase(
738  FwIndexType portNum,
739  U32 key
740  );
741 
743  void schedIn_handlerBase(
744  FwIndexType portNum,
745  U32 context
746  );
747 
750  FwIndexType portNum,
751  FwSizeType packetsPerContainer,
752  FwDpPriorityType priority
753  );
754 
757  FwIndexType portNum
758  );
759 
760  protected:
761 
762  // ----------------------------------------------------------------------
763  // Pre-message hooks for typed async input ports
764  //
765  // Each of these functions is invoked just before processing a message
766  // on the corresponding port. By default, they do nothing. You can
767  // override them to provide specific pre-message behavior.
768  // ----------------------------------------------------------------------
769 
771  virtual void comIn_preMsgHook(
772  FwIndexType portNum,
773  Fw::ComBuffer& data,
774  U32 context
775  );
776 
778  virtual void pingIn_preMsgHook(
779  FwIndexType portNum,
780  U32 key
781  );
782 
784  virtual void startRecordingIn_preMsgHook(
785  FwIndexType portNum,
786  FwSizeType packetsPerContainer,
787  FwDpPriorityType priority
788  );
789 
791  virtual void stopRecordingIn_preMsgHook(
792  FwIndexType portNum
793  );
794 
795  protected:
796 
797  // ----------------------------------------------------------------------
798  // Invocation functions for typed output ports
799  // ----------------------------------------------------------------------
800 
802  void pingOut_out(
803  FwIndexType portNum,
804  U32 key
805  ) const;
806 
807  protected:
808 
809  // ----------------------------------------------------------------------
810  // Hooks for internal ports
811  //
812  // Each of these functions is invoked just before dropping a message
813  // on the corresponding internal port. You should override them to provide
814  // specific drop behavior.
815  // ----------------------------------------------------------------------
816 
818  virtual void schedInInternal_overflowHook() = 0;
819 
820  protected:
821 
822  // ----------------------------------------------------------------------
823  // Internal interface handlers
824  // ----------------------------------------------------------------------
825 
827  virtual void schedInInternal_internalInterfaceHandler() = 0;
828 
829  protected:
830 
831  // ----------------------------------------------------------------------
832  // Internal interface base-class functions
833  // ----------------------------------------------------------------------
834 
837 
838  protected:
839 
840  // ----------------------------------------------------------------------
841  // Command response
842  // ----------------------------------------------------------------------
843 
845  void cmdResponse_out(
846  FwOpcodeType opCode,
847  U32 cmdSeq,
848  Fw::CmdResponse response
849  );
850 
851  protected:
852 
853  // ----------------------------------------------------------------------
854  // Command handlers to implement
855  // ----------------------------------------------------------------------
856 
860  virtual void StartComDp_cmdHandler(
861  FwOpcodeType opCode,
862  U32 cmdSeq,
863  FwSizeType packetsPerContainer,
864  FwDpPriorityType priority
865  ) = 0;
866 
870  virtual void UpdatePriority_cmdHandler(
871  FwOpcodeType opCode,
872  U32 cmdSeq,
873  FwDpPriorityType priority
874  ) = 0;
875 
879  virtual void StopComDp_cmdHandler(
880  FwOpcodeType opCode,
881  U32 cmdSeq
882  ) = 0;
883 
887  virtual void CLEAR_COUNTERS_cmdHandler(
888  FwOpcodeType opCode,
889  U32 cmdSeq
890  ) = 0;
891 
892  protected:
893 
894  // ----------------------------------------------------------------------
895  // Command handler base-class functions
896  //
897  // Call these functions directly to bypass the command input port
898  // ----------------------------------------------------------------------
899 
904  FwOpcodeType opCode,
905  U32 cmdSeq,
906  Fw::CmdArgBuffer& args
907  );
908 
913  FwOpcodeType opCode,
914  U32 cmdSeq,
915  Fw::CmdArgBuffer& args
916  );
917 
922  FwOpcodeType opCode,
923  U32 cmdSeq,
924  Fw::CmdArgBuffer& args
925  );
926 
931  FwOpcodeType opCode,
932  U32 cmdSeq,
933  Fw::CmdArgBuffer& args
934  );
935 
936  protected:
937 
938  // ----------------------------------------------------------------------
939  // Pre-message hooks for async commands
940  //
941  // Each of these functions is invoked just before processing the
942  // corresponding command. By default they do nothing. You can
943  // override them to provide specific pre-command behavior.
944  // ----------------------------------------------------------------------
945 
947  virtual void StartComDp_preMsgHook(
948  FwOpcodeType opCode,
949  U32 cmdSeq
950  );
951 
953  virtual void UpdatePriority_preMsgHook(
954  FwOpcodeType opCode,
955  U32 cmdSeq
956  );
957 
959  virtual void StopComDp_preMsgHook(
960  FwOpcodeType opCode,
961  U32 cmdSeq
962  );
963 
965  virtual void CLEAR_COUNTERS_preMsgHook(
966  FwOpcodeType opCode,
967  U32 cmdSeq
968  );
969 
970  protected:
971 
972  // ----------------------------------------------------------------------
973  // Event logging functions
974  // ----------------------------------------------------------------------
975 
978  U32 size
979  );
980 
984  void log_ACTIVITY_HI_ComDpStarted(FwSizeType packetsPerContainer) const;
985 
989  void log_ACTIVITY_HI_ComDpStopped(const Svc::ComLoggerDp_PartialContainerStatus& partialContainer) const;
990 
995 
999  void log_ACTIVITY_LO_CountersCleared() const;
1000 
1005  FwSizeType packetsPerContainer
1006  ) const;
1007 
1008  protected:
1009 
1010  // ----------------------------------------------------------------------
1011  // Event throttle reset functions
1012  // ----------------------------------------------------------------------
1013 
1016 
1017  protected:
1018 
1019  // ----------------------------------------------------------------------
1020  // Telemetry serialized write
1021  // ----------------------------------------------------------------------
1022 
1027  void tlmWrite(
1028  FwChanIdType id,
1029  Fw::TlmBuffer& _tlmBuff,
1030  Fw::Time _tlmTime = Fw::Time()
1031  ) const;
1032 
1033  protected:
1034 
1035  // ----------------------------------------------------------------------
1036  // Telemetry write functions
1037  // ----------------------------------------------------------------------
1038 
1043  bool arg,
1044  Fw::Time _tlmTime = Fw::Time()
1045  ) const;
1046 
1051  U32 arg,
1052  Fw::Time _tlmTime = Fw::Time()
1053  ) const;
1054 
1059  U32 arg,
1060  Fw::Time _tlmTime = Fw::Time()
1061  ) const;
1062 
1067  U32 arg,
1068  Fw::Time _tlmTime = Fw::Time()
1069  ) const;
1070 
1071  protected:
1072 
1073  // ----------------------------------------------------------------------
1074  // Functions for managing data products
1075  // ----------------------------------------------------------------------
1076 
1080  FwSizeType dataSize,
1081  DpContainer& container
1082  ) {
1083  return this->dpGet(
1085  dataSize,
1087  container
1088  );
1089  }
1090 
1092  void dpSend(
1093  DpContainer& container,
1094  Fw::Time timeTag = Fw::ZERO_TIME
1095  );
1096 
1097  protected:
1098 
1099  // ----------------------------------------------------------------------
1100  // Time
1101  // ----------------------------------------------------------------------
1102 
1106  Fw::Time getTime() const;
1107 
1108  private:
1109 
1110  // ----------------------------------------------------------------------
1111  // Message dispatch functions
1112  // ----------------------------------------------------------------------
1113 
1115  virtual MsgDispatchStatus doDispatch();
1116 
1117  private:
1118 
1119  // ----------------------------------------------------------------------
1120  // Calls for messages received on special input ports
1121  // ----------------------------------------------------------------------
1122 
1124  static void m_p_cmdIn_in(
1125  Fw::PassiveComponentBase* callComp,
1126  FwIndexType portNum,
1127  FwOpcodeType opCode,
1128  U32 cmdSeq,
1129  Fw::CmdArgBuffer& args
1130  );
1131 
1132  private:
1133 
1134  // ----------------------------------------------------------------------
1135  // Calls for messages received on typed input ports
1136  // ----------------------------------------------------------------------
1137 
1139  static void m_p_comIn_in(
1140  Fw::PassiveComponentBase* callComp,
1141  FwIndexType portNum,
1142  Fw::ComBuffer& data,
1143  U32 context
1144  );
1145 
1147  static void m_p_pingIn_in(
1148  Fw::PassiveComponentBase* callComp,
1149  FwIndexType portNum,
1150  U32 key
1151  );
1152 
1154  static void m_p_schedIn_in(
1155  Fw::PassiveComponentBase* callComp,
1156  FwIndexType portNum,
1157  U32 context
1158  );
1159 
1161  static void m_p_startRecordingIn_in(
1162  Fw::PassiveComponentBase* callComp,
1163  FwIndexType portNum,
1164  FwSizeType packetsPerContainer,
1165  FwDpPriorityType priority
1166  );
1167 
1169  static void m_p_stopRecordingIn_in(
1170  Fw::PassiveComponentBase* callComp,
1171  FwIndexType portNum
1172  );
1173 
1174  private:
1175 
1176  // ----------------------------------------------------------------------
1177  // Invocation functions for special output ports
1178  // ----------------------------------------------------------------------
1179 
1180 #if FW_ENABLE_TEXT_LOGGING
1181 
1183  void LogText_out(
1184  FwIndexType portNum,
1185  FwEventIdType id,
1186  Fw::Time& timeTag,
1187  const Fw::LogSeverity& severity,
1188  Fw::TextLogString& text
1189  ) const;
1190 
1191 #endif
1192 
1194  void cmdRegOut_out(
1195  FwIndexType portNum,
1196  FwOpcodeType opCode
1197  ) const;
1198 
1200  void cmdResponseOut_out(
1201  FwIndexType portNum,
1202  FwOpcodeType opCode,
1203  U32 cmdSeq,
1204  const Fw::CmdResponse& response
1205  ) const;
1206 
1208  void logOut_out(
1209  FwIndexType portNum,
1210  FwEventIdType id,
1211  Fw::Time& timeTag,
1212  const Fw::LogSeverity& severity,
1213  Fw::LogBuffer& args
1214  ) const;
1215 
1217  Fw::Success productGetOut_out(
1218  FwIndexType portNum,
1219  FwDpIdType id,
1220  FwSizeType dataSize,
1221  Fw::Buffer& buffer
1222  ) const;
1223 
1225  void productSendOut_out(
1226  FwIndexType portNum,
1227  FwDpIdType id,
1228  const Fw::Buffer& buffer
1229  ) const;
1230 
1232  void timeCaller_out(
1233  FwIndexType portNum,
1234  Fw::Time& time
1235  ) const;
1236 
1238  void tlmOut_out(
1239  FwIndexType portNum,
1240  FwChanIdType id,
1241  Fw::Time& timeTag,
1242  Fw::TlmBuffer& val
1243  ) const;
1244 
1245  private:
1246 
1247  // ----------------------------------------------------------------------
1248  // Private data product handling functions
1249  // ----------------------------------------------------------------------
1250 
1253  Fw::Success::T dpGet(
1254  ContainerId::T containerId,
1255  FwSizeType dataSize,
1256  FwDpPriorityType priority,
1257  DpContainer& container
1258  );
1259 
1260 #if !FW_DIRECT_PORT_CALLS
1261 
1262  private:
1263 
1264  // ----------------------------------------------------------------------
1265  // Special input ports
1266  // ----------------------------------------------------------------------
1267 
1269  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1270 
1271 #endif
1272 
1273 #if !FW_DIRECT_PORT_CALLS
1274 
1275  private:
1276 
1277  // ----------------------------------------------------------------------
1278  // Typed input ports
1279  // ----------------------------------------------------------------------
1280 
1282  Fw::InputComPort m_comIn_InputPort[NUM_COMIN_INPUT_PORTS];
1283 
1285  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1286 
1288  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1289 
1291  Svc::InputComLoggerStartPort m_startRecordingIn_InputPort[NUM_STARTRECORDINGIN_INPUT_PORTS];
1292 
1294  Svc::InputComLoggerStopPort m_stopRecordingIn_InputPort[NUM_STOPRECORDINGIN_INPUT_PORTS];
1295 
1296 #endif
1297 
1298 #if !FW_DIRECT_PORT_CALLS
1299 
1300  private:
1301 
1302  // ----------------------------------------------------------------------
1303  // Special output ports
1304  // ----------------------------------------------------------------------
1305 
1306 #if FW_ENABLE_TEXT_LOGGING == 1
1307 
1309  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1310 
1311 #endif
1312 
1314  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1315 
1317  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1318 
1320  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1321 
1323  Fw::OutputDpGetPort m_productGetOut_OutputPort[NUM_PRODUCTGETOUT_OUTPUT_PORTS];
1324 
1326  Fw::OutputDpSendPort m_productSendOut_OutputPort[NUM_PRODUCTSENDOUT_OUTPUT_PORTS];
1327 
1329  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1330 
1332  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1333 
1334 #endif
1335 
1336 #if !FW_DIRECT_PORT_CALLS
1337 
1338  private:
1339 
1340  // ----------------------------------------------------------------------
1341  // Typed output ports
1342  // ----------------------------------------------------------------------
1343 
1345  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1346 
1347 #endif
1348 
1349  private:
1350 
1351  // ----------------------------------------------------------------------
1352  // Counter values for event throttling
1353  // ----------------------------------------------------------------------
1354 
1356  std::atomic<FwIndexType> m_DpBufferErrorThrottle;
1357 
1358  };
1359 
1360 }
1361 
1362 #endif
Fw::InputComPort * get_comIn_InputPort(FwIndexType portNum)
A data product Container.
Definition: DpContainer.hpp:26
static constexpr FwIndexType getNum_logOut_OutputPorts()
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
static constexpr FwIndexType getNum_productGetOut_OutputPorts()
friend class ComLoggerDpTester
Friend class tester implementation to support white-box testing.
static constexpr FwSizeType SIZE_OF_ComBufferRecord_RECORD(FwSizeType arraySize)
Record sizes.
FwIdType FwOpcodeType
The type of a command opcode.
Starts recording ComBuffers at the specified priority.
virtual ~ComLoggerDpComponentBase()
Destroy ComLoggerDpComponentBase object.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
PlatformSizeType FwSizeType
Fw::Success::T dpGet_ComBuffContainer(FwSizeType dataSize, DpContainer &container)
Svc::InputComLoggerStartPort * get_startRecordingIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
U32 FwDpPriorityType
The type of a data product priority.
void dpSend(DpContainer &container, Fw::Time timeTag=Fw::ZERO_TIME)
Send a data product.
I32 FwEnumStoreType
void set_productSendOut_OutputPort(FwIndexType portNum, Fw::InputDpSendPort *port)
Connect port to productSendOut[portNum].
virtual void schedInInternal_overflowHook()=0
Overflow hook for async input port schedInInternal.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwIndexType getNum_schedIn_InputPorts()
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
virtual void StartComDp_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, FwSizeType packetsPerContainer, FwDpPriorityType priority)=0
void StartComDp_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_NumBuffersDropped(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void startRecordingIn_handlerBase(FwIndexType portNum, FwSizeType packetsPerContainer, FwDpPriorityType priority)
Handler base-class function for input port startRecordingIn.
const Time ZERO_TIME
Definition: Time.cpp:5
static constexpr FwIndexType getNum_productSendOut_OutputPorts()
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
Enum representing a command response.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void set_productGetOut_OutputPort(FwIndexType portNum, Fw::InputDpGetPort *port)
Connect port to productGetOut[portNum].
void StopComDp_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_comIn_InputPorts()
void init()
Object initializer.
Definition: ObjBase.cpp:24
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
void log_WARNING_HI_DpBufferError(U32 size)
Log event DpBufferError.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
virtual void StopComDp_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command StopComDp.
FwIdType FwEventIdType
The type of an event identifier.
Auto-generated base for ComLoggerDp component.
Svc::InputComLoggerStopPort * get_stopRecordingIn_InputPort(FwIndexType portNum)
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
virtual void UpdatePriority_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, FwDpPriorityType priority)=0
virtual void comIn_preMsgHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Pre-message hook for async input port comIn.
static constexpr FwIndexType getNum_pingIn_InputPorts()
void log_ACTIVITY_LO_PriorityUpdated(FwDpPriorityType priority) const
friend class ComLoggerDpTesterBase
Friend class tester to support autocoded test harness.
T
The raw enum type.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
virtual void comIn_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port comIn.
Fw::SerializeStatus serializeRecord_ComBufferRecord(const U8 *array, FwSizeType size)
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
FwSizeType FwSizeStoreType
void schedInInternal_internalInterfaceInvoke()
Internal interface base-class function for schedInInternal.
static constexpr FwIndexType getNum_stopRecordingIn_InputPorts()
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
Enum representing event severity.
virtual void UpdatePriority_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command UpdatePriority.
virtual void StartComDp_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command StartComDp.
void stopRecordingIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port stopRecordingIn.
virtual void schedInInternal_internalInterfaceHandler()=0
Internal interface handler for schedInInternal.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
virtual void StopComDp_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
Updates the priority of the active container (if any) and of all future containers.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
FwIdType FwDpIdType
The type of a data product identifier.
void comIn_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port comIn.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
Clears NumBuffersLogged and NumBuffersDropped counters and DpBufferError event throttle.
void log_WARNING_LO_StartRecordingFailed(FwSizeType packetsPerContainer) const
virtual void startRecordingIn_handler(FwIndexType portNum, FwSizeType packetsPerContainer, FwDpPriorityType priority)=0
Handler for input port startRecordingIn.
PlatformIndexType FwIndexType
virtual void CLEAR_COUNTERS_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_COUNTERS.
Failed to start recording due to invalid configuration.
virtual void stopRecordingIn_handler(FwIndexType portNum)=0
Handler for input port stopRecordingIn.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
virtual void stopRecordingIn_preMsgHook(FwIndexType portNum)
Pre-message hook for async input port stopRecordingIn.
RateGroupDivider component implementation.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
bool isConnected_productGetOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
Whether a partial container was sent when recording stopped.
void tlmWrite_NumQueueDrops(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void UpdatePriority_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_ComDpStarted(FwSizeType packetsPerContainer) const
static constexpr FwIndexType getNum_startRecordingIn_InputPorts()
ComLoggerDpComponentBase(const char *compName="")
Construct ComLoggerDpComponentBase object.
void log_ACTIVITY_HI_ComDpStopped(const Svc::ComLoggerDp_PartialContainerStatus &partialContainer) const
void log_WARNING_HI_DpBufferError_ThrottleClear()
Reset throttle value for DpBufferError.
void tlmWrite_NumBuffersLogged(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
DpContainer()
Constructor with default initialization.
virtual void CLEAR_COUNTERS_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
bool isConnected_productSendOut_OutputPort(FwIndexType portNum) const
virtual void startRecordingIn_preMsgHook(FwIndexType portNum, FwSizeType packetsPerContainer, FwDpPriorityType priority)
Pre-message hook for async input port startRecordingIn.
void tlmWrite_LoggingEnabled(bool arg, Fw::Time _tlmTime=Fw::Time()) const
Success/Failure.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void regCommands()
Register commands with the Command Dispatcher.
void CLEAR_COUNTERS_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_cmdIn_InputPorts()
static constexpr FwIndexType getNum_timeCaller_OutputPorts()