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

Auto-generated base for OsTime component. More...

#include <Svc/OsTime/OsTimeComponentAc.hpp>

Inheritance diagram for Svc::OsTimeComponentBase:
Fw::PassiveComponentBase Fw::ObjBase Svc::OsTime

Public Member Functions

void init (FwEnumStoreType instance=0)
 Initialize OsTimeComponentBase object. More...
 
Fw::InputCmdPortget_CmdDisp_InputPort (FwIndexType portNum)
 
Svc::InputOsTimeEpochPortget_setEpoch_InputPort (FwIndexType portNum)
 
Fw::InputTimePortget_timeGetPort_InputPort (FwIndexType portNum)
 
void set_CmdReg_OutputPort (FwIndexType portNum, Fw::InputCmdRegPort *port)
 Connect port to CmdReg[portNum]. More...
 
void set_CmdStatus_OutputPort (FwIndexType portNum, Fw::InputCmdResponsePort *port)
 Connect port to CmdStatus[portNum]. More...
 
void set_EventOut_OutputPort (FwIndexType portNum, Fw::InputLogPort *port)
 Connect port to EventOut[portNum]. More...
 
void set_timeCaller_OutputPort (FwIndexType portNum, Fw::InputTimePort *port)
 Connect port to timeCaller[portNum]. More...
 
void regCommands ()
 Register commands with the Command Dispatcher. More...
 
- Public Member Functions inherited from Fw::PassiveComponentBase
void setIdBase (const FwIdType)
 Set the ID base. More...
 
FwIdType getIdBase () const
 

Protected Types

enum  { NUM_CMDDISP_INPUT_PORTS = 1 }
 Enumerations for numbers of special input ports. More...
 
enum  { NUM_SETEPOCH_INPUT_PORTS = 1, NUM_TIMEGETPORT_INPUT_PORTS = 1 }
 Enumerations for numbers of typed input ports. More...
 
enum  {
  NUM_CMDREG_OUTPUT_PORTS = 1, NUM_CMDSTATUS_OUTPUT_PORTS = 1, NUM_EVENTOUT_OUTPUT_PORTS = 1, NUM_LOGTEXT_OUTPUT_PORTS = 1,
  NUM_TIMECALLER_OUTPUT_PORTS = 1
}
 Enumerations for numbers of special output ports. More...
 
enum  { OPCODE_SETCURRENTTIME = 0x0 }
 Command opcodes. More...
 
enum  { EVENTID_SETCURRENTTIMEERROR = 0x0 }
 Event IDs. More...
 

Protected Member Functions

 OsTimeComponentBase (const char *compName="")
 Construct OsTimeComponentBase object. More...
 
virtual ~OsTimeComponentBase ()
 Destroy OsTimeComponentBase object. More...
 
FwIndexType getNum_CmdDisp_InputPorts () const
 
FwIndexType getNum_setEpoch_InputPorts () const
 
FwIndexType getNum_timeGetPort_InputPorts () const
 
FwIndexType getNum_CmdReg_OutputPorts () const
 
FwIndexType getNum_CmdStatus_OutputPorts () const
 
FwIndexType getNum_EventOut_OutputPorts () const
 
FwIndexType getNum_timeCaller_OutputPorts () const
 
bool isConnected_CmdReg_OutputPort (FwIndexType portNum)
 
bool isConnected_CmdStatus_OutputPort (FwIndexType portNum)
 
bool isConnected_EventOut_OutputPort (FwIndexType portNum)
 
bool isConnected_timeCaller_OutputPort (FwIndexType portNum)
 
virtual void setEpoch_handler (FwIndexType portNum, const Fw::Time &fw_time, const Os::RawTime &os_time)=0
 Handler for input port setEpoch. More...
 
virtual void timeGetPort_handler (FwIndexType portNum, Fw::Time &time)=0
 Handler for input port timeGetPort. More...
 
void setEpoch_handlerBase (FwIndexType portNum, const Fw::Time &fw_time, const Os::RawTime &os_time)
 Handler base-class function for input port setEpoch. More...
 
void timeGetPort_handlerBase (FwIndexType portNum, Fw::Time &time)
 Handler base-class function for input port timeGetPort. More...
 
