10 #if FW_ENABLE_TEXT_LOGGING 32 this->m_SpiReadWrite_InputPort[port].
init();
37 this->m_SpiReadWrite_InputPort[port].
setPortNum(port);
39 #if FW_OBJECT_NAMES == 1 43 this->m_objName.toChar(),
46 this->m_SpiReadWrite_InputPort[port].setObjName(portName.
toChar());
56 this->m_Log_OutputPort[port].
init();
58 #if FW_OBJECT_NAMES == 1 62 this->m_objName.toChar(),
65 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
69 #if FW_ENABLE_TEXT_LOGGING == 1 73 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
76 this->m_LogText_OutputPort[port].
init();
78 #if FW_OBJECT_NAMES == 1 82 this->m_objName.toChar(),
85 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
96 this->m_Time_OutputPort[port].
init();
98 #if FW_OBJECT_NAMES == 1 102 this->m_objName.toChar(),
105 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
115 this->m_Tlm_OutputPort[port].
init();
117 #if FW_OBJECT_NAMES == 1 121 this->m_objName.toChar(),
124 this->m_Tlm_OutputPort[port].setObjName(portName.
toChar());
138 static_cast<FwAssertArgType>(portNum)
141 return &this->m_SpiReadWrite_InputPort[portNum];
156 static_cast<FwAssertArgType>(portNum)
162 #if FW_ENABLE_TEXT_LOGGING == 1 164 void LinuxSpiDriverComponentBase ::
165 set_LogText_OutputPort(
171 portNum < this->getNum_LogText_OutputPorts(),
172 static_cast<FwAssertArgType>(portNum)
175 this->m_LogText_OutputPort[portNum].addCallPort(port);
188 static_cast<FwAssertArgType>(portNum)
191 this->m_Time_OutputPort[portNum].
addCallPort(port);
202 static_cast<FwAssertArgType>(portNum)
208 #if FW_PORT_SERIALIZATION 217 Fw::InputSerializePort* port
222 static_cast<FwAssertArgType>(portNum)
225 this->m_Log_OutputPort[portNum].registerSerialPort(port);
228 #if FW_ENABLE_TEXT_LOGGING == 1 230 void LinuxSpiDriverComponentBase ::
231 set_LogText_OutputPort(
233 Fw::InputSerializePort* port
237 portNum < this->getNum_LogText_OutputPorts(),
238 static_cast<FwAssertArgType>(portNum)
241 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
249 Fw::InputSerializePort* port
254 static_cast<FwAssertArgType>(portNum)
257 this->m_Time_OutputPort[portNum].registerSerialPort(port);
263 Fw::InputSerializePort* port
268 static_cast<FwAssertArgType>(portNum)
271 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
282 Fw::PassiveComponentBase(compName)
284 this->m_SPI_WriteErrorThrottle = 0;
313 #if FW_ENABLE_TEXT_LOGGING == 1 316 getNum_LogText_OutputPorts()
const 344 static_cast<FwAssertArgType>(portNum)
347 return this->m_Log_OutputPort[portNum].
isConnected();
350 #if FW_ENABLE_TEXT_LOGGING == 1 352 bool LinuxSpiDriverComponentBase ::
353 isConnected_LogText_OutputPort(
FwIndexType portNum)
356 portNum < this->getNum_LogText_OutputPorts(),
357 static_cast<FwAssertArgType>(portNum)
360 return this->m_LogText_OutputPort[portNum].isConnected();
370 static_cast<FwAssertArgType>(portNum)
373 return this->m_Time_OutputPort[portNum].
isConnected();
381 static_cast<FwAssertArgType>(portNum)
384 return this->m_Tlm_OutputPort[portNum].
isConnected();
403 static_cast<FwAssertArgType>(portNum)
427 if (this->m_Time_OutputPort[0].isConnected()) {
428 this->m_Time_OutputPort[0].
invoke(_logTime);
436 if (this->m_Log_OutputPort[0].isConnected()) {
440 #if FW_AMPCS_COMPATIBLE 442 _status = _logBuff.
serialize(static_cast<U8>(3));
445 static_cast<FwAssertArgType>(_status)
449 #if FW_AMPCS_COMPATIBLE 452 static_cast<U8>(
sizeof(I32))
456 static_cast<FwAssertArgType>(_status)
462 static_cast<FwAssertArgType>(_status)
465 #if FW_AMPCS_COMPATIBLE 468 static_cast<U8>(
sizeof(I32))
472 static_cast<FwAssertArgType>(_status)
478 static_cast<FwAssertArgType>(_status)
481 #if FW_AMPCS_COMPATIBLE 484 static_cast<U8>(
sizeof(I32))
488 static_cast<FwAssertArgType>(_status)
494 static_cast<FwAssertArgType>(_status)
497 this->m_Log_OutputPort[0].
invoke(
506 #if FW_ENABLE_TEXT_LOGGING 507 if (this->m_LogText_OutputPort[0].isConnected()) {
508 #if FW_OBJECT_NAMES == 1 509 const char* _formatString =
510 "(%s) %s: Error opening SPI device %" PRIi32
".%" PRIi32
": %" PRIi32
"";
512 const char* _formatString =
513 "%s: Error opening SPI device %" PRIi32
".%" PRIi32
": %" PRIi32
"";
520 this->m_objName.toChar(),
528 this->m_LogText_OutputPort[0].invoke(
547 if (this->m_Time_OutputPort[0].isConnected()) {
548 this->m_Time_OutputPort[0].
invoke(_logTime);
556 if (this->m_Log_OutputPort[0].isConnected()) {
560 #if FW_AMPCS_COMPATIBLE 562 _status = _logBuff.
serialize(static_cast<U8>(3));
565 static_cast<FwAssertArgType>(_status)
569 #if FW_AMPCS_COMPATIBLE 572 static_cast<U8>(
sizeof(I32))
576 static_cast<FwAssertArgType>(_status)
582 static_cast<FwAssertArgType>(_status)
585 #if FW_AMPCS_COMPATIBLE 588 static_cast<U8>(
sizeof(I32))
592 static_cast<FwAssertArgType>(_status)
598 static_cast<FwAssertArgType>(_status)
601 #if FW_AMPCS_COMPATIBLE 604 static_cast<U8>(
sizeof(I32))
608 static_cast<FwAssertArgType>(_status)
614 static_cast<FwAssertArgType>(_status)
617 this->m_Log_OutputPort[0].
invoke(
626 #if FW_ENABLE_TEXT_LOGGING 627 if (this->m_LogText_OutputPort[0].isConnected()) {
628 #if FW_OBJECT_NAMES == 1 629 const char* _formatString =
630 "(%s) %s: Error configuring SPI device %" PRIi32
".%" PRIi32
": %" PRIi32
"";
632 const char* _formatString =
633 "%s: Error configuring SPI device %" PRIi32
".%" PRIi32
": %" PRIi32
"";
640 this->m_objName.toChar(),
648 this->m_LogText_OutputPort[0].invoke(
670 this->m_SPI_WriteErrorThrottle++;
675 if (this->m_Time_OutputPort[0].isConnected()) {
676 this->m_Time_OutputPort[0].
invoke(_logTime);
684 if (this->m_Log_OutputPort[0].isConnected()) {
688 #if FW_AMPCS_COMPATIBLE 690 _status = _logBuff.
serialize(static_cast<U8>(3));
693 static_cast<FwAssertArgType>(_status)
697 #if FW_AMPCS_COMPATIBLE 700 static_cast<U8>(
sizeof(I32))
704 static_cast<FwAssertArgType>(_status)
710 static_cast<FwAssertArgType>(_status)
713 #if FW_AMPCS_COMPATIBLE 716 static_cast<U8>(
sizeof(I32))
720 static_cast<FwAssertArgType>(_status)
726 static_cast<FwAssertArgType>(_status)
729 #if FW_AMPCS_COMPATIBLE 732 static_cast<U8>(
sizeof(I32))
736 static_cast<FwAssertArgType>(_status)
742 static_cast<FwAssertArgType>(_status)
745 this->m_Log_OutputPort[0].
invoke(
754 #if FW_ENABLE_TEXT_LOGGING 755 if (this->m_LogText_OutputPort[0].isConnected()) {
756 #if FW_OBJECT_NAMES == 1 757 const char* _formatString =
758 "(%s) %s: Error writing/reading SPI device %" PRIi32
".%" PRIi32
": %" PRIi32
"";
760 const char* _formatString =
761 "%s: Error writing/reading SPI device %" PRIi32
".%" PRIi32
": %" PRIi32
"";
768 this->m_objName.toChar(),
776 this->m_LogText_OutputPort[0].invoke(
794 if (this->m_Time_OutputPort[0].isConnected()) {
795 this->m_Time_OutputPort[0].
invoke(_logTime);
803 if (this->m_Log_OutputPort[0].isConnected()) {
807 #if FW_AMPCS_COMPATIBLE 809 _status = _logBuff.
serialize(static_cast<U8>(2));
812 static_cast<FwAssertArgType>(_status)
816 #if FW_AMPCS_COMPATIBLE 819 static_cast<U8>(
sizeof(I32))
823 static_cast<FwAssertArgType>(_status)
829 static_cast<FwAssertArgType>(_status)
832 #if FW_AMPCS_COMPATIBLE 835 static_cast<U8>(
sizeof(I32))
839 static_cast<FwAssertArgType>(_status)
845 static_cast<FwAssertArgType>(_status)
848 this->m_Log_OutputPort[0].
invoke(
857 #if FW_ENABLE_TEXT_LOGGING 858 if (this->m_LogText_OutputPort[0].isConnected()) {
859 #if FW_OBJECT_NAMES == 1 860 const char* _formatString =
861 "(%s) %s: SPI Device %" PRIi32
".%" PRIi32
" configured";
863 const char* _formatString =
864 "%s: SPI Device %" PRIi32
".%" PRIi32
" configured";
871 this->m_objName.toChar(),
878 this->m_LogText_OutputPort[0].invoke(
896 this->m_SPI_WriteErrorThrottle = 0;
909 if (this->m_Tlm_OutputPort[0].isConnected()) {
911 this->m_Time_OutputPort[0].isConnected() &&
914 this->m_Time_OutputPort[0].
invoke(_tlmTime);
921 static_cast<FwAssertArgType>(_stat)
928 this->m_Tlm_OutputPort[0].
invoke(
943 if (this->m_Time_OutputPort[0].isConnected()) {
945 this->m_Time_OutputPort[0].
invoke(_time);
957 void LinuxSpiDriverComponentBase ::
FwIndexType getNum_SpiReadWrite_InputPorts() const
void SpiReadWrite_handlerBase(FwIndexType portNum, Fw::Buffer &writeBuffer, Fw::Buffer &readBuffer)
Handler base-class function for input port SpiReadWrite.
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
void log_WARNING_HI_SPI_ConfigError(I32 device, I32 select, I32 error) const
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual void SpiReadWrite_handler(FwIndexType portNum, Fw::Buffer &writeBuffer, Fw::Buffer &readBuffer)=0
Handler for input port SpiReadWrite.
FwIndexType getNum_Log_OutputPorts() const
void log_WARNING_HI_SPI_WriteError(I32 device, I32 select, I32 error)
void init()
Initialization function.
virtual ~LinuxSpiDriverComponentBase()
Destroy LinuxSpiDriverComponentBase object.
PlatformIndexType FwIndexType
Channel ID for SPI_Bytes.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void tlmWrite_SPI_Bytes(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void addCallPort(InputTlmPort *callPort)
Register an input port.
void init()
Object initializer.
SerializeStatus
forward declaration for string
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
void log_WARNING_HI_SPI_WriteError_ThrottleClear()
Reset throttle value for SPI_WriteError.
FwIndexType getNum_Time_OutputPorts() const
Drv::InputSpiReadWritePort * get_SpiReadWrite_InputPort(FwIndexType portNum)
Auto-generated base for LinuxSpiDriver component.
Throttle reset count for SPI_WriteError.
void init()
Initialization function.
bool isConnected_Time_OutputPort(FwIndexType portNum)
LinuxSpiDriverComponentBase(const char *compName="")
Construct LinuxSpiDriverComponentBase object.
void invoke(Fw::Time &time) const
Invoke a port interface.
const char * toChar() const
No time base has been established.
void log_ACTIVITY_HI_SPI_PortOpened(I32 device, I32 select) const
FwIndexType getNum_Tlm_OutputPorts() const
A serious but recoverable event.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void log_WARNING_HI_SPI_OpenError(I32 device, I32 select, I32 error) const
#define PRI_PlatformIntType
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
Important informational events.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
bool isConnected_Log_OutputPort(FwIndexType portNum)
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void addCallPort(InputLogPort *callPort)
Register an input port.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...