CaptureHelperDevice class

Wraps a connected device's Capture instance with typed property methods.

Created automatically by CaptureHelper on device arrival. Developers should never instantiate this class directly.

All methods throw CaptureException on error.

Constructors

CaptureHelperDevice({required String name, required String guid, required int type, required int handle, required Capture capture})
Creates a CaptureHelperDevice.

Properties

devCapture → Capture
The underlying device Capture instance.
no setter
guid → String
The globally unique identifier for this device instance.
final
handle → int
The SDK-assigned handle used to correlate subsequent device events.
final
hashCode → int
The hash code for this object.
no setterinherited
isBarcodeScanner → bool
Whether this device reads barcodes (SocketCam included).
no setter
isNfcReader → bool
Whether this device reads NFC tags.
no setter
name → String
The device display name as reported by the SDK.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → int
The device type constant (see CaptureDeviceType).
final

Methods

getBatteryLevel() → Future<int>
Gets the current battery level as a percentage (0–100).
getBluetoothAddress() → Future
Gets the device's Bluetooth MAC address as a byte array.
getButtonsState() → Future<int>
Gets the current buttons state (see ButtonsState).
getDataAcknowledgment() → Future<int>
Gets the local data acknowledgment mode (see DeviceDataAcknowledgment).
getDataFormat() → Future<int>
Gets the current data output format (see DataFormat).
getDataSource(int id) → Future<DataSource>
Gets the current state of a data source (symbology or NFC tag type).
getDecodeAction() → Future<int>
Gets the local decode action (see LocalDecodeAction).
getDeviceSpecificCommand(dynamic command) → Future
Sends a device-specific raw command and receives the response.
getDeviceType() → Future<int>
Gets the device type constant.
getFirmwareVersion() → Future<Version>
Gets the device firmware version as a Version object.
getFriendlyName() → Future<String>
Gets the device's friendly (display) name.
getNotifications() → Future<int>
Gets the current notification subscription flags (see Notifications).
getPowerState() → Future<int>
Gets the current power state (see PowerState).
getStandConfig() → Future<int>
Gets the stand (cradle) configuration (see StandConfig).
getTimers() → Future
Gets the current device timers.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDataAcknowledgment(int mode) → Future<int>
Sets the local data acknowledgment mode (see DeviceDataAcknowledgment).
setDataConfirmation(int confirmation) → Future<int>
Sends a data confirmation to the device.
setDataFormat(int format) → Future<int>
Sets the data output format (see DataFormat).
setDataSource(int id, {required int status}) → Future<int>
Enables or disables a data source (symbology or NFC tag type).
setDecodeAction(int action) → Future<int>
Sets the local decode action (see LocalDecodeAction).
setDisconnect(int value) → Future<int>
Disconnects the device (see Disconnect for valid values).
setFactoryReset() → Future<int>
Restores factory defaults on the device.
setFriendlyName(String name) → Future<int>
Sets the device's friendly name. Maximum 31 UTF-8 characters.
setNotifications(int notifications) → Future<int>
Sets which events the device reports (see Notifications for flag values).
setPowerOff() → Future<int>
Powers off the device.
setReset() → Future<int>
Power-cycles the device. Reboots if on power; otherwise powers off.
setStandConfig(int config) → Future<int>
Sets the stand (cradle) configuration (see StandConfig).
setTimers(dynamic timers) → Future<int>
Sets the device timers.
setTrigger(int action) → Future<int>
Sets the scan trigger (see Trigger for valid values).
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

batteryLevelPercent(int raw) → int
Converts a raw battery level, as reported by the SDK, to a percentage (0–100).