Socket ScanAPI Reference
using the Set API, the Set Complete will return the property ID of the friendly name,
but it won't return the new friendly name.
11.5 Get Complete
When a Get API operation is completed, the Wait API returns with a ScanObject that
has its MsgID field set to kSktScanGetComplete. The Result field contains the result
of the Get operation. If the result is successful the data can be retrieved according to
the data type that is set in the Type field of the ScanObject Property member.
11.6 Events
Asynchronous events such as decoded data or low battery can be received in the
Wait API. The Msg field of the ScanObject has an event member that is defined by
ScanEvent.
The ScanEvent contains the event identifier and the event data. The event data
defines data that is associated to the event received. Event Data has a type
descriptor and a value that depends on the type descriptor, which could be None,
Byte, Ulong, Array, String or Decoded Data.
11.6.1
Power Event
The Power Event is received when the device has a change regarding its power. This
allows the application UI to display clearly the power state of the device by example
when the device is charging.
The Power Event is not activated by default. The device notification must be
modified in order to turn on this notification. This is accomplished by using the
property kSktScanPropIdNotificationDevice.
The power information is coded in a double word that can be decomposed in 4 fields
from the most significant byte to the least significant:
Byte 3
-reserved-
A helper macro can be used for retrieving the value.
Macro name
SKTPOWER_GETSTATE(powerStatus)
© 2013 Socket Mobile, Inc.
Byte 2
-reserved-
Byte 1
-reserved-
Description
Returns the least significant byte
Byte 0 of the double word
powerStatus which represents the
power state.
Byte 0
State
64/152
Need help?
Do you have a question about the ScanAPI and is the answer not in the manual?