-
2.26. Send scanner command set to decoding chip
Function Description:
This function call has the same function as HAM_SendCommand except that it takes a single
WORD parameter for the length and an extra timeout parameter. This is a synchronized function, it
returns when command has been sent to and got response from scanner.
USI_WaitForSendEchoTO is not needed before a next continuous send command call.
To send a string please call HAM_SendCommand_SetString.
BOOL HAM_SendCommand_Set(WORD len, BYTE cmdID, BYTE op, BYTE set, DWORD timeout)
Parameter: (input)
len: BYTE : Specifies length of command, which is actually always be 4.
cmdID: BYTE : command ID
op: BYTE : operation mode for this command
set: BYTE : operand for this command
timeout: DWORD : Specifies the timeout in millisecond
Return:
TRUE = indicates the setting has been set successfully.
2.27. Get scanner command set from decoding chip
Function Description:
This function call has the similar function as HAM_SendCommand_Set except that it retrieves
setting from scanner. This is a synchronized function, it returns when command has been sent to
and got response from scanner. USI_WaitForSendEchoTO is not needed before a next continuous
send command call.
BOOL HAM_SendCommand_Get(WORD len, BYTE cmdID, BYTE op, BYTE* get, DWORD
timeout)
Parameter: (input)
len: BYTE : Specifies length of command, which is actually always be 4.
cmdID: BYTE : command ID
op: BYTE : operation mode for this command
get: BYTE* : Pointer to a byte which will hold the setting retrieved from
scanner.
timeout: DWORD : Specifies the timeout in millisecond
Return:
TRUE = indicates the setting has been retrieve successfully.
2.28. Send scanner command set string to decoding chip
Function Description:
This function call has the same function as HAM_SendCommand_Set except that it sends a serial
of data instead of a single byte to scanner.
BOOL HAM_SendCommand_SetString(WORD len, BYTE cmdID, BYTE op, LPCSTR sets, int slen,
DWORD timeout)
Parameter: (input)
len: BYTE : Specifies length of command, which will be calculated and
adjusted automatically
cmdID: BYTE : command ID
op: BYTE : operation mode for this command
sets: LPCSTR : Specifies the string data
slen: int : Specifies the length of string data. Set to -1 to calculate
automatically
timeout: DWORD : Specifies the timeout in millisecond
Return:
TRUE = indicates the setting has been set successfully.