F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
Svc::CmdSequencerComponentImpl::Sequence Class Referenceabstract

A sequence with unspecified binary format. More...

#include <Svc/CmdSequencer/CmdSequencerImpl.hpp>

Inheritance diagram for Svc::CmdSequencerComponentImpl::Sequence:
Svc::AMPCSSequence Svc::CmdSequencerComponentImpl::FPrimeSequence

Classes

class  Events
 Sequence event reporting. More...
 
class  Header
 A sequence header. More...
 
class  Record
 A sequence record. More...
 

Public Member Functions

 Sequence (CmdSequencerComponentImpl &component)
 Construct a Sequence object. More...
 
virtual ~Sequence ()
 Destroy a Sequence object. More...
 
void allocateBuffer (NATIVE_INT_TYPE identifier, Fw::MemAllocator &allocator, NATIVE_UINT_TYPE bytes)
 Give the sequence representation a memory buffer. More...
 
void deallocateBuffer (Fw::MemAllocator &allocator)
 Deallocate the buffer. More...
 
void setFileName (const Fw::StringBase &fileName)
 Set the file name. Also sets the log file name. More...
 
Fw::CmdStringArggetFileName ()
 
Fw::LogStringArggetLogFileName ()
 
const HeadergetHeader () const
 Get the sequence header. More...
 
virtual bool loadFile (const Fw::StringBase &fileName)=0
 
virtual bool hasMoreRecords () const =0
 
virtual void nextRecord (Record &record)=0
 
virtual void reset ()=0
 
virtual void clear ()=0
 

Protected Attributes

CmdSequencerComponentImplm_component
 The enclosing component. More...
 
Events m_events
 Event reporting. More...
 
Fw::CmdStringArg m_fileName
 The sequence file name. More...
 
Fw::LogStringArg m_logFileName
 Copy of file name for events. More...
 
Fw::ExternalSerializeBuffer m_buffer
 Serialize buffer to hold the binary sequence data. More...
 
NATIVE_INT_TYPE m_allocatorId
 The allocator ID. More...
 
Header m_header
 The sequence header. More...
 

Detailed Description

A sequence with unspecified binary format.

Definition at line 50 of file CmdSequencerImpl.hpp.

Constructor & Destructor Documentation

◆ Sequence()

Svc::CmdSequencerComponentImpl::Sequence::Sequence ( CmdSequencerComponentImpl component)

Construct a Sequence object.

Parameters
componentThe enclosing component

Definition at line 16 of file Sequence.cpp.

◆ ~Sequence()

Svc::CmdSequencerComponentImpl::Sequence::~Sequence ( )
virtual

Destroy a Sequence object.

Definition at line 25 of file Sequence.cpp.

Member Function Documentation

◆ allocateBuffer()

void Svc::CmdSequencerComponentImpl::Sequence::allocateBuffer ( NATIVE_INT_TYPE  identifier,
Fw::MemAllocator allocator,
NATIVE_UINT_TYPE  bytes 
)

Give the sequence representation a memory buffer.

Parameters
identifierThe identifier
allocatorThe allocator
bytesThe number of bytes

Definition at line 76 of file Sequence.cpp.

◆ clear()

virtual void Svc::CmdSequencerComponentImpl::Sequence::clear ( )
pure virtual

Clear the sequence records. After calling this, hasMoreRecords should return false

Implemented in Svc::AMPCSSequence, and Svc::CmdSequencerComponentImpl::FPrimeSequence.

◆ deallocateBuffer()

void Svc::CmdSequencerComponentImpl::Sequence::deallocateBuffer ( Fw::MemAllocator allocator)

Deallocate the buffer.

Parameters
allocatorThe allocator

Definition at line 93 of file Sequence.cpp.

◆ getFileName()

Fw::CmdStringArg & Svc::CmdSequencerComponentImpl::Sequence::getFileName ( )

Get the file name

Returns
The file name

Definition at line 117 of file Sequence.cpp.

◆ getHeader()

const CmdSequencerComponentImpl::Sequence::Header & Svc::CmdSequencerComponentImpl::Sequence::getHeader ( ) const

Get the sequence header.

Definition at line 104 of file Sequence.cpp.

◆ getLogFileName()

Fw::LogStringArg & Svc::CmdSequencerComponentImpl::Sequence::getLogFileName ( )

Get the log file name

Returns
The log file name

Definition at line 123 of file Sequence.cpp.

◆ hasMoreRecords()

virtual bool Svc::CmdSequencerComponentImpl::Sequence::hasMoreRecords ( ) const
pure virtual

Query whether the sequence has any more records

Returns
Yes or no

Implemented in Svc::AMPCSSequence, and Svc::CmdSequencerComponentImpl::FPrimeSequence.

◆ loadFile()

virtual bool Svc::CmdSequencerComponentImpl::Sequence::loadFile ( const Fw::StringBase fileName)
pure virtual

Load a sequence file

Returns
Success or failure
Parameters
fileNameThe file name

Implemented in Svc::AMPCSSequence, and Svc::CmdSequencerComponentImpl::FPrimeSequence.

◆ nextRecord()

virtual void Svc::CmdSequencerComponentImpl::Sequence::nextRecord ( Record record)
pure virtual

Get the next record in the sequence Asserts on failure

Parameters
recordThe returned record

Implemented in Svc::CmdSequencerComponentImpl::FPrimeSequence.

◆ reset()

virtual void Svc::CmdSequencerComponentImpl::Sequence::reset ( )
pure virtual

Reset the sequence to the beginning. After calling this, hasMoreRecords should return true, unless the sequence has no records

Implemented in Svc::AMPCSSequence, and Svc::CmdSequencerComponentImpl::FPrimeSequence.

◆ setFileName()

void Svc::CmdSequencerComponentImpl::Sequence::setFileName ( const Fw::StringBase fileName)

Set the file name. Also sets the log file name.

Definition at line 110 of file Sequence.cpp.

Member Data Documentation

◆ m_allocatorId

NATIVE_INT_TYPE Svc::CmdSequencerComponentImpl::Sequence::m_allocatorId
protected

The allocator ID.

Definition at line 284 of file CmdSequencerImpl.hpp.

◆ m_buffer

Fw::ExternalSerializeBuffer Svc::CmdSequencerComponentImpl::Sequence::m_buffer
protected

Serialize buffer to hold the binary sequence data.

Definition at line 281 of file CmdSequencerImpl.hpp.

◆ m_component

CmdSequencerComponentImpl& Svc::CmdSequencerComponentImpl::Sequence::m_component
protected

The enclosing component.

Definition at line 269 of file CmdSequencerImpl.hpp.

◆ m_events

Events Svc::CmdSequencerComponentImpl::Sequence::m_events
protected

Event reporting.

Definition at line 272 of file CmdSequencerImpl.hpp.

◆ m_fileName

Fw::CmdStringArg Svc::CmdSequencerComponentImpl::Sequence::m_fileName
protected

The sequence file name.

Definition at line 275 of file CmdSequencerImpl.hpp.

◆ m_header

Header Svc::CmdSequencerComponentImpl::Sequence::m_header
protected

The sequence header.

Definition at line 287 of file CmdSequencerImpl.hpp.

◆ m_logFileName

Fw::LogStringArg Svc::CmdSequencerComponentImpl::Sequence::m_logFileName
protected

Copy of file name for events.

Definition at line 278 of file CmdSequencerImpl.hpp.


The documentation for this class was generated from the following files: