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"
37 #include "Svc/Ping/PingPortAc.hpp"
41 
42 namespace Svc {
43 
50  {
51 
52  // ----------------------------------------------------------------------
53  // Friend classes
54  // ----------------------------------------------------------------------
55 
57  friend class ComLoggerDpTesterBase;
59  friend class ComLoggerDpTester;
60 
61  protected:
62 
63  // ----------------------------------------------------------------------
64  // Constants
65  // ----------------------------------------------------------------------
66 
68  enum {
70  };
71 
73  enum {
79  };
80 
82  enum {
91  };
92 
94  enum {
96  };
97 
99  enum {
104  };
105 
107  enum {
114  };
115 
117  enum {
119  };
120 
122  enum {
127  };
128 
131  return sizeof(FwDpIdType) + sizeof(FwSizeStoreType) + arraySize * sizeof(U8);
132  }
133 
134  protected:
135 
136  // ----------------------------------------------------------------------
137  // Types for data products
138  // ----------------------------------------------------------------------
139 
141  struct ContainerId {
142  enum T : FwDpIdType {
144  };
145  };
146 
151  };
152  };
153 
155  struct RecordId {
156  enum T : FwDpIdType {
158  };
159  };
160 
162  class DpContainer :
163  public Fw::DpContainer
164  {
165 
166  public:
167 
169  DpContainer(
170  FwDpIdType id,
171  const Fw::Buffer& buffer,
172  FwDpIdType baseId
173  );
174 
176  DpContainer();
177 
178  public:
179 
183  const U8* array,
184  FwSizeType size
185  );
186 
187  FwDpIdType getBaseId() const { return this->m_baseId; }
188 
189  void setBaseId(FwDpIdType baseId) { this->m_baseId = baseId; }
190 
191  private:
192 
194  FwDpIdType m_baseId;
195 
196  };
197 
198  public:
199 
200  // ----------------------------------------------------------------------
201  // Component initialization
202  // ----------------------------------------------------------------------
203 
205  void init(
206  FwSizeType queueDepth,
207  FwEnumStoreType instance = 0
208  );
209 
210 #if !FW_DIRECT_PORT_CALLS
211 
212  public:
213 
214  // ----------------------------------------------------------------------
215  // Getters for special input ports
216  // ----------------------------------------------------------------------
217 
222  FwIndexType portNum
223  );
224 
225 #endif
226 
227 #if !FW_DIRECT_PORT_CALLS
228 
229  public:
230 
231  // ----------------------------------------------------------------------
232  // Getters for typed input ports
233  // ----------------------------------------------------------------------
234 
239  FwIndexType portNum
240  );
241 
246  FwIndexType portNum
247  );
248 
253  FwIndexType portNum
254  );
255 
260  FwIndexType portNum
261  );
262 
267  FwIndexType portNum
268  );
269 
270 #endif
271 
272 #if !FW_DIRECT_PORT_CALLS
273 
274  public:
275 
276  // ----------------------------------------------------------------------
277  // Connect input ports to special output ports
278  // ----------------------------------------------------------------------
279 
280 #if FW_ENABLE_TEXT_LOGGING == 1
281 
283  void set_LogText_OutputPort(
284  FwIndexType portNum,
285  Fw::InputLogTextPort* port
286  );
287 
288 #endif
289 
292  FwIndexType portNum,
293  Fw::InputCmdRegPort* port
294  );
295 
298  FwIndexType portNum,
300  );
301 
304  FwIndexType portNum,
305  Fw::InputLogPort* port
306  );
307 
310  FwIndexType portNum,
311  Fw::InputDpGetPort* port
312  );
313 
316  FwIndexType portNum,
317  Fw::InputDpSendPort* port
318  );
319 
322  FwIndexType portNum,
323  Fw::InputTimePort* port
324  );
325 
328  FwIndexType portNum,
329  Fw::InputTlmPort* port
330  );
331 
332 #endif
333 
334 #if !FW_DIRECT_PORT_CALLS
335 
336  public:
337 
338  // ----------------------------------------------------------------------
339  // Connect typed input ports to typed output ports
340  // ----------------------------------------------------------------------
341 
344  FwIndexType portNum,
345  Svc::InputPingPort* port
346  );
347 
348 #endif
349 
350 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
351 
352  public:
353 
354  // ----------------------------------------------------------------------
355  // Connect serial input ports to special output ports
356  // ----------------------------------------------------------------------
357 
358 #if FW_ENABLE_TEXT_LOGGING == 1
359 
361  void set_LogText_OutputPort(
362  FwIndexType portNum,
363  Fw::InputSerializePort* port
364  );
365 
366 #endif
367 
370  FwIndexType portNum,
371  Fw::InputSerializePort* port
372  );
373 
376  FwIndexType portNum,
377  Fw::InputSerializePort* port
378  );
379 
382  FwIndexType portNum,
383  Fw::InputSerializePort* port
384  );
385 
388  FwIndexType portNum,
389  Fw::InputSerializePort* port
390  );
391 
394  FwIndexType portNum,
395  Fw::InputSerializePort* port
396  );
397 
400  FwIndexType portNum,
401  Fw::InputSerializePort* port
402  );
403 
404 #endif
405 
406 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
407 
408  public:
409 
410  // ----------------------------------------------------------------------
411  // Connect serial input ports to typed output ports
412  // ----------------------------------------------------------------------
413 
416  FwIndexType portNum,
417  Fw::InputSerializePort* port
418  );
419 
420 #endif
421 
422  public:
423 
424  // ----------------------------------------------------------------------
425  // Command registration
426  // ----------------------------------------------------------------------
427 
431  void regCommands();
432 
433  protected:
434 
435  // ----------------------------------------------------------------------
436  // Component construction and destruction
437  // ----------------------------------------------------------------------
438 
441  const char* compName = ""
442  );
443 
445  virtual ~ComLoggerDpComponentBase();
446 
447  protected:
448 
449  // ----------------------------------------------------------------------
450  // Getters for numbers of special input ports
451  // ----------------------------------------------------------------------
452 
457  return NUM_CMDIN_INPUT_PORTS;
458  }
459 
460  protected:
461 
462  // ----------------------------------------------------------------------
463  // Getters for numbers of typed input ports
464  // ----------------------------------------------------------------------
465 
470  return NUM_COMIN_INPUT_PORTS;
471  }
472 
477  return NUM_PINGIN_INPUT_PORTS;
478  }
479 
485  }
486 
492  }
493 
499  }
500 
501  protected:
502 
503  // ----------------------------------------------------------------------
504  // Getters for numbers of special output ports
505  // ----------------------------------------------------------------------
506 
507 #if FW_ENABLE_TEXT_LOGGING == 1
508 
512  static constexpr FwIndexType getNum_LogText_OutputPorts() {
514  }
515 
516 #endif
517 
523  }
524 
530  }
531 
537  }
538 
544  }
545 
551  }
552 
558  }
559 
565  }
566 
567  protected:
568 
569  // ----------------------------------------------------------------------
570  // Getters for numbers of typed output ports
571  // ----------------------------------------------------------------------
572 
578  }
579 
580  protected:
581 
582  // ----------------------------------------------------------------------
583  // Connection status queries for special output ports
584  // ----------------------------------------------------------------------
585 
586 #if FW_ENABLE_TEXT_LOGGING == 1
587 
591  bool isConnected_LogText_OutputPort(
592  FwIndexType portNum
593  ) const;
594 
595 #endif
596 
601  FwIndexType portNum
602  ) const;
603 
608  FwIndexType portNum
609  ) const;
610 
615  FwIndexType portNum
616  ) const;
617 
622  FwIndexType portNum
623  ) const;
624 
629  FwIndexType portNum
630  ) const;
631 
636  FwIndexType portNum
637  ) const;
638 
643  FwIndexType portNum
644  ) const;
645 
646  protected:
647 
648  // ----------------------------------------------------------------------
649  // Connection status queries for typed output ports
650  // ----------------------------------------------------------------------
651 
656  FwIndexType portNum
657  ) const;
658 
659 #if FW_DIRECT_PORT_CALLS
660  public:
661 #else
662  protected:
663 #endif
664 
665  // ----------------------------------------------------------------------
666  // Port handler base-class functions for special input ports
667  //
668  // Call these functions directly to bypass the corresponding ports
669  // ----------------------------------------------------------------------
670 
672  void cmdIn_handlerBase(
673  FwIndexType portNum,
674  FwOpcodeType opCode,
675  U32 cmdSeq,
676  Fw::CmdArgBuffer& args
677  );
678 
679  protected:
680 
681  // ----------------------------------------------------------------------
682  // Handlers to implement for typed input ports
683  // ----------------------------------------------------------------------
684 
686  virtual void comIn_handler(
687  FwIndexType portNum,
688  Fw::ComBuffer& data,
689  U32 context
690  ) = 0;
691 
693  virtual void pingIn_handler(
694  FwIndexType portNum,
695  U32 key
696  ) = 0;
697 
699  virtual void schedIn_handler(
700  FwIndexType portNum,
701  U32 context
702  ) = 0;
703 
705  virtual void startRecordingIn_handler(
706  FwIndexType portNum,
707  FwSizeType packetsPerContainer,
708  FwDpPriorityType priority
709  ) = 0;
710 
712  virtual void stopRecordingIn_handler(
713  FwIndexType portNum
714  ) = 0;
715 
716 #if FW_DIRECT_PORT_CALLS
717  public:
718 #else
719  protected:
720 #endif
721 
722  // ----------------------------------------------------------------------
723  // Port handler base-class functions for typed input ports
724  //
725  // Call these functions directly to bypass the corresponding ports
726  // ----------------------------------------------------------------------
727 
729  void comIn_handlerBase(
730  FwIndexType portNum,
731  Fw::ComBuffer& data,
732  U32 context
733  );
734 
736  void pingIn_handlerBase(
737  FwIndexType portNum,
738  U32 key
739  );
740 
742  void schedIn_handlerBase(
743  FwIndexType portNum,
744  U32 context
745  );
746 
749  FwIndexType portNum,
750  FwSizeType packetsPerContainer,
751  FwDpPriorityType priority
752  );
753 
756  FwIndexType portNum
757  );
758 
759  protected:
760 
761  // ----------------------------------------------------------------------
762  // Pre-message hooks for typed async input ports
763  //
764  // Each of these functions is invoked just before processing a message
765  // on the corresponding port. By default, they do nothing. You can
766  // override them to provide specific pre-message behavior.
767  // ----------------------------------------------------------------------
768 
770  virtual void comIn_preMsgHook(
771  FwIndexType portNum,
772  Fw::ComBuffer& data,
773  U32 context
774  );
775 
777  virtual void pingIn_preMsgHook(
778  FwIndexType portNum,
779  U32 key
780  );
781 
783  virtual void schedIn_preMsgHook(
784  FwIndexType portNum,
785  U32 context
786  );
787 
789  virtual void startRecordingIn_preMsgHook(
790  FwIndexType portNum,
791  FwSizeType packetsPerContainer,
792  FwDpPriorityType priority
793  );
794 
796  virtual void stopRecordingIn_preMsgHook(
797  FwIndexType portNum
798  );
799 
800  protected:
801 
802  // ----------------------------------------------------------------------
803  // Invocation functions for typed output ports
804  // ----------------------------------------------------------------------
805 
807  void pingOut_out(
808  FwIndexType portNum,
809  U32 key
810  ) const;
811 
812  protected:
813 
814  // ----------------------------------------------------------------------
815  // Command response
816  // ----------------------------------------------------------------------
817 
819  void cmdResponse_out(
820  FwOpcodeType opCode,
821  U32 cmdSeq,
822  Fw::CmdResponse response
823  );
824 
825  protected:
826 
827  // ----------------------------------------------------------------------
828  // Command handlers to implement
829  // ----------------------------------------------------------------------
830 
834  virtual void StartComDp_cmdHandler(
835  FwOpcodeType opCode,
836  U32 cmdSeq,
837  FwSizeType packetsPerContainer,
838  FwDpPriorityType priority
839  ) = 0;
840 
844  virtual void UpdatePriority_cmdHandler(
845  FwOpcodeType opCode,
846  U32 cmdSeq,
847  FwDpPriorityType priority
848  ) = 0;
849 
853  virtual void StopComDp_cmdHandler(
854  FwOpcodeType opCode,
855  U32 cmdSeq
856  ) = 0;
857 
861  virtual void CLEAR_COUNTERS_cmdHandler(
862  FwOpcodeType opCode,
863  U32 cmdSeq
864  ) = 0;
865 
866  protected:
867 
868  // ----------------------------------------------------------------------
869  // Command handler base-class functions
870  //
871  // Call these functions directly to bypass the command input port
872  // ----------------------------------------------------------------------
873 
878  FwOpcodeType opCode,
879  U32 cmdSeq,
880  Fw::CmdArgBuffer& args
881  );
882 
887  FwOpcodeType opCode,
888  U32 cmdSeq,
889  Fw::CmdArgBuffer& args
890  );
891 
896  FwOpcodeType opCode,
897  U32 cmdSeq,
898  Fw::CmdArgBuffer& args
899  );
900 
905  FwOpcodeType opCode,
906  U32 cmdSeq,
907  Fw::CmdArgBuffer& args
908  );
909 
910  protected:
911 
912  // ----------------------------------------------------------------------
913  // Pre-message hooks for async commands
914  //
915  // Each of these functions is invoked just before processing the
916  // corresponding command. By default they do nothing. You can
917  // override them to provide specific pre-command behavior.
918  // ----------------------------------------------------------------------
919 
921  virtual void StartComDp_preMsgHook(
922  FwOpcodeType opCode,
923  U32 cmdSeq
924  );
925 
927  virtual void UpdatePriority_preMsgHook(
928  FwOpcodeType opCode,
929  U32 cmdSeq
930  );
931 
933  virtual void StopComDp_preMsgHook(
934  FwOpcodeType opCode,
935  U32 cmdSeq
936  );
937 
939  virtual void CLEAR_COUNTERS_preMsgHook(
940  FwOpcodeType opCode,
941  U32 cmdSeq
942  );
943 
944  protected:
945 
946  // ----------------------------------------------------------------------
947  // Event logging functions
948  // ----------------------------------------------------------------------
949 
952  U32 size
953  );
954 
958  void log_ACTIVITY_HI_ComDpStarted(FwSizeType packetsPerContainer) const;
959 
963  void log_ACTIVITY_HI_ComDpStopped(const Svc::ComLoggerDp_PartialContainerStatus& partialContainer) const;
964 
969 
973  void log_ACTIVITY_LO_CountersCleared() const;
974 
979  FwSizeType packetsPerContainer
980  ) const;
981 
982  protected:
983 
984  // ----------------------------------------------------------------------
985  // Event throttle reset functions
986  // ----------------------------------------------------------------------
987 
990 
991  protected:
992 
993  // ----------------------------------------------------------------------
994  // Telemetry serialized write
995  // ----------------------------------------------------------------------
996 
1001  void tlmWrite(
1002  FwChanIdType id,
1003  Fw::TlmBuffer& _tlmBuff,
1004  Fw::Time _tlmTime = Fw::Time()
1005  ) const;
1006 
1007  protected:
1008 
1009  // ----------------------------------------------------------------------
1010  // Telemetry write functions
1011  // ----------------------------------------------------------------------
1012 
1017  bool arg,
1018  Fw::Time _tlmTime = Fw::Time()
1019  ) const;
1020 
1025  U32 arg,
1026  Fw::Time _tlmTime = Fw::Time()
1027  ) const;
1028 
1033  U32 arg,
1034  Fw::Time _tlmTime = Fw::Time()
1035  ) const;
1036 
1041  U32 arg,
1042  Fw::Time _tlmTime = Fw::Time()
1043  ) const;
1044 
1045  protected:
1046 
1047  // ----------------------------------------------------------------------
1048  // Functions for managing data products
1049  // ----------------------------------------------------------------------
1050 
1054  FwSizeType dataSize,
1055  DpContainer& container
1056  ) {
1057  return this->dpGet(
1059  dataSize,
1061  container
1062  );
1063  }
1064 
1066  void dpSend(
1067  DpContainer& container,
1068  Fw::Time timeTag = Fw::ZERO_TIME
1069  );
1070 
1071  protected:
1072 
1073  // ----------------------------------------------------------------------
1074  // Time
1075  // ----------------------------------------------------------------------
1076 
1080  Fw::Time getTime() const;
1081 
1082  private:
1083 
1084  // ----------------------------------------------------------------------
1085  // Message dispatch functions
1086  // ----------------------------------------------------------------------
1087 
1089  virtual MsgDispatchStatus doDispatch();
1090 
1091  private:
1092 
1093  // ----------------------------------------------------------------------
1094  // Calls for messages received on special input ports
1095  // ----------------------------------------------------------------------
1096 
1098  static void m_p_cmdIn_in(
1099  Fw::PassiveComponentBase* callComp,
1100  FwIndexType portNum,
1101  FwOpcodeType opCode,
1102  U32 cmdSeq,
1103  Fw::CmdArgBuffer& args
1104  );
1105 
1106  private:
1107 
1108  // ----------------------------------------------------------------------
1109  // Calls for messages received on typed input ports
1110  // ----------------------------------------------------------------------
1111 
1113  static void m_p_comIn_in(
1114  Fw::PassiveComponentBase* callComp,
1115  FwIndexType portNum,
1116  Fw::ComBuffer& data,
1117  U32 context
1118  );
1119 
1121  static void m_p_pingIn_in(
1122  Fw::PassiveComponentBase* callComp,
1123  FwIndexType portNum,
1124  U32 key
1125  );
1126 
1128  static void m_p_schedIn_in(
1129  Fw::PassiveComponentBase* callComp,
1130  FwIndexType portNum,
1131  U32 context
1132  );
1133 
1135  static void m_p_startRecordingIn_in(
1136  Fw::PassiveComponentBase* callComp,
1137  FwIndexType portNum,
1138  FwSizeType packetsPerContainer,
1139  FwDpPriorityType priority
1140  );
1141 
1143  static void m_p_stopRecordingIn_in(
1144  Fw::PassiveComponentBase* callComp,
1145  FwIndexType portNum
1146  );
1147 
1148  private:
1149 
1150  // ----------------------------------------------------------------------
1151  // Invocation functions for special output ports
1152  // ----------------------------------------------------------------------
1153 
1154 #if FW_ENABLE_TEXT_LOGGING
1155 
1157  void LogText_out(
1158  FwIndexType portNum,
1159  FwEventIdType id,
1160  Fw::Time& timeTag,
1161  const Fw::LogSeverity& severity,
1162  Fw::TextLogString& text
1163  ) const;
1164 
1165 #endif
1166 
1168  void cmdRegOut_out(
1169  FwIndexType portNum,
1170  FwOpcodeType opCode
1171  ) const;
1172 
1174  void cmdResponseOut_out(
1175  FwIndexType portNum,
1176  FwOpcodeType opCode,
1177  U32 cmdSeq,
1178  const Fw::CmdResponse& response
1179  ) const;
1180 
1182  void logOut_out(
1183  FwIndexType portNum,
1184  FwEventIdType id,
1185  Fw::Time& timeTag,
1186  const Fw::LogSeverity& severity,
1187  Fw::LogBuffer& args
1188  ) const;
1189 
1191  Fw::Success productGetOut_out(
1192  FwIndexType portNum,
1193  FwDpIdType id,
1194  FwSizeType dataSize,
1195  Fw::Buffer& buffer
1196  ) const;
1197 
1199  void productSendOut_out(
1200  FwIndexType portNum,
1201  FwDpIdType id,
1202  const Fw::Buffer& buffer
1203  ) const;
1204 
1206  void timeCaller_out(
1207  FwIndexType portNum,
1208  Fw::Time& time
1209  ) const;
1210 
1212  void tlmOut_out(
1213  FwIndexType portNum,
1214  FwChanIdType id,
1215  Fw::Time& timeTag,
1216  Fw::TlmBuffer& val
1217  ) const;
1218 
1219  private:
1220 
1221  // ----------------------------------------------------------------------
1222  // Private data product handling functions
1223  // ----------------------------------------------------------------------
1224 
1227  Fw::Success::T dpGet(
1228  ContainerId::T containerId,
1229  FwSizeType dataSize,
1230  FwDpPriorityType priority,
1231  DpContainer& container
1232  );
1233 
1234 #if !FW_DIRECT_PORT_CALLS
1235 
1236  private:
1237 
1238  // ----------------------------------------------------------------------
1239  // Special input ports
1240  // ----------------------------------------------------------------------
1241 
1243  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1244 
1245 #endif
1246 
1247 #if !FW_DIRECT_PORT_CALLS
1248 
1249  private:
1250 
1251  // ----------------------------------------------------------------------
1252  // Typed input ports
1253  // ----------------------------------------------------------------------
1254 
1256  Fw::InputComPort m_comIn_InputPort[NUM_COMIN_INPUT_PORTS];
1257 
1259  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1260 
1262  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1263 
1265  Svc::InputComLoggerStartPort m_startRecordingIn_InputPort[NUM_STARTRECORDINGIN_INPUT_PORTS];
1266 
1268  Svc::InputComLoggerStopPort m_stopRecordingIn_InputPort[NUM_STOPRECORDINGIN_INPUT_PORTS];
1269 
1270 #endif
1271 
1272 #if !FW_DIRECT_PORT_CALLS
1273 
1274  private:
1275 
1276  // ----------------------------------------------------------------------
1277  // Special output ports
1278  // ----------------------------------------------------------------------
1279 
1280 #if FW_ENABLE_TEXT_LOGGING == 1
1281 
1283  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1284 
1285 #endif
1286 
1288  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1289 
1291  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1292 
1294  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1295 
1297  Fw::OutputDpGetPort m_productGetOut_OutputPort[NUM_PRODUCTGETOUT_OUTPUT_PORTS];
1298 
1300  Fw::OutputDpSendPort m_productSendOut_OutputPort[NUM_PRODUCTSENDOUT_OUTPUT_PORTS];
1301 
1303  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1304 
1306  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1307 
1308 #endif
1309 
1310 #if !FW_DIRECT_PORT_CALLS
1311 
1312  private:
1313 
1314  // ----------------------------------------------------------------------
1315  // Typed output ports
1316  // ----------------------------------------------------------------------
1317 
1319  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1320 
1321 #endif
1322 
1323  private:
1324 
1325  // ----------------------------------------------------------------------
1326  // Counter values for event throttling
1327  // ----------------------------------------------------------------------
1328 
1330  std::atomic<FwIndexType> m_DpBufferErrorThrottle;
1331 
1332  };
1333 
1334 }
1335 
1336 #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.
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()
Failed to start recording due to invalid configuration.
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].
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwIndexType getNum_schedIn_InputPorts()
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
Starts recording ComBuffers at the specified priority.
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
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 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)
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.
Updates the priority of the active container (if any) and of all future containers.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
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.
virtual void stopRecordingIn_handler(FwIndexType portNum)=0
Handler for input port stopRecordingIn.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
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
Clears NumBuffersLogged and NumBuffersDropped counters and DpBufferError event throttle.
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()