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());
162 static_cast<FwAssertArgType>(portNum)
165 return &this->m_gpioRead_InputPort[portNum];
173 static_cast<FwAssertArgType>(portNum)
176 return &this->m_gpioWrite_InputPort[portNum];
191 static_cast<FwAssertArgType>(portNum)
197 #if FW_ENABLE_TEXT_LOGGING == 1 199 void LinuxGpioDriverComponentBase ::
200 set_LogText_OutputPort(
206 portNum < this->getNum_LogText_OutputPorts(),
207 static_cast<FwAssertArgType>(portNum)
210 this->m_LogText_OutputPort[portNum].addCallPort(port);
223 static_cast<FwAssertArgType>(portNum)
226 this->m_Time_OutputPort[portNum].
addCallPort(port);
241 static_cast<FwAssertArgType>(portNum)
244 this->m_gpioInterrupt_OutputPort[portNum].
addCallPort(port);
247 #if FW_PORT_SERIALIZATION 256 Fw::InputSerializePort* port
261 static_cast<FwAssertArgType>(portNum)
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(),
277 static_cast<FwAssertArgType>(portNum)
280 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
288 Fw::InputSerializePort* port
293 static_cast<FwAssertArgType>(portNum)
296 this->m_Time_OutputPort[portNum].registerSerialPort(port);
301 #if FW_PORT_SERIALIZATION 310 Fw::InputSerializePort* port
315 static_cast<FwAssertArgType>(portNum)
318 this->m_gpioInterrupt_OutputPort[portNum].registerSerialPort(port);
329 Fw::PassiveComponentBase(compName)
366 #if FW_ENABLE_TEXT_LOGGING == 1 369 getNum_LogText_OutputPorts()
const 401 static_cast<FwAssertArgType>(portNum)
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(),
414 static_cast<FwAssertArgType>(portNum)
417 return this->m_LogText_OutputPort[portNum].isConnected();
427 static_cast<FwAssertArgType>(portNum)
430 return this->m_Time_OutputPort[portNum].
isConnected();
442 static_cast<FwAssertArgType>(portNum)
445 return this->m_gpioInterrupt_OutputPort[portNum].
isConnected();
463 static_cast<FwAssertArgType>(portNum)
486 static_cast<FwAssertArgType>(portNum)
512 static_cast<FwAssertArgType>(portNum)
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 548 _status = _logBuff.
serialize(static_cast<U8>(4));
551 static_cast<FwAssertArgType>(_status)
558 static_cast<FwAssertArgType>(_status)
564 static_cast<FwAssertArgType>(_status)
567 #if FW_AMPCS_COMPATIBLE 570 static_cast<U8>(
sizeof(U32))
574 static_cast<FwAssertArgType>(_status)
580 static_cast<FwAssertArgType>(_status)
586 static_cast<FwAssertArgType>(_status)
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 654 _status = _logBuff.
serialize(static_cast<U8>(2));
657 static_cast<FwAssertArgType>(_status)
664 static_cast<FwAssertArgType>(_status)
667 #if FW_AMPCS_COMPATIBLE 674 static_cast<FwAssertArgType>(_status)
680 static_cast<FwAssertArgType>(_status)
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 751 _status = _logBuff.
serialize(static_cast<U8>(4));
754 static_cast<FwAssertArgType>(_status)
761 static_cast<FwAssertArgType>(_status)
764 #if FW_AMPCS_COMPATIBLE 767 static_cast<U8>(
sizeof(U32))
771 static_cast<FwAssertArgType>(_status)
777 static_cast<FwAssertArgType>(_status)
783 static_cast<FwAssertArgType>(_status)
786 #if FW_AMPCS_COMPATIBLE 793 static_cast<FwAssertArgType>(_status)
799 static_cast<FwAssertArgType>(_status)
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 870 _status = _logBuff.
serialize(static_cast<U8>(2));
873 static_cast<FwAssertArgType>(_status)
877 #if FW_AMPCS_COMPATIBLE 880 static_cast<U8>(
sizeof(U32))
884 static_cast<FwAssertArgType>(_status)
890 static_cast<FwAssertArgType>(_status)
893 #if FW_AMPCS_COMPATIBLE 896 static_cast<U8>(
sizeof(U32))
900 static_cast<FwAssertArgType>(_status)
906 static_cast<FwAssertArgType>(_status)
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 969 _status = _logBuff.
serialize(static_cast<U8>(1));
972 static_cast<FwAssertArgType>(_status)
976 #if FW_AMPCS_COMPATIBLE 979 static_cast<U8>(
sizeof(I32))
983 static_cast<FwAssertArgType>(_status)
986 _status = _logBuff.
serialize(error_number);
989 static_cast<FwAssertArgType>(_status)
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(
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
Drv::InputGpioReadPort * get_gpioRead_InputPort(FwIndexType portNum)
bool isConnected_gpioInterrupt_OutputPort(FwIndexType portNum)
Drv::InputGpioWritePort * get_gpioWrite_InputPort(FwIndexType portNum)
FwIndexType getNum_Time_OutputPorts() const
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void log_WARNING_HI_InterruptReadError(U32 expected, U32 got) const
Log event InterruptReadError.
const char * toChar() const
LinuxGpioDriverComponentBase(const char *compName="")
Construct LinuxGpioDriverComponentBase object.
void set_gpioInterrupt_OutputPort(FwIndexType portNum, Svc::InputCyclePort *port)
Connect port to gpioInterrupt[portNum].
Drv::GpioStatus gpioWrite_handlerBase(FwIndexType portNum, const Fw::Logic &state)
Handler base-class function for input port gpioWrite.
virtual Drv::GpioStatus gpioWrite_handler(FwIndexType portNum, const Fw::Logic &state)=0
Handler for input port gpioWrite.
void log_WARNING_HI_OpenPinError(const Fw::StringBase &chip, U32 pin, const Fw::StringBase &pinMessage, Os::FileStatus status) const
Log event OpenPinError.
PlatformIndexType FwIndexType
virtual Drv::GpioStatus gpioRead_handler(FwIndexType portNum, Fw::Logic &state)=0
Handler for input port gpioRead.
Software diagnostic events.
void init()
Object initializer.
FwIndexType getNum_gpioRead_InputPorts() const
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
Drv::GpioStatus gpioRead_handlerBase(FwIndexType portNum, Fw::Logic &state)
Handler base-class function for input port gpioRead.
SerializeStatus
forward declaration for string
void addCallPort(InputCyclePort *callPort)
Register an input port.
bool isConnected_Log_OutputPort(FwIndexType portNum)
Auto-generated base for LinuxGpioDriver component.
void init()
Initialization function.
#define FW_MIN(a, b)
MIN macro.
bool isConnected_Time_OutputPort(FwIndexType portNum)
void log_WARNING_HI_OpenChipError(const Fw::StringBase &chip, Os::FileStatus status) const
Log event OpenChipError.
void invoke(Fw::Time &time) const
Invoke a port interface.
const char * toChar() const
No time base has been established.
void log_DIAGNOSTIC_OpenChip(const Fw::StringBase &chip, const Fw::StringBase &chipLabel, U32 pin, const Fw::StringBase &pinMessage) const
Log event OpenChip.
void gpioInterrupt_out(FwIndexType portNum, Os::RawTime &cycleStart)
Invoke output port gpioInterrupt.
A serious but recoverable event.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void init()
Initialization function.
#define PRI_PlatformIntType
FwIndexType getNum_gpioWrite_InputPorts() const
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
void log_WARNING_HI_PollingError(I32 error_number) const
Log event PollingError.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void addCallPort(InputLogPort *callPort)
Register an input port.
FwIndexType getNum_Log_OutputPorts() const
The size of the serial representation.
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
FwIndexType getNum_gpioInterrupt_OutputPorts() const
void invoke(Os::RawTime &cycleStart) const
Invoke a port interface.
virtual ~LinuxGpioDriverComponentBase()
Destroy LinuxGpioDriverComponentBase object.
FPP shadow-enum representing Os::File::Status.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
virtual const CHAR * toChar() const =0