| Line | Branch | Exec | Source |
|---|---|---|---|
| 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" | ||
| 12 | #include "Svc/CmdSequencer/CmdSequencerImpl.hpp" | ||
| 13 | |||
| 14 | namespace Svc { | ||
| 15 | |||
| 16 | 148 | CmdSequencerComponentImpl::Sequence::Events ::Events(Sequence& sequence) : m_sequence(sequence) {} | |
| 17 | |||
| 18 | 2 | void CmdSequencerComponentImpl::Sequence::Events ::fileCRCFailure(const U32 storedCRC, const U32 computedCRC) { | |
| 19 | 2 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 20 | 2 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 21 | 2 | component.log_WARNING_HI_CS_FileCrcFailure(logFileName, storedCRC, computedCRC); | |
| 22 | 2 | component.error(); | |
| 23 | 2 | } | |
| 24 | |||
| 25 | 15 | void CmdSequencerComponentImpl::Sequence::Events ::fileInvalid(const CmdSequencer_FileReadStage::t stage, | |
| 26 | const I32 error) { | ||
| 27 | 15 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 28 | 15 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 29 |
2/2✓ Branch 6 taken 15 times.
✓ Branch 12 taken 15 times.
|
15 | component.log_WARNING_HI_CS_FileInvalid(logFileName, stage, error); |
| 30 | 15 | component.error(); | |
| 31 | 15 | } | |
| 32 | |||
| 33 | 5 | void CmdSequencerComponentImpl::Sequence::Events ::fileNotFound() { | |
| 34 | 5 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 35 | 5 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 36 | 5 | component.log_WARNING_HI_CS_FileNotFound(logFileName); | |
| 37 | 5 | component.error(); | |
| 38 | 5 | } | |
| 39 | |||
| 40 | 3 | void CmdSequencerComponentImpl::Sequence::Events ::fileReadError() { | |
| 41 | 3 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 42 | 3 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 43 | 3 | component.log_WARNING_HI_CS_FileReadError(logFileName); | |
| 44 | 3 | component.error(); | |
| 45 | 3 | } | |
| 46 | |||
| 47 | 2 | void CmdSequencerComponentImpl::Sequence::Events ::fileSizeError(const U32 size) { | |
| 48 | 2 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 49 | 2 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 50 | 2 | component.log_WARNING_HI_CS_FileSizeError(logFileName, size); | |
| 51 | 2 | component.error(); | |
| 52 | 2 | } | |
| 53 | |||
| 54 | 10 | void CmdSequencerComponentImpl::Sequence::Events ::recordInvalid(const U32 recordNumber, const I32 error) { | |
| 55 | 10 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 56 | 10 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 57 | 10 | component.log_WARNING_HI_CS_RecordInvalid(logFileName, recordNumber, error); | |
| 58 | 10 | component.error(); | |
| 59 | 10 | } | |
| 60 | |||
| 61 | 1 | void CmdSequencerComponentImpl::Sequence::Events ::recordMismatch(const U32 numRecords, const U32 extraBytes) { | |
| 62 | 1 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 63 | 1 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 64 | 1 | component.log_WARNING_HI_CS_RecordMismatch(logFileName, numRecords, extraBytes); | |
| 65 | // TODO: Should this be an error? | ||
| 66 | 1 | } | |
| 67 | |||
| 68 | 1 | void CmdSequencerComponentImpl::Sequence::Events ::timeBaseMismatch(const TimeBase currTimeBase, | |
| 69 | const TimeBase seqTimeBase) { | ||
| 70 | 1 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 71 | 1 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 72 | 1 | component.log_WARNING_HI_CS_TimeBaseMismatch(logFileName, currTimeBase, seqTimeBase); | |
| 73 | 1 | component.error(); | |
| 74 | 1 | } | |
| 75 | |||
| 76 | 1 | void CmdSequencerComponentImpl::Sequence::Events ::timeContextMismatch(const FwTimeContextStoreType currTimeContext, | |
| 77 | const FwTimeContextStoreType seqTimeContext) { | ||
| 78 | 1 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 79 | 1 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 80 | 1 | component.log_WARNING_HI_CS_TimeContextMismatch(logFileName, currTimeContext, seqTimeContext); | |
| 81 | 1 | component.error(); | |
| 82 | 1 | } | |
| 83 | |||
| 84 | 2 | void CmdSequencerComponentImpl::Sequence::Events ::noRecords() { | |
| 85 | 2 | Fw::LogStringArg& logFileName = this->m_sequence.getLogFileName(); | |
| 86 | 2 | CmdSequencerComponentImpl& component = this->m_sequence.m_component; | |
| 87 | 2 | component.log_WARNING_LO_CS_NoRecords(logFileName); | |
| 88 | 2 | component.error(); | |
| 89 | 2 | } | |
| 90 | |||
| 91 | } // namespace Svc | ||
| 92 |