Although data conversion is performed by the Level 2 API, applications may need to use these functions to manage data efficiently by storing it in raw, packed format and using it in “programmer friendly” structures.
Functions that convert structures to hand reader data perform validation on structure members. But it is the application’s responsibility to ensure buffers that are passed to these functions are of sufficient size.
These functions will work whether or not the Level 0 API has been called to initialize the DLL/hand reader communication.
rsiUserRecordToData
RSI_DATA_ERROR rsiUserRecordToData (RSI_USER_RECORD FAR*
ur, LPBYTE data);
RSI_USER_RECORD FAR* ur
A pointer to the structure with the user record.
LPBYTE data
A pointer to the buffer that will receive the user record in raw, packed hand reader format.
Converts a user record structure into the format used by the hand reader.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiDataToUserRecord
RSI_DATA_ERROR rsiDataToUserRecord (LPBYTE data, RSI_USER_RECORD FAR* ur);
Chapter
7
P R O T O T Y P E
A R G U M E N T S
D E S C R I P T I O N
R E T U R N S
P R O T O T Y P E
LPBYTE data
A pointer to the buffer with the raw, packed hand reader user record.
RSI_USER_RECORD FAR* ur
A pointer to the structure that will receive the converted user record.
Converts raw, packed hand reader data into a user record structure.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiSetupDataToData
RSI_DATA_ERROR rsiSetupDataToData (RSI_SETUP_DATA FAR*
setup, LPBYTE data);
RSI_SETUP_DATA FAR* setup
A pointer to the structure with the setup data.
LPBYTE data
A pointer to the buffer that will receive the setup data in raw, packed hand reader format.
Convert a setup data structure to the format used by the hand reader.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiDataToSetupData
RSI_DATA_ERROR rsiDataToSetupData (LPBYTE data, RSI_SETUP_DATA FAR* setup);
LPBYTE data
A pointer to the buffer with the setup data in raw, packed hand reader format.
RSI_SETUP_DATA FAR* setup
A pointer to the structure that will receive the converted setup data.
Converts setup data from raw, packed hand reader format to a setup data structure.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiTimeToData
RSI_DATA_ERROR rsiTimeToData (RSI_TIME_DATE FAR* time, LPBYTE data);
RSI_TIME_DATE FAR* time
A pointer to the structure with the time. The wDayOfWeek and wMilliseconds members are not used. The wYear member must be number between 0 and 99 and not a number like 1996.
LPBYTE data
A pointer to the buffer that will receive the time in raw, packed hand reader format.
Converts a time structure to the hand reader format.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiDataToTime
RSI_DATA_ERROR rsiDataToTime (LPBYTE data, RSI_TIME_DATE FAR* time);
Converts the hand reader time/date format to a time structure.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiDataToStatus
RSI_DATA_ERROR rsiDataToStatus (LPBYTE data, RSI_STATUS FAR* status);
R E T U R N S
P R O T O T Y P E
A R G U M E N T S
D E S C R I P T I O N R E T U R N S
P R O T O T Y P E
D E S C R I P T I O N
R E T U R N S
P R O T O T Y P E
LPBYTE data
A pointer to the buffer with the status information in raw, packed hand reader format.
RSI_STATUS FAR* status
A pointer to the structure that will receive the converted time.
Converts hand reader data into a time structure.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiTextToID
RSI_DATA_ERROR rsiTextToID (LPCTSTR text, RSI_ID id);
LPCTSTR text
A pointer to the string that contains the ID number.
RSI_ID id
The structure that will receive the ID in BCD format.
Converts a user ID from text to hand reader BCD format.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiIDToText
RSI_DATA_ERROR rsiIDToText (RSI_ID id, LPTSTR text);
RSI_ID id
The structure with the user ID in BCD format.
LPTSTR text
A pointer to the string that will receive the ID number in text format.
Converts a user ID in BCD format to text.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
A R G U M E N T S
D E S C R I P T I O N R E T U R N S
P R O T O T Y P E A R G U M E N T S
D E S C R I P T I O N R E T U R N S
P R O T O T Y P E A R G U M E N T S
D E S C R I P T I O N R E T U R N S
rsiTextToMessage
RSI_DATA_ERROR rsiTextToMessage (LPCTSTR text, RSI_MESSAGE_TEXT FAR* msg);
LPCTSTR text
A pointer to the string with the message of up to 32 characters.
RSI_MESSAGE_TEXT FAR* msg
A pointer to the structure that will receive the message in hand reader format.
Converts a string to a hand reader string (fixed-length, no null termination).
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiTimeZoneTableToData
RSI_DATA_ERROR rsiTimeZoneTableToData
(RSI_TIME_ZONE_TABLE FAR* tz, LPBYTE data);
RSI_TIME_ZONE_TABLE FAR* tz
A pointer to the structure with the time zone table (including holiday table).
LPBYTE data
A pointer to the buffer that will receive the time zone table in hand reader format.
Converts a time zone table structure to the hand reader data format.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiBellScheduleToData
RSI_DATA_ERROR rsiBellScheduleToData (RSI_BELL_SCHEDULE FAR* schedule, LPBYTE data);
RSI_BELL_SCHEDULE FAR* schedule
A pointer to the structure with the bell schedule.
P R O T O T Y P E
A R G U M E N T S
D E S C R I P T I O N
R E T U R N S
P R O T O T Y P E
A R G U M E N T S
D E S C R I P T I O N R E T U R N S
P R O T O T Y P E
A R G U M E N T S
LPBYTE data
A pointer to the buffer that will receive the bell schedule in hand reader format.
Converts a bell schedule structure to the hand reader data format.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiDisplayMessageToData
RSI_DATA_ERROR rsiDisplayMessageToData
(RSI_DISPLAY_MESSAGE FAR* msg, LPBYTE data);
RSI_DISPLAY_MESSAGE FAR* msg
A pointer to the structure with the display message information.
LPBYTE data
A pointer to the buffer that will receive the display message information in hand reader format.
Coverts a display message information structure to the hand reader data format.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
rsiDataToDataLog
RSI_DATA_ERROR rsiDataToDataLog (LPBYTE data, RSI_DATA_LOG_ELEMENT FAR* datalog);
LPBYTE data
A pointer to the buffer with the data log element in raw, packed hand reader data.
RSI_DATA_LOG_ELEMENT FAR* datalog
A pointer to the structure that will receive the converted data log element.
Converts hand reader data into a data log element.
RSI_DATA_OK if successful.
One of the values returned by rsiGetDataError if unsuccessful.
D E S C R I P T I O N R E T U R N S
P R O T O T Y P E
A R G U M E N T S
D E S C R I P T I O N
R E T U R N S
P R O T O T Y P E
A R G U M E N T S
D E S C R I P T I O N R E T U R N S
rsiTextToTemplate
void rsiTextToTemplate (LPCTSTR text, int length, RSI_TEMPLATE tmpl);
LPCTSTR text
A pointer to the string that contains the template.
RSI_TEMPLATE tmpl
The structure that will receive the template in hex format.
Converts a template from text to hex format.
None
rsiTemplateToText
void rsiTemplateToText (RSI_TEMPLATE tmpl, LPTSTR text);
RSI_TEMPLATE tmpl
The structure with the template in hex format.
LPTSTR text
A pointer to the string that will receive the template in text format.
Converts a template in hex format to text.
none
P R O T O T Y P E
A R G U M E N T S
D E S C R I P T I O N R E T U R N S
P R O T O T Y P E A R G U M E N T S
D E S C R I P T I O N R E T U R N S