RFID_STATUS WINAPI RFID_LoginW ( RFID_HANDLE32 *  pReaderManagementHandle,
LPLOGIN_INFOW  lpLoginInfo,
READER_TYPE  readerType,
BOOLEAN  secureMode,
LPVOID  rsvd 
)

This function is used to login in to the reader.

Parameters:
[out] pReaderManagementHandle 
Returns handle to the Reader Management Interface of the Reader.
[in] lpLoginInfo 
Pointer to LOGIN_INFO (user name & password).
[in] readerType 
Specifies the Reader type (XR, FX or MC).
[in] secureMode 
FALSE for HTTP, TRUE for HTTPS.
[in] rsvd 
Reserved for future use.
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_COMM_OPEN_ERROR Connection to the Reader Failed.
  • RFID_RM_INVALID_USERNAME_PASSWORD Failed due to invalid user name and/or password.
  • RFID_RM_LOGIN_ERROR Failed to Login due to unspecified error.
  • RFID_API_PARAM_ERROR Parameter Error.
Remarks:
All further Reader Management functions requires providing the handle readerManagementHandle. This function is applicable for the readers which supports HTTP web interface and the login command. This function can be used wherever login and logout process is required with the reader. Some readers do not allow full functionality over HTTP if there is an LLRP connection existing to the reader, in which case it may be required to call RFID_Disconnect to exercise full Reader Management functionality. Even though Hand-Held / Device-based Readers like MC does not have web-interface it is required to call this function with lpLoginInfo as NULL, and readerType as MC.
See also:
RFID_Logout
Remarks:
Example:
RFID_HANDLE32 readerManagementHandle;
RFID_STATUS rfidStatus = RFID_API_SUCCESS;
LOGIN_INFO loginInfo;
READER_TYPE readerType = XR;
BOOLEAN secureMode = FALSE; // HTTP
READER_SYSTEM_INFO readerSystemInfo;
BOOLEAN antennaStatus = TRUE;
UINT16 antennaID = 1;
ANTENNA_MODE antennaMode;

_tcscpy(loginInfo.userName, TEXT("admin"));
_tcscpy(loginInfo.password, TEXT("admin"));
_tcscpy(loginInfo.hostName, TEXT("157.235.207.190"));

if(RFID_API_SUCCESS == RFID_Login(&readerManagementHandle,
&loginInfo, readerType, secureMode, NULL))
{
rfidStatus = RFID_GetSystemInfo(readerManagementHandle, &readerSystemInfo);
rfidStatus = RFID_GetAntennaMode(readerManagementHandle, &antennaMode);
printf("\n Antenna mode is %s", antennaMode == ANTENNA_MODE_BISTATIC ?
"Bi-static" : "Mono-static");
if(antennaMode == ANTENNA_MODE_BISTATIC)
rfidStatus = RFID_SetAntennaMode(readerManagementHandle,
ANTENNA_MODE_MONOSTATIC);
rfidStatus = RFID_GetReadPointStatus(readerManagementHandle, antennaID, &antennaStatus);
if(RFID_API_SUCCESS == RFID_EnableReadPoint(readerManagementHandle,
antennaID, antennaStatus))
printf("\n Antenna %d is %s", antennaID, antennaStatus ? "Enabled" : "Disabled");
// Restart the Reader (when required)
rfidStatus = RFID_Restart(readerManagementHandle);

RFID_Logout(readerManagementHandle); // Call RFID_Logout so as to clean up the Dll
}


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