F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Events.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Events.cpp
3 // \author Bocchino
4 // \brief Implementation for CmdSequencerComponentImpl::Sequence::Events
5 //
6 // Copyright (C) 2009-2018 California Institute of Technology.
7 // ALL RIGHTS RESERVED. United States Government Sponsorship
8 // acknowledged.
9 // ======================================================================
10 
11 #include "Fw/Types/Assert.hpp"
13 
14 namespace Svc {
15 
17  Events(Sequence& sequence) :
18  m_sequence(sequence)
19  {
20 
21  }
22 
24  fileCRCFailure(const U32 storedCRC, const U32 computedCRC)
25  {
26  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
27  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
29  logFileName,
30  storedCRC,
31  computedCRC
32  );
33  component.error();
34  }
35 
37  fileInvalid(const CmdSequencer_FileReadStage::t stage, const I32 error)
38  {
39  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
40  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
42  logFileName,
43  stage,
44  error
45  );
46  component.error();
47  }
48 
51  {
52  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
53  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
54  component.log_WARNING_HI_CS_FileNotFound(logFileName);
55  component.error();
56  }
57 
60  {
61  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
62  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
63  component.log_WARNING_HI_CS_FileReadError(logFileName);
64  component.error();
65  }
66 
68  fileSizeError(const U32 size)
69  {
70  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
71  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
73  logFileName,
74  size
75  );
76  component.error();
77  }
78 
80  recordInvalid(const U32 recordNumber, const I32 error)
81  {
82  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
83  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
85  logFileName,
86  recordNumber,
87  error
88  );
89  component.error();
90  }
91 
93  recordMismatch(const U32 numRecords, const U32 extraBytes)
94  {
95  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
96  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
98  logFileName,
99  numRecords,
100  extraBytes
101  );
102  // TODO: Should this be an error?
103  }
104 
106  timeBaseMismatch(const TimeBase currTimeBase, const TimeBase seqTimeBase)
107  {
108  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
109  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
111  logFileName,
112  currTimeBase,
113  seqTimeBase
114  );
115  component.error();
116  }
117 
120  const FwTimeContextStoreType currTimeContext,
121  const FwTimeContextStoreType seqTimeContext
122  )
123  {
124  Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName();
125  CmdSequencerComponentImpl& component = this->m_sequence.m_component;
127  logFileName,
128  currTimeContext,
129  seqTimeContext
130  );
131  component.error();
132  }
133 
134 }
135 
TimeBase
Definition: FpConfig.h:69
U8 FwTimeContextStoreType
Definition: FpConfig.h:83
void log_WARNING_HI_CS_FileNotFound(const Fw::StringBase &fileName)
void log_WARNING_HI_CS_FileReadError(const Fw::StringBase &fileName)
void log_WARNING_HI_CS_RecordMismatch(const Fw::StringBase &fileName, U32 header_records, U32 extra_bytes)
void log_WARNING_HI_CS_TimeBaseMismatch(const Fw::StringBase &fileName, U16 time_base, U16 seq_time_base)
void log_WARNING_HI_CS_TimeContextMismatch(const Fw::StringBase &fileName, U8 currTimeBase, U8 seqTimeBase)
void log_WARNING_HI_CS_FileInvalid(const Fw::StringBase &fileName, Svc::CmdSequencer_FileReadStage stage, I32 error)
void log_WARNING_HI_CS_FileCrcFailure(const Fw::StringBase &fileName, U32 storedCRC, U32 computedCRC)
void log_WARNING_HI_CS_RecordInvalid(const Fw::StringBase &fileName, U32 recordNumber, I32 error)
void log_WARNING_HI_CS_FileSizeError(const Fw::StringBase &fileName, U32 size)
void recordMismatch(const U32 numRecords, const U32 extraBytes)
Record mismatch.
Definition: Events.cpp:93
void timeBaseMismatch(const TimeBase currTimeBase, const TimeBase seqTimeBase)
Time base mismatch.
Definition: Events.cpp:106
void fileSizeError(const U32 size)
File size error.
Definition: Events.cpp:68
void fileCRCFailure(const U32 storedCRC, const U32 computedCRC)
File CRC failure.
Definition: Events.cpp:24
Events(Sequence &sequence)
Construct an Events object.
Definition: Events.cpp:17
void timeContextMismatch(const FwTimeContextStoreType currTimeContext, const FwTimeContextStoreType seqTimeContext)
Time context mismatch.
Definition: Events.cpp:119
void recordInvalid(const U32 recordNumber, const I32 error)
Record invalid.
Definition: Events.cpp:80
void fileInvalid(const CmdSequencer_FileReadStage::t stage, const I32 error)
File invalid.
Definition: Events.cpp:37
A sequence with unspecified binary format.