RFID_STATUS WINAPI RFID_GetGPIState ( RFID_HANDLE32  readerHandle,
UINT32  portNumber,
BOOLEAN *  pGPIEnable,
GPI_PORT_STATE *  pState 
)

This function gets current configuration and state of a single GPI Port.

Parameters:
[in] readerHandle 
Handle to the RFID device.
[in] portNumber 
Port Number of the GPI Port.
[out] pGPIEnable 
Pointer to current configuration of the specified GPI Port: Enabled/Disabled.
[out] pState 
Pointer to current state of the specified specified GPI port, of type GPI_PORT_STATE.
Returns:
If the function succeeds the return value is RFID_API_SUCCESS. If the function fails the return value is one of the following:
  • RFID_API_INVALID_HANDLE Invalid handle is provided
  • RFID_API_PARAM_ERROR Invalid parameter given
  • RFID_API_PARAM_OUT_OF_RANGE Parameter out of Range
  • RFID_CONFIG_GET_FAILED Failed to set the configuration
Remarks:
None
See also:
RFID_EnableGPIPort, RFID_GetGPOState, RFID_SetGPOState
Remarks:
Example:
RFID_HANDLE32 readerHandle;
RFID_STATUS rfidStatus = RFID_API_SUCCESS;
BOOLEAN gpiEnabled;
GPI_PORT_STATE gpiState;
UINT32 portNumber = 1;
if(RFID_API_SUCCESS == RFID_Connect(&readerHandle, TEXT("157.235.207.190"), 0, 0, 0))
{
RFID_GetGPIState(readerHandle, portNumber, &gpiEnabled, &gpiState);
if(FALSE == gpiEnabled)
{
rfidStatus = RFID_EnableGPIPort(readerHandle, portNumber, TRUE);
}
printf("\n GPI port %d is %s: state - %s", portNumber,
gpiEnabled? "Enabled" : "Disabled",
GPI_PORT_STATE_LOW == gpiState? "Low" : 
GPI_PORT_STATE_HIGH == gpiState? "High" : "Unknown");
rfidStatus = RFID_Disconnect(readerHandle);
}


Generated on Fri Mar 4 02:25:29 2016 for RFIDAPI3 1.1 C API Documentation by  doxygen 1.5.6