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 #include "Fw/Log/LogTextPortAc.hpp"
22 #if !FW_DIRECT_PORT_CALLS
24 #endif
25 #if !FW_DIRECT_PORT_CALLS
27 #endif
29 #include "Fw/Prm/PrmGetPortAc.hpp"
30 #include "Fw/Prm/PrmSetPortAc.hpp"
31 #include "Fw/Prm/PrmString.hpp"
32 #include "Fw/Time/TimePortAc.hpp"
33 #include "Fw/Tlm/TlmGetPortAc.hpp"
34 #include "Fw/Tlm/TlmPortAc.hpp"
35 #include "Fw/Tlm/TlmString.hpp"
37 #include "Os/Mutex.hpp"
38 #include "Svc/Ping/PingPortAc.hpp"
51 
52 namespace Svc {
53 
60  {
61 
62  // ----------------------------------------------------------------------
63  // Friend classes
64  // ----------------------------------------------------------------------
65 
69  friend class TlmPacketizerTester;
70 
71  protected:
72 
73  // ----------------------------------------------------------------------
74  // Constants
75  // ----------------------------------------------------------------------
76 
78  enum {
80  };
81 
83  enum {
90  };
91 
93  enum {
102  };
103 
105  enum {
108  };
109 
111  enum {
122  };
123 
125  enum {
132  };
133 
135  enum {
138  };
139 
141  enum {
144  };
145 
146  public:
147 
148  // ----------------------------------------------------------------------
149  // Component initialization
150  // ----------------------------------------------------------------------
151 
153  void init(
154  FwSizeType queueDepth,
155  FwEnumStoreType instance = 0
156  );
157 
158 #if !FW_DIRECT_PORT_CALLS
159 
160  public:
161 
162  // ----------------------------------------------------------------------
163  // Getters for special input ports
164  // ----------------------------------------------------------------------
165 
170  FwIndexType portNum
171  );
172 
173 #endif
174 
175 #if !FW_DIRECT_PORT_CALLS
176 
177  public:
178 
179  // ----------------------------------------------------------------------
180  // Getters for typed input ports
181  // ----------------------------------------------------------------------
182 
187  FwIndexType portNum
188  );
189 
194  FwIndexType portNum
195  );
196 
201  FwIndexType portNum
202  );
203 
208  FwIndexType portNum
209  );
210 
215  FwIndexType portNum
216  );
217 
222  FwIndexType portNum
223  );
224 
225 #endif
226 
227 #if !FW_DIRECT_PORT_CALLS
228 
229  public:
230 
231  // ----------------------------------------------------------------------
232  // Connect input ports to special output ports
233  // ----------------------------------------------------------------------
234 
237  FwIndexType portNum,
238  Fw::InputCmdRegPort* port
239  );
240 
243  FwIndexType portNum,
245  );
246 
249  FwIndexType portNum,
250  Fw::InputLogPort* port
251  );
252 
255  FwIndexType portNum,
256  Fw::InputPrmGetPort* port
257  );
258 
261  FwIndexType portNum,
262  Fw::InputPrmSetPort* port
263  );
264 
265 #if FW_ENABLE_TEXT_LOGGING == 1
266 
268  void set_textEventOut_OutputPort(
269  FwIndexType portNum,
270  Fw::InputLogTextPort* port
271  );
272 
273 #endif
274 
277  FwIndexType portNum,
278  Fw::InputTimePort* port
279  );
280 
283  FwIndexType portNum,
284  Fw::InputTlmPort* port
285  );
286 
287 #endif
288 
289 #if !FW_DIRECT_PORT_CALLS
290 
291  public:
292 
293  // ----------------------------------------------------------------------
294  // Connect typed input ports to typed output ports
295  // ----------------------------------------------------------------------
296 
299  FwIndexType portNum,
300  Fw::InputComPort* port
301  );
302 
305  FwIndexType portNum,
306  Svc::InputPingPort* port
307  );
308 
309 #endif
310 
311 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
312 
313  public:
314 
315  // ----------------------------------------------------------------------
316  // Connect serial input ports to special output ports
317  // ----------------------------------------------------------------------
318 
321  FwIndexType portNum,
322  Fw::InputSerializePort* port
323  );
324 
327  FwIndexType portNum,
328  Fw::InputSerializePort* port
329  );
330 
333  FwIndexType portNum,
334  Fw::InputSerializePort* port
335  );
336 
339  FwIndexType portNum,
340  Fw::InputSerializePort* port
341  );
342 
343 #if FW_ENABLE_TEXT_LOGGING == 1
344 
346  void set_textEventOut_OutputPort(
347  FwIndexType portNum,
348  Fw::InputSerializePort* port
349  );
350 
351 #endif
352 
355  FwIndexType portNum,
356  Fw::InputSerializePort* port
357  );
358 
361  FwIndexType portNum,
362  Fw::InputSerializePort* port
363  );
364 
365 #endif
366 
367 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
368 
369  public:
370 
371  // ----------------------------------------------------------------------
372  // Connect serial input ports to typed output ports
373  // ----------------------------------------------------------------------
374 
377  FwIndexType portNum,
378  Fw::InputSerializePort* port
379  );
380 
383  FwIndexType portNum,
384  Fw::InputSerializePort* port
385  );
386 
387 #endif
388 
389  public:
390 
391  // ----------------------------------------------------------------------
392  // Command registration
393  // ----------------------------------------------------------------------
394 
398  void regCommands();
399 
400  public:
401 
402  // ----------------------------------------------------------------------
403  // Parameter loading
404  // ----------------------------------------------------------------------
405 
409  void loadParameters();
410 
411  protected:
412 
413  // ----------------------------------------------------------------------
414  // Component construction and destruction
415  // ----------------------------------------------------------------------
416 
419  const char* compName = ""
420  );
421 
423  virtual ~TlmPacketizerComponentBase();
424 
425  protected:
426 
427  // ----------------------------------------------------------------------
428  // Getters for numbers of special input ports
429  // ----------------------------------------------------------------------
430 
435  return NUM_CMDIN_INPUT_PORTS;
436  }
437 
438  protected:
439 
440  // ----------------------------------------------------------------------
441  // Getters for numbers of typed input ports
442  // ----------------------------------------------------------------------
443 
447  static constexpr FwIndexType getNum_Run_InputPorts() {
448  return NUM_RUN_INPUT_PORTS;
449  }
450 
455  return NUM_TLMGET_INPUT_PORTS;
456  }
457 
463  }
464 
470  }
471 
477  }
478 
483  return NUM_PINGIN_INPUT_PORTS;
484  }
485 
486  protected:
487 
488  // ----------------------------------------------------------------------
489  // Getters for numbers of special output ports
490  // ----------------------------------------------------------------------
491 
497  }
498 
504  }
505 
511  }
512 
518  }
519 
525  }
526 
527 #if FW_ENABLE_TEXT_LOGGING == 1
528 
532  static constexpr FwIndexType getNum_textEventOut_OutputPorts() {
534  }
535 
536 #endif
537 
543  }
544 
550  }
551 
552  protected:
553 
554  // ----------------------------------------------------------------------
555  // Getters for numbers of typed output ports
556  // ----------------------------------------------------------------------
557 
563  }
564 
570  }
571 
572  protected:
573 
574  // ----------------------------------------------------------------------
575  // Connection status queries for special output ports
576  // ----------------------------------------------------------------------
577 
582  FwIndexType portNum
583  ) const;
584 
589  FwIndexType portNum
590  ) const;
591 
596  FwIndexType portNum
597  ) const;
598 
603  FwIndexType portNum
604  ) const;
605 
610  FwIndexType portNum
611  ) const;
612 
613 #if FW_ENABLE_TEXT_LOGGING == 1
614 
618  bool isConnected_textEventOut_OutputPort(
619  FwIndexType portNum
620  ) const;
621 
622 #endif
623 
628  FwIndexType portNum
629  ) const;
630 
635  FwIndexType portNum
636  ) const;
637 
638  protected:
639 
640  // ----------------------------------------------------------------------
641  // Connection status queries for typed output ports
642  // ----------------------------------------------------------------------
643 
648  FwIndexType portNum
649  ) const;
650 
655  FwIndexType portNum
656  ) const;
657 
658 #if FW_DIRECT_PORT_CALLS
659  public:
660 #else
661  protected:
662 #endif
663 
664  // ----------------------------------------------------------------------
665  // Port handler base-class functions for special input ports
666  //
667  // Call these functions directly to bypass the corresponding ports
668  // ----------------------------------------------------------------------
669 
671  void cmdIn_handlerBase(
672  FwIndexType portNum,
673  FwOpcodeType opCode,
674  U32 cmdSeq,
675  Fw::CmdArgBuffer& args
676  );
677 
678  protected:
679 
680  // ----------------------------------------------------------------------
681  // Handlers to implement for typed input ports
682  // ----------------------------------------------------------------------
683 
685  virtual void Run_handler(
686  FwIndexType portNum,
687  U32 context
688  ) = 0;
689 
692  FwIndexType portNum,
693  FwChanIdType id,
694  Fw::Time& timeTag,
695  Fw::TlmBuffer& val
696  ) = 0;
699 
701  virtual void TlmRecv_handler(
702  FwIndexType portNum,
703  FwChanIdType id,
704  Fw::Time& timeTag,
705  Fw::TlmBuffer& val
706  ) = 0;
707 
710  FwIndexType portNum,
711  const Svc::TelemetrySection& section,
712  FwChanIdType tlmGroup,
713  const Svc::RateLogic& rateLogic,
714  U32 minDelta,
715  U32 maxDelta
716  ) = 0;
717 
719  virtual void controlIn_handler(
720  FwIndexType portNum,
721  const Svc::TelemetrySection& section,
722  const Fw::Enabled& enabled
723  ) = 0;
724 
726  virtual void pingIn_handler(
727  FwIndexType portNum,
728  U32 key
729  ) = 0;
730 
731 #if FW_DIRECT_PORT_CALLS
732  public:
733 #else
734  protected:
735 #endif
736 
737  // ----------------------------------------------------------------------
738  // Port handler base-class functions for typed input ports
739  //
740  // Call these functions directly to bypass the corresponding ports
741  // ----------------------------------------------------------------------
742 
744  void Run_handlerBase(
745  FwIndexType portNum,
746  U32 context
747  );
748 
751  FwIndexType portNum,
752  FwChanIdType id,
753  Fw::Time& timeTag,
754  Fw::TlmBuffer& val
755  );
758 
760  void TlmRecv_handlerBase(
761  FwIndexType portNum,
762  FwChanIdType id,
763  Fw::Time& timeTag,
764  Fw::TlmBuffer& val
765  );
766 
769  FwIndexType portNum,
770  const Svc::TelemetrySection& section,
771  FwChanIdType tlmGroup,
772  const Svc::RateLogic& rateLogic,
773  U32 minDelta,
774  U32 maxDelta
775  );
776 
779  FwIndexType portNum,
780  const Svc::TelemetrySection& section,
781  const Fw::Enabled& enabled
782  );
783 
785  void pingIn_handlerBase(
786  FwIndexType portNum,
787  U32 key
788  );
789 
790  protected:
791 
792  // ----------------------------------------------------------------------
793  // Pre-message hooks for typed async input ports
794  //
795  // Each of these functions is invoked just before processing a message
796  // on the corresponding port. By default, they do nothing. You can
797  // override them to provide specific pre-message behavior.
798  // ----------------------------------------------------------------------
799 
801  virtual void Run_preMsgHook(
802  FwIndexType portNum,
803  U32 context
804  );
805 
808  FwIndexType portNum,
809  const Svc::TelemetrySection& section,
810  FwChanIdType tlmGroup,
811  const Svc::RateLogic& rateLogic,
812  U32 minDelta,
813  U32 maxDelta
814  );
815 
817  virtual void controlIn_preMsgHook(
818  FwIndexType portNum,
819  const Svc::TelemetrySection& section,
820  const Fw::Enabled& enabled
821  );
822 
824  virtual void pingIn_preMsgHook(
825  FwIndexType portNum,
826  U32 key
827  );
828 
829  protected:
830 
831  // ----------------------------------------------------------------------
832  // Invocation functions for typed output ports
833  // ----------------------------------------------------------------------
834 
836  void PktSend_out(
837  FwIndexType portNum,
838  Fw::ComBuffer& data,
839  U32 context
840  ) const;
841 
843  void pingOut_out(
844  FwIndexType portNum,
845  U32 key
846  ) const;
847 
848  protected:
849 
850  // ----------------------------------------------------------------------
851  // Command response
852  // ----------------------------------------------------------------------
853 
855  void cmdResponse_out(
856  FwOpcodeType opCode,
857  U32 cmdSeq,
858  Fw::CmdResponse response
859  );
860 
861  protected:
862 
863  // ----------------------------------------------------------------------
864  // Command handlers to implement
865  // ----------------------------------------------------------------------
866 
870  virtual void SET_LEVEL_cmdHandler(
871  FwOpcodeType opCode,
872  U32 cmdSeq,
873  FwChanIdType level
874  ) = 0;
875 
879  virtual void SEND_PKT_cmdHandler(
880  FwOpcodeType opCode,
881  U32 cmdSeq,
882  U32 id,
883  Svc::TelemetrySection section
884  ) = 0;
885 
889  virtual void ENABLE_SECTION_cmdHandler(
890  FwOpcodeType opCode,
891  U32 cmdSeq,
892  Svc::TelemetrySection section,
893  Fw::Enabled enable
894  ) = 0;
895 
899  virtual void ENABLE_GROUP_cmdHandler(
900  FwOpcodeType opCode,
901  U32 cmdSeq,
902  Svc::TelemetrySection section,
903  FwChanIdType tlmGroup,
904  Fw::Enabled enable
905  ) = 0;
906 
910  virtual void FORCE_GROUP_cmdHandler(
911  FwOpcodeType opCode,
912  U32 cmdSeq,
913  Svc::TelemetrySection section,
914  FwChanIdType tlmGroup,
915  Fw::Enabled enable
916  ) = 0;
917 
922  FwOpcodeType opCode,
923  U32 cmdSeq,
924  Svc::TelemetrySection section,
925  FwChanIdType tlmGroup,
926  Svc::RateLogic rateLogic,
927  U32 minDelta,
928  U32 maxDelta
929  ) = 0;
930 
931  protected:
932 
933  // ----------------------------------------------------------------------
934  // Command handler base-class functions
935  //
936  // Call these functions directly to bypass the command input port
937  // ----------------------------------------------------------------------
938 
943  FwOpcodeType opCode,
944  U32 cmdSeq,
945  Fw::CmdArgBuffer& args
946  );
947 
952  FwOpcodeType opCode,
953  U32 cmdSeq,
954  Fw::CmdArgBuffer& args
955  );
956 
961  FwOpcodeType opCode,
962  U32 cmdSeq,
963  Fw::CmdArgBuffer& args
964  );
965 
970  FwOpcodeType opCode,
971  U32 cmdSeq,
972  Fw::CmdArgBuffer& args
973  );
974 
979  FwOpcodeType opCode,
980  U32 cmdSeq,
981  Fw::CmdArgBuffer& args
982  );
983 
988  FwOpcodeType opCode,
989  U32 cmdSeq,
990  Fw::CmdArgBuffer& args
991  );
992 
993  protected:
994 
995  // ----------------------------------------------------------------------
996  // Pre-message hooks for async commands
997  //
998  // Each of these functions is invoked just before processing the
999  // corresponding command. By default they do nothing. You can
1000  // override them to provide specific pre-command behavior.
1001  // ----------------------------------------------------------------------
1002 
1004  virtual void SET_LEVEL_preMsgHook(
1005  FwOpcodeType opCode,
1006  U32 cmdSeq
1007  );
1008 
1010  virtual void SEND_PKT_preMsgHook(
1011  FwOpcodeType opCode,
1012  U32 cmdSeq
1013  );
1014 
1016  virtual void ENABLE_SECTION_preMsgHook(
1017  FwOpcodeType opCode,
1018  U32 cmdSeq
1019  );
1020 
1022  virtual void ENABLE_GROUP_preMsgHook(
1023  FwOpcodeType opCode,
1024  U32 cmdSeq
1025  );
1026 
1028  virtual void FORCE_GROUP_preMsgHook(
1029  FwOpcodeType opCode,
1030  U32 cmdSeq
1031  );
1032 
1034  virtual void CONFIGURE_GROUP_RATES_preMsgHook(
1035  FwOpcodeType opCode,
1036  U32 cmdSeq
1037  );
1038 
1039  protected:
1040 
1041  // ----------------------------------------------------------------------
1042  // Event logging functions
1043  // ----------------------------------------------------------------------
1044 
1048  void log_WARNING_LO_NoChan(
1049  FwChanIdType Id
1050  ) const;
1051 
1056  FwChanIdType level
1057  ) const;
1058 
1063  FwChanIdType level,
1064  FwChanIdType max
1065  ) const;
1066 
1071  U32 packetId
1072  ) const;
1073 
1078  U32 packetId
1079  ) const;
1080 
1083  Svc::TelemetrySection section,
1084  Fw::Enabled enable
1085  ) const;
1086 
1087  protected:
1088 
1089  // ----------------------------------------------------------------------
1090  // Telemetry serialized write
1091  // ----------------------------------------------------------------------
1092 
1097  void tlmWrite(
1098  FwChanIdType id,
1099  Fw::TlmBuffer& _tlmBuff,
1100  Fw::Time _tlmTime = Fw::Time()
1101  ) const;
1102 
1103  protected:
1104 
1105  // ----------------------------------------------------------------------
1106  // Telemetry write functions
1107  // ----------------------------------------------------------------------
1108 
1112  void tlmWrite_GroupConfigs(
1114  Fw::Time _tlmTime = Fw::Time()
1115  ) const;
1116 
1120  Fw::Time _tlmTime = Fw::Time()
1121  ) const;
1122 
1123  protected:
1124 
1125  // ----------------------------------------------------------------------
1126  // Parameter hook functions
1127  // ----------------------------------------------------------------------
1128 
1132  virtual void parameterUpdated(
1133  FwPrmIdType id
1134  );
1135 
1139  virtual void parametersLoaded();
1140 
1141  protected:
1142 
1143  // ----------------------------------------------------------------------
1144  // Parameter get functions
1145  // ----------------------------------------------------------------------
1146 
1153  Fw::ParamValid& valid
1154  );
1155 
1162  Fw::ParamValid& valid
1163  );
1164 
1165  protected:
1166 
1167  // ----------------------------------------------------------------------
1168  // External parameter delegate initialization
1169  // ----------------------------------------------------------------------
1170 
1173  Fw::ParamExternalDelegate* paramExternalDelegatePtr
1174  );
1175 
1176  protected:
1177 
1178  // ----------------------------------------------------------------------
1179  // Time
1180  // ----------------------------------------------------------------------
1181 
1185  Fw::Time getTime() const;
1186 
1187  private:
1188 
1189  // ----------------------------------------------------------------------
1190  // Message dispatch functions
1191  // ----------------------------------------------------------------------
1192 
1194  virtual MsgDispatchStatus doDispatch();
1195 
1196  private:
1197 
1198  // ----------------------------------------------------------------------
1199  // Calls for messages received on special input ports
1200  // ----------------------------------------------------------------------
1201 
1203  static void m_p_cmdIn_in(
1204  Fw::PassiveComponentBase* callComp,
1205  FwIndexType portNum,
1206  FwOpcodeType opCode,
1207  U32 cmdSeq,
1208  Fw::CmdArgBuffer& args
1209  );
1210 
1211  private:
1212 
1213  // ----------------------------------------------------------------------
1214  // Calls for messages received on typed input ports
1215  // ----------------------------------------------------------------------
1216 
1218  static void m_p_Run_in(
1219  Fw::PassiveComponentBase* callComp,
1220  FwIndexType portNum,
1221  U32 context
1222  );
1223 
1225  static Fw::TlmValid m_p_TlmGet_in(
1226  Fw::PassiveComponentBase* callComp,
1227  FwIndexType portNum,
1228  FwChanIdType id,
1229  Fw::Time& timeTag,
1230  Fw::TlmBuffer& val
1231  );
1234 
1236  static void m_p_TlmRecv_in(
1237  Fw::PassiveComponentBase* callComp,
1238  FwIndexType portNum,
1239  FwChanIdType id,
1240  Fw::Time& timeTag,
1241  Fw::TlmBuffer& val
1242  );
1243 
1245  static void m_p_configureSectionGroupRate_in(
1246  Fw::PassiveComponentBase* callComp,
1247  FwIndexType portNum,
1248  const Svc::TelemetrySection& section,
1249  FwChanIdType tlmGroup,
1250  const Svc::RateLogic& rateLogic,
1251  U32 minDelta,
1252  U32 maxDelta
1253  );
1254 
1256  static void m_p_controlIn_in(
1257  Fw::PassiveComponentBase* callComp,
1258  FwIndexType portNum,
1259  const Svc::TelemetrySection& section,
1260  const Fw::Enabled& enabled
1261  );
1262 
1264  static void m_p_pingIn_in(
1265  Fw::PassiveComponentBase* callComp,
1266  FwIndexType portNum,
1267  U32 key
1268  );
1269 
1270  private:
1271 
1272  // ----------------------------------------------------------------------
1273  // Invocation functions for special output ports
1274  // ----------------------------------------------------------------------
1275 
1277  void cmdRegOut_out(
1278  FwIndexType portNum,
1279  FwOpcodeType opCode
1280  ) const;
1281 
1283  void cmdResponseOut_out(
1284  FwIndexType portNum,
1285  FwOpcodeType opCode,
1286  U32 cmdSeq,
1287  const Fw::CmdResponse& response
1288  ) const;
1289 
1291  void eventOut_out(
1292  FwIndexType portNum,
1293  FwEventIdType id,
1294  Fw::Time& timeTag,
1295  const Fw::LogSeverity& severity,
1296  Fw::LogBuffer& args
1297  ) const;
1298 
1300  Fw::ParamValid paramGetOut_out(
1301  FwIndexType portNum,
1302  FwPrmIdType id,
1303  Fw::ParamBuffer& val
1304  ) const;
1306 
1308  void paramSetOut_out(
1309  FwIndexType portNum,
1310  FwPrmIdType id,
1311  Fw::ParamBuffer& val
1312  ) const;
1313 
1314 #if FW_ENABLE_TEXT_LOGGING
1315 
1317  void textEventOut_out(
1318  FwIndexType portNum,
1319  FwEventIdType id,
1320  Fw::Time& timeTag,
1321  const Fw::LogSeverity& severity,
1322  Fw::TextLogString& text
1323  ) const;
1324 
1325 #endif
1326 
1328  void timeGetOut_out(
1329  FwIndexType portNum,
1330  Fw::Time& time
1331  ) const;
1332 
1334  void tlmOut_out(
1335  FwIndexType portNum,
1336  FwChanIdType id,
1337  Fw::Time& timeTag,
1338  Fw::TlmBuffer& val
1339  ) const;
1340 
1341  private:
1342 
1343  // ----------------------------------------------------------------------
1344  // Parameter set functions
1345  // ----------------------------------------------------------------------
1346 
1350  Fw::CmdResponse paramSet_SECTION_ENABLED(
1351  Fw::SerialBufferBase& val
1352  );
1353 
1357  Fw::CmdResponse paramSet_SECTION_CONFIGS(
1358  Fw::SerialBufferBase& val
1359  );
1360 
1361  private:
1362 
1363  // ----------------------------------------------------------------------
1364  // Parameter save functions
1365  // ----------------------------------------------------------------------
1366 
1370  Fw::CmdResponse paramSave_SECTION_ENABLED();
1371 
1375  Fw::CmdResponse paramSave_SECTION_CONFIGS();
1376 
1377 #if !FW_DIRECT_PORT_CALLS
1378 
1379  private:
1380 
1381  // ----------------------------------------------------------------------
1382  // Special input ports
1383  // ----------------------------------------------------------------------
1384 
1386  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1387 
1388 #endif
1389 
1390 #if !FW_DIRECT_PORT_CALLS
1391 
1392  private:
1393 
1394  // ----------------------------------------------------------------------
1395  // Typed input ports
1396  // ----------------------------------------------------------------------
1397 
1399  Svc::InputSchedPort m_Run_InputPort[NUM_RUN_INPUT_PORTS];
1400 
1402  Fw::InputTlmGetPort m_TlmGet_InputPort[NUM_TLMGET_INPUT_PORTS];
1403 
1405  Fw::InputTlmPort m_TlmRecv_InputPort[NUM_TLMRECV_INPUT_PORTS];
1406 
1408  Svc::InputConfigureGroupRatePort m_configureSectionGroupRate_InputPort[NUM_CONFIGURESECTIONGROUPRATE_INPUT_PORTS];
1409 
1412 
1414  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1415 
1416 #endif
1417 
1418 #if !FW_DIRECT_PORT_CALLS
1419 
1420  private:
1421 
1422  // ----------------------------------------------------------------------
1423  // Special output ports
1424  // ----------------------------------------------------------------------
1425 
1427  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1428 
1430  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1431 
1433  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1434 
1436  Fw::OutputPrmGetPort m_paramGetOut_OutputPort[NUM_PARAMGETOUT_OUTPUT_PORTS];
1437 
1439  Fw::OutputPrmSetPort m_paramSetOut_OutputPort[NUM_PARAMSETOUT_OUTPUT_PORTS];
1440 
1441 #if FW_ENABLE_TEXT_LOGGING == 1
1442 
1444  Fw::OutputLogTextPort m_textEventOut_OutputPort[NUM_TEXTEVENTOUT_OUTPUT_PORTS];
1445 
1446 #endif
1447 
1449  Fw::OutputTimePort m_timeGetOut_OutputPort[NUM_TIMEGETOUT_OUTPUT_PORTS];
1450 
1452  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1453 
1454 #endif
1455 
1456 #if !FW_DIRECT_PORT_CALLS
1457 
1458  private:
1459 
1460  // ----------------------------------------------------------------------
1461  // Typed output ports
1462  // ----------------------------------------------------------------------
1463 
1465  Fw::OutputComPort m_PktSend_OutputPort[NUM_PKTSEND_OUTPUT_PORTS];
1466 
1468  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1469 
1470 #endif
1471 
1472  private:
1473 
1474  // ----------------------------------------------------------------------
1475  // Parameter validity flags
1476  // ----------------------------------------------------------------------
1477 
1479  Fw::ParamValid m_param_SECTION_ENABLED_valid = Fw::ParamValid::UNINIT;
1480 
1482  Fw::ParamValid m_param_SECTION_CONFIGS_valid = Fw::ParamValid::UNINIT;
1483 
1484  private:
1485 
1486  // ----------------------------------------------------------------------
1487  // Parameter delegate
1488  // ----------------------------------------------------------------------
1489 
1491  Fw::ParamExternalDelegate* paramDelegatePtr = nullptr;
1492 
1493  private:
1494 
1495  // ----------------------------------------------------------------------
1496  // Mutexes
1497  // ----------------------------------------------------------------------
1498 
1500  Os::Mutex m_paramLock;
1501 
1502  };
1503 
1504 }
1505 
1506 #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.
Telemetry channel is not part of a telemetry packet.
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
void log_ACTIVITY_HI_LevelSet(FwChanIdType level) 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.
void log_ACTIVITY_LO_PacketSent(U32 packetId) const
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.
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
Enable / disable telemetry of a group on a section.
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 log_WARNING_LO_PacketNotFound(U32 packetId) const
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.
Set Min and Max Deltas between successive packets.
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
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.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
void ENABLE_GROUP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
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 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.
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.
Force telemetering a group on a section, even if disabled.
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()