10 #if FW_ENABLE_TEXT_LOGGING
32 this->m_gpioRead_InputPort[port].
init();
37 this->m_gpioRead_InputPort[port].
setPortNum(port);
39 #if FW_OBJECT_NAMES == 1
43 this->m_objName.toChar(),
46 this->m_gpioRead_InputPort[port].setObjName(portName.
toChar());
56 this->m_gpioWrite_InputPort[port].
init();
61 this->m_gpioWrite_InputPort[port].
setPortNum(port);
63 #if FW_OBJECT_NAMES == 1
67 this->m_objName.toChar(),
70 this->m_gpioWrite_InputPort[port].setObjName(portName.
toChar());
80 this->m_Log_OutputPort[port].
init();
82 #if FW_OBJECT_NAMES == 1
86 this->m_objName.toChar(),
89 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
93 #if FW_ENABLE_TEXT_LOGGING == 1
97 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
100 this->m_LogText_OutputPort[port].
init();
102 #if FW_OBJECT_NAMES == 1
106 this->m_objName.toChar(),
109 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
120 this->m_Time_OutputPort[port].
init();
122 #if FW_OBJECT_NAMES == 1
126 this->m_objName.toChar(),
129 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
139 this->m_gpioInterrupt_OutputPort[port].
init();
141 #if FW_OBJECT_NAMES == 1
145 this->m_objName.toChar(),
148 this->m_gpioInterrupt_OutputPort[port].setObjName(portName.
toChar());
165 return &this->m_gpioRead_InputPort[portNum];
176 return &this->m_gpioWrite_InputPort[portNum];
197 #if FW_ENABLE_TEXT_LOGGING == 1
199 void LinuxGpioDriverComponentBase ::
200 set_LogText_OutputPort(
206 portNum < this->getNum_LogText_OutputPorts(),
210 this->m_LogText_OutputPort[portNum].addCallPort(port);
226 this->m_Time_OutputPort[portNum].
addCallPort(port);
244 this->m_gpioInterrupt_OutputPort[portNum].
addCallPort(port);
247 #if FW_PORT_SERIALIZATION
256 Fw::InputSerializePort* port
264 this->m_Log_OutputPort[portNum].registerSerialPort(port);
267 #if FW_ENABLE_TEXT_LOGGING == 1
269 void LinuxGpioDriverComponentBase ::
270 set_LogText_OutputPort(
272 Fw::InputSerializePort* port
276 portNum < this->getNum_LogText_OutputPorts(),
280 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
288 Fw::InputSerializePort* port
296 this->m_Time_OutputPort[portNum].registerSerialPort(port);
301 #if FW_PORT_SERIALIZATION
310 Fw::InputSerializePort* port
318 this->m_gpioInterrupt_OutputPort[portNum].registerSerialPort(port);
329 Fw::PassiveComponentBase(compName)
366 #if FW_ENABLE_TEXT_LOGGING == 1
369 getNum_LogText_OutputPorts()
const
404 return this->m_Log_OutputPort[portNum].
isConnected();
407 #if FW_ENABLE_TEXT_LOGGING == 1
409 bool LinuxGpioDriverComponentBase ::
410 isConnected_LogText_OutputPort(
FwIndexType portNum)
413 portNum < this->getNum_LogText_OutputPorts(),
417 return this->m_LogText_OutputPort[portNum].isConnected();
430 return this->m_Time_OutputPort[portNum].
isConnected();
445 return this->m_gpioInterrupt_OutputPort[portNum].
isConnected();
514 this->m_gpioInterrupt_OutputPort[portNum].
invoke(
533 if (this->m_Time_OutputPort[0].isConnected()) {
534 this->m_Time_OutputPort[0].
invoke(_logTime);
542 if (this->m_Log_OutputPort[0].isConnected()) {
546 #if FW_AMPCS_COMPATIBLE
567 #if FW_AMPCS_COMPATIBLE
570 static_cast<U8>(
sizeof(U32))
589 this->m_Log_OutputPort[0].
invoke(
598 #if FW_ENABLE_TEXT_LOGGING
599 if (this->m_LogText_OutputPort[0].isConnected()) {
600 #if FW_OBJECT_NAMES == 1
601 const char* _formatString =
602 "(%s) %s: Opened GPIO chip %s[%s] pin %" PRIu32
"[%s]";
604 const char* _formatString =
605 "%s: Opened GPIO chip %s[%s] pin %" PRIu32
"[%s]";
612 this->m_objName.toChar(),
621 this->m_LogText_OutputPort[0].invoke(
639 if (this->m_Time_OutputPort[0].isConnected()) {
640 this->m_Time_OutputPort[0].
invoke(_logTime);
648 if (this->m_Log_OutputPort[0].isConnected()) {
652 #if FW_AMPCS_COMPATIBLE
667 #if FW_AMPCS_COMPATIBLE
683 this->m_Log_OutputPort[0].
invoke(
692 #if FW_ENABLE_TEXT_LOGGING
693 if (this->m_LogText_OutputPort[0].isConnected()) {
694 #if FW_OBJECT_NAMES == 1
695 const char* _formatString =
696 "(%s) %s: Failed to open GPIO chip %s: %s";
698 const char* _formatString =
699 "%s: Failed to open GPIO chip %s: %s";
703 status.toString(statusStr);
709 this->m_objName.toChar(),
716 this->m_LogText_OutputPort[0].invoke(
736 if (this->m_Time_OutputPort[0].isConnected()) {
737 this->m_Time_OutputPort[0].
invoke(_logTime);
745 if (this->m_Log_OutputPort[0].isConnected()) {
749 #if FW_AMPCS_COMPATIBLE
764 #if FW_AMPCS_COMPATIBLE
767 static_cast<U8>(
sizeof(U32))
786 #if FW_AMPCS_COMPATIBLE
802 this->m_Log_OutputPort[0].
invoke(
811 #if FW_ENABLE_TEXT_LOGGING
812 if (this->m_LogText_OutputPort[0].isConnected()) {
813 #if FW_OBJECT_NAMES == 1
814 const char* _formatString =
815 "(%s) %s: Failed to open GPIO chip %s pin %" PRIu32
" [%s]: %s";
817 const char* _formatString =
818 "%s: Failed to open GPIO chip %s pin %" PRIu32
" [%s]: %s";
822 status.toString(statusStr);
828 this->m_objName.toChar(),
837 this->m_LogText_OutputPort[0].invoke(
855 if (this->m_Time_OutputPort[0].isConnected()) {
856 this->m_Time_OutputPort[0].
invoke(_logTime);
864 if (this->m_Log_OutputPort[0].isConnected()) {
868 #if FW_AMPCS_COMPATIBLE
877 #if FW_AMPCS_COMPATIBLE
880 static_cast<U8>(
sizeof(U32))
893 #if FW_AMPCS_COMPATIBLE
896 static_cast<U8>(
sizeof(U32))
909 this->m_Log_OutputPort[0].
invoke(
918 #if FW_ENABLE_TEXT_LOGGING
919 if (this->m_LogText_OutputPort[0].isConnected()) {
920 #if FW_OBJECT_NAMES == 1
921 const char* _formatString =
922 "(%s) %s: Interrupt data read expected %" PRIu32
" byes and got %" PRIu32
"";
924 const char* _formatString =
925 "%s: Interrupt data read expected %" PRIu32
" byes and got %" PRIu32
"";
932 this->m_objName.toChar(),
934 "InterruptReadError ",
939 this->m_LogText_OutputPort[0].invoke(
954 if (this->m_Time_OutputPort[0].isConnected()) {
955 this->m_Time_OutputPort[0].
invoke(_logTime);
963 if (this->m_Log_OutputPort[0].isConnected()) {
967 #if FW_AMPCS_COMPATIBLE
976 #if FW_AMPCS_COMPATIBLE
979 static_cast<U8>(
sizeof(I32))
986 _status = _logBuff.
serialize(error_number);
992 this->m_Log_OutputPort[0].
invoke(
1001 #if FW_ENABLE_TEXT_LOGGING
1002 if (this->m_LogText_OutputPort[0].isConnected()) {
1003 #if FW_OBJECT_NAMES == 1
1004 const char* _formatString =
1005 "(%s) %s: Interrupt polling returned errno: %" PRIi32
"";
1007 const char* _formatString =
1008 "%s: Interrupt polling returned errno: %" PRIi32
"";
1015 this->m_objName.toChar(),
1021 this->m_LogText_OutputPort[0].invoke(
1038 if (this->m_Time_OutputPort[0].isConnected()) {
1040 this->m_Time_OutputPort[0].
invoke(_time);
1076 return compPtr->gpioWrite_handlerBase(
#define FW_MIN(a, b)
MIN macro.
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
Auto-generated base for LinuxGpioDriver component.
Drv::InputGpioWritePort * get_gpioWrite_InputPort(FwIndexType portNum)
void set_gpioInterrupt_OutputPort(FwIndexType portNum, Svc::InputCyclePort *port)
Connect port to gpioInterrupt[portNum].
FwIndexType getNum_gpioWrite_InputPorts() const
virtual ~LinuxGpioDriverComponentBase()
Destroy LinuxGpioDriverComponentBase object.
@ EVENTID_INTERRUPTREADERROR
void log_DIAGNOSTIC_OpenChip(const Fw::StringBase &chip, const Fw::StringBase &chipLabel, U32 pin, const Fw::StringBase &pinMessage)
Log event OpenChip.
Drv::GpioStatus gpioRead_handlerBase(FwIndexType portNum, Fw::Logic &state)
Handler base-class function for input port gpioRead.
void log_WARNING_HI_OpenPinError(const Fw::StringBase &chip, U32 pin, const Fw::StringBase &pinMessage, Os::FileStatus status)
Log event OpenPinError.
Drv::GpioStatus gpioWrite_handlerBase(FwIndexType portNum, const Fw::Logic &state)
Handler base-class function for input port gpioWrite.
void log_WARNING_HI_OpenChipError(const Fw::StringBase &chip, Os::FileStatus status)
Log event OpenChipError.
FwIndexType getNum_Log_OutputPorts() const
void log_WARNING_HI_InterruptReadError(U32 expected, U32 got)
Log event InterruptReadError.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
Drv::InputGpioReadPort * get_gpioRead_InputPort(FwIndexType portNum)
FwIndexType getNum_gpioRead_InputPorts() const
void log_WARNING_HI_PollingError(I32 error_number)
Log event PollingError.
FwIndexType getNum_gpioInterrupt_OutputPorts() const
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
bool isConnected_Time_OutputPort(FwIndexType portNum)
FwIndexType getNum_Time_OutputPorts() const
bool isConnected_gpioInterrupt_OutputPort(FwIndexType portNum)
bool isConnected_Log_OutputPort(FwIndexType portNum)
void gpioInterrupt_out(FwIndexType portNum, Os::RawTime &cycleStart)
Invoke output port gpioInterrupt.
LinuxGpioDriverComponentBase(const char *compName="")
Construct LinuxGpioDriverComponentBase object.
virtual Drv::GpioStatus gpioWrite_handler(FwIndexType portNum, const Fw::Logic &state)=0
Handler for input port gpioWrite.
virtual Drv::GpioStatus gpioRead_handler(FwIndexType portNum, Fw::Logic &state)=0
Handler for input port gpioRead.
@ WARNING_HI
A serious but recoverable event.
@ DIAGNOSTIC
Software diagnostic events.
void init()
Object initializer.
const char * toChar() const
void init()
Initialization function.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke a port interface.
void addCallPort(InputLogPort *callPort)
Register an input port.
void addCallPort(InputTimePort *callPort)
Register an input port.
void invoke(Fw::Time &time)
Invoke a port interface.
void init()
Initialization function.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual const CHAR * toChar() const =0
void format(const CHAR *formatString,...)
write formatted string to buffer
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
const char * toChar() const
FPP shadow-enum representing Os::File::Status.
@ SERIALIZED_SIZE
The size of the serial representation.
void init()
Initialization function.
void invoke(Os::RawTime &cycleStart)
Invoke a port interface.
void addCallPort(InputCyclePort *callPort)
Register an input port.
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.