void cmdResponse_out (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
 Emit command response. More...
 
virtual void SetCurrentTime_cmdHandler (FwOpcodeType opCode, U32 cmdSeq, U32 seconds_now)=0
 Handler for command SetCurrentTime. More...
 
void SetCurrentTime_cmdHandlerBase (FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
 Base-class handler function for command SetCurrentTime. More...
 
void log_WARNING_HI_SetCurrentTimeError (U32 status) const
 
Fw::Time getTime () const
 
- Protected Member Functions inherited from Fw::PassiveComponentBase
 PassiveComponentBase (const char *name)
 Named constructor. More...
 
virtual ~PassiveComponentBase ()
 Destructor. More...
 
void init (FwEnumStoreType instance)
 Initialization function. More...
 
FwEnumStoreType getInstance () const
 
- Protected Member Functions inherited from Fw::ObjBase
 ObjBase (const char *name)
 ObjBase constructor. More...
 
virtual ~ObjBase ()
 Destructor. More...
 
void init ()
 Object initializer. More...
 

Friends

class OsTimeTesterBase
 Friend class tester to support autocoded test harness. More...
 
class OsTimeTester
 Friend class tester implementation to support white-box testing. More...
 

Detailed Description

Auto-generated base for OsTime component.

A time component using OSAL RawTime abstractions

Definition at line 34 of file OsTimeComponentAc.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected

Enumerations for numbers of special input ports.

Enumerator
NUM_CMDDISP_INPUT_PORTS 

Definition at line 54 of file OsTimeComponentAc.hpp.

◆ anonymous enum

anonymous enum
protected

Enumerations for numbers of typed input ports.

Enumerator
NUM_SETEPOCH_INPUT_PORTS 
NUM_TIMEGETPORT_INPUT_PORTS 

Definition at line 59 of file OsTimeComponentAc.hpp.

◆ anonymous enum

anonymous enum
protected

Enumerations for numbers of special output ports.

Enumerator
NUM_CMDREG_OUTPUT_PORTS 
NUM_CMDSTATUS_OUTPUT_PORTS 
NUM_EVENTOUT_OUTPUT_PORTS 
NUM_LOGTEXT_OUTPUT_PORTS 
NUM_TIMECALLER_OUTPUT_PORTS 

Definition at line 65 of file OsTimeComponentAc.hpp.

◆ anonymous enum

anonymous enum
protected

Command opcodes.

Enumerator
OPCODE_SETCURRENTTIME 

Definition at line 74 of file OsTimeComponentAc.hpp.

◆ anonymous enum

anonymous enum
protected

Event IDs.

Enumerator
EVENTID_SETCURRENTTIMEERROR 

An error occurred while attempting to set the current time.

Definition at line 79 of file OsTimeComponentAc.hpp.

Constructor & Destructor Documentation

◆ OsTimeComponentBase()

Svc::OsTimeComponentBase::OsTimeComponentBase ( const char *  compName = "")
protected

Construct OsTimeComponentBase object.

Parameters
compNameThe component name

Definition at line 416 of file OsTimeComponentAc.cpp.

◆ ~OsTimeComponentBase()

Svc::OsTimeComponentBase::~OsTimeComponentBase ( )
protectedvirtual

Destroy OsTimeComponentBase object.

Definition at line 423 of file OsTimeComponentAc.cpp.

Member Function Documentation

◆ cmdResponse_out()

void Svc::OsTimeComponentBase::cmdResponse_out ( FwOpcodeType  opCode,
U32  cmdSeq,
Fw::CmdResponse  response 
)
protected

Emit command response.

Parameters
opCodeThe opcode
cmdSeqThe command sequence number
responseThe command response

Definition at line 606 of file OsTimeComponentAc.cpp.

◆ get_CmdDisp_InputPort()

Fw::InputCmdPort * Svc::OsTimeComponentBase::get_CmdDisp_InputPort ( FwIndexType  portNum)

Get special input port at index

Returns
CmdDisp[portNum]
Parameters
portNumThe port number

Definition at line 201 of file OsTimeComponentAc.cpp.

◆ get_setEpoch_InputPort()

Svc::InputOsTimeEpochPort * Svc::OsTimeComponentBase::get_setEpoch_InputPort ( FwIndexType  portNum)

Get typed input port at index

Returns
setEpoch[portNum]
Parameters
portNumThe port number

Definition at line 216 of file OsTimeComponentAc.cpp.

◆ get_timeGetPort_InputPort()

Fw::InputTimePort * Svc::OsTimeComponentBase::get_timeGetPort_InputPort ( FwIndexType  portNum)

Get typed input port at index

Returns
timeGetPort[portNum]
Parameters
portNumThe port number

Definition at line 227 of file OsTimeComponentAc.cpp.

◆ getNum_CmdDisp_InputPorts()

FwIndexType Svc::OsTimeComponentBase::getNum_CmdDisp_InputPorts ( ) const
protected

Get the number of CmdDisp input ports

Returns
The number of CmdDisp input ports

Definition at line 433 of file OsTimeComponentAc.cpp.

◆ getNum_CmdReg_OutputPorts()

FwIndexType Svc::OsTimeComponentBase::getNum_CmdReg_OutputPorts ( ) const
protected

Get the number of CmdReg output ports

Returns
The number of CmdReg output ports

Definition at line 459 of file OsTimeComponentAc.cpp.

◆ getNum_CmdStatus_OutputPorts()

FwIndexType Svc::OsTimeComponentBase::getNum_CmdStatus_OutputPorts ( ) const
protected

Get the number of CmdStatus output ports

Returns
The number of CmdStatus output ports

Definition at line 465 of file OsTimeComponentAc.cpp.

◆ getNum_EventOut_OutputPorts()

FwIndexType Svc::OsTimeComponentBase::getNum_EventOut_OutputPorts ( ) const
protected

Get the number of EventOut output ports

Returns
The number of EventOut output ports

Definition at line 471 of file OsTimeComponentAc.cpp.

◆ getNum_setEpoch_InputPorts()

FwIndexType Svc::OsTimeComponentBase::getNum_setEpoch_InputPorts ( ) const
protected

Get the number of setEpoch input ports

Returns
The number of setEpoch input ports

Definition at line 443 of file OsTimeComponentAc.cpp.

◆ getNum_timeCaller_OutputPorts()

FwIndexType Svc::OsTimeComponentBase::getNum_timeCaller_OutputPorts ( ) const
protected

Get the number of timeCaller output ports

Returns
The number of timeCaller output ports

Definition at line 487 of file OsTimeComponentAc.cpp.

◆ getNum_timeGetPort_InputPorts()

FwIndexType Svc::OsTimeComponentBase::getNum_timeGetPort_InputPorts ( ) const
protected

Get the number of timeGetPort input ports

Returns
The number of timeGetPort input ports

Definition at line 449 of file OsTimeComponentAc.cpp.

◆ getTime()

Fw::Time Svc::OsTimeComponentBase::getTime ( ) const
protected

Get the time

\return The current time

Definition at line 760 of file OsTimeComponentAc.cpp.

◆ init()

void Svc::OsTimeComponentBase::init ( FwEnumStoreType  instance = 0)

Initialize OsTimeComponentBase object.

Parameters
instanceThe instance number

Definition at line 21 of file OsTimeComponentAc.cpp.

◆ isConnected_CmdReg_OutputPort()

bool Svc::OsTimeComponentBase::isConnected_CmdReg_OutputPort ( FwIndexType  portNum)
protected

Check whether port CmdReg is connected

Returns
Whether port CmdReg is connected
Parameters
portNumThe port number

Definition at line 497 of file OsTimeComponentAc.cpp.

◆ isConnected_CmdStatus_OutputPort()

bool Svc::OsTimeComponentBase::isConnected_CmdStatus_OutputPort ( FwIndexType  portNum)
protected

Check whether port CmdStatus is connected

Returns
Whether port CmdStatus is connected
Parameters
portNumThe port number

Definition at line 508 of file OsTimeComponentAc.cpp.

◆ isConnected_EventOut_OutputPort()

bool Svc::OsTimeComponentBase::isConnected_EventOut_OutputPort ( FwIndexType  portNum)
protected

Check whether port EventOut is connected

Returns
Whether port EventOut is connected
Parameters
portNumThe port number

Definition at line 519 of file OsTimeComponentAc.cpp.

◆ isConnected_timeCaller_OutputPort()

bool Svc::OsTimeComponentBase::isConnected_timeCaller_OutputPort ( FwIndexType  portNum)
protected

Check whether port timeCaller is connected

Returns
Whether port timeCaller is connected
Parameters
portNumThe port number

Definition at line 545 of file OsTimeComponentAc.cpp.

◆ log_WARNING_HI_SetCurrentTimeError()

void Svc::OsTimeComponentBase::log_WARNING_HI_SetCurrentTimeError ( U32  status) const
protected

Log event SetCurrentTimeError

An error occurred while attempting to set the current time

Parameters
statusThe error status

Definition at line 674 of file OsTimeComponentAc.cpp.

◆ regCommands()

void Svc::OsTimeComponentBase::regCommands ( )

Register commands with the Command Dispatcher.

Connect the dispatcher first

Definition at line 402 of file OsTimeComponentAc.cpp.

◆ set_CmdReg_OutputPort()

void Svc::OsTimeComponentBase::set_CmdReg_OutputPort ( FwIndexType  portNum,
Fw::InputCmdRegPort port 
)

Connect port to CmdReg[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 242 of file OsTimeComponentAc.cpp.

◆ set_CmdStatus_OutputPort()

void Svc::OsTimeComponentBase::set_CmdStatus_OutputPort ( FwIndexType  portNum,
Fw::InputCmdResponsePort port 
)

Connect port to CmdStatus[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 256 of file OsTimeComponentAc.cpp.

◆ set_EventOut_OutputPort()

void Svc::OsTimeComponentBase::set_EventOut_OutputPort ( FwIndexType  portNum,
Fw::InputLogPort port 
)

Connect port to EventOut[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 270 of file OsTimeComponentAc.cpp.

◆ set_timeCaller_OutputPort()

void Svc::OsTimeComponentBase::set_timeCaller_OutputPort ( FwIndexType  portNum,
Fw::InputTimePort port 
)

Connect port to timeCaller[portNum].

Parameters
portNumThe port number
portThe input port

Definition at line 302 of file OsTimeComponentAc.cpp.

◆ SetCurrentTime_cmdHandler()

virtual void Svc::OsTimeComponentBase::SetCurrentTime_cmdHandler ( FwOpcodeType  opCode,
U32  cmdSeq,
U32  seconds_now 
)
protectedpure virtual

Handler for command SetCurrentTime.

Parameters
opCodeThe opcode
cmdSeqThe command sequence number

◆ SetCurrentTime_cmdHandlerBase()

void Svc::OsTimeComponentBase::SetCurrentTime_cmdHandlerBase ( FwOpcodeType  opCode,
U32  cmdSeq,
Fw::CmdArgBuffer args 
)
protected

Base-class handler function for command SetCurrentTime.

Parameters
opCodeThe opcode
cmdSeqThe command sequence number
argsThe command argument buffer

Definition at line 623 of file OsTimeComponentAc.cpp.

◆ setEpoch_handler()

virtual void Svc::OsTimeComponentBase::setEpoch_handler ( FwIndexType  portNum,
const Fw::Time fw_time,
const Os::RawTime os_time 
)
protectedpure virtual

Handler for input port setEpoch.

Parameters
portNumThe port number

◆ setEpoch_handlerBase()

void Svc::OsTimeComponentBase::setEpoch_handlerBase ( FwIndexType  portNum,
const Fw::Time fw_time,
const Os::RawTime os_time 
)
protected

Handler base-class function for input port setEpoch.

Parameters
portNumThe port number

Definition at line 562 of file OsTimeComponentAc.cpp.

◆ timeGetPort_handler()

virtual void Svc::OsTimeComponentBase::timeGetPort_handler ( FwIndexType  portNum,
Fw::Time time 
)
protectedpure virtual

Handler for input port timeGetPort.

Parameters
portNumThe port number
timeReference to Time object

◆ timeGetPort_handlerBase()

void Svc::OsTimeComponentBase::timeGetPort_handlerBase ( FwIndexType  portNum,
Fw::Time time 
)
protected

Handler base-class function for input port timeGetPort.

Parameters
portNumThe port number
timeReference to Time object

Definition at line 583 of file OsTimeComponentAc.cpp.

Friends And Related Function Documentation

◆ OsTimeTester

friend class OsTimeTester
friend

Friend class tester implementation to support white-box testing.

Definition at line 45 of file OsTimeComponentAc.hpp.

◆ OsTimeTesterBase

friend class OsTimeTesterBase
friend

Friend class tester to support autocoded test harness.

Definition at line 43 of file OsTimeComponentAc.hpp.


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