X64 Xcelera-CL PX4 User's Manual Appendix: X-I/O Module Option • 115
Output Dialog: CGioOutputDlg class (see Sapera Gui class)
void CGioOutputDlg::UpdateIO()
{
UINT32 output=0;
UINT32 state=0;
BOOL status;
[ . . . ]
// We loop to get all I/O pins.
for (UINT32 iIO=0; iIO < (UINT32)m_pGio->GetNumPins(); iIO++)
{
[ . . . ]
// We set the current state of the current I/O pin by using
// - the pin number on the current I/O resource
// - the pointer to pin state
// ( SapGio ::PinLow if low and SapGio ::PinHigh if high)
status = m_pGio->SetPinState(iIO, (SapGio::PinState)state);
}
}
Input Dialog: CGioInputDlg class. (see Sapera Gui class)
BOOL CGioInputDlg::Update()
{
SapGio::PinState state = SapGio::PinState::PinLow;
BOOL status = true;
UINT32 iIO;
UINT32 jIO;
if (m_pGio == NULL)
return FALSE;
// We loop to get all I/O pins.
for (iIO=0; iIO < (UINT32)m_pGio->GetNumPins(); iIO++)
{
m_pGio->SetDisplayStatusMode(SapManager::StatusLog, NULL);
// We get the current state of the current I/O pin by using
// the pin number on the current I/O resource
// the pointer to pin state
// ( SapGio ::PinLow if low and SapGio ::PinHigh if high)
status = m_pGio->GetPinState(iIO, &state);
m_pGio->SetDisplayStatusMode(SapManager::StatusNotify, NULL);
[ . . . ]
}
[ . . . ]
}