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"
37 
38 namespace Svc {
39 
46  {
47 
48  // ----------------------------------------------------------------------
49  // Friend classes
50  // ----------------------------------------------------------------------
51 
53  friend class DpWriterTesterBase;
55  friend class DpWriterTester;
56 
57  protected:
58 
59  // ----------------------------------------------------------------------
60  // Constants
61  // ----------------------------------------------------------------------
62 
64  enum {
66  };
67 
69  enum {
72  };
73 
75  enum {
82  };
83 
85  enum {
89  };
90 
92  enum {
94  };
95 
97  enum {
107  };
108 
110  enum {
119  };
120 
122  enum {
128  };
129 
130  public:
131 
132  // ----------------------------------------------------------------------
133  // Component initialization
134  // ----------------------------------------------------------------------
135 
137  void init(
138  FwSizeType queueDepth,
139  FwEnumStoreType instance = 0
140  );
141 
142 #if !FW_DIRECT_PORT_CALLS
143 
144  public:
145 
146  // ----------------------------------------------------------------------
147  // Getters for special input ports
148  // ----------------------------------------------------------------------
149 
154  FwIndexType portNum
155  );
156 
157 #endif
158 
159 #if !FW_DIRECT_PORT_CALLS
160 
161  public:
162 
163  // ----------------------------------------------------------------------
164  // Getters for typed input ports
165  // ----------------------------------------------------------------------
166 
171  FwIndexType portNum
172  );
173 
178  FwIndexType portNum
179  );
180 
181 #endif
182 
183 #if !FW_DIRECT_PORT_CALLS
184 
185  public:
186 
187  // ----------------------------------------------------------------------
188  // Connect input ports to special output ports
189  // ----------------------------------------------------------------------
190 
193  FwIndexType portNum,
194  Fw::InputCmdRegPort* port
195  );
196 
199  FwIndexType portNum,
201  );
202 
205  FwIndexType portNum,
206  Fw::InputLogPort* port
207  );
208 
209 #if FW_ENABLE_TEXT_LOGGING == 1
210 
212  void set_textEventOut_OutputPort(
213  FwIndexType portNum,
214  Fw::InputLogTextPort* port
215  );
216 
217 #endif
218 
221  FwIndexType portNum,
222  Fw::InputTimePort* port
223  );
224 
227  FwIndexType portNum,
228  Fw::InputTlmPort* port
229  );
230 
231 #endif
232 
233 #if !FW_DIRECT_PORT_CALLS
234 
235  public:
236 
237  // ----------------------------------------------------------------------
238  // Connect typed input ports to typed output ports
239  // ----------------------------------------------------------------------
240 
243  FwIndexType portNum,
245  );
246 
249  FwIndexType portNum,
251  );
252 
255  FwIndexType portNum,
257  );
258 
259 #endif
260 
261 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
262 
263  public:
264 
265  // ----------------------------------------------------------------------
266  // Connect serial input ports to special output ports
267  // ----------------------------------------------------------------------
268 
271  FwIndexType portNum,
272  Fw::InputSerializePort* port
273  );
274 
277  FwIndexType portNum,
278  Fw::InputSerializePort* port
279  );
280 
283  FwIndexType portNum,
284  Fw::InputSerializePort* port
285  );
286 
287 #if FW_ENABLE_TEXT_LOGGING == 1
288 
290  void set_textEventOut_OutputPort(
291  FwIndexType portNum,
292  Fw::InputSerializePort* port
293  );
294 
295 #endif
296 
299  FwIndexType portNum,
300  Fw::InputSerializePort* port
301  );
302 
305  FwIndexType portNum,
306  Fw::InputSerializePort* 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 typed 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 
337 #endif
338 
339  public:
340 
341  // ----------------------------------------------------------------------
342  // Command registration
343  // ----------------------------------------------------------------------
344 
348  void regCommands();
349 
350  protected:
351 
352  // ----------------------------------------------------------------------
353  // Component construction and destruction
354  // ----------------------------------------------------------------------
355 
358  const char* compName = ""
359  );
360 
362  virtual ~DpWriterComponentBase();
363 
364  protected:
365 
366  // ----------------------------------------------------------------------
367  // Getters for numbers of special input ports
368  // ----------------------------------------------------------------------
369 
374  return NUM_CMDIN_INPUT_PORTS;
375  }
376 
377  protected:
378 
379  // ----------------------------------------------------------------------
380  // Getters for numbers of typed input ports
381  // ----------------------------------------------------------------------
382 
388  }
389 
395  }
396 
397  protected:
398 
399  // ----------------------------------------------------------------------
400  // Getters for numbers of special output ports
401  // ----------------------------------------------------------------------
402 
408  }
409 
415  }
416 
422  }
423 
424 #if FW_ENABLE_TEXT_LOGGING == 1
425 
429  static constexpr FwIndexType getNum_textEventOut_OutputPorts() {
431  }
432 
433 #endif
434 
440  }
441 
447  }
448 
449  protected:
450 
451  // ----------------------------------------------------------------------
452  // Getters for numbers of typed output ports
453  // ----------------------------------------------------------------------
454 
460  }
461 
467  }
468 
474  }
475 
476  protected:
477 
478  // ----------------------------------------------------------------------
479  // Connection status queries for special output ports
480  // ----------------------------------------------------------------------
481 
486  FwIndexType portNum
487  ) const;
488 
493  FwIndexType portNum
494  ) const;
495 
500  FwIndexType portNum
501  ) const;
502 
503 #if FW_ENABLE_TEXT_LOGGING == 1
504 
508  bool isConnected_textEventOut_OutputPort(
509  FwIndexType portNum
510  ) const;
511 
512 #endif
513 
518  FwIndexType portNum
519  ) const;
520 
525  FwIndexType portNum
526  ) const;
527 
528  protected:
529 
530  // ----------------------------------------------------------------------
531  // Connection status queries for typed output ports
532  // ----------------------------------------------------------------------
533 
538  FwIndexType portNum
539  ) const;
540 
545  FwIndexType portNum
546  ) const;
547 
552  FwIndexType portNum
553  ) const;
554 
555 #if FW_DIRECT_PORT_CALLS
556  public:
557 #else
558  protected:
559 #endif
560 
561  // ----------------------------------------------------------------------
562  // Port handler base-class functions for special input ports
563  //
564  // Call these functions directly to bypass the corresponding ports
565  // ----------------------------------------------------------------------
566 
568  void cmdIn_handlerBase(
569  FwIndexType portNum,
570  FwOpcodeType opCode,
571  U32 cmdSeq,
572  Fw::CmdArgBuffer& args
573  );
574 
575  protected:
576 
577  // ----------------------------------------------------------------------
578  // Handlers to implement for typed input ports
579  // ----------------------------------------------------------------------
580 
582  virtual void bufferSendIn_handler(
583  FwIndexType portNum,
584  Fw::Buffer& fwBuffer
585  ) = 0;
586 
588  virtual void schedIn_handler(
589  FwIndexType portNum,
590  U32 context
591  ) = 0;
592 
593 #if FW_DIRECT_PORT_CALLS
594  public:
595 #else
596  protected:
597 #endif
598 
599  // ----------------------------------------------------------------------
600  // Port handler base-class functions for typed input ports
601  //
602  // Call these functions directly to bypass the corresponding ports
603  // ----------------------------------------------------------------------
604 
607  FwIndexType portNum,
608  Fw::Buffer& fwBuffer
609  );
610 
612  void schedIn_handlerBase(
613  FwIndexType portNum,
614  U32 context
615  );
616 
617  protected:
618 
619  // ----------------------------------------------------------------------
620  // Pre-message hooks for typed async input ports
621  //
622  // Each of these functions is invoked just before processing a message
623  // on the corresponding port. By default, they do nothing. You can
624  // override them to provide specific pre-message behavior.
625  // ----------------------------------------------------------------------
626 
628  virtual void bufferSendIn_preMsgHook(
629  FwIndexType portNum,
630  Fw::Buffer& fwBuffer
631  );
632 
633  protected:
634 
635  // ----------------------------------------------------------------------
636  // Invocation functions for typed output ports
637  // ----------------------------------------------------------------------
638 
641  FwIndexType portNum,
642  Fw::Buffer& fwBuffer
643  ) const;
644 
646  void dpWrittenOut_out(
647  FwIndexType portNum,
648  const Fw::StringBase& fileName,
649  FwDpPriorityType priority,
650  FwSizeType size
651  ) const;
652 
655  FwIndexType portNum,
656  Fw::Buffer& fwBuffer
657  ) const;
658 
659  protected:
660 
661  // ----------------------------------------------------------------------
662  // Hooks for internal ports
663  //
664  // Each of these functions is invoked just before dropping a message
665  // on the corresponding internal port. You should override them to provide
666  // specific drop behavior.
667  // ----------------------------------------------------------------------
668 
670  virtual void schedInInternal_overflowHook() = 0;
671 
672  protected:
673 
674  // ----------------------------------------------------------------------
675  // Internal interface handlers
676  // ----------------------------------------------------------------------
677 
679  virtual void schedInInternal_internalInterfaceHandler() = 0;
680 
681  protected:
682 
683  // ----------------------------------------------------------------------
684  // Internal interface base-class functions
685  // ----------------------------------------------------------------------
686 
689 
690  protected:
691 
692  // ----------------------------------------------------------------------
693  // Command response
694  // ----------------------------------------------------------------------
695 
697  void cmdResponse_out(
698  FwOpcodeType opCode,
699  U32 cmdSeq,
700  Fw::CmdResponse response
701  );
702 
703  protected:
704 
705  // ----------------------------------------------------------------------
706  // Command handlers to implement
707  // ----------------------------------------------------------------------
708 
712  virtual void CLEAR_EVENT_THROTTLE_cmdHandler(
713  FwOpcodeType opCode,
714  U32 cmdSeq
715  ) = 0;
716 
717  protected:
718 
719  // ----------------------------------------------------------------------
720  // Command handler base-class functions
721  //
722  // Call these functions directly to bypass the command input port
723  // ----------------------------------------------------------------------
724 
729  FwOpcodeType opCode,
730  U32 cmdSeq,
731  Fw::CmdArgBuffer& args
732  );
733 
734  protected:
735 
736  // ----------------------------------------------------------------------
737  // Pre-message hooks for async commands
738  //
739  // Each of these functions is invoked just before processing the
740  // corresponding command. By default they do nothing. You can
741  // override them to provide specific pre-command behavior.
742  // ----------------------------------------------------------------------
743 
745  virtual void CLEAR_EVENT_THROTTLE_preMsgHook(
746  FwOpcodeType opCode,
747  U32 cmdSeq
748  );
749 
750  protected:
751 
752  // ----------------------------------------------------------------------
753  // Event logging functions
754  // ----------------------------------------------------------------------
755 
760 
765  FwSizeType bufferSize,
766  U32 minSize
767  );
768 
773  FwSizeType bufferSize,
774  U32 storedHash,
775  U32 computedHash
776  );
777 
782  FwSizeType bufferSize,
783  U32 errorCode
784  );
785 
790  FwSizeType bufferSize,
791  U32 minSize
792  );
793 
798  const Fw::StringFormatStatus& status
799  );
800 
805  U32 status,
806  const Fw::StringBase& file
807  );
808 
813  U32 status,
814  U32 bytesWritten,
815  U32 bytesToWrite,
816  const Fw::StringBase& file
817  );
818 
823  U32 bytes,
824  const Fw::StringBase& file
825  ) const;
826 
827  protected:
828 
829  // ----------------------------------------------------------------------
830  // Event throttle reset functions
831  // ----------------------------------------------------------------------
832 
835 
838 
841 
844 
847 
850 
853 
856 
857  protected:
858 
859  // ----------------------------------------------------------------------
860  // Telemetry serialized write
861  // ----------------------------------------------------------------------
862 
867  void tlmWrite(
868  FwChanIdType id,
869  Fw::TlmBuffer& _tlmBuff,
870  Fw::Time _tlmTime = Fw::Time()
871  ) const;
872 
873  protected:
874 
875  // ----------------------------------------------------------------------
876  // Telemetry write functions
877  // ----------------------------------------------------------------------
878 
883  U32 arg,
884  Fw::Time _tlmTime = Fw::Time()
885  );
886 
891  U64 arg,
892  Fw::Time _tlmTime = Fw::Time()
893  );
894 
899  U32 arg,
900  Fw::Time _tlmTime = Fw::Time()
901  );
902 
907  U32 arg,
908  Fw::Time _tlmTime = Fw::Time()
909  );
910 
914  void tlmWrite_NumErrors(
915  U32 arg,
916  Fw::Time _tlmTime = Fw::Time()
917  );
918 
919  protected:
920 
921  // ----------------------------------------------------------------------
922  // Time
923  // ----------------------------------------------------------------------
924 
928  Fw::Time getTime() const;
929 
930  private:
931 
932  // ----------------------------------------------------------------------
933  // Message dispatch functions
934  // ----------------------------------------------------------------------
935 
937  virtual MsgDispatchStatus doDispatch();
938 
939  private:
940 
941  // ----------------------------------------------------------------------
942  // Calls for messages received on special input ports
943  // ----------------------------------------------------------------------
944 
946  static void m_p_cmdIn_in(
947  Fw::PassiveComponentBase* callComp,
948  FwIndexType portNum,
949  FwOpcodeType opCode,
950  U32 cmdSeq,
951  Fw::CmdArgBuffer& args
952  );
953 
954  private:
955 
956  // ----------------------------------------------------------------------
957  // Calls for messages received on typed input ports
958  // ----------------------------------------------------------------------
959 
961  static void m_p_bufferSendIn_in(
962  Fw::PassiveComponentBase* callComp,
963  FwIndexType portNum,
964  Fw::Buffer& fwBuffer
965  );
966 
968  static void m_p_schedIn_in(
969  Fw::PassiveComponentBase* callComp,
970  FwIndexType portNum,
971  U32 context
972  );
973 
974  private:
975 
976  // ----------------------------------------------------------------------
977  // Invocation functions for special output ports
978  // ----------------------------------------------------------------------
979 
981  void cmdRegIn_out(
982  FwIndexType portNum,
983  FwOpcodeType opCode
984  ) const;
985 
987  void cmdResponseOut_out(
988  FwIndexType portNum,
989  FwOpcodeType opCode,
990  U32 cmdSeq,
991  const Fw::CmdResponse& response
992  ) const;
993 
995  void eventOut_out(
996  FwIndexType portNum,
997  FwEventIdType id,
998  Fw::Time& timeTag,
999  const Fw::LogSeverity& severity,
1000  Fw::LogBuffer& args
1001  ) const;
1002 
1003 #if FW_ENABLE_TEXT_LOGGING
1004 
1006  void textEventOut_out(
1007  FwIndexType portNum,
1008  FwEventIdType id,
1009  Fw::Time& timeTag,
1010  const Fw::LogSeverity& severity,
1011  Fw::TextLogString& text
1012  ) const;
1013 
1014 #endif
1015 
1017  void timeGetOut_out(
1018  FwIndexType portNum,
1019  Fw::Time& time
1020  ) const;
1021 
1023  void tlmOut_out(
1024  FwIndexType portNum,
1025  FwChanIdType id,
1026  Fw::Time& timeTag,
1027  Fw::TlmBuffer& val
1028  ) const;
1029 
1030 #if !FW_DIRECT_PORT_CALLS
1031 
1032  private:
1033 
1034  // ----------------------------------------------------------------------
1035  // Special input ports
1036  // ----------------------------------------------------------------------
1037 
1039  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1040 
1041 #endif
1042 
1043 #if !FW_DIRECT_PORT_CALLS
1044 
1045  private:
1046 
1047  // ----------------------------------------------------------------------
1048  // Typed input ports
1049  // ----------------------------------------------------------------------
1050 
1052  Fw::InputBufferSendPort m_bufferSendIn_InputPort[NUM_BUFFERSENDIN_INPUT_PORTS];
1053 
1055  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1056 
1057 #endif
1058 
1059 #if !FW_DIRECT_PORT_CALLS
1060 
1061  private:
1062 
1063  // ----------------------------------------------------------------------
1064  // Special output ports
1065  // ----------------------------------------------------------------------
1066 
1068  Fw::OutputCmdRegPort m_cmdRegIn_OutputPort[NUM_CMDREGIN_OUTPUT_PORTS];
1069 
1071  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1072 
1074  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1075 
1076 #if FW_ENABLE_TEXT_LOGGING == 1
1077 
1079  Fw::OutputLogTextPort m_textEventOut_OutputPort[NUM_TEXTEVENTOUT_OUTPUT_PORTS];
1080 
1081 #endif
1082 
1084  Fw::OutputTimePort m_timeGetOut_OutputPort[NUM_TIMEGETOUT_OUTPUT_PORTS];
1085 
1087  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1088 
1089 #endif
1090 
1091 #if !FW_DIRECT_PORT_CALLS
1092 
1093  private:
1094 
1095  // ----------------------------------------------------------------------
1096  // Typed output ports
1097  // ----------------------------------------------------------------------
1098 
1100  Fw::OutputBufferSendPort m_deallocBufferSendOut_OutputPort[NUM_DEALLOCBUFFERSENDOUT_OUTPUT_PORTS];
1101 
1103  Svc::OutputDpWrittenPort m_dpWrittenOut_OutputPort[NUM_DPWRITTENOUT_OUTPUT_PORTS];
1104 
1106  Fw::OutputBufferSendPort m_procBufferSendOut_OutputPort[NUM_PROCBUFFERSENDOUT_OUTPUT_PORTS];
1107 
1108 #endif
1109 
1110  private:
1111 
1112  // ----------------------------------------------------------------------
1113  // Counter values for event throttling
1114  // ----------------------------------------------------------------------
1115 
1117  std::atomic<FwIndexType> m_InvalidBufferThrottle;
1118 
1120  std::atomic<FwIndexType> m_BufferTooSmallForPacketThrottle;
1121 
1123  std::atomic<FwIndexType> m_InvalidHeaderHashThrottle;
1124 
1126  std::atomic<FwIndexType> m_InvalidHeaderThrottle;
1127 
1129  std::atomic<FwIndexType> m_BufferTooSmallForDataThrottle;
1130 
1132  std::atomic<FwIndexType> m_FileNameFormatErrorThrottle;
1133 
1135  std::atomic<FwIndexType> m_FileOpenErrorThrottle;
1136 
1138  std::atomic<FwIndexType> m_FileWriteErrorThrottle;
1139 
1140  private:
1141 
1142  // ----------------------------------------------------------------------
1143  // First update flags for telemetry channels
1144  // ----------------------------------------------------------------------
1145 
1147  bool m_first_update_NumBuffersReceived = true;
1148 
1150  bool m_first_update_NumBytesWritten = true;
1151 
1153  bool m_first_update_NumSuccessfulWrites = true;
1154 
1156  bool m_first_update_NumFailedWrites = true;
1157 
1159  bool m_first_update_NumErrors = true;
1160 
1161  private:
1162 
1163  // ----------------------------------------------------------------------
1164  // Last value storage for telemetry channels
1165  // ----------------------------------------------------------------------
1166 
1168  U32 m_last_NumBuffersReceived = {};
1169 
1171  U64 m_last_NumBytesWritten = {};
1172 
1174  U32 m_last_NumSuccessfulWrites = {};
1175 
1177  U32 m_last_NumFailedWrites = {};
1178 
1180  U32 m_last_NumErrors = {};
1181 
1182  };
1183 
1184 }
1185 
1186 #endif
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
An error occurred when writing to a file.
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()
virtual void schedInInternal_internalInterfaceHandler()=0
Internal interface handler for schedInInternal.
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.
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()
The received buffer has an invalid header hash.
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)
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)
virtual void schedInInternal_overflowHook()=0
Overflow hook for async input port schedInInternal.
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)
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()
An error occurred when opening a file.
Received buffer is too small to hold the data specified in the header.
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())
void log_WARNING_HI_InvalidHeader(FwSizeType bufferSize, U32 errorCode)
Received buffer is too small to hold a data product packet.
An error occurred when formatting a file name.
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].
Error occurred when deserializing the packet header.
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.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void schedInInternal_internalInterfaceInvoke()
Internal interface base-class function for schedInInternal.