Skip to content

Display command

Display command messages are sent to interface with a connected device with a display.

Use the Display command as the communication protocol to tell the Gateway to control the Mark Display via serial communication (CDC integration) as shown below:

Response: An Error event in case of error.

Fields

Name Type Description Accepted values Constraints Required
api_version string The input API schema version number. 1.0 Yes
event_type string The message type. display! Yes
event_id string The message identifier. This can be used to reference it. Any 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
time_validity_duration integer The duration in milliseconds the effect is valid for starting at its creation time. A value of 0 will keep the text displayed indefinitely, until a new command is sent. Any value >= 0 No (default is 0)
device_serial string The serial number of a worker device. Any 1 <= length <= 128 Yes
display_template_id string The ID of the template to use. Any 1 <= length <= 15 Yes
display_refresh_type string The display refresh strategy. DEFAULT, FULL_REFRESH, PARTIAL_REFRESH No (default is DEFAULT)
display_fields array See Display Fields below Any size <= 12 items No

Display fields

Name Type Description Accepted values Constraints
display_fields.display_field_id integer The ID of the field in a template this action acts upon. Any value >=1
display_fields.display_field_header string The field header text. Any length <= 40
display_fields.display_field_text string The field content text. Any length <= 80

Note: All non-ASCII characters must be represented as Unicode code points (i.e. in the \uxxxx format).

Example

{
  "api_version": "1.0",
  "event_type": "display!",
  "event_id": "02114da8-feae-46e3-8b00-a3f7ea8672df",
  "time_created": 1546300800000,
  "time_validity_duration": 1000,
  "device_serial": "MDMR000000064",
  "display_template_id": "PG3",
  "display_refresh_type": "DEFAULT",
  "display_fields": [
    {
      "display_field_id": 1,
      "display_field_header": "Storage Unit",
      "display_field_text": "R15"
    },
    {
      "display_field_id": 2,
      "display_field_header": "Item",
      "display_field_text": "Engine 12"
    },
    {
      "display_field_id": 3,
      "display_field_header": "Quantity",
      "display_field_text": "10"
    }
  ]
}