F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
14namespace Svc {
15
16 CmdSequencerComponentImpl::Sequence::Events ::
17 Events(Sequence& sequence) :
18 m_sequence(sequence)
19 {
20
21 }
22
23 void CmdSequencerComponentImpl::Sequence::Events ::
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
36 void CmdSequencerComponentImpl::Sequence::Events ::
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
49 void CmdSequencerComponentImpl::Sequence::Events ::
50 fileNotFound()
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
58 void CmdSequencerComponentImpl::Sequence::Events ::
59 fileReadError()
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
67 void CmdSequencerComponentImpl::Sequence::Events ::
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
79 void CmdSequencerComponentImpl::Sequence::Events ::
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
92 void CmdSequencerComponentImpl::Sequence::Events ::
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
105 void CmdSequencerComponentImpl::Sequence::Events ::
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
118 void CmdSequencerComponentImpl::Sequence::Events ::
119 timeContextMismatch(
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:38
U8 FwTimeContextStoreType
Definition FpConfig.h:50
void log_WARNING_HI_CS_FileSizeError(const Fw::LogStringArg &fileName, U32 size)
void log_WARNING_HI_CS_FileReadError(const Fw::LogStringArg &fileName)
void log_WARNING_HI_CS_FileCrcFailure(const Fw::LogStringArg &fileName, U32 storedCRC, U32 computedCRC)
void log_WARNING_HI_CS_RecordMismatch(const Fw::LogStringArg &fileName, U32 header_records, U32 extra_bytes)
void log_WARNING_HI_CS_FileNotFound(const Fw::LogStringArg &fileName)
void log_WARNING_HI_CS_RecordInvalid(const Fw::LogStringArg &fileName, U32 recordNumber, I32 error)
void log_WARNING_HI_CS_FileInvalid(const Fw::LogStringArg &fileName, Svc::CmdSequencer_FileReadStage stage, I32 error)
void log_WARNING_HI_CS_TimeBaseMismatch(const Fw::LogStringArg &fileName, U16 time_base, U16 seq_time_base)
void log_WARNING_HI_CS_TimeContextMismatch(const Fw::LogStringArg &fileName, U8 currTimeBase, U8 seqTimeBase)
A sequence with unspecified binary format.