F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpWriterComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpWriterComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DpWriter component base class
5 // ======================================================================
6 
7 #ifndef Svc_DpWriterComponentAc_HPP
8 #define Svc_DpWriterComponentAc_HPP
9 
10 #include <atomic>
11 
13 #include "Fw/Cmd/CmdPortAc.hpp"
14 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/Cmd/CmdString.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
28 #include "Fw/Time/TimePortAc.hpp"
29 #include "Fw/Tlm/TlmPortAc.hpp"
30 #include "Fw/Tlm/TlmString.hpp"
36 
37 namespace Svc {
38 
45  {
46 
47  // ----------------------------------------------------------------------
48  // Friend classes
49  // ----------------------------------------------------------------------
50 
52  friend class DpWriterTesterBase;
54  friend class DpWriterTester;
55 
56  protected:
57 
58  // ----------------------------------------------------------------------
59  // Constants
60  // ----------------------------------------------------------------------
61 
63  enum {
65  };
66 
68  enum {
71  };
72 
74  enum {
81  };
82 
84  enum {
88  };
89 
91  enum {
93  };
94 
96  enum {
106  };
107 
109  enum {
118  };
119 
121  enum {
127  };
128 
129  public:
130 
131  // ----------------------------------------------------------------------
132  // Component initialization
133  // ----------------------------------------------------------------------
134 
136  void init(
137  FwSizeType queueDepth,
138  FwEnumStoreType instance = 0
139  );
140 
141 #if !FW_DIRECT_PORT_CALLS
142 
143  public:
144 
145  // ----------------------------------------------------------------------
146  // Getters for special input ports
147  // ----------------------------------------------------------------------
148 
153  FwIndexType portNum
154  );
155 
156 #endif
157 
158 #if !FW_DIRECT_PORT_CALLS
159 
160  public:
161 
162  // ----------------------------------------------------------------------
163  // Getters for typed input ports
164  // ----------------------------------------------------------------------
165 
170  FwIndexType portNum
171  );
172 
177  FwIndexType portNum
178  );
179 
180 #endif
181 
182 #if !FW_DIRECT_PORT_CALLS
183 
184  public:
185 
186  // ----------------------------------------------------------------------
187  // Connect input ports to special output ports
188  // ----------------------------------------------------------------------
189 
192  FwIndexType portNum,
193  Fw::InputCmdRegPort* port
194  );
195 
198  FwIndexType portNum,
200  );
201 
204  FwIndexType portNum,
205  Fw::InputLogPort* port
206  );
207 
208 #if FW_ENABLE_TEXT_LOGGING == 1
209 
211  void set_textEventOut_OutputPort(
212  FwIndexType portNum,
213  Fw::InputLogTextPort* port
214  );
215 
216 #endif
217 
220  FwIndexType portNum,
221  Fw::InputTimePort* port
222  );
223 
226  FwIndexType portNum,
227  Fw::InputTlmPort* port
228  );
229 
230 #endif
231 
232 #if !FW_DIRECT_PORT_CALLS
233 
234  public:
235 
236  // ----------------------------------------------------------------------
237  // Connect typed input ports to typed output ports
238  // ----------------------------------------------------------------------
239 
242  FwIndexType portNum,
244  );
245 
248  FwIndexType portNum,
250  );
251 
254  FwIndexType portNum,
256  );
257 
258 #endif
259 
260 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
261 
262  public:
263 
264  // ----------------------------------------------------------------------
265  // Connect serial input ports to special output ports
266  // ----------------------------------------------------------------------
267 
270  FwIndexType portNum,
271  Fw::InputSerializePort* port
272  );
273 
276  FwIndexType portNum,
277  Fw::InputSerializePort* port
278  );
279 
282  FwIndexType portNum,
283  Fw::InputSerializePort* port
284  );
285 
286 #if FW_ENABLE_TEXT_LOGGING == 1
287 
289  void set_textEventOut_OutputPort(
290  FwIndexType portNum,
291  Fw::InputSerializePort* port
292  );
293 
294 #endif
295 
298  FwIndexType portNum,
299  Fw::InputSerializePort* port
300  );
301 
304  FwIndexType portNum,
305  Fw::InputSerializePort* port
306  );
307 
308 #endif
309 
310 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
311 
312  public:
313 
314  // ----------------------------------------------------------------------
315  // Connect serial input ports to typed output ports
316  // ----------------------------------------------------------------------
317 
320  FwIndexType portNum,
321  Fw::InputSerializePort* port
322  );
323 
326  FwIndexType portNum,
327  Fw::InputSerializePort* port
328  );
329 
332  FwIndexType portNum,
333  Fw::InputSerializePort* port
334  );
335 
336 #endif
337 
338  public:
339 
340  // ----------------------------------------------------------------------
341  // Command registration
342  // ----------------------------------------------------------------------
343 
347  void regCommands();
348 
349  protected:
350 
351  // ----------------------------------------------------------------------
352  // Component construction and destruction
353  // ----------------------------------------------------------------------
354 
357  const char* compName = ""
358  );
359 
361  virtual ~DpWriterComponentBase();
362 
363  protected:
364 
365  // ----------------------------------------------------------------------
366  // Getters for numbers of special input ports
367  // ----------------------------------------------------------------------
368 
373  return NUM_CMDIN_INPUT_PORTS;
374  }
375 
376  protected:
377 
378  // ----------------------------------------------------------------------
379  // Getters for numbers of typed input ports
380  // ----------------------------------------------------------------------
381 
387  }
388 
394  }
395 
396  protected:
397 
398  // ----------------------------------------------------------------------
399  // Getters for numbers of special output ports
400  // ----------------------------------------------------------------------
401 
407  }
408 
414  }
415 
421  }
422 
423 #if FW_ENABLE_TEXT_LOGGING == 1
424 
428  static constexpr FwIndexType getNum_textEventOut_OutputPorts() {
430  }
431 
432 #endif
433 
439  }
440 
446  }
447 
448  protected:
449 
450  // ----------------------------------------------------------------------
451  // Getters for numbers of typed output ports
452  // ----------------------------------------------------------------------
453 
459  }
460 
466  }
467 
473  }
474 
475  protected:
476 
477  // ----------------------------------------------------------------------
478  // Connection status queries for special output ports
479  // ----------------------------------------------------------------------
480 
485  FwIndexType portNum
486  ) const;
487 
492  FwIndexType portNum
493  ) const;
494 
499  FwIndexType portNum
500  ) const;
501 
502 #if FW_ENABLE_TEXT_LOGGING == 1
503 
507  bool isConnected_textEventOut_OutputPort(
508  FwIndexType portNum
509  ) const;
510 
511 #endif
512 
517  FwIndexType portNum
518  ) const;
519 
524  FwIndexType portNum
525  ) const;
526 
527  protected:
528 
529  // ----------------------------------------------------------------------
530  // Connection status queries for typed output ports
531  // ----------------------------------------------------------------------
532 
537  FwIndexType portNum
538  ) const;
539 
544  FwIndexType portNum
545  ) const;
546 
551  FwIndexType portNum
552  ) const;
553 
554 #if FW_DIRECT_PORT_CALLS
555  public:
556 #else
557  protected:
558 #endif
559 
560  // ----------------------------------------------------------------------
561  // Port handler base-class functions for special input ports
562  //
563  // Call these functions directly to bypass the corresponding ports
564  // ----------------------------------------------------------------------
565 
567  void cmdIn_handlerBase(
568  FwIndexType portNum,
569  FwOpcodeType opCode,
570  U32 cmdSeq,
571  Fw::CmdArgBuffer& args
572  );
573 
574  protected:
575 
576  // ----------------------------------------------------------------------
577  // Handlers to implement for typed input ports
578  // ----------------------------------------------------------------------
579 
581  virtual void bufferSendIn_handler(
582  FwIndexType portNum,
583  Fw::Buffer& fwBuffer
584  ) = 0;
585 
587  virtual void schedIn_handler(
588  FwIndexType portNum,
589  U32 context
590  ) = 0;
591 
592 #if FW_DIRECT_PORT_CALLS
593  public:
594 #else
595  protected:
596 #endif
597 
598  // ----------------------------------------------------------------------
599  // Port handler base-class functions for typed input ports
600  //
601  // Call these functions directly to bypass the corresponding ports
602  // ----------------------------------------------------------------------
603 
606  FwIndexType portNum,
607  Fw::Buffer& fwBuffer
608  );
609 
611  void schedIn_handlerBase(
612  FwIndexType portNum,
613  U32 context
614  );
615 
616  protected:
617 
618  // ----------------------------------------------------------------------
619  // Pre-message hooks for typed async input ports
620  //
621  // Each of these functions is invoked just before processing a message
622  // on the corresponding port. By default, they do nothing. You can
623  // override them to provide specific pre-message behavior.
624  // ----------------------------------------------------------------------
625 
627  virtual void bufferSendIn_preMsgHook(
628  FwIndexType portNum,
629  Fw::Buffer& fwBuffer
630  );
631 
633  virtual void schedIn_preMsgHook(
634  FwIndexType portNum,
635  U32 context
636  );
637 
638  protected:
639 
640  // ----------------------------------------------------------------------
641  // Invocation functions for typed output ports
642  // ----------------------------------------------------------------------
643 
646  FwIndexType portNum,
647  Fw::Buffer& fwBuffer
648  ) const;
649 
651  void dpWrittenOut_out(
652  FwIndexType portNum,
653  const Fw::StringBase& fileName,
654  FwDpPriorityType priority,
655  FwSizeType size
656  ) const;
657 
660  FwIndexType portNum,
661  Fw::Buffer& fwBuffer
662  ) const;
663 
664  protected:
665 
666  // ----------------------------------------------------------------------
667  // Command response
668  // ----------------------------------------------------------------------
669 
671  void cmdResponse_out(
672  FwOpcodeType opCode,
673  U32 cmdSeq,
674  Fw::CmdResponse response
675  );
676 
677  protected:
678 
679  // ----------------------------------------------------------------------
680  // Command handlers to implement
681  // ----------------------------------------------------------------------
682 
686  virtual void CLEAR_EVENT_THROTTLE_cmdHandler(
687  FwOpcodeType opCode,
688  U32 cmdSeq
689  ) = 0;
690 
691  protected:
692 
693  // ----------------------------------------------------------------------
694  // Command handler base-class functions
695  //
696  // Call these functions directly to bypass the command input port
697  // ----------------------------------------------------------------------
698 
703  FwOpcodeType opCode,
704  U32 cmdSeq,
705  Fw::CmdArgBuffer& args
706  );
707 
708  protected:
709 
710  // ----------------------------------------------------------------------
711  // Pre-message hooks for async commands
712  //
713  // Each of these functions is invoked just before processing the
714  // corresponding command. By default they do nothing. You can
715  // override them to provide specific pre-command behavior.
716  // ----------------------------------------------------------------------
717 
719  virtual void CLEAR_EVENT_THROTTLE_preMsgHook(
720  FwOpcodeType opCode,
721  U32 cmdSeq
722  );
723 
724  protected:
725 
726  // ----------------------------------------------------------------------
727  // Event logging functions
728  // ----------------------------------------------------------------------
729 
734 
739  FwSizeType bufferSize,
740  U32 minSize
741  );
742 
747  FwSizeType bufferSize,
748  U32 storedHash,
749  U32 computedHash
750  );
751 
756  FwSizeType bufferSize,
757  U32 errorCode
758  );
759 
764  FwSizeType bufferSize,
765  U32 minSize
766  );
767 
772  const Fw::StringFormatStatus& status
773  );
774 
779  U32 status,
780  const Fw::StringBase& file
781  );
782 
787  U32 status,
788  U32 bytesWritten,
789  U32 bytesToWrite,
790  const Fw::StringBase& file
791  );
792 
797  U32 bytes,
798  const Fw::StringBase& file
799  ) const;
800 
801  protected:
802 
803  // ----------------------------------------------------------------------
804  // Event throttle reset functions
805  // ----------------------------------------------------------------------
806 
809 
812 
815 
818 
821 
824 
827 
830 
831  protected:
832 
833  // ----------------------------------------------------------------------
834  // Telemetry serialized write
835  // ----------------------------------------------------------------------
836 
841  void tlmWrite(
842  FwChanIdType id,
843  Fw::TlmBuffer& _tlmBuff,
844  Fw::Time _tlmTime = Fw::Time()
845  ) const;
846 
847  protected:
848 
849  // ----------------------------------------------------------------------
850  // Telemetry write functions
851  // ----------------------------------------------------------------------
852 
857  U32 arg,
858  Fw::Time _tlmTime = Fw::Time()
859  );
860 
865  U64 arg,
866  Fw::Time _tlmTime = Fw::Time()
867  );
868 
873  U32 arg,
874  Fw::Time _tlmTime = Fw::Time()
875  );
876 
881  U32 arg,
882  Fw::Time _tlmTime = Fw::Time()
883  );
884 
888  void tlmWrite_NumErrors(
889  U32 arg,
890  Fw::Time _tlmTime = Fw::Time()
891  );
892 
893  protected:
894 
895  // ----------------------------------------------------------------------
896  // Time
897  // ----------------------------------------------------------------------
898 
902  Fw::Time getTime() const;
903 
904  private:
905 
906  // ----------------------------------------------------------------------
907  // Message dispatch functions
908  // ----------------------------------------------------------------------
909 
911  virtual MsgDispatchStatus doDispatch();
912 
913  private:
914 
915  // ----------------------------------------------------------------------
916  // Calls for messages received on special input ports
917  // ----------------------------------------------------------------------
918 
920  static void m_p_cmdIn_in(
921  Fw::PassiveComponentBase* callComp,
922  FwIndexType portNum,
923  FwOpcodeType opCode,
924  U32 cmdSeq,
925  Fw::CmdArgBuffer& args
926  );
927 
928  private:
929 
930  // ----------------------------------------------------------------------
931  // Calls for messages received on typed input ports
932  // ----------------------------------------------------------------------
933 
935  static void m_p_bufferSendIn_in(
936  Fw::PassiveComponentBase* callComp,
937  FwIndexType portNum,
938  Fw::Buffer& fwBuffer
939  );
940 
942  static void m_p_schedIn_in(
943  Fw::PassiveComponentBase* callComp,
944  FwIndexType portNum,
945  U32 context
946  );
947 
948  private:
949 
950  // ----------------------------------------------------------------------
951  // Invocation functions for special output ports
952  // ----------------------------------------------------------------------
953 
955  void cmdRegIn_out(
956  FwIndexType portNum,
957  FwOpcodeType opCode
958  ) const;
959 
961  void cmdResponseOut_out(
962  FwIndexType portNum,
963  FwOpcodeType opCode,
964  U32 cmdSeq,
965  const Fw::CmdResponse& response
966  ) const;
967 
969  void eventOut_out(
970  FwIndexType portNum,
971  FwEventIdType id,
972  Fw::Time& timeTag,
973  const Fw::LogSeverity& severity,
974  Fw::LogBuffer& args
975  ) const;
976 
977 #if FW_ENABLE_TEXT_LOGGING
978 
980  void textEventOut_out(
981  FwIndexType portNum,
982  FwEventIdType id,
983  Fw::Time& timeTag,
984  const Fw::LogSeverity& severity,
985  Fw::TextLogString& text
986  ) const;
987 
988 #endif
989 
991  void timeGetOut_out(
992  FwIndexType portNum,
993  Fw::Time& time
994  ) const;
995 
997  void tlmOut_out(
998  FwIndexType portNum,
999  FwChanIdType id,
1000  Fw::Time& timeTag,
1001  Fw::TlmBuffer& val
1002  ) const;
1003 
1004 #if !FW_DIRECT_PORT_CALLS
1005 
1006  private:
1007 
1008  // ----------------------------------------------------------------------
1009  // Special input ports
1010  // ----------------------------------------------------------------------
1011 
1013  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1014 
1015 #endif
1016 
1017 #if !FW_DIRECT_PORT_CALLS
1018 
1019  private:
1020 
1021  // ----------------------------------------------------------------------
1022  // Typed input ports
1023  // ----------------------------------------------------------------------
1024 
1026  Fw::InputBufferSendPort m_bufferSendIn_InputPort[NUM_BUFFERSENDIN_INPUT_PORTS];
1027 
1029  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1030 
1031 #endif
1032 
1033 #if !FW_DIRECT_PORT_CALLS
1034 
1035  private:
1036 
1037  // ----------------------------------------------------------------------
1038  // Special output ports
1039  // ----------------------------------------------------------------------
1040 
1042  Fw::OutputCmdRegPort m_cmdRegIn_OutputPort[NUM_CMDREGIN_OUTPUT_PORTS];
1043 
1045  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1046 
1048  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1049 
1050 #if FW_ENABLE_TEXT_LOGGING == 1
1051 
1053  Fw::OutputLogTextPort m_textEventOut_OutputPort[NUM_TEXTEVENTOUT_OUTPUT_PORTS];
1054 
1055 #endif
1056 
1058  Fw::OutputTimePort m_timeGetOut_OutputPort[NUM_TIMEGETOUT_OUTPUT_PORTS];
1059 
1061  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1062 
1063 #endif
1064 
1065 #if !FW_DIRECT_PORT_CALLS
1066 
1067  private:
1068 
1069  // ----------------------------------------------------------------------
1070  // Typed output ports
1071  // ----------------------------------------------------------------------
1072 
1074  Fw::OutputBufferSendPort m_deallocBufferSendOut_OutputPort[NUM_DEALLOCBUFFERSENDOUT_OUTPUT_PORTS];
1075 
1077  Svc::OutputDpWrittenPort m_dpWrittenOut_OutputPort[NUM_DPWRITTENOUT_OUTPUT_PORTS];
1078 
1080  Fw::OutputBufferSendPort m_procBufferSendOut_OutputPort[NUM_PROCBUFFERSENDOUT_OUTPUT_PORTS];
1081 
1082 #endif
1083 
1084  private:
1085 
1086  // ----------------------------------------------------------------------
1087  // Counter values for event throttling
1088  // ----------------------------------------------------------------------
1089 
1091  std::atomic<FwIndexType> m_InvalidBufferThrottle;
1092 
1094  std::atomic<FwIndexType> m_BufferTooSmallForPacketThrottle;
1095 
1097  std::atomic<FwIndexType> m_InvalidHeaderHashThrottle;
1098 
1100  std::atomic<FwIndexType> m_InvalidHeaderThrottle;
1101 
1103  std::atomic<FwIndexType> m_BufferTooSmallForDataThrottle;
1104 
1106  std::atomic<FwIndexType> m_FileNameFormatErrorThrottle;
1107 
1109  std::atomic<FwIndexType> m_FileOpenErrorThrottle;
1110 
1112  std::atomic<FwIndexType> m_FileWriteErrorThrottle;
1113 
1114  private:
1115 
1116  // ----------------------------------------------------------------------
1117  // First update flags for telemetry channels
1118  // ----------------------------------------------------------------------
1119 
1121  bool m_first_update_NumBuffersReceived = true;
1122 
1124  bool m_first_update_NumBytesWritten = true;
1125 
1127  bool m_first_update_NumSuccessfulWrites = true;
1128 
1130  bool m_first_update_NumFailedWrites = true;
1131 
1133  bool m_first_update_NumErrors = true;
1134 
1135  private:
1136 
1137  // ----------------------------------------------------------------------
1138  // Last value storage for telemetry channels
1139  // ----------------------------------------------------------------------
1140 
1142  U32 m_last_NumBuffersReceived = {};
1143 
1145  U64 m_last_NumBytesWritten = {};
1146 
1148  U32 m_last_NumSuccessfulWrites = {};
1149 
1151  U32 m_last_NumFailedWrites = {};
1152 
1154  U32 m_last_NumErrors = {};
1155 
1156  };
1157 
1158 }
1159 
1160 #endif
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
An error occurred when formatting a file name.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
FwIdType FwOpcodeType
The type of a command opcode.
void log_WARNING_HI_BufferTooSmallForData(FwSizeType bufferSize, U32 minSize)
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
virtual void CLEAR_EVENT_THROTTLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
PlatformSizeType FwSizeType
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum) const
U32 FwDpPriorityType
The type of a data product priority.
I32 FwEnumStoreType
static constexpr FwIndexType getNum_eventOut_OutputPorts()
void set_dpWrittenOut_OutputPort(FwIndexType portNum, Svc::InputDpWrittenPort *port)
Connect port to dpWrittenOut[portNum].
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void log_WARNING_HI_FileNameFormatError_ThrottleClear()
Reset throttle value for FileNameFormatError.
An error occurred when opening a file.
friend class DpWriterTester
Friend class tester implementation to support white-box testing.
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum) const
Enum representing a command response.
virtual void bufferSendIn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendIn.
static constexpr FwIndexType getNum_schedIn_InputPorts()
static constexpr FwIndexType getNum_timeGetOut_OutputPorts()
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
FPP shadow-enum representing Fw::FormatStatus.
static constexpr FwIndexType getNum_deallocBufferSendOut_OutputPorts()
Received buffer is too small to hold a data product packet.
An error occurred when writing to a file.
void tlmWrite_NumErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
Definition: ObjBase.cpp:24
bool isConnected_dpWrittenOut_OutputPort(FwIndexType portNum) const
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
bool isConnected_deallocBufferSendOut_OutputPort(FwIndexType portNum) const
void deallocBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port deallocBufferSendOut.
void log_WARNING_HI_InvalidBuffer_ThrottleClear()
Reset throttle value for InvalidBuffer.
FwIdType FwEventIdType
The type of an event identifier.
void tlmWrite_NumFailedWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileWriteError_ThrottleClear()
Reset throttle value for FileWriteError.
void CLEAR_EVENT_THROTTLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
void dpWrittenOut_out(FwIndexType portNum, const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size) const
Invoke output port dpWrittenOut.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Received buffer is too small to hold the data specified in the header.
void log_WARNING_HI_InvalidHeaderHash(FwSizeType bufferSize, U32 storedHash, U32 computedHash)
void set_deallocBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocBufferSendOut[portNum].
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void tlmWrite_NumBuffersReceived(U32 arg, Fw::Time _tlmTime=Fw::Time())
static constexpr FwIndexType getNum_procBufferSendOut_OutputPorts()
void procBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port procBufferSendOut.
void log_WARNING_HI_BufferTooSmallForData_ThrottleClear()
Reset throttle value for BufferTooSmallForData.
void log_WARNING_HI_FileOpenError_ThrottleClear()
Reset throttle value for FileOpenError.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
DpWriterComponentBase(const char *compName="")
Construct DpWriterComponentBase object.
void log_WARNING_HI_FileOpenError(U32 status, const Fw::StringBase &file)
void log_WARNING_HI_InvalidHeader_ThrottleClear()
Reset throttle value for InvalidHeader.
Enum representing event severity.
void log_WARNING_HI_FileNameFormatError(const Fw::StringFormatStatus &status)
void log_WARNING_HI_InvalidHeaderHash_ThrottleClear()
Reset throttle value for InvalidHeaderHash.
bool isConnected_procBufferSendOut_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_BufferTooSmallForPacket(FwSizeType bufferSize, U32 minSize)
The received buffer has an invalid header hash.
void regCommands()
Register commands with the Command Dispatcher.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_ACTIVITY_LO_FileWritten(U32 bytes, const Fw::StringBase &file) const
static constexpr FwIndexType getNum_cmdRegIn_OutputPorts()
virtual void CLEAR_EVENT_THROTTLE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_EVENT_THROTTLE.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_dpWrittenOut_OutputPorts()
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
void log_WARNING_HI_FileWriteError(U32 status, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file)
void set_timeGetOut_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeGetOut[portNum].
RateGroupDivider component implementation.
friend class DpWriterTesterBase
Friend class tester to support autocoded test harness.
void bufferSendIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
void tlmWrite_NumBytesWritten(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
void log_WARNING_HI_InvalidHeader(FwSizeType bufferSize, U32 errorCode)
void tlmWrite_NumSuccessfulWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_BufferTooSmallForPacket_ThrottleClear()
Reset throttle value for BufferTooSmallForPacket.
void set_procBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to procBufferSendOut[portNum].
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void set_cmdRegIn_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegIn[portNum].
Auto-generated base for DpWriter component.
Error occurred when deserializing the packet header.
static constexpr FwIndexType getNum_cmdIn_InputPorts()