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
27 #include "Fw/Prm/PrmGetPortAc.hpp"
28 #include "Fw/Prm/PrmSetPortAc.hpp"
29 #include "Fw/Prm/PrmString.hpp"
30 #include "Fw/Time/TimePortAc.hpp"
31 #include "Fw/Tlm/TlmGetPortAc.hpp"
32 #include "Fw/Tlm/TlmPortAc.hpp"
33 #include "Fw/Tlm/TlmString.hpp"
35 #include "Os/Mutex.hpp"
36 #include "Svc/Ping/PingPortAc.hpp"
49 
50 namespace Svc {
51 
58  {
59 
60  // ----------------------------------------------------------------------
61  // Friend classes
62  // ----------------------------------------------------------------------
63 
67  friend class TlmPacketizerTester;
68 
69  protected:
70 
71  // ----------------------------------------------------------------------
72  // Constants
73  // ----------------------------------------------------------------------
74 
76  enum {
78  };
79 
81  enum {
88  };
89 
91  enum {
100  };
101 
103  enum {
106  };
107 
109  enum {
120  };
121 
123  enum {
130  };
131 
133  enum {
136  };
137 
139  enum {
142  };
143 
144  public:
145 
146  // ----------------------------------------------------------------------
147  // Component initialization
148  // ----------------------------------------------------------------------
149 
151  void init(
152  FwSizeType queueDepth,
153  FwEnumStoreType instance = 0
154  );
155 
156  public:
157 
158  // ----------------------------------------------------------------------
159  // Getters for special input ports
160  // ----------------------------------------------------------------------
161 
166  FwIndexType portNum
167  );
168 
169  public:
170 
171  // ----------------------------------------------------------------------
172  // Getters for typed input ports
173  // ----------------------------------------------------------------------
174 
179  FwIndexType portNum
180  );
181 
186  FwIndexType portNum
187  );
188 
193  FwIndexType portNum
194  );
195 
200  FwIndexType portNum
201  );
202 
207  FwIndexType portNum
208  );
209 
214  FwIndexType portNum
215  );
216 
217  public:
218 
219  // ----------------------------------------------------------------------
220  // Connect input ports to special output ports
221  // ----------------------------------------------------------------------
222 
225  FwIndexType portNum,
226  Fw::InputCmdRegPort* port
227  );
228 
231  FwIndexType portNum,
233  );
234 
237  FwIndexType portNum,
238  Fw::InputLogPort* port
239  );
240 
243  FwIndexType portNum,
244  Fw::InputPrmGetPort* port
245  );
246 
249  FwIndexType portNum,
250  Fw::InputPrmSetPort* port
251  );
252 
253 #if FW_ENABLE_TEXT_LOGGING == 1
254 
256  void set_textEventOut_OutputPort(
257  FwIndexType portNum,
258  Fw::InputLogTextPort* port
259  );
260 
261 #endif
262 
265  FwIndexType portNum,
266  Fw::InputTimePort* port
267  );
268 
271  FwIndexType portNum,
272  Fw::InputTlmPort* port
273  );
274 
275  public:
276 
277  // ----------------------------------------------------------------------
278  // Connect typed input ports to typed output ports
279  // ----------------------------------------------------------------------
280 
283  FwIndexType portNum,
284  Fw::InputComPort* port
285  );
286 
289  FwIndexType portNum,
290  Svc::InputPingPort* port
291  );
292 
293 #if FW_PORT_SERIALIZATION
294 
295  public:
296 
297  // ----------------------------------------------------------------------
298  // Connect serial input ports to special output ports
299  // ----------------------------------------------------------------------
300 
303  FwIndexType portNum,
304  Fw::InputSerializePort* port
305  );
306 
309  FwIndexType portNum,
310  Fw::InputSerializePort* port
311  );
312 
315  FwIndexType portNum,
316  Fw::InputSerializePort* port
317  );
318 
321  FwIndexType portNum,
322  Fw::InputSerializePort* port
323  );
324 
325 #if FW_ENABLE_TEXT_LOGGING == 1
326 
328  void set_textEventOut_OutputPort(
329  FwIndexType portNum,
330  Fw::InputSerializePort* port
331  );
332 
333 #endif
334 
337  FwIndexType portNum,
338  Fw::InputSerializePort* port
339  );
340 
343  FwIndexType portNum,
344  Fw::InputSerializePort* port
345  );
346 
347 #endif
348 
349 #if FW_PORT_SERIALIZATION
350 
351  public:
352 
353  // ----------------------------------------------------------------------
354  // Connect serial input ports to typed output ports
355  // ----------------------------------------------------------------------
356 
359  FwIndexType portNum,
360  Fw::InputSerializePort* port
361  );
362 
365  FwIndexType portNum,
366  Fw::InputSerializePort* port
367  );
368 
369 #endif
370 
371  public:
372 
373  // ----------------------------------------------------------------------
374  // Command registration
375  // ----------------------------------------------------------------------
376 
380  void regCommands();
381 
382  public:
383 
384  // ----------------------------------------------------------------------
385  // Parameter loading
386  // ----------------------------------------------------------------------
387 
391  void loadParameters();
392 
393  protected:
394 
395  // ----------------------------------------------------------------------
396  // Component construction and destruction
397  // ----------------------------------------------------------------------
398 
401  const char* compName = ""
402  );
403 
405  virtual ~TlmPacketizerComponentBase();
406 
407  protected:
408 
409  // ----------------------------------------------------------------------
410  // Getters for numbers of special input ports
411  // ----------------------------------------------------------------------
412 
417  return NUM_CMDIN_INPUT_PORTS;
418  }
419 
420  protected:
421 
422  // ----------------------------------------------------------------------
423  // Getters for numbers of typed input ports
424  // ----------------------------------------------------------------------
425 
429  static constexpr FwIndexType getNum_Run_InputPorts() {
430  return NUM_RUN_INPUT_PORTS;
431  }
432 
437  return NUM_TLMGET_INPUT_PORTS;
438  }
439 
445  }
446 
452  }
453 
459  }
460 
465  return NUM_PINGIN_INPUT_PORTS;
466  }
467 
468  protected:
469 
470  // ----------------------------------------------------------------------
471  // Getters for numbers of special output ports
472  // ----------------------------------------------------------------------
473 
479  }
480 
486  }
487 
493  }
494 
500  }
501 
507  }
508 
509 #if FW_ENABLE_TEXT_LOGGING == 1
510 
514  static constexpr FwIndexType getNum_textEventOut_OutputPorts() {
516  }
517 
518 #endif
519 
525  }
526 
532  }
533 
534  protected:
535 
536  // ----------------------------------------------------------------------
537  // Getters for numbers of typed output ports
538  // ----------------------------------------------------------------------
539 
545  }
546 
552  }
553 
554  protected:
555 
556  // ----------------------------------------------------------------------
557  // Connection status queries for special output ports
558  // ----------------------------------------------------------------------
559 
564  FwIndexType portNum
565  );
566 
571  FwIndexType portNum
572  );
573 
578  FwIndexType portNum
579  );
580 
585  FwIndexType portNum
586  );
587 
592  FwIndexType portNum
593  );
594 
595 #if FW_ENABLE_TEXT_LOGGING == 1
596 
600  bool isConnected_textEventOut_OutputPort(
601  FwIndexType portNum
602  );
603 
604 #endif
605 
610  FwIndexType portNum
611  );
612 
617  FwIndexType portNum
618  );
619 
620  protected:
621 
622  // ----------------------------------------------------------------------
623  // Connection status queries for typed output ports
624  // ----------------------------------------------------------------------
625 
630  FwIndexType portNum
631  );
632 
637  FwIndexType portNum
638  );
639 
640  protected:
641 
642  // ----------------------------------------------------------------------
643  // Handlers to implement for typed input ports
644  // ----------------------------------------------------------------------
645 
647  virtual void Run_handler(
648  FwIndexType portNum,
649  U32 context
650  ) = 0;
651 
654  FwIndexType portNum,
655  FwChanIdType id,
656  Fw::Time& timeTag,
657  Fw::TlmBuffer& val
658  ) = 0;
661 
663  virtual void TlmRecv_handler(
664  FwIndexType portNum,
665  FwChanIdType id,
666  Fw::Time& timeTag,
667  Fw::TlmBuffer& val
668  ) = 0;
669 
672  FwIndexType portNum,
673  const Svc::TelemetrySection& section,
674  FwChanIdType tlmGroup,
675  const Svc::RateLogic& rateLogic,
676  U32 minDelta,
677  U32 maxDelta
678  ) = 0;
679 
681  virtual void controlIn_handler(
682  FwIndexType portNum,
683  const Svc::TelemetrySection& section,
684  const Fw::Enabled& enabled
685  ) = 0;
686 
688  virtual void pingIn_handler(
689  FwIndexType portNum,
690  U32 key
691  ) = 0;
692 
693  protected:
694 
695  // ----------------------------------------------------------------------
696  // Port handler base-class functions for typed input ports
697  //
698  // Call these functions directly to bypass the corresponding ports
699  // ----------------------------------------------------------------------
700 
702  void Run_handlerBase(
703  FwIndexType portNum,
704  U32 context
705  );
706 
709  FwIndexType portNum,
710  FwChanIdType id,
711  Fw::Time& timeTag,
712  Fw::TlmBuffer& val
713  );
716 
718  void TlmRecv_handlerBase(
719  FwIndexType portNum,
720  FwChanIdType id,
721  Fw::Time& timeTag,
722  Fw::TlmBuffer& val
723  );
724 
727  FwIndexType portNum,
728  const Svc::TelemetrySection& section,
729  FwChanIdType tlmGroup,
730  const Svc::RateLogic& rateLogic,
731  U32 minDelta,
732  U32 maxDelta
733  );
734 
737  FwIndexType portNum,
738  const Svc::TelemetrySection& section,
739  const Fw::Enabled& enabled
740  );
741 
743  void pingIn_handlerBase(
744  FwIndexType portNum,
745  U32 key
746  );
747 
748  protected:
749 
750  // ----------------------------------------------------------------------
751  // Pre-message hooks for typed async input ports
752  //
753  // Each of these functions is invoked just before processing a message
754  // on the corresponding port. By default, they do nothing. You can
755  // override them to provide specific pre-message behavior.
756  // ----------------------------------------------------------------------
757 
759  virtual void Run_preMsgHook(
760  FwIndexType portNum,
761  U32 context
762  );
763 
766  FwIndexType portNum,
767  const Svc::TelemetrySection& section,
768  FwChanIdType tlmGroup,
769  const Svc::RateLogic& rateLogic,
770  U32 minDelta,
771  U32 maxDelta
772  );
773 
775  virtual void controlIn_preMsgHook(
776  FwIndexType portNum,
777  const Svc::TelemetrySection& section,
778  const Fw::Enabled& enabled
779  );
780 
782  virtual void pingIn_preMsgHook(
783  FwIndexType portNum,
784  U32 key
785  );
786 
787  protected:
788 
789  // ----------------------------------------------------------------------
790  // Invocation functions for typed output ports
791  // ----------------------------------------------------------------------
792 
794  void PktSend_out(
795  FwIndexType portNum,
796  Fw::ComBuffer& data,
797  U32 context
798  );
799 
801  void pingOut_out(
802  FwIndexType portNum,
803  U32 key
804  );
805 
806  protected:
807 
808  // ----------------------------------------------------------------------
809  // Command response
810  // ----------------------------------------------------------------------
811 
813  void cmdResponse_out(
814  FwOpcodeType opCode,
815  U32 cmdSeq,
816  Fw::CmdResponse response
817  );
818 
819  protected:
820 
821  // ----------------------------------------------------------------------
822  // Command handlers to implement
823  // ----------------------------------------------------------------------
824 
828  virtual void SET_LEVEL_cmdHandler(
829  FwOpcodeType opCode,
830  U32 cmdSeq,
831  FwChanIdType level
832  ) = 0;
833 
837  virtual void SEND_PKT_cmdHandler(
838  FwOpcodeType opCode,
839  U32 cmdSeq,
840  U32 id,
841  Svc::TelemetrySection section
842  ) = 0;
843 
847  virtual void ENABLE_SECTION_cmdHandler(
848  FwOpcodeType opCode,
849  U32 cmdSeq,
850  Svc::TelemetrySection section,
851  Fw::Enabled enable
852  ) = 0;
853 
857  virtual void ENABLE_GROUP_cmdHandler(
858  FwOpcodeType opCode,
859  U32 cmdSeq,
860  Svc::TelemetrySection section,
861  FwChanIdType tlmGroup,
862  Fw::Enabled enable
863  ) = 0;
864 
868  virtual void FORCE_GROUP_cmdHandler(
869  FwOpcodeType opCode,
870  U32 cmdSeq,
871  Svc::TelemetrySection section,
872  FwChanIdType tlmGroup,
873  Fw::Enabled enable
874  ) = 0;
875 
880  FwOpcodeType opCode,
881  U32 cmdSeq,
882  Svc::TelemetrySection section,
883  FwChanIdType tlmGroup,
884  Svc::RateLogic rateLogic,
885  U32 minDelta,
886  U32 maxDelta
887  ) = 0;
888 
889  protected:
890 
891  // ----------------------------------------------------------------------
892  // Command handler base-class functions
893  //
894  // Call these functions directly to bypass the command input port
895  // ----------------------------------------------------------------------
896 
901  FwOpcodeType opCode,
902  U32 cmdSeq,
903  Fw::CmdArgBuffer& args
904  );
905 
910  FwOpcodeType opCode,
911  U32 cmdSeq,
912  Fw::CmdArgBuffer& args
913  );
914 
919  FwOpcodeType opCode,
920  U32 cmdSeq,
921  Fw::CmdArgBuffer& args
922  );
923 
928  FwOpcodeType opCode,
929  U32 cmdSeq,
930  Fw::CmdArgBuffer& args
931  );
932 
937  FwOpcodeType opCode,
938  U32 cmdSeq,
939  Fw::CmdArgBuffer& args
940  );
941 
946  FwOpcodeType opCode,
947  U32 cmdSeq,
948  Fw::CmdArgBuffer& args
949  );
950 
951  protected:
952 
953  // ----------------------------------------------------------------------
954  // Pre-message hooks for async commands
955  //
956  // Each of these functions is invoked just before processing the
957  // corresponding command. By default they do nothing. You can
958  // override them to provide specific pre-command behavior.
959  // ----------------------------------------------------------------------
960 
962  virtual void SET_LEVEL_preMsgHook(
963  FwOpcodeType opCode,
964  U32 cmdSeq
965  );
966 
968  virtual void SEND_PKT_preMsgHook(
969  FwOpcodeType opCode,
970  U32 cmdSeq
971  );
972 
974  virtual void ENABLE_SECTION_preMsgHook(
975  FwOpcodeType opCode,
976  U32 cmdSeq
977  );
978 
980  virtual void ENABLE_GROUP_preMsgHook(
981  FwOpcodeType opCode,
982  U32 cmdSeq
983  );
984 
986  virtual void FORCE_GROUP_preMsgHook(
987  FwOpcodeType opCode,
988  U32 cmdSeq
989  );
990 
993  FwOpcodeType opCode,
994  U32 cmdSeq
995  );
996 
997  protected:
998 
999  // ----------------------------------------------------------------------
1000  // Event logging functions
1001  // ----------------------------------------------------------------------
1002 
1006  void log_WARNING_LO_NoChan(
1007  FwChanIdType Id
1008  ) const;
1009 
1014  FwChanIdType id
1015  ) const;
1016 
1021  FwChanIdType level,
1022  FwChanIdType max
1023  ) const;
1024 
1029  U32 id
1030  ) const;
1031 
1036  U32 id
1037  ) const;
1038 
1041  Svc::TelemetrySection section,
1042  Fw::Enabled enable
1043  ) const;
1044 
1045  protected:
1046 
1047  // ----------------------------------------------------------------------
1048  // Telemetry write functions
1049  // ----------------------------------------------------------------------
1050 
1054  void tlmWrite_GroupConfigs(
1056  Fw::Time _tlmTime = Fw::Time()
1057  ) const;
1058 
1062  Fw::Time _tlmTime = Fw::Time()
1063  ) const;
1064 
1065  protected:
1066 
1067  // ----------------------------------------------------------------------
1068  // Parameter update hook
1069  // ----------------------------------------------------------------------
1070 
1074  virtual void parameterUpdated(
1075  FwPrmIdType id
1076  );
1077 
1078  // ----------------------------------------------------------------------
1079  // Parameter load hook
1080  // ----------------------------------------------------------------------
1081 
1085  virtual void parametersLoaded();
1086 
1087  protected:
1088 
1089  // ----------------------------------------------------------------------
1090  // Parameter get functions
1091  // ----------------------------------------------------------------------
1092 
1099  Fw::ParamValid& valid
1100  );
1101 
1108  Fw::ParamValid& valid
1109  );
1110 
1111  protected:
1112 
1113  // ----------------------------------------------------------------------
1114  // External parameter delegate initialization
1115  // ----------------------------------------------------------------------
1116 
1119  Fw::ParamExternalDelegate* paramExternalDelegatePtr
1120  );
1121 
1122  protected:
1123 
1124  // ----------------------------------------------------------------------
1125  // Time
1126  // ----------------------------------------------------------------------
1127 
1131  Fw::Time getTime() const;
1132 
1133  private:
1134 
1135  // ----------------------------------------------------------------------
1136  // Message dispatch functions
1137  // ----------------------------------------------------------------------
1138 
1140  virtual MsgDispatchStatus doDispatch();
1141 
1142  private:
1143 
1144  // ----------------------------------------------------------------------
1145  // Calls for messages received on special input ports
1146  // ----------------------------------------------------------------------
1147 
1149  static void m_p_cmdIn_in(
1150  Fw::PassiveComponentBase* callComp,
1151  FwIndexType portNum,
1152  FwOpcodeType opCode,
1153  U32 cmdSeq,
1154  Fw::CmdArgBuffer& args
1155  );
1156 
1157  private:
1158 
1159  // ----------------------------------------------------------------------
1160  // Calls for messages received on typed input ports
1161  // ----------------------------------------------------------------------
1162 
1164  static void m_p_Run_in(
1165  Fw::PassiveComponentBase* callComp,
1166  FwIndexType portNum,
1167  U32 context
1168  );
1169 
1171  static Fw::TlmValid m_p_TlmGet_in(
1172  Fw::PassiveComponentBase* callComp,
1173  FwIndexType portNum,
1174  FwChanIdType id,
1175  Fw::Time& timeTag,
1176  Fw::TlmBuffer& val
1177  );
1180 
1182  static void m_p_TlmRecv_in(
1183  Fw::PassiveComponentBase* callComp,
1184  FwIndexType portNum,
1185  FwChanIdType id,
1186  Fw::Time& timeTag,
1187  Fw::TlmBuffer& val
1188  );
1189 
1191  static void m_p_configureSectionGroupRate_in(
1192  Fw::PassiveComponentBase* callComp,
1193  FwIndexType portNum,
1194  const Svc::TelemetrySection& section,
1195  FwChanIdType tlmGroup,
1196  const Svc::RateLogic& rateLogic,
1197  U32 minDelta,
1198  U32 maxDelta
1199  );
1200 
1202  static void m_p_controlIn_in(
1203  Fw::PassiveComponentBase* callComp,
1204  FwIndexType portNum,
1205  const Svc::TelemetrySection& section,
1206  const Fw::Enabled& enabled
1207  );
1208 
1210  static void m_p_pingIn_in(
1211  Fw::PassiveComponentBase* callComp,
1212  FwIndexType portNum,
1213  U32 key
1214  );
1215 
1216  private:
1217 
1218  // ----------------------------------------------------------------------
1219  // Parameter set functions
1220  // ----------------------------------------------------------------------
1221 
1225  Fw::CmdResponse paramSet_SECTION_ENABLED(
1226  Fw::SerialBufferBase& val
1227  );
1228 
1232  Fw::CmdResponse paramSet_SECTION_CONFIGS(
1233  Fw::SerialBufferBase& val
1234  );
1235 
1236  private:
1237 
1238  // ----------------------------------------------------------------------
1239  // Parameter save functions
1240  // ----------------------------------------------------------------------
1241 
1245  Fw::CmdResponse paramSave_SECTION_ENABLED();
1246 
1250  Fw::CmdResponse paramSave_SECTION_CONFIGS();
1251 
1252  private:
1253 
1254  // ----------------------------------------------------------------------
1255  // Special input ports
1256  // ----------------------------------------------------------------------
1257 
1259  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1260 
1261  private:
1262 
1263  // ----------------------------------------------------------------------
1264  // Typed input ports
1265  // ----------------------------------------------------------------------
1266 
1268  Svc::InputSchedPort m_Run_InputPort[NUM_RUN_INPUT_PORTS];
1269 
1271  Fw::InputTlmGetPort m_TlmGet_InputPort[NUM_TLMGET_INPUT_PORTS];
1272 
1274  Fw::InputTlmPort m_TlmRecv_InputPort[NUM_TLMRECV_INPUT_PORTS];
1275 
1277  Svc::InputConfigureGroupRatePort m_configureSectionGroupRate_InputPort[NUM_CONFIGURESECTIONGROUPRATE_INPUT_PORTS];
1278 
1281 
1283  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1284 
1285  private:
1286 
1287  // ----------------------------------------------------------------------
1288  // Special output ports
1289  // ----------------------------------------------------------------------
1290 
1292  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1293 
1295  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1296 
1298  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1299 
1301  Fw::OutputPrmGetPort m_paramGetOut_OutputPort[NUM_PARAMGETOUT_OUTPUT_PORTS];
1302 
1304  Fw::OutputPrmSetPort m_paramSetOut_OutputPort[NUM_PARAMSETOUT_OUTPUT_PORTS];
1305 
1306 #if FW_ENABLE_TEXT_LOGGING == 1
1307 
1309  Fw::OutputLogTextPort m_textEventOut_OutputPort[NUM_TEXTEVENTOUT_OUTPUT_PORTS];
1310 
1311 #endif
1312 
1314  Fw::OutputTimePort m_timeGetOut_OutputPort[NUM_TIMEGETOUT_OUTPUT_PORTS];
1315 
1317  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1318 
1319  private:
1320 
1321  // ----------------------------------------------------------------------
1322  // Typed output ports
1323  // ----------------------------------------------------------------------
1324 
1326  Fw::OutputComPort m_PktSend_OutputPort[NUM_PKTSEND_OUTPUT_PORTS];
1327 
1329  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1330 
1331  private:
1332 
1333  // ----------------------------------------------------------------------
1334  // Parameter delegates
1335  // ----------------------------------------------------------------------
1336 
1338  Fw::ParamExternalDelegate* paramDelegatePtr;
1339 
1340  private:
1341 
1342  // ----------------------------------------------------------------------
1343  // Mutexes
1344  // ----------------------------------------------------------------------
1345 
1347  Os::Mutex m_paramLock;
1348 
1349  };
1350 
1351 }
1352 
1353 #endif
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].
Set Min and Max Deltas between successive packets.
Force telemetering a group on a section, even if disabled.
FwIdType FwOpcodeType
The type of a command opcode.
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
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()
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.
void PktSend_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port PktSend.
virtual void controlIn_handler(FwIndexType portNum, const Svc::TelemetrySection &section, const Fw::Enabled &enabled)=0
Handler for input port controlIn.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
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.
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.
virtual void FORCE_GROUP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FORCE_GROUP.
Enable / disable telemetry of a group on a section.
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
Enable / disable telemetry of a group on a section.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
Fw::InputTlmGetPort * get_TlmGet_InputPort(FwIndexType portNum)
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.
bool isConnected_paramSetOut_OutputPort(FwIndexType portNum)
Enumeration for rate logic types for telemetry groups.
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.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
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 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.
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
Enum representing parameter validity.
bool isConnected_PktSend_OutputPort(FwIndexType portNum)
Svc::InputSchedPort * get_Run_InputPort(FwIndexType portNum)
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_TlmGet_InputPorts()
Fw::InputTlmPort * get_TlmRecv_InputPort(FwIndexType portNum)
Telemetry channel is not part of a telemetry packet.
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.
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum)
void regCommands()
Register commands with the Command Dispatcher.
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
bool isConnected_paramGetOut_OutputPort(FwIndexType portNum)
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].
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
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()