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 serialized write
1093  // ----------------------------------------------------------------------
1094 
1099  void tlmWrite(
1100  FwChanIdType id,
1101  Fw::TlmBuffer& _tlmBuff,
1102  Fw::Time _tlmTime = Fw::Time()
1103  ) const;
1104 
1105  protected:
1106 
1107  // ----------------------------------------------------------------------
1108  // Telemetry write functions
1109  // ----------------------------------------------------------------------
1110 
1114  void tlmWrite_GroupConfigs(
1116  Fw::Time _tlmTime = Fw::Time()
1117  ) const;
1118 
1122  Fw::Time _tlmTime = Fw::Time()
1123  ) const;
1124 
1125  protected:
1126 
1127  // ----------------------------------------------------------------------
1128  // Parameter hook functions
1129  // ----------------------------------------------------------------------
1130 
1134  virtual void parameterUpdated(
1135  FwPrmIdType id
1136  );
1137 
1141  virtual void parametersLoaded();
1142 
1143  protected:
1144 
1145  // ----------------------------------------------------------------------
1146  // Parameter get functions
1147  // ----------------------------------------------------------------------
1148 
1155  Fw::ParamValid& valid
1156  );
1157 
1164  Fw::ParamValid& valid
1165  );
1166 
1167  protected:
1168 
1169  // ----------------------------------------------------------------------
1170  // External parameter delegate initialization
1171  // ----------------------------------------------------------------------
1172 
1175  Fw::ParamExternalDelegate* paramExternalDelegatePtr
1176  );
1177 
1178  protected:
1179 
1180  // ----------------------------------------------------------------------
1181  // Time
1182  // ----------------------------------------------------------------------
1183 
1187  Fw::Time getTime() const;
1188 
1189  private:
1190 
1191  // ----------------------------------------------------------------------
1192  // Message dispatch functions
1193  // ----------------------------------------------------------------------
1194 
1196  virtual MsgDispatchStatus doDispatch();
1197 
1198  private:
1199 
1200  // ----------------------------------------------------------------------
1201  // Calls for messages received on special input ports
1202  // ----------------------------------------------------------------------
1203 
1205  static void m_p_cmdIn_in(
1206  Fw::PassiveComponentBase* callComp,
1207  FwIndexType portNum,
1208  FwOpcodeType opCode,
1209  U32 cmdSeq,
1210  Fw::CmdArgBuffer& args
1211  );
1212 
1213  private:
1214 
1215  // ----------------------------------------------------------------------
1216  // Calls for messages received on typed input ports
1217  // ----------------------------------------------------------------------
1218 
1220  static void m_p_Run_in(
1221  Fw::PassiveComponentBase* callComp,
1222  FwIndexType portNum,
1223  U32 context
1224  );
1225 
1227  static Fw::TlmValid m_p_TlmGet_in(
1228  Fw::PassiveComponentBase* callComp,
1229  FwIndexType portNum,
1230  FwChanIdType id,
1231  Fw::Time& timeTag,
1232  Fw::TlmBuffer& val
1233  );
1236 
1238  static void m_p_TlmRecv_in(
1239  Fw::PassiveComponentBase* callComp,
1240  FwIndexType portNum,
1241  FwChanIdType id,
1242  Fw::Time& timeTag,
1243  Fw::TlmBuffer& val
1244  );
1245 
1247  static void m_p_configureSectionGroupRate_in(
1248  Fw::PassiveComponentBase* callComp,
1249  FwIndexType portNum,
1250  const Svc::TelemetrySection& section,
1251  FwChanIdType tlmGroup,
1252  const Svc::RateLogic& rateLogic,
1253  U32 minDelta,
1254  U32 maxDelta
1255  );
1256 
1258  static void m_p_controlIn_in(
1259  Fw::PassiveComponentBase* callComp,
1260  FwIndexType portNum,
1261  const Svc::TelemetrySection& section,
1262  const Fw::Enabled& enabled
1263  );
1264 
1266  static void m_p_pingIn_in(
1267  Fw::PassiveComponentBase* callComp,
1268  FwIndexType portNum,
1269  U32 key
1270  );
1271 
1272  private:
1273 
1274  // ----------------------------------------------------------------------
1275  // Invocation functions for special output ports
1276  // ----------------------------------------------------------------------
1277 
1279  void cmdRegOut_out(
1280  FwIndexType portNum,
1281  FwOpcodeType opCode
1282  ) const;
1283 
1285  void cmdResponseOut_out(
1286  FwIndexType portNum,
1287  FwOpcodeType opCode,
1288  U32 cmdSeq,
1289  const Fw::CmdResponse& response
1290  ) const;
1291 
1293  void eventOut_out(
1294  FwIndexType portNum,
1295  FwEventIdType id,
1296  Fw::Time& timeTag,
1297  const Fw::LogSeverity& severity,
1298  Fw::LogBuffer& args
1299  ) const;
1300 
1302  Fw::ParamValid paramGetOut_out(
1303  FwIndexType portNum,
1304  FwPrmIdType id,
1305  Fw::ParamBuffer& val
1306  ) const;
1308 
1310  void paramSetOut_out(
1311  FwIndexType portNum,
1312  FwPrmIdType id,
1313  Fw::ParamBuffer& val
1314  ) const;
1315 
1316 #if FW_ENABLE_TEXT_LOGGING
1317 
1319  void textEventOut_out(
1320  FwIndexType portNum,
1321  FwEventIdType id,
1322  Fw::Time& timeTag,
1323  const Fw::LogSeverity& severity,
1324  Fw::TextLogString& text
1325  ) const;
1326 
1327 #endif
1328 
1330  void timeGetOut_out(
1331  FwIndexType portNum,
1332  Fw::Time& time
1333  ) const;
1334 
1336  void tlmOut_out(
1337  FwIndexType portNum,
1338  FwChanIdType id,
1339  Fw::Time& timeTag,
1340  Fw::TlmBuffer& val
1341  ) const;
1342 
1343  private:
1344 
1345  // ----------------------------------------------------------------------
1346  // Parameter set functions
1347  // ----------------------------------------------------------------------
1348 
1352  Fw::CmdResponse paramSet_SECTION_ENABLED(
1353  Fw::SerialBufferBase& val
1354  );
1355 
1359  Fw::CmdResponse paramSet_SECTION_CONFIGS(
1360  Fw::SerialBufferBase& val
1361  );
1362 
1363  private:
1364 
1365  // ----------------------------------------------------------------------
1366  // Parameter save functions
1367  // ----------------------------------------------------------------------
1368 
1372  Fw::CmdResponse paramSave_SECTION_ENABLED();
1373 
1377  Fw::CmdResponse paramSave_SECTION_CONFIGS();
1378 
1379 #if !FW_DIRECT_PORT_CALLS
1380 
1381  private:
1382 
1383  // ----------------------------------------------------------------------
1384  // Special input ports
1385  // ----------------------------------------------------------------------
1386 
1388  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1389 
1390 #endif
1391 
1392 #if !FW_DIRECT_PORT_CALLS
1393 
1394  private:
1395 
1396  // ----------------------------------------------------------------------
1397  // Typed input ports
1398  // ----------------------------------------------------------------------
1399 
1401  Svc::InputSchedPort m_Run_InputPort[NUM_RUN_INPUT_PORTS];
1402 
1404  Fw::InputTlmGetPort m_TlmGet_InputPort[NUM_TLMGET_INPUT_PORTS];
1405 
1407  Fw::InputTlmPort m_TlmRecv_InputPort[NUM_TLMRECV_INPUT_PORTS];
1408 
1410  Svc::InputConfigureGroupRatePort m_configureSectionGroupRate_InputPort[NUM_CONFIGURESECTIONGROUPRATE_INPUT_PORTS];
1411 
1414 
1416  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1417 
1418 #endif
1419 
1420 #if !FW_DIRECT_PORT_CALLS
1421 
1422  private:
1423 
1424  // ----------------------------------------------------------------------
1425  // Special output ports
1426  // ----------------------------------------------------------------------
1427 
1429  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1430 
1432  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1433 
1435  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1436 
1438  Fw::OutputPrmGetPort m_paramGetOut_OutputPort[NUM_PARAMGETOUT_OUTPUT_PORTS];
1439 
1441  Fw::OutputPrmSetPort m_paramSetOut_OutputPort[NUM_PARAMSETOUT_OUTPUT_PORTS];
1442 
1443 #if FW_ENABLE_TEXT_LOGGING == 1
1444 
1446  Fw::OutputLogTextPort m_textEventOut_OutputPort[NUM_TEXTEVENTOUT_OUTPUT_PORTS];
1447 
1448 #endif
1449 
1451  Fw::OutputTimePort m_timeGetOut_OutputPort[NUM_TIMEGETOUT_OUTPUT_PORTS];
1452 
1454  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1455 
1456 #endif
1457 
1458 #if !FW_DIRECT_PORT_CALLS
1459 
1460  private:
1461 
1462  // ----------------------------------------------------------------------
1463  // Typed output ports
1464  // ----------------------------------------------------------------------
1465 
1467  Fw::OutputComPort m_PktSend_OutputPort[NUM_PKTSEND_OUTPUT_PORTS];
1468 
1470  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1471 
1472 #endif
1473 
1474  private:
1475 
1476  // ----------------------------------------------------------------------
1477  // Parameter delegate
1478  // ----------------------------------------------------------------------
1479 
1481  Fw::ParamExternalDelegate* paramDelegatePtr;
1482 
1483  private:
1484 
1485  // ----------------------------------------------------------------------
1486  // Mutexes
1487  // ----------------------------------------------------------------------
1488 
1490  Os::Mutex m_paramLock;
1491 
1492  };
1493 
1494 }
1495 
1496 #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.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
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()