F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TlmPacketizerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TlmPacketizerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TlmPacketizer component base class
5 // ======================================================================
6 
7 #ifndef Svc_TlmPacketizerComponentAc_HPP
8 #define Svc_TlmPacketizerComponentAc_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/FPrimeBasicTypes.hpp"
19 #include "Fw/Log/LogPortAc.hpp"
20 #include "Fw/Log/LogString.hpp"
21 #if FW_ENABLE_TEXT_LOGGING == 1
22 #include "Fw/Log/LogTextPortAc.hpp"
23 #endif
24 #if !FW_DIRECT_PORT_CALLS
26 #endif
27 #if !FW_DIRECT_PORT_CALLS
29 #endif
31 #include "Fw/Prm/PrmGetPortAc.hpp"
32 #include "Fw/Prm/PrmSetPortAc.hpp"
33 #include "Fw/Prm/PrmString.hpp"
34 #include "Fw/Time/TimePortAc.hpp"
35 #include "Fw/Tlm/TlmGetPortAc.hpp"
36 #include "Fw/Tlm/TlmPortAc.hpp"
37 #include "Fw/Tlm/TlmString.hpp"
39 #include "Os/Mutex.hpp"
40 #include "Svc/Ping/PingPortAc.hpp"
53 
54 namespace Svc {
55 
62  {
63 
64  // ----------------------------------------------------------------------
65  // Friend classes
66  // ----------------------------------------------------------------------
67 
71  friend class TlmPacketizerTester;
72 
73  protected:
74 
75  // ----------------------------------------------------------------------
76  // Constants
77  // ----------------------------------------------------------------------
78 
80  enum {
82  };
83 
85  enum {
92  };
93 
95  enum {
104  };
105 
107  enum {
110  };
111 
113  enum {
124  };
125 
127  enum {
134  };
135 
137  enum {
140  };
141 
143  enum {
146  };
147 
148  public:
149 
150  // ----------------------------------------------------------------------
151  // Component initialization
152  // ----------------------------------------------------------------------
153 
155  void init(
156  FwSizeType queueDepth,
157  FwEnumStoreType instance = 0
158  );
159 
160 #if !FW_DIRECT_PORT_CALLS
161 
162  public:
163 
164  // ----------------------------------------------------------------------
165  // Getters for special input ports
166  // ----------------------------------------------------------------------
167 
172  FwIndexType portNum
173  );
174 
175 #endif
176 
177 #if !FW_DIRECT_PORT_CALLS
178 
179  public:
180 
181  // ----------------------------------------------------------------------
182  // Getters for typed input ports
183  // ----------------------------------------------------------------------
184 
189  FwIndexType portNum
190  );
191 
196  FwIndexType portNum
197  );
198 
203  FwIndexType portNum
204  );
205 
210  FwIndexType portNum
211  );
212 
217  FwIndexType portNum
218  );
219 
224  FwIndexType portNum
225  );
226 
227 #endif
228 
229 #if !FW_DIRECT_PORT_CALLS
230 
231  public:
232 
233  // ----------------------------------------------------------------------
234  // Connect input ports to special output ports
235  // ----------------------------------------------------------------------
236 
239  FwIndexType portNum,
240  Fw::InputCmdRegPort* port
241  );
242 
245  FwIndexType portNum,
247  );
248 
251  FwIndexType portNum,
252  Fw::InputLogPort* port
253  );
254 
257  FwIndexType portNum,
258  Fw::InputPrmGetPort* port
259  );
260 
263  FwIndexType portNum,
264  Fw::InputPrmSetPort* port
265  );
266 
267 #if FW_ENABLE_TEXT_LOGGING == 1
268 
270  void set_textEventOut_OutputPort(
271  FwIndexType portNum,
272  Fw::InputLogTextPort* port
273  );
274 
275 #endif
276 
279  FwIndexType portNum,
280  Fw::InputTimePort* port
281  );
282 
285  FwIndexType portNum,
286  Fw::InputTlmPort* port
287  );
288 
289 #endif
290 
291 #if !FW_DIRECT_PORT_CALLS
292 
293  public:
294 
295  // ----------------------------------------------------------------------
296  // Connect typed input ports to typed output ports
297  // ----------------------------------------------------------------------
298 
301  FwIndexType portNum,
302  Fw::InputComPort* port
303  );
304 
307  FwIndexType portNum,
308  Svc::InputPingPort* port
309  );
310 
311 #endif
312 
313 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
314 
315  public:
316 
317  // ----------------------------------------------------------------------
318  // Connect serial input ports to special output ports
319  // ----------------------------------------------------------------------
320 
323  FwIndexType portNum,
324  Fw::InputSerializePort* port
325  );
326 
329  FwIndexType portNum,
330  Fw::InputSerializePort* port
331  );
332 
335  FwIndexType portNum,
336  Fw::InputSerializePort* port
337  );
338 
341  FwIndexType portNum,
342  Fw::InputSerializePort* port
343  );
344 
345 #if FW_ENABLE_TEXT_LOGGING == 1
346 
348  void set_textEventOut_OutputPort(
349  FwIndexType portNum,
350  Fw::InputSerializePort* port
351  );
352 
353 #endif
354 
357  FwIndexType portNum,
358  Fw::InputSerializePort* port
359  );
360 
363  FwIndexType portNum,
364  Fw::InputSerializePort* port
365  );
366 
367 #endif
368 
369 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
370 
371  public:
372 
373  // ----------------------------------------------------------------------
374  // Connect serial input ports to typed output ports
375  // ----------------------------------------------------------------------
376 
379  FwIndexType portNum,
380  Fw::InputSerializePort* port
381  );
382 
385  FwIndexType portNum,
386  Fw::InputSerializePort* port
387  );
388 
389 #endif
390 
391  public:
392 
393  // ----------------------------------------------------------------------
394  // Command registration
395  // ----------------------------------------------------------------------
396 
400  void regCommands();
401 
402  public:
403 
404  // ----------------------------------------------------------------------
405  // Parameter loading
406  // ----------------------------------------------------------------------
407 
411  void loadParameters();
412 
413  protected:
414 
415  // ----------------------------------------------------------------------
416  // Component construction and destruction
417  // ----------------------------------------------------------------------
418 
421  const char* compName = ""
422  );
423 
425  virtual ~TlmPacketizerComponentBase();
426 
427  protected:
428 
429  // ----------------------------------------------------------------------
430  // Getters for numbers of special input ports
431  // ----------------------------------------------------------------------
432 
437  return NUM_CMDIN_INPUT_PORTS;
438  }
439 
440  protected:
441 
442  // ----------------------------------------------------------------------
443  // Getters for numbers of typed input ports
444  // ----------------------------------------------------------------------
445 
449  static constexpr FwIndexType getNum_Run_InputPorts() {
450  return NUM_RUN_INPUT_PORTS;
451  }
452 
457  return NUM_TLMGET_INPUT_PORTS;
458  }
459 
465  }
466 
472  }
473 
479  }
480 
485  return NUM_PINGIN_INPUT_PORTS;
486  }
487 
488  protected:
489 
490  // ----------------------------------------------------------------------
491  // Getters for numbers of special output ports
492  // ----------------------------------------------------------------------
493 
499  }
500 
506  }
507 
513  }
514 
520  }
521 
527  }
528 
529 #if FW_ENABLE_TEXT_LOGGING == 1
530 
534  static constexpr FwIndexType getNum_textEventOut_OutputPorts() {
536  }
537 
538 #endif
539 
545  }
546 
552  }
553 
554  protected:
555 
556  // ----------------------------------------------------------------------
557  // Getters for numbers of typed output ports
558  // ----------------------------------------------------------------------
559 
565  }
566 
572  }
573 
574  protected:
575 
576  // ----------------------------------------------------------------------
577  // Connection status queries for special output ports
578  // ----------------------------------------------------------------------
579 
584  FwIndexType portNum
585  ) const;
586 
591  FwIndexType portNum
592  ) const;
593 
598  FwIndexType portNum
599  ) const;
600 
605  FwIndexType portNum
606  ) const;
607 
612  FwIndexType portNum
613  ) const;
614 
615 #if FW_ENABLE_TEXT_LOGGING == 1
616 
620  bool isConnected_textEventOut_OutputPort(
621  FwIndexType portNum
622  ) const;
623 
624 #endif
625 
630  FwIndexType portNum
631  ) const;
632 
637  FwIndexType portNum
638  ) const;
639 
640  protected:
641 
642  // ----------------------------------------------------------------------
643  // Connection status queries for typed output ports
644  // ----------------------------------------------------------------------
645 
650  FwIndexType portNum
651  ) const;
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 Run_handler(
688  FwIndexType portNum,
689  U32 context
690  ) = 0;
691 
694  FwIndexType portNum,
695  FwChanIdType id,
696  Fw::Time& timeTag,
697  Fw::TlmBuffer& val
698  ) = 0;
701 
703  virtual void TlmRecv_handler(
704  FwIndexType portNum,
705  FwChanIdType id,
706  Fw::Time& timeTag,
707  Fw::TlmBuffer& val
708  ) = 0;
709 
712  FwIndexType portNum,
713  const Svc::TelemetrySection& section,
714  FwChanIdType tlmGroup,
715  const Svc::RateLogic& rateLogic,
716  U32 minDelta,
717  U32 maxDelta
718  ) = 0;
719 
721  virtual void controlIn_handler(
722  FwIndexType portNum,
723  const Svc::TelemetrySection& section,
724  const Fw::Enabled& enabled
725  ) = 0;
726 
728  virtual void pingIn_handler(
729  FwIndexType portNum,
730  U32 key
731  ) = 0;
732 
733 #if FW_DIRECT_PORT_CALLS
734  public:
735 #else
736  protected:
737 #endif
738 
739  // ----------------------------------------------------------------------
740  // Port handler base-class functions for typed input ports
741  //
742  // Call these functions directly to bypass the corresponding ports
743  // ----------------------------------------------------------------------
744 
746  void Run_handlerBase(
747  FwIndexType portNum,
748  U32 context
749  );
750 
753  FwIndexType portNum,
754  FwChanIdType id,
755  Fw::Time& timeTag,
756  Fw::TlmBuffer& val
757  );
760 
762  void TlmRecv_handlerBase(
763  FwIndexType portNum,
764  FwChanIdType id,
765  Fw::Time& timeTag,
766  Fw::TlmBuffer& val
767  );
768 
771  FwIndexType portNum,
772  const Svc::TelemetrySection& section,
773  FwChanIdType tlmGroup,
774  const Svc::RateLogic& rateLogic,
775  U32 minDelta,
776  U32 maxDelta
777  );
778 
781  FwIndexType portNum,
782  const Svc::TelemetrySection& section,
783  const Fw::Enabled& enabled
784  );
785 
787  void pingIn_handlerBase(
788  FwIndexType portNum,
789  U32 key
790  );
791 
792  protected:
793 
794  // ----------------------------------------------------------------------
795  // Pre-message hooks for typed async input ports
796  //
797  // Each of these functions is invoked just before processing a message
798  // on the corresponding port. By default, they do nothing. You can
799  // override them to provide specific pre-message behavior.
800  // ----------------------------------------------------------------------
801 
803  virtual void Run_preMsgHook(
804  FwIndexType portNum,
805  U32 context
806  );
807 
810  FwIndexType portNum,
811  const Svc::TelemetrySection& section,
812  FwChanIdType tlmGroup,
813  const Svc::RateLogic& rateLogic,
814  U32 minDelta,
815  U32 maxDelta
816  );
817 
819  virtual void controlIn_preMsgHook(
820  FwIndexType portNum,
821  const Svc::TelemetrySection& section,
822  const Fw::Enabled& enabled
823  );
824 
826  virtual void pingIn_preMsgHook(
827  FwIndexType portNum,
828  U32 key
829  );
830 
831  protected:
832 
833  // ----------------------------------------------------------------------
834  // Invocation functions for typed output ports
835  // ----------------------------------------------------------------------
836 
838  void PktSend_out(
839  FwIndexType portNum,
840  Fw::ComBuffer& data,
841  U32 context
842  ) const;
843 
845  void pingOut_out(
846  FwIndexType portNum,
847  U32 key
848  ) const;
849 
850  protected:
851 
852  // ----------------------------------------------------------------------
853  // Command response
854  // ----------------------------------------------------------------------
855 
857  void cmdResponse_out(
858  FwOpcodeType opCode,
859  U32 cmdSeq,
860  Fw::CmdResponse response
861  );
862 
863  protected:
864 
865  // ----------------------------------------------------------------------
866  // Command handlers to implement
867  // ----------------------------------------------------------------------
868 
872  virtual void SET_LEVEL_cmdHandler(
873  FwOpcodeType opCode,
874  U32 cmdSeq,
875  FwChanIdType level
876  ) = 0;
877 
881  virtual void SEND_PKT_cmdHandler(
882  FwOpcodeType opCode,
883  U32 cmdSeq,
884  U32 id,
885  Svc::TelemetrySection section
886  ) = 0;
887 
891  virtual void ENABLE_SECTION_cmdHandler(
892  FwOpcodeType opCode,
893  U32 cmdSeq,
894  Svc::TelemetrySection section,
895  Fw::Enabled enable
896  ) = 0;
897 
901  virtual void ENABLE_GROUP_cmdHandler(
902  FwOpcodeType opCode,
903  U32 cmdSeq,
904  Svc::TelemetrySection section,
905  FwChanIdType tlmGroup,
906  Fw::Enabled enable
907  ) = 0;
908 
912  virtual void FORCE_GROUP_cmdHandler(
913  FwOpcodeType opCode,
914  U32 cmdSeq,
915  Svc::TelemetrySection section,
916  FwChanIdType tlmGroup,
917  Fw::Enabled enable
918  ) = 0;
919 
924  FwOpcodeType opCode,
925  U32 cmdSeq,
926  Svc::TelemetrySection section,
927  FwChanIdType tlmGroup,
928  Svc::RateLogic rateLogic,
929  U32 minDelta,
930  U32 maxDelta
931  ) = 0;
932 
933  protected:
934 
935  // ----------------------------------------------------------------------
936  // Command handler base-class functions
937  //
938  // Call these functions directly to bypass the command input port
939  // ----------------------------------------------------------------------
940 
945  FwOpcodeType opCode,
946  U32 cmdSeq,
947  Fw::CmdArgBuffer& args
948  );
949 
954  FwOpcodeType opCode,
955  U32 cmdSeq,
956  Fw::CmdArgBuffer& args
957  );
958 
963  FwOpcodeType opCode,
964  U32 cmdSeq,
965  Fw::CmdArgBuffer& args
966  );
967 
972  FwOpcodeType opCode,
973  U32 cmdSeq,
974  Fw::CmdArgBuffer& args
975  );
976 
981  FwOpcodeType opCode,
982  U32 cmdSeq,
983  Fw::CmdArgBuffer& args
984  );
985 
990  FwOpcodeType opCode,
991  U32 cmdSeq,
992  Fw::CmdArgBuffer& args
993  );
994 
995  protected:
996 
997  // ----------------------------------------------------------------------
998  // Pre-message hooks for async commands
999  //
1000  // Each of these functions is invoked just before processing the
1001  // corresponding command. By default they do nothing. You can
1002  // override them to provide specific pre-command behavior.
1003  // ----------------------------------------------------------------------
1004 
1006  virtual void SET_LEVEL_preMsgHook(
1007  FwOpcodeType opCode,
1008  U32 cmdSeq
1009  );
1010 
1012  virtual void SEND_PKT_preMsgHook(
1013  FwOpcodeType opCode,
1014  U32 cmdSeq
1015  );
1016 
1018  virtual void ENABLE_SECTION_preMsgHook(
1019  FwOpcodeType opCode,
1020  U32 cmdSeq
1021  );
1022 
1024  virtual void ENABLE_GROUP_preMsgHook(
1025  FwOpcodeType opCode,
1026  U32 cmdSeq
1027  );
1028 
1030  virtual void FORCE_GROUP_preMsgHook(
1031  FwOpcodeType opCode,
1032  U32 cmdSeq
1033  );
1034 
1036  virtual void CONFIGURE_GROUP_RATES_preMsgHook(
1037  FwOpcodeType opCode,
1038  U32 cmdSeq
1039  );
1040 
1041  protected:
1042 
1043  // ----------------------------------------------------------------------
1044  // Event logging functions
1045  // ----------------------------------------------------------------------
1046 
1050  void log_WARNING_LO_NoChan(
1051  FwChanIdType Id
1052  ) const;
1053 
1058  FwChanIdType id
1059  ) const;
1060 
1065  FwChanIdType level,
1066  FwChanIdType max
1067  ) const;
1068 
1073  U32 id
1074  ) const;
1075 
1080  U32 id
1081  ) const;
1082 
1085  Svc::TelemetrySection section,
1086  Fw::Enabled enable
1087  ) const;
1088 
1089  protected:
1090 
1091  // ----------------------------------------------------------------------
1092  // Telemetry write functions
1093  // ----------------------------------------------------------------------
1094 
1098  void tlmWrite_GroupConfigs(
1100  Fw::Time _tlmTime = Fw::Time()
1101  ) const;
1102 
1106  Fw::Time _tlmTime = Fw::Time()
1107  ) const;
1108 
1109  protected:
1110 
1111  // ----------------------------------------------------------------------
1112  // Parameter hook functions
1113  // ----------------------------------------------------------------------
1114 
1118  virtual void parameterUpdated(
1119  FwPrmIdType id
1120  );
1121 
1125  virtual void parametersLoaded();
1126 
1127  protected:
1128 
1129  // ----------------------------------------------------------------------
1130  // Parameter get functions
1131  // ----------------------------------------------------------------------
1132 
1139  Fw::ParamValid& valid
1140  );
1141 
1148  Fw::ParamValid& valid
1149  );
1150 
1151  protected:
1152 
1153  // ----------------------------------------------------------------------
1154  // External parameter delegate initialization
1155  // ----------------------------------------------------------------------
1156 
1159  Fw::ParamExternalDelegate* paramExternalDelegatePtr
1160  );
1161 
1162  protected:
1163 
1164  // ----------------------------------------------------------------------
1165  // Time
1166  // ----------------------------------------------------------------------
1167 
1171  Fw::Time getTime() const;
1172 
1173  private:
1174 
1175  // ----------------------------------------------------------------------
1176  // Message dispatch functions
1177  // ----------------------------------------------------------------------
1178 
1180  virtual MsgDispatchStatus doDispatch();
1181 
1182  private:
1183 
1184  // ----------------------------------------------------------------------
1185  // Calls for messages received on special input ports
1186  // ----------------------------------------------------------------------
1187 
1189  static void m_p_cmdIn_in(
1190  Fw::PassiveComponentBase* callComp,
1191  FwIndexType portNum,
1192  FwOpcodeType opCode,
1193  U32 cmdSeq,
1194  Fw::CmdArgBuffer& args
1195  );
1196 
1197  private:
1198 
1199  // ----------------------------------------------------------------------
1200  // Calls for messages received on typed input ports
1201  // ----------------------------------------------------------------------
1202 
1204  static void m_p_Run_in(
1205  Fw::PassiveComponentBase* callComp,
1206  FwIndexType portNum,
1207  U32 context
1208  );
1209 
1211  static Fw::TlmValid m_p_TlmGet_in(
1212  Fw::PassiveComponentBase* callComp,
1213  FwIndexType portNum,
1214  FwChanIdType id,
1215  Fw::Time& timeTag,
1216  Fw::TlmBuffer& val
1217  );
1220 
1222  static void m_p_TlmRecv_in(
1223  Fw::PassiveComponentBase* callComp,
1224  FwIndexType portNum,
1225  FwChanIdType id,
1226  Fw::Time& timeTag,
1227  Fw::TlmBuffer& val
1228  );
1229 
1231  static void m_p_configureSectionGroupRate_in(
1232  Fw::PassiveComponentBase* callComp,
1233  FwIndexType portNum,
1234  const Svc::TelemetrySection& section,
1235  FwChanIdType tlmGroup,
1236  const Svc::RateLogic& rateLogic,
1237  U32 minDelta,
1238  U32 maxDelta
1239  );
1240 
1242  static void m_p_controlIn_in(
1243  Fw::PassiveComponentBase* callComp,
1244  FwIndexType portNum,
1245  const Svc::TelemetrySection& section,
1246  const Fw::Enabled& enabled
1247  );
1248 
1250  static void m_p_pingIn_in(
1251  Fw::PassiveComponentBase* callComp,
1252  FwIndexType portNum,
1253  U32 key
1254  );
1255 
1256  private:
1257 
1258  // ----------------------------------------------------------------------
1259  // Invocation functions for special output ports
1260  // ----------------------------------------------------------------------
1261 
1263  void cmdRegOut_out(
1264  FwIndexType portNum,
1265  FwOpcodeType opCode
1266  ) const;
1267 
1269  void cmdResponseOut_out(
1270  FwIndexType portNum,
1271  FwOpcodeType opCode,
1272  U32 cmdSeq,
1273  const Fw::CmdResponse& response
1274  ) const;
1275 
1277  void eventOut_out(
1278  FwIndexType portNum,
1279  FwEventIdType id,
1280  Fw::Time& timeTag,
1281  const Fw::LogSeverity& severity,
1282  Fw::LogBuffer& args
1283  ) const;
1284 
1286  Fw::ParamValid paramGetOut_out(
1287  FwIndexType portNum,
1288  FwPrmIdType id,
1289  Fw::ParamBuffer& val
1290  ) const;
1292 
1294  void paramSetOut_out(
1295  FwIndexType portNum,
1296  FwPrmIdType id,
1297  Fw::ParamBuffer& val
1298  ) const;
1299 
1300 #if FW_ENABLE_TEXT_LOGGING
1301 
1303  void textEventOut_out(
1304  FwIndexType portNum,
1305  FwEventIdType id,
1306  Fw::Time& timeTag,
1307  const Fw::LogSeverity& severity,
1308  Fw::TextLogString& text
1309  ) const;
1310 
1311 #endif
1312 
1314  void timeGetOut_out(
1315  FwIndexType portNum,
1316  Fw::Time& time
1317  ) const;
1318 
1320  void tlmOut_out(
1321  FwIndexType portNum,
1322  FwChanIdType id,
1323  Fw::Time& timeTag,
1324  Fw::TlmBuffer& val
1325  ) const;
1326 
1327  private:
1328 
1329  // ----------------------------------------------------------------------
1330  // Parameter set functions
1331  // ----------------------------------------------------------------------
1332 
1336  Fw::CmdResponse paramSet_SECTION_ENABLED(
1337  Fw::SerialBufferBase& val
1338  );
1339 
1343  Fw::CmdResponse paramSet_SECTION_CONFIGS(
1344  Fw::SerialBufferBase& val
1345  );
1346 
1347  private:
1348 
1349  // ----------------------------------------------------------------------
1350  // Parameter save functions
1351  // ----------------------------------------------------------------------
1352 
1356  Fw::CmdResponse paramSave_SECTION_ENABLED();
1357 
1361  Fw::CmdResponse paramSave_SECTION_CONFIGS();
1362 
1363 #if !FW_DIRECT_PORT_CALLS
1364 
1365  private:
1366 
1367  // ----------------------------------------------------------------------
1368  // Special input ports
1369  // ----------------------------------------------------------------------
1370 
1372  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1373 
1374 #endif
1375 
1376 #if !FW_DIRECT_PORT_CALLS
1377 
1378  private:
1379 
1380  // ----------------------------------------------------------------------
1381  // Typed input ports
1382  // ----------------------------------------------------------------------
1383 
1385  Svc::InputSchedPort m_Run_InputPort[NUM_RUN_INPUT_PORTS];
1386 
1388  Fw::InputTlmGetPort m_TlmGet_InputPort[NUM_TLMGET_INPUT_PORTS];
1389 
1391  Fw::InputTlmPort m_TlmRecv_InputPort[NUM_TLMRECV_INPUT_PORTS];
1392 
1394  Svc::InputConfigureGroupRatePort m_configureSectionGroupRate_InputPort[NUM_CONFIGURESECTIONGROUPRATE_INPUT_PORTS];
1395 
1398 
1400  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1401 
1402 #endif
1403 
1404 #if !FW_DIRECT_PORT_CALLS
1405 
1406  private:
1407 
1408  // ----------------------------------------------------------------------
1409  // Special output ports
1410  // ----------------------------------------------------------------------
1411 
1413  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1414 
1416  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1417 
1419  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1420 
1422  Fw::OutputPrmGetPort m_paramGetOut_OutputPort[NUM_PARAMGETOUT_OUTPUT_PORTS];
1423 
1425  Fw::OutputPrmSetPort m_paramSetOut_OutputPort[NUM_PARAMSETOUT_OUTPUT_PORTS];
1426 
1427 #if FW_ENABLE_TEXT_LOGGING == 1
1428 
1430  Fw::OutputLogTextPort m_textEventOut_OutputPort[NUM_TEXTEVENTOUT_OUTPUT_PORTS];
1431 
1432 #endif
1433 
1435  Fw::OutputTimePort m_timeGetOut_OutputPort[NUM_TIMEGETOUT_OUTPUT_PORTS];
1436 
1438  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1439 
1440 #endif
1441 
1442 #if !FW_DIRECT_PORT_CALLS
1443 
1444  private:
1445 
1446  // ----------------------------------------------------------------------
1447  // Typed output ports
1448  // ----------------------------------------------------------------------
1449 
1451  Fw::OutputComPort m_PktSend_OutputPort[NUM_PKTSEND_OUTPUT_PORTS];
1452 
1454  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1455 
1456 #endif
1457 
1458  private:
1459 
1460  // ----------------------------------------------------------------------
1461  // Parameter delegate
1462  // ----------------------------------------------------------------------
1463 
1465  Fw::ParamExternalDelegate* paramDelegatePtr;
1466 
1467  private:
1468 
1469  // ----------------------------------------------------------------------
1470  // Mutexes
1471  // ----------------------------------------------------------------------
1472 
1474  Os::Mutex m_paramLock;
1475 
1476  };
1477 
1478 }
1479 
1480 #endif
bool isConnected_PktSend_OutputPort(FwIndexType portNum) const
void SEND_PKT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputEnableSectionPort * get_controlIn_InputPort(FwIndexType portNum)
friend class TlmPacketizerTesterBase
Friend class tester to support autocoded test harness.
void set_PktSend_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to PktSend[portNum].
FwIdType FwOpcodeType
The type of a command opcode.
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
PlatformSizeType FwSizeType
void tlmWrite_GroupConfigs(const Svc::TlmPacketizer_SectionConfigs &arg, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void FORCE_GROUP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
I32 FwEnumStoreType
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
bool isConnected_paramGetOut_OutputPort(FwIndexType portNum) const
Svc::InputConfigureGroupRatePort * get_configureSectionGroupRate_InputPort(FwIndexType portNum)
virtual void TlmRecv_handler(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)=0
Handler for input port TlmRecv.
void Run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port Run.
static constexpr FwIndexType getNum_PktSend_OutputPorts()
FwIdType FwPrmIdType
The type of a parameter identifier.
void log_WARNING_LO_NoChan(FwChanIdType Id) const
static constexpr FwIndexType getNum_pingIn_InputPorts()
virtual void configureSectionGroupRate_handler(FwIndexType portNum, const Svc::TelemetrySection &section, FwChanIdType tlmGroup, const Svc::RateLogic &rateLogic, U32 minDelta, U32 maxDelta)=0
Handler for input port configureSectionGroupRate.
virtual void FORCE_GROUP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::TelemetrySection section, FwChanIdType tlmGroup, Fw::Enabled enable)=0
void TlmRecv_handlerBase(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Handler base-class function for input port TlmRecv.
void controlIn_handlerBase(FwIndexType portNum, const Svc::TelemetrySection &section, const Fw::Enabled &enabled)
Handler base-class function for input port controlIn.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
virtual void controlIn_handler(FwIndexType portNum, const Svc::TelemetrySection &section, const Fw::Enabled &enabled)=0
Handler for input port controlIn.
Telemetry channel is not part of a telemetry packet.
virtual void SEND_PKT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 id, Svc::TelemetrySection section)=0
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
Enum representing a command response.
bool isConnected_paramSetOut_OutputPort(FwIndexType portNum) const
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
virtual void SET_LEVEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, FwChanIdType level)=0
void loadParameters()
Load the parameters from a parameter source.
void set_paramSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to paramSetOut[portNum].
virtual ~TlmPacketizerComponentBase()
Destroy TlmPacketizerComponentBase object.
void tlmWrite_SectionEnabled(const Svc::TlmPacketizer_SectionEnabled &arg, Fw::Time _tlmTime=Fw::Time()) const
Write telemetry channel SectionEnabled.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void init()
Object initializer.
Definition: ObjBase.cpp:24
virtual void CONFIGURE_GROUP_RATES_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::TelemetrySection section, FwChanIdType tlmGroup, Svc::RateLogic rateLogic, U32 minDelta, U32 maxDelta)=0
void registerExternalParameters(Fw::ParamExternalDelegate *paramExternalDelegatePtr)
Initialize the external parameter delegate.
virtual void configureSectionGroupRate_preMsgHook(FwIndexType portNum, const Svc::TelemetrySection &section, FwChanIdType tlmGroup, const Svc::RateLogic &rateLogic, U32 minDelta, U32 maxDelta)
Pre-message hook for async input port configureSectionGroupRate.
FwIdType FwEventIdType
The type of an event identifier.
virtual void FORCE_GROUP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FORCE_GROUP.
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
Fw::InputTlmGetPort * get_TlmGet_InputPort(FwIndexType portNum)
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum) const
virtual void CONFIGURE_GROUP_RATES_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CONFIGURE_GROUP_RATES.
virtual void Run_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port Run.
Enumeration for rate logic types for telemetry groups.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_timeGetOut_OutputPorts()
static constexpr FwIndexType getNum_paramGetOut_OutputPorts()
virtual void ENABLE_GROUP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::TelemetrySection section, FwChanIdType tlmGroup, Fw::Enabled enable)=0
Force telemetering a group on a section, even if disabled.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
virtual void ENABLE_GROUP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command ENABLE_GROUP.
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
Enum representing event severity.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
virtual void ENABLE_SECTION_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::TelemetrySection section, Fw::Enabled enable)=0
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
Enabled and disabled states.
friend class TlmPacketizerTester
Friend class tester implementation to support white-box testing.
Fw::TlmValid TlmGet_handlerBase(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Handler base-class function for input port TlmGet.
virtual void Run_handler(FwIndexType portNum, U32 context)=0
Handler for input port Run.
Enable / disable telemetry of a group on a section.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
void ENABLE_GROUP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Set Min and Max Deltas between successive packets.
Svc::TlmPacketizer_SectionEnabled paramGet_SECTION_ENABLED(Fw::ParamValid &valid)
void PktSend_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context) const
Invoke output port PktSend.
void log_WARNING_LO_SectionUnconfigurable(Svc::TelemetrySection section, Fw::Enabled enable) const
Log event SectionUnconfigurable.
static constexpr FwIndexType getNum_paramSetOut_OutputPorts()
void log_WARNING_LO_MaxLevelExceed(FwChanIdType level, FwChanIdType max) const
virtual void controlIn_preMsgHook(FwIndexType portNum, const Svc::TelemetrySection &section, const Fw::Enabled &enabled)
Pre-message hook for async input port controlIn.
PlatformIndexType FwIndexType
TlmPacketizerComponentBase(const char *compName="")
Construct TlmPacketizerComponentBase object.
static constexpr FwIndexType getNum_configureSectionGroupRate_InputPorts()
virtual void parametersLoaded()
Called whenever parameters are loaded.
void log_ACTIVITY_HI_LevelSet(FwChanIdType id) const
void set_timeGetOut_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeGetOut[portNum].
void ENABLE_SECTION_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void SEND_PKT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SEND_PKT.
void configureSectionGroupRate_handlerBase(FwIndexType portNum, const Svc::TelemetrySection &section, FwChanIdType tlmGroup, const Svc::RateLogic &rateLogic, U32 minDelta, U32 maxDelta)
Handler base-class function for input port configureSectionGroupRate.
RateGroupDivider component implementation.
Enable / disable telemetry of a group on a section.
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
Enum representing parameter validity.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
Svc::InputSchedPort * get_Run_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_TlmGet_InputPorts()
Fw::InputTlmPort * get_TlmRecv_InputPort(FwIndexType portNum)
Svc::TlmPacketizer_SectionConfigs paramGet_SECTION_CONFIGS(Fw::ParamValid &valid)
static constexpr FwIndexType getNum_controlIn_InputPorts()
virtual void ENABLE_SECTION_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command ENABLE_SECTION.
void regCommands()
Register commands with the Command Dispatcher.
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
void CONFIGURE_GROUP_RATES_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void SET_LEVEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void SET_LEVEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_LEVEL.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
void set_paramGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to paramGetOut[portNum].
static constexpr FwIndexType getNum_Run_InputPorts()
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
virtual Fw::TlmValid TlmGet_handler(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)=0
Handler for input port TlmGet.
static constexpr FwIndexType getNum_TlmRecv_InputPorts()
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
Auto-generated base for TlmPacketizer component.
static constexpr FwIndexType getNum_cmdIn_InputPorts()