Skip to main content

ProGlove Documentation

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

api_version

string

The input API schema version number.

1.0, 1.1

Yes

event_type

string

The message type.

trigger_block!

Yes

event_id

string

The message identifier. This can be used to reference it.

Any

UUID format UUID format [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}

Yes

time_created

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

device_serial

string

The serial number of a worker’s device.

Any

1 <= length <= 128

Yes

time_validity_duration

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

trigger_block_gesture_list

array [string]

The list of buttons to block. If not provided or an empty list, the default is all acceptable values (see Unblocking).

  • TRIGGER_SINGLE_CLICK

  • TRIGGER_DOUBLE_CLICK

  • TRIGGER_TRIPLE_CLICK

size <= 15 items

No

trigger_unblock_gesture_list

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).

  • TRIGGER_SINGLE_CLICK

  • TRIGGER_DOUBLE_CLICK

  • TRIGGER_TRIPLE_CLICK

size <= 15 items

No

trigger_block_state

boolean

The state of the buttons (true for blocking and false for unblocking).

true or false

Yes

event_time_to_live_duration

integer

The maximum duration the event is valid, compared to its creation time (in milliseconds).

Default value: 0.

If the value is default, the event must be processed irrespective of its age. If the event is the last one (no queued events after it) then it must be processed regardless of its age. If the event has not been processed before this time has passed it will be ignored.

*Compatible with api_version >=1.1.

Any

value >=0

No

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 via trigger_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 via time_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
Example 15. Block the single-press button
{
  "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
}


Example 16. Block all buttons
{
  "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
}


Example 17. Block scanning until the worker confirms with a double-press
{
  "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
}