Button-blocking command
The Button-blocking command is an event that enables you to block or unblock certain button gestures on a scanner connected to Gateway. This makes it impossible to scan any barcodes, receive certain button events, or take photos with the scanner until the block is resolved.
Use it in situations where the worker needs to perform an action outside of the regular workflow, like an acknowledgement of an error.
Depending on the blocking command, the button can be enabled again either by a predefined action of the worker or by sending the unblocking command.
Response: An Error event in case of error.
Name | Type | Description | Accepted values | Constraints | Required |
---|---|---|---|---|---|
| string | The input API schema version number. |
| Yes | |
| string | The message type. |
| Yes | |
| string | The message identifier. This can be used to reference it. | Any | UUID format | Yes |
| integer | The time of creation client-side, used to determine the order of incoming messages. Unix time stamp in milliseconds. | Any | 1546300800000 <= value <= 99999999999999 | Yes |
| string | The serial number of a worker’s device. | Any | 1 <= length <= 128 | Yes |
| integer | The duration that the button should be blocked, in milliseconds. A value of 0 will block the button indefinitely (see Unblocking). | Any | value >= 0 | No |
| array [string] | The list of buttons to block. If not provided or an empty list, the default is all acceptable values (see Unblocking). |
| 1 <= max items < 15 | No |
| array [string] | The list of triggers that unblock the blocked buttons. If not provided or an empty list, unblocking is not possible via a button (see Unblocking). |
| 1 <= max items < 15 | No |
| boolean | The state of the buttons (true for blocking and false for unblocking). |
| Yes |
Block button
When the trigger_block_state
field is set to true, the Gateway will block the button gestures that are in the trigger_block_gesture_list
list for the specified connected device.
If trigger_block_gesture
is not given or empty, all buttons will be blocked.
Unblock buttons
When the
trigger_block_state
field is set to false, the Gateway will unblock all the buttons for the specified connected device.When the
trigger_block_state
field is set to true, a list of triggers to unblock the blocked buttons can be provided viatrigger_unblock_gesture_list
. The worker is then able to unblock a button on their own. This can be used to require a confirmation.When the
trigger_block_state
field is set to true, a blocking timeout can be provided viatime_validity_duration
. After the time has elapsed, all blocked button are unblocked.
Unblocking
If no unblocking command is sent, the button will be unblocked by:
Pairing to another connectivity device
Intentionally disconnecting (scanning PEP barcode or pressing button in Insight Mobile)
Being out of range for long enough until the scanner stops advertising to reconnect (default 3 minutes)
Scanner being put back into the charger
Hard reset.
Examples
{ "api_version": "1.0", "event_type": "trigger_block!", "event_id": "02114da8-feae-46e3-8b00-a3f7ea8672df", "time_created": 1546300800000, "time_validity_duration": 60000, "device_serial": "M2MR111100928", "trigger_block_gesture_list": ["TRIGGER_SINGLE_CLICK"], "trigger_block_state": true }
{ "api_version": "1.0", "event_type": "trigger_block!", "event_id": "02114da8-feae-46e3-8b00-a3f7ea8672df", "time_created": 1546300800000, "device_serial": "M2MR111100928", "trigger_block_gesture_list": [], "trigger_block_state": true }
{ "api_version": "1.0", "event_type": "trigger_block!", "event_id": "02114da8-feae-46e3-8b00-a3f7ea8672df", "time_created": 1546300800001, "device_serial": "MDMR102001603", "trigger_block_gesture_list": ["TRIGGER_SINGLE_CLICK"], "trigger_unblock_gesture_list": ["TRIGGER_DOUBLE_CLICK"], "trigger_block_state": true }