F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
BufferLoggerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title BufferLoggerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for BufferLogger component base class
5 // ======================================================================
6 
7 #ifndef Svc_BufferLoggerComponentAc_HPP
8 #define Svc_BufferLoggerComponentAc_HPP
9 
10 #include <atomic>
11 
13 #include "Fw/Cmd/CmdPortAc.hpp"
14 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/Com/ComPortAc.hpp"
19 #include "Fw/FPrimeBasicTypes.hpp"
20 #include "Fw/Log/LogPortAc.hpp"
21 #include "Fw/Log/LogString.hpp"
22 #include "Fw/Log/LogTextPortAc.hpp"
23 #if !FW_DIRECT_PORT_CALLS
25 #endif
26 #if !FW_DIRECT_PORT_CALLS
28 #endif
29 #include "Fw/Time/TimePortAc.hpp"
30 #include "Fw/Tlm/TlmPortAc.hpp"
31 #include "Fw/Tlm/TlmString.hpp"
33 #include "Svc/Ping/PingPortAc.hpp"
36 
37 namespace Svc {
38 
43  {
44 
45  // ----------------------------------------------------------------------
46  // Friend classes
47  // ----------------------------------------------------------------------
48 
50  friend class BufferLoggerTesterBase;
52  friend class BufferLoggerTester;
53 
54  protected:
55 
56  // ----------------------------------------------------------------------
57  // Constants
58  // ----------------------------------------------------------------------
59 
61  enum {
63  };
64 
66  enum {
71  };
72 
74  enum {
81  };
82 
84  enum {
87  };
88 
90  enum {
95  };
96 
98  enum {
106  };
107 
109  enum {
111  };
112 
113  public:
114 
115  // ----------------------------------------------------------------------
116  // Component initialization
117  // ----------------------------------------------------------------------
118 
120  void init(
121  FwSizeType queueDepth,
122  FwEnumStoreType instance = 0
123  );
124 
125 #if !FW_DIRECT_PORT_CALLS
126 
127  public:
128 
129  // ----------------------------------------------------------------------
130  // Getters for special input ports
131  // ----------------------------------------------------------------------
132 
137  FwIndexType portNum
138  );
139 
140 #endif
141 
142 #if !FW_DIRECT_PORT_CALLS
143 
144  public:
145 
146  // ----------------------------------------------------------------------
147  // Getters for typed input ports
148  // ----------------------------------------------------------------------
149 
154  FwIndexType portNum
155  );
156 
161  FwIndexType portNum
162  );
163 
168  FwIndexType portNum
169  );
170 
175  FwIndexType portNum
176  );
177 
178 #endif
179 
180 #if !FW_DIRECT_PORT_CALLS
181 
182  public:
183 
184  // ----------------------------------------------------------------------
185  // Connect input ports to special output ports
186  // ----------------------------------------------------------------------
187 
190  FwIndexType portNum,
191  Fw::InputCmdRegPort* port
192  );
193 
196  FwIndexType portNum,
198  );
199 
202  FwIndexType portNum,
203  Fw::InputLogPort* port
204  );
205 
206 #if FW_ENABLE_TEXT_LOGGING == 1
207 
209  void set_eventOutText_OutputPort(
210  FwIndexType portNum,
211  Fw::InputLogTextPort* port
212  );
213 
214 #endif
215 
218  FwIndexType portNum,
219  Fw::InputTimePort* port
220  );
221 
224  FwIndexType portNum,
225  Fw::InputTlmPort* port
226  );
227 
228 #endif
229 
230 #if !FW_DIRECT_PORT_CALLS
231 
232  public:
233 
234  // ----------------------------------------------------------------------
235  // Connect typed input ports to typed output ports
236  // ----------------------------------------------------------------------
237 
240  FwIndexType portNum,
242  );
243 
246  FwIndexType portNum,
247  Svc::InputPingPort* port
248  );
249 
250 #endif
251 
252 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
253 
254  public:
255 
256  // ----------------------------------------------------------------------
257  // Connect serial input ports to special output ports
258  // ----------------------------------------------------------------------
259 
262  FwIndexType portNum,
263  Fw::InputSerializePort* port
264  );
265 
268  FwIndexType portNum,
269  Fw::InputSerializePort* port
270  );
271 
274  FwIndexType portNum,
275  Fw::InputSerializePort* port
276  );
277 
278 #if FW_ENABLE_TEXT_LOGGING == 1
279 
281  void set_eventOutText_OutputPort(
282  FwIndexType portNum,
283  Fw::InputSerializePort* port
284  );
285 
286 #endif
287 
290  FwIndexType portNum,
291  Fw::InputSerializePort* port
292  );
293 
296  FwIndexType portNum,
297  Fw::InputSerializePort* port
298  );
299 
300 #endif
301 
302 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
303 
304  public:
305 
306  // ----------------------------------------------------------------------
307  // Connect serial input ports to typed output ports
308  // ----------------------------------------------------------------------
309 
312  FwIndexType portNum,
313  Fw::InputSerializePort* port
314  );
315 
318  FwIndexType portNum,
319  Fw::InputSerializePort* port
320  );
321 
322 #endif
323 
324  public:
325 
326  // ----------------------------------------------------------------------
327  // Command registration
328  // ----------------------------------------------------------------------
329 
333  void regCommands();
334 
335  protected:
336 
337  // ----------------------------------------------------------------------
338  // Component construction and destruction
339  // ----------------------------------------------------------------------
340 
343  const char* compName = ""
344  );
345 
347  virtual ~BufferLoggerComponentBase();
348 
349  protected:
350 
351  // ----------------------------------------------------------------------
352  // Getters for numbers of special input ports
353  // ----------------------------------------------------------------------
354 
359  return NUM_CMDIN_INPUT_PORTS;
360  }
361 
362  protected:
363 
364  // ----------------------------------------------------------------------
365  // Getters for numbers of typed input ports
366  // ----------------------------------------------------------------------
367 
373  }
374 
379  return NUM_COMIN_INPUT_PORTS;
380  }
381 
386  return NUM_PINGIN_INPUT_PORTS;
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_eventOutText_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 
468  protected:
469 
470  // ----------------------------------------------------------------------
471  // Connection status queries for special output ports
472  // ----------------------------------------------------------------------
473 
478  FwIndexType portNum
479  ) const;
480 
485  FwIndexType portNum
486  ) const;
487 
492  FwIndexType portNum
493  ) const;
494 
495 #if FW_ENABLE_TEXT_LOGGING == 1
496 
500  bool isConnected_eventOutText_OutputPort(
501  FwIndexType portNum
502  ) const;
503 
504 #endif
505 
510  FwIndexType portNum
511  ) const;
512 
517  FwIndexType portNum
518  ) const;
519 
520  protected:
521 
522  // ----------------------------------------------------------------------
523  // Connection status queries for typed output ports
524  // ----------------------------------------------------------------------
525 
530  FwIndexType portNum
531  ) const;
532 
537  FwIndexType portNum
538  ) const;
539 
540 #if FW_DIRECT_PORT_CALLS
541  public:
542 #else
543  protected:
544 #endif
545 
546  // ----------------------------------------------------------------------
547  // Port handler base-class functions for special input ports
548  //
549  // Call these functions directly to bypass the corresponding ports
550  // ----------------------------------------------------------------------
551 
553  void cmdIn_handlerBase(
554  FwIndexType portNum,
555  FwOpcodeType opCode,
556  U32 cmdSeq,
557  Fw::CmdArgBuffer& args
558  );
559 
560  protected:
561 
562  // ----------------------------------------------------------------------
563  // Handlers to implement for typed input ports
564  // ----------------------------------------------------------------------
565 
567  virtual void bufferSendIn_handler(
568  FwIndexType portNum,
569  Fw::Buffer& fwBuffer
570  ) = 0;
571 
573  virtual void comIn_handler(
574  FwIndexType portNum,
575  Fw::ComBuffer& data,
576  U32 context
577  ) = 0;
578 
580  virtual void pingIn_handler(
581  FwIndexType portNum,
582  U32 key
583  ) = 0;
584 
586  virtual void schedIn_handler(
587  FwIndexType portNum,
588  U32 context
589  ) = 0;
590 
591 #if FW_DIRECT_PORT_CALLS
592  public:
593 #else
594  protected:
595 #endif
596 
597  // ----------------------------------------------------------------------
598  // Port handler base-class functions for typed input ports
599  //
600  // Call these functions directly to bypass the corresponding ports
601  // ----------------------------------------------------------------------
602 
605  FwIndexType portNum,
606  Fw::Buffer& fwBuffer
607  );
608 
610  void comIn_handlerBase(
611  FwIndexType portNum,
612  Fw::ComBuffer& data,
613  U32 context
614  );
615 
617  void pingIn_handlerBase(
618  FwIndexType portNum,
619  U32 key
620  );
621 
623  void schedIn_handlerBase(
624  FwIndexType portNum,
625  U32 context
626  );
627 
628  protected:
629 
630  // ----------------------------------------------------------------------
631  // Pre-message hooks for typed async input ports
632  //
633  // Each of these functions is invoked just before processing a message
634  // on the corresponding port. By default, they do nothing. You can
635  // override them to provide specific pre-message behavior.
636  // ----------------------------------------------------------------------
637 
639  virtual void bufferSendIn_preMsgHook(
640  FwIndexType portNum,
641  Fw::Buffer& fwBuffer
642  );
643 
645  virtual void comIn_preMsgHook(
646  FwIndexType portNum,
647  Fw::ComBuffer& data,
648  U32 context
649  );
650 
652  virtual void pingIn_preMsgHook(
653  FwIndexType portNum,
654  U32 key
655  );
656 
658  virtual void schedIn_preMsgHook(
659  FwIndexType portNum,
660  U32 context
661  );
662 
663  protected:
664 
665  // ----------------------------------------------------------------------
666  // Invocation functions for typed output ports
667  // ----------------------------------------------------------------------
668 
670  void bufferSendOut_out(
671  FwIndexType portNum,
672  Fw::Buffer& fwBuffer
673  ) const;
674 
676  void pingOut_out(
677  FwIndexType portNum,
678  U32 key
679  ) const;
680 
681  protected:
682 
683  // ----------------------------------------------------------------------
684  // Command response
685  // ----------------------------------------------------------------------
686 
688  void cmdResponse_out(
689  FwOpcodeType opCode,
690  U32 cmdSeq,
691  Fw::CmdResponse response
692  );
693 
694  protected:
695 
696  // ----------------------------------------------------------------------
697  // Command handlers to implement
698  // ----------------------------------------------------------------------
699 
703  virtual void BL_OpenFile_cmdHandler(
704  FwOpcodeType opCode,
705  U32 cmdSeq,
706  const Fw::CmdStringArg& file
707  ) = 0;
708 
712  virtual void BL_CloseFile_cmdHandler(
713  FwOpcodeType opCode,
714  U32 cmdSeq
715  ) = 0;
716 
720  virtual void BL_SetLogging_cmdHandler(
721  FwOpcodeType opCode,
722  U32 cmdSeq,
724  ) = 0;
725 
729  virtual void BL_FlushFile_cmdHandler(
730  FwOpcodeType opCode,
731  U32 cmdSeq
732  ) = 0;
733 
734  protected:
735 
736  // ----------------------------------------------------------------------
737  // Command handler base-class functions
738  //
739  // Call these functions directly to bypass the command input port
740  // ----------------------------------------------------------------------
741 
746  FwOpcodeType opCode,
747  U32 cmdSeq,
748  Fw::CmdArgBuffer& args
749  );
750 
755  FwOpcodeType opCode,
756  U32 cmdSeq,
757  Fw::CmdArgBuffer& args
758  );
759 
764  FwOpcodeType opCode,
765  U32 cmdSeq,
766  Fw::CmdArgBuffer& args
767  );
768 
773  FwOpcodeType opCode,
774  U32 cmdSeq,
775  Fw::CmdArgBuffer& args
776  );
777 
778  protected:
779 
780  // ----------------------------------------------------------------------
781  // Pre-message hooks for async commands
782  //
783  // Each of these functions is invoked just before processing the
784  // corresponding command. By default they do nothing. You can
785  // override them to provide specific pre-command behavior.
786  // ----------------------------------------------------------------------
787 
789  virtual void BL_OpenFile_preMsgHook(
790  FwOpcodeType opCode,
791  U32 cmdSeq
792  );
793 
795  virtual void BL_CloseFile_preMsgHook(
796  FwOpcodeType opCode,
797  U32 cmdSeq
798  );
799 
801  virtual void BL_SetLogging_preMsgHook(
802  FwOpcodeType opCode,
803  U32 cmdSeq
804  );
805 
807  virtual void BL_FlushFile_preMsgHook(
808  FwOpcodeType opCode,
809  U32 cmdSeq
810  );
811 
812  protected:
813 
814  // ----------------------------------------------------------------------
815  // Event logging functions
816  // ----------------------------------------------------------------------
817 
822  const Fw::StringBase& file
823  ) const;
824 
829  U32 errornum,
830  const Fw::StringBase& file
831  ) const;
832 
837  const Fw::StringBase& validationFile,
838  U32 status
839  ) const;
840 
845  U32 errornum,
846  U32 bytesWritten,
847  U32 bytesToWrite,
848  const Fw::StringBase& file
849  ) const;
850 
854  void log_ACTIVITY_LO_BL_Activated() const;
855 
859  void log_ACTIVITY_LO_BL_Deactivated() const;
860 
865 
866  protected:
867 
868  // ----------------------------------------------------------------------
869  // Telemetry serialized write
870  // ----------------------------------------------------------------------
871 
876  void tlmWrite(
877  FwChanIdType id,
878  Fw::TlmBuffer& _tlmBuff,
879  Fw::Time _tlmTime = Fw::Time()
880  ) const;
881 
882  protected:
883 
884  // ----------------------------------------------------------------------
885  // Telemetry write functions
886  // ----------------------------------------------------------------------
887 
892  U32 arg,
893  Fw::Time _tlmTime = Fw::Time()
894  ) const;
895 
896  protected:
897 
898  // ----------------------------------------------------------------------
899  // Time
900  // ----------------------------------------------------------------------
901 
905  Fw::Time getTime() const;
906 
907  private:
908 
909  // ----------------------------------------------------------------------
910  // Message dispatch functions
911  // ----------------------------------------------------------------------
912 
914  virtual MsgDispatchStatus doDispatch();
915 
916  private:
917 
918  // ----------------------------------------------------------------------
919  // Calls for messages received on special input ports
920  // ----------------------------------------------------------------------
921 
923  static void m_p_cmdIn_in(
924  Fw::PassiveComponentBase* callComp,
925  FwIndexType portNum,
926  FwOpcodeType opCode,
927  U32 cmdSeq,
928  Fw::CmdArgBuffer& args
929  );
930 
931  private:
932 
933  // ----------------------------------------------------------------------
934  // Calls for messages received on typed input ports
935  // ----------------------------------------------------------------------
936 
938  static void m_p_bufferSendIn_in(
939  Fw::PassiveComponentBase* callComp,
940  FwIndexType portNum,
941  Fw::Buffer& fwBuffer
942  );
943 
945  static void m_p_comIn_in(
946  Fw::PassiveComponentBase* callComp,
947  FwIndexType portNum,
948  Fw::ComBuffer& data,
949  U32 context
950  );
951 
953  static void m_p_pingIn_in(
954  Fw::PassiveComponentBase* callComp,
955  FwIndexType portNum,
956  U32 key
957  );
958 
960  static void m_p_schedIn_in(
961  Fw::PassiveComponentBase* callComp,
962  FwIndexType portNum,
963  U32 context
964  );
965 
966  private:
967 
968  // ----------------------------------------------------------------------
969  // Invocation functions for special output ports
970  // ----------------------------------------------------------------------
971 
973  void cmdRegOut_out(
974  FwIndexType portNum,
975  FwOpcodeType opCode
976  ) const;
977 
979  void cmdResponseOut_out(
980  FwIndexType portNum,
981  FwOpcodeType opCode,
982  U32 cmdSeq,
983  const Fw::CmdResponse& response
984  ) const;
985 
987  void eventOut_out(
988  FwIndexType portNum,
989  FwEventIdType id,
990  Fw::Time& timeTag,
991  const Fw::LogSeverity& severity,
992  Fw::LogBuffer& args
993  ) const;
994 
995 #if FW_ENABLE_TEXT_LOGGING
996 
998  void eventOutText_out(
999  FwIndexType portNum,
1000  FwEventIdType id,
1001  Fw::Time& timeTag,
1002  const Fw::LogSeverity& severity,
1003  Fw::TextLogString& text
1004  ) const;
1005 
1006 #endif
1007 
1009  void timeCaller_out(
1010  FwIndexType portNum,
1011  Fw::Time& time
1012  ) const;
1013 
1015  void tlmOut_out(
1016  FwIndexType portNum,
1017  FwChanIdType id,
1018  Fw::Time& timeTag,
1019  Fw::TlmBuffer& val
1020  ) const;
1021 
1022 #if !FW_DIRECT_PORT_CALLS
1023 
1024  private:
1025 
1026  // ----------------------------------------------------------------------
1027  // Special input ports
1028  // ----------------------------------------------------------------------
1029 
1031  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1032 
1033 #endif
1034 
1035 #if !FW_DIRECT_PORT_CALLS
1036 
1037  private:
1038 
1039  // ----------------------------------------------------------------------
1040  // Typed input ports
1041  // ----------------------------------------------------------------------
1042 
1044  Fw::InputBufferSendPort m_bufferSendIn_InputPort[NUM_BUFFERSENDIN_INPUT_PORTS];
1045 
1047  Fw::InputComPort m_comIn_InputPort[NUM_COMIN_INPUT_PORTS];
1048 
1050  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1051 
1053  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1054 
1055 #endif
1056 
1057 #if !FW_DIRECT_PORT_CALLS
1058 
1059  private:
1060 
1061  // ----------------------------------------------------------------------
1062  // Special output ports
1063  // ----------------------------------------------------------------------
1064 
1066  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1067 
1069  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1070 
1072  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1073 
1074 #if FW_ENABLE_TEXT_LOGGING == 1
1075 
1077  Fw::OutputLogTextPort m_eventOutText_OutputPort[NUM_EVENTOUTTEXT_OUTPUT_PORTS];
1078 
1079 #endif
1080 
1082  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1083 
1085  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1086 
1087 #endif
1088 
1089 #if !FW_DIRECT_PORT_CALLS
1090 
1091  private:
1092 
1093  // ----------------------------------------------------------------------
1094  // Typed output ports
1095  // ----------------------------------------------------------------------
1096 
1098  Fw::OutputBufferSendPort m_bufferSendOut_OutputPort[NUM_BUFFERSENDOUT_OUTPUT_PORTS];
1099 
1101  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1102 
1103 #endif
1104 
1105  };
1106 
1107 }
1108 
1109 #endif
Close the currently open log file, if any.
void BL_SetLogging_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void regCommands()
Register commands with the Command Dispatcher.
virtual void bufferSendIn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendIn.
FwIdType FwOpcodeType
The type of a command opcode.
Flushes the current open log file to disk; a no-op with fprime&#39;s unbuffered file I/O, so always returns success.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
PlatformSizeType FwSizeType
I32 FwEnumStoreType
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
static constexpr FwIndexType getNum_pingIn_InputPorts()
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
virtual void BL_SetLogging_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_SetLogging.
virtual void BL_CloseFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_CloseFile.
The Buffer Logger encountered an error opening a log file.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
virtual void BL_SetLogging_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::BufferLogger_LogState state)=0
virtual void BL_OpenFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_OpenFile.
virtual void BL_FlushFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command BL_FlushFile.
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
void BL_OpenFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_DIAGNOSTIC_BL_LogFileClosed(const Fw::StringBase &file) const
Enum representing a command response.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void bufferSendIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
void init()
Object initializer.
Definition: ObjBase.cpp:24
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
virtual void comIn_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port comIn.
void log_WARNING_HI_BL_LogFileOpenError(U32 errornum, const Fw::StringBase &file) const
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
FwIdType FwEventIdType
The type of an event identifier.
virtual void comIn_preMsgHook(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Pre-message hook for async input port comIn.
static constexpr FwIndexType getNum_schedIn_InputPorts()
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void set_bufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferSendOut[portNum].
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Auto-generated base for BufferLogger component.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void tlmWrite_BufferLogger_NumLoggedBuffers(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
virtual void BL_FlushFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
FwIdType FwChanIdType
The type of a telemetry channel identifier.
bool isConnected_bufferSendOut_OutputPort(FwIndexType portNum) const
void BL_CloseFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_WARNING_HI_BL_LogFileWriteError(U32 errornum, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file) const
BufferLoggerComponentBase(const char *compName="")
Construct BufferLoggerComponentBase object.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
The Buffer Logger encountered an error writing a validation file.
friend class BufferLoggerTesterBase
Friend class tester to support autocoded test harness.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
Enum representing event severity.
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
void bufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferSendOut.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
No log file open command was received by BufferLogger.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
Fw::InputComPort * get_comIn_InputPort(FwIndexType portNum)
void comIn_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port comIn.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
The Buffer Logger encountered an error writing to a log file.
static constexpr FwIndexType getNum_bufferSendOut_OutputPorts()
virtual ~BufferLoggerComponentBase()
Destroy BufferLoggerComponentBase object.
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
RateGroupDivider component implementation.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
void BL_FlushFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
friend class BufferLoggerTester
Friend class tester implementation to support white-box testing.
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_comIn_InputPorts()
Open a new log file with specified name; also resets unique file counter to 0.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
virtual void BL_CloseFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void BL_OpenFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &file)=0
void log_WARNING_HI_BL_LogFileValidationError(const Fw::StringBase &validationFile, U32 status) const
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].