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"
34 #include "Svc/Ping/PingPortAc.hpp"
37 
38 namespace Svc {
39 
44  {
45 
46  // ----------------------------------------------------------------------
47  // Friend classes
48  // ----------------------------------------------------------------------
49 
51  friend class BufferLoggerTesterBase;
53  friend class BufferLoggerTester;
54 
55  protected:
56 
57  // ----------------------------------------------------------------------
58  // Constants
59  // ----------------------------------------------------------------------
60 
62  enum {
64  };
65 
67  enum {
72  };
73 
75  enum {
82  };
83 
85  enum {
88  };
89 
91  enum {
96  };
97 
99  enum {
108  };
109 
111  enum {
113  };
114 
115  public:
116 
117  // ----------------------------------------------------------------------
118  // Component initialization
119  // ----------------------------------------------------------------------
120 
122  void init(
123  FwSizeType queueDepth,
124  FwEnumStoreType instance = 0
125  );
126 
127 #if !FW_DIRECT_PORT_CALLS
128 
129  public:
130 
131  // ----------------------------------------------------------------------
132  // Getters for special input ports
133  // ----------------------------------------------------------------------
134 
139  FwIndexType portNum
140  );
141 
142 #endif
143 
144 #if !FW_DIRECT_PORT_CALLS
145 
146  public:
147 
148  // ----------------------------------------------------------------------
149  // Getters for typed input ports
150  // ----------------------------------------------------------------------
151 
156  FwIndexType portNum
157  );
158 
163  FwIndexType portNum
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_eventOutText_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,
249  Svc::InputPingPort* port
250  );
251 
252 #endif
253 
254 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
255 
256  public:
257 
258  // ----------------------------------------------------------------------
259  // Connect serial input ports to special output ports
260  // ----------------------------------------------------------------------
261 
264  FwIndexType portNum,
265  Fw::InputSerializePort* port
266  );
267 
270  FwIndexType portNum,
271  Fw::InputSerializePort* port
272  );
273 
276  FwIndexType portNum,
277  Fw::InputSerializePort* port
278  );
279 
280 #if FW_ENABLE_TEXT_LOGGING == 1
281 
283  void set_eventOutText_OutputPort(
284  FwIndexType portNum,
285  Fw::InputSerializePort* port
286  );
287 
288 #endif
289 
292  FwIndexType portNum,
293  Fw::InputSerializePort* port
294  );
295 
298  FwIndexType portNum,
299  Fw::InputSerializePort* port
300  );
301 
302 #endif
303 
304 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
305 
306  public:
307 
308  // ----------------------------------------------------------------------
309  // Connect serial input ports to typed output ports
310  // ----------------------------------------------------------------------
311 
314  FwIndexType portNum,
315  Fw::InputSerializePort* port
316  );
317 
320  FwIndexType portNum,
321  Fw::InputSerializePort* port
322  );
323 
324 #endif
325 
326  public:
327 
328  // ----------------------------------------------------------------------
329  // Command registration
330  // ----------------------------------------------------------------------
331 
335  void regCommands();
336 
337  protected:
338 
339  // ----------------------------------------------------------------------
340  // Component construction and destruction
341  // ----------------------------------------------------------------------
342 
345  const char* compName = ""
346  );
347 
349  virtual ~BufferLoggerComponentBase();
350 
351  protected:
352 
353  // ----------------------------------------------------------------------
354  // Getters for numbers of special input ports
355  // ----------------------------------------------------------------------
356 
361  return NUM_CMDIN_INPUT_PORTS;
362  }
363 
364  protected:
365 
366  // ----------------------------------------------------------------------
367  // Getters for numbers of typed input ports
368  // ----------------------------------------------------------------------
369 
375  }
376 
381  return NUM_COMIN_INPUT_PORTS;
382  }
383 
388  return NUM_PINGIN_INPUT_PORTS;
389  }
390 
396  }
397 
398  protected:
399 
400  // ----------------------------------------------------------------------
401  // Getters for numbers of special output ports
402  // ----------------------------------------------------------------------
403 
409  }
410 
416  }
417 
423  }
424 
425 #if FW_ENABLE_TEXT_LOGGING == 1
426 
430  static constexpr FwIndexType getNum_eventOutText_OutputPorts() {
432  }
433 
434 #endif
435 
441  }
442 
448  }
449 
450  protected:
451 
452  // ----------------------------------------------------------------------
453  // Getters for numbers of typed output ports
454  // ----------------------------------------------------------------------
455 
461  }
462 
468  }
469 
470  protected:
471 
472  // ----------------------------------------------------------------------
473  // Connection status queries for special output ports
474  // ----------------------------------------------------------------------
475 
480  FwIndexType portNum
481  ) const;
482 
487  FwIndexType portNum
488  ) const;
489 
494  FwIndexType portNum
495  ) const;
496 
497 #if FW_ENABLE_TEXT_LOGGING == 1
498 
502  bool isConnected_eventOutText_OutputPort(
503  FwIndexType portNum
504  ) const;
505 
506 #endif
507 
512  FwIndexType portNum
513  ) const;
514 
519  FwIndexType portNum
520  ) const;
521 
522  protected:
523 
524  // ----------------------------------------------------------------------
525  // Connection status queries for typed output ports
526  // ----------------------------------------------------------------------
527 
532  FwIndexType portNum
533  ) const;
534 
539  FwIndexType portNum
540  ) const;
541 
542 #if FW_DIRECT_PORT_CALLS
543  public:
544 #else
545  protected:
546 #endif
547 
548  // ----------------------------------------------------------------------
549  // Port handler base-class functions for special input ports
550  //
551  // Call these functions directly to bypass the corresponding ports
552  // ----------------------------------------------------------------------
553 
555  void cmdIn_handlerBase(
556  FwIndexType portNum,
557  FwOpcodeType opCode,
558  U32 cmdSeq,
559  Fw::CmdArgBuffer& args
560  );
561 
562  protected:
563 
564  // ----------------------------------------------------------------------
565  // Handlers to implement for typed input ports
566  // ----------------------------------------------------------------------
567 
569  virtual void bufferSendIn_handler(
570  FwIndexType portNum,
571  Fw::Buffer& fwBuffer
572  ) = 0;
573 
575  virtual void comIn_handler(
576  FwIndexType portNum,
577  Fw::ComBuffer& data,
578  U32 context
579  ) = 0;
580 
582  virtual void pingIn_handler(
583  FwIndexType portNum,
584  U32 key
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 comIn_handlerBase(
613  FwIndexType portNum,
614  Fw::ComBuffer& data,
615  U32 context
616  );
617 
619  void pingIn_handlerBase(
620  FwIndexType portNum,
621  U32 key
622  );
623 
625  void schedIn_handlerBase(
626  FwIndexType portNum,
627  U32 context
628  );
629 
630  protected:
631 
632  // ----------------------------------------------------------------------
633  // Pre-message hooks for typed async input ports
634  //
635  // Each of these functions is invoked just before processing a message
636  // on the corresponding port. By default, they do nothing. You can
637  // override them to provide specific pre-message behavior.
638  // ----------------------------------------------------------------------
639 
641  virtual void bufferSendIn_preMsgHook(
642  FwIndexType portNum,
643  Fw::Buffer& fwBuffer
644  );
645 
647  virtual void comIn_preMsgHook(
648  FwIndexType portNum,
649  Fw::ComBuffer& data,
650  U32 context
651  );
652 
654  virtual void pingIn_preMsgHook(
655  FwIndexType portNum,
656  U32 key
657  );
658 
660  virtual void schedIn_preMsgHook(
661  FwIndexType portNum,
662  U32 context
663  );
664 
665  protected:
666 
667  // ----------------------------------------------------------------------
668  // Invocation functions for typed output ports
669  // ----------------------------------------------------------------------
670 
672  void bufferSendOut_out(
673  FwIndexType portNum,
674  Fw::Buffer& fwBuffer
675  ) const;
676 
678  void pingOut_out(
679  FwIndexType portNum,
680  U32 key
681  ) const;
682 
683  protected:
684 
685  // ----------------------------------------------------------------------
686  // Command response
687  // ----------------------------------------------------------------------
688 
690  void cmdResponse_out(
691  FwOpcodeType opCode,
692  U32 cmdSeq,
693  Fw::CmdResponse response
694  );
695 
696  protected:
697 
698  // ----------------------------------------------------------------------
699  // Command handlers to implement
700  // ----------------------------------------------------------------------
701 
705  virtual void BL_OpenFile_cmdHandler(
706  FwOpcodeType opCode,
707  U32 cmdSeq,
708  const Fw::CmdStringArg& file
709  ) = 0;
710 
714  virtual void BL_CloseFile_cmdHandler(
715  FwOpcodeType opCode,
716  U32 cmdSeq
717  ) = 0;
718 
722  virtual void BL_SetLogging_cmdHandler(
723  FwOpcodeType opCode,
724  U32 cmdSeq,
725  const Svc::BufferLogger_LogState& state
726  ) = 0;
727 
731  virtual void BL_FlushFile_cmdHandler(
732  FwOpcodeType opCode,
733  U32 cmdSeq
734  ) = 0;
735 
736  protected:
737 
738  // ----------------------------------------------------------------------
739  // Command handler base-class functions
740  //
741  // Call these functions directly to bypass the command input port
742  // ----------------------------------------------------------------------
743 
748  FwOpcodeType opCode,
749  U32 cmdSeq,
750  Fw::CmdArgBuffer& args
751  );
752 
757  FwOpcodeType opCode,
758  U32 cmdSeq,
759  Fw::CmdArgBuffer& args
760  );
761 
766  FwOpcodeType opCode,
767  U32 cmdSeq,
768  Fw::CmdArgBuffer& args
769  );
770 
775  FwOpcodeType opCode,
776  U32 cmdSeq,
777  Fw::CmdArgBuffer& args
778  );
779 
780  protected:
781 
782  // ----------------------------------------------------------------------
783  // Pre-message hooks for async commands
784  //
785  // Each of these functions is invoked just before processing the
786  // corresponding command. By default they do nothing. You can
787  // override them to provide specific pre-command behavior.
788  // ----------------------------------------------------------------------
789 
791  virtual void BL_OpenFile_preMsgHook(
792  FwOpcodeType opCode,
793  U32 cmdSeq
794  );
795 
797  virtual void BL_CloseFile_preMsgHook(
798  FwOpcodeType opCode,
799  U32 cmdSeq
800  );
801 
803  virtual void BL_SetLogging_preMsgHook(
804  FwOpcodeType opCode,
805  U32 cmdSeq
806  );
807 
809  virtual void BL_FlushFile_preMsgHook(
810  FwOpcodeType opCode,
811  U32 cmdSeq
812  );
813 
814  protected:
815 
816  // ----------------------------------------------------------------------
817  // Event logging functions
818  // ----------------------------------------------------------------------
819 
824  const Fw::StringBase& file
825  ) const;
826 
831  U32 errornum,
832  const Fw::StringBase& file
833  ) const;
834 
839  const Fw::StringBase& validationFile,
840  U32 status
841  ) const;
842 
847  U32 errornum,
848  U32 bytesWritten,
849  U32 bytesToWrite,
850  const Fw::StringBase& file
851  ) const;
852 
856  void log_ACTIVITY_LO_BL_Activated() const;
857 
861  void log_ACTIVITY_LO_BL_Deactivated() const;
862 
867 
872  const Fw::StringFormatStatus& status
873  ) const;
874 
875  protected:
876 
877  // ----------------------------------------------------------------------
878  // Telemetry serialized write
879  // ----------------------------------------------------------------------
880 
885  void tlmWrite(
886  FwChanIdType id,
887  Fw::TlmBuffer& _tlmBuff,
888  Fw::Time _tlmTime = Fw::Time()
889  ) const;
890 
891  protected:
892 
893  // ----------------------------------------------------------------------
894  // Telemetry write functions
895  // ----------------------------------------------------------------------
896 
901  U32 arg,
902  Fw::Time _tlmTime = Fw::Time()
903  ) const;
904 
905  protected:
906 
907  // ----------------------------------------------------------------------
908  // Time
909  // ----------------------------------------------------------------------
910 
914  Fw::Time getTime() const;
915 
916  private:
917 
918  // ----------------------------------------------------------------------
919  // Message dispatch functions
920  // ----------------------------------------------------------------------
921 
923  virtual MsgDispatchStatus doDispatch();
924 
925  private:
926 
927  // ----------------------------------------------------------------------
928  // Calls for messages received on special input ports
929  // ----------------------------------------------------------------------
930 
932  static void m_p_cmdIn_in(
933  Fw::PassiveComponentBase* callComp,
934  FwIndexType portNum,
935  FwOpcodeType opCode,
936  U32 cmdSeq,
937  Fw::CmdArgBuffer& args
938  );
939 
940  private:
941 
942  // ----------------------------------------------------------------------
943  // Calls for messages received on typed input ports
944  // ----------------------------------------------------------------------
945 
947  static void m_p_bufferSendIn_in(
948  Fw::PassiveComponentBase* callComp,
949  FwIndexType portNum,
950  Fw::Buffer& fwBuffer
951  );
952 
954  static void m_p_comIn_in(
955  Fw::PassiveComponentBase* callComp,
956  FwIndexType portNum,
957  Fw::ComBuffer& data,
958  U32 context
959  );
960 
962  static void m_p_pingIn_in(
963  Fw::PassiveComponentBase* callComp,
964  FwIndexType portNum,
965  U32 key
966  );
967 
969  static void m_p_schedIn_in(
970  Fw::PassiveComponentBase* callComp,
971  FwIndexType portNum,
972  U32 context
973  );
974 
975  private:
976 
977  // ----------------------------------------------------------------------
978  // Invocation functions for special output ports
979  // ----------------------------------------------------------------------
980 
982  void cmdRegOut_out(
983  FwIndexType portNum,
984  FwOpcodeType opCode
985  ) const;
986 
988  void cmdResponseOut_out(
989  FwIndexType portNum,
990  FwOpcodeType opCode,
991  U32 cmdSeq,
992  const Fw::CmdResponse& response
993  ) const;
994 
996  void eventOut_out(
997  FwIndexType portNum,
998  FwEventIdType id,
999  Fw::Time& timeTag,
1000  const Fw::LogSeverity& severity,
1001  Fw::LogBuffer& args
1002  ) const;
1003 
1004 #if FW_ENABLE_TEXT_LOGGING
1005 
1007  void eventOutText_out(
1008  FwIndexType portNum,
1009  FwEventIdType id,
1010  Fw::Time& timeTag,
1011  const Fw::LogSeverity& severity,
1012  Fw::TextLogString& text
1013  ) const;
1014 
1015 #endif
1016 
1018  void timeCaller_out(
1019  FwIndexType portNum,
1020  Fw::Time& time
1021  ) const;
1022 
1024  void tlmOut_out(
1025  FwIndexType portNum,
1026  FwChanIdType id,
1027  Fw::Time& timeTag,
1028  Fw::TlmBuffer& val
1029  ) const;
1030 
1031 #if !FW_DIRECT_PORT_CALLS
1032 
1033  private:
1034 
1035  // ----------------------------------------------------------------------
1036  // Special input ports
1037  // ----------------------------------------------------------------------
1038 
1040  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1041 
1042 #endif
1043 
1044 #if !FW_DIRECT_PORT_CALLS
1045 
1046  private:
1047 
1048  // ----------------------------------------------------------------------
1049  // Typed input ports
1050  // ----------------------------------------------------------------------
1051 
1053  Fw::InputBufferSendPort m_bufferSendIn_InputPort[NUM_BUFFERSENDIN_INPUT_PORTS];
1054 
1056  Fw::InputComPort m_comIn_InputPort[NUM_COMIN_INPUT_PORTS];
1057 
1059  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1060 
1062  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1063 
1064 #endif
1065 
1066 #if !FW_DIRECT_PORT_CALLS
1067 
1068  private:
1069 
1070  // ----------------------------------------------------------------------
1071  // Special output ports
1072  // ----------------------------------------------------------------------
1073 
1075  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1076 
1078  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1079 
1081  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1082 
1083 #if FW_ENABLE_TEXT_LOGGING == 1
1084 
1086  Fw::OutputLogTextPort m_eventOutText_OutputPort[NUM_EVENTOUTTEXT_OUTPUT_PORTS];
1087 
1088 #endif
1089 
1091  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1092 
1094  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1095 
1096 #endif
1097 
1098 #if !FW_DIRECT_PORT_CALLS
1099 
1100  private:
1101 
1102  // ----------------------------------------------------------------------
1103  // Typed output ports
1104  // ----------------------------------------------------------------------
1105 
1107  Fw::OutputBufferSendPort m_bufferSendOut_OutputPort[NUM_BUFFERSENDOUT_OUTPUT_PORTS];
1108 
1110  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1111 
1112 #endif
1113 
1114  };
1115 
1116 }
1117 
1118 #endif
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.
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.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
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.
FPP shadow-enum representing Fw::FormatStatus.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
Open a new log file with specified name; also resets unique file counter to 0.
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
The Buffer Logger encountered an error formatting a log file name.
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.
void log_WARNING_HI_BL_LogFileNameError(const Fw::StringFormatStatus &status) const
friend class BufferLoggerTesterBase
Friend class tester to support autocoded test harness.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
The Buffer Logger encountered an error writing a validation file.
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.
Flushes the current open log file to disk; a no-op with fprime&#39;s unbuffered file I/O, so always returns success.
Fw::InputComPort * get_comIn_InputPort(FwIndexType portNum)
virtual void BL_SetLogging_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Svc::BufferLogger_LogState &state)=0
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.
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()
Close the currently open log file, if any.
The Buffer Logger encountered an error opening a log file.
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()
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
The Buffer Logger encountered an error writing to a log file.
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].