← All message topics  ·  schema Chat/chat_event_message.json

header

FieldTypeRequiredAllowed valuesDescription
timestamp string
message_type string chat
version string The message format version

msg

FieldTypeRequiredAllowed valuesDescription
experiment_id string
trial_id string
timestamp string
source string
sub_type string Event:Chat
version string
replay_parent_type string|null TRIAL REPLAY null
replay_parent_id string|null
replay_id string|null

data

FieldTypeRequiredAllowed valuesDescription
mission_timer string
elapsed_milliseconds number
sender string
addressees array<string> The Addressee List
text string

Example message

{ 	
	"header": {
		"timestamp": "2019-12-26T12:47:23.1234Z",
		"message_type": "chat",
		"version": "1.1"
	},
	"msg": { 
		"experiment_id":"123e4567-e89b-12d3-a456-426655440000",
  		"trial_id": "123e4567-e89b-12d3-a456-426655440000",		
		"timestamp": "2019-12-26T14:05:02.1412Z",
		"source": "simulator",
		"sub_type": "Event:Chat",
		"version": "0.5", 	
	},
	"data":{
		"mission_timer":"8 : 36",
		"elapsed_milliseconds": 15113,
		"sender":"Aptiminer1",
		"addressees": ["Player746"],
		"text": "I'm in room 210"
	}
}

{ 
	"header": {
		"timestamp": "2019-12-26T12:47:23.1234Z",
		"message_type": "chat",
		"version": "1.1"
	},
	"msg": { 
		"experiment_id":"123e4567-e89b-12d3-a456-426655440000",
  		"trial_id": "123e4567-e89b-12d3-a456-426655440000",
		"replay_id": "876e4567-ab65-cfe7-b208-426305dc1234",
		"timestamp": "2019-12-26T14:05:02.1412Z",
		"source": "simulator",
		"sub_type": "Event:Chat",
		"version": "1.0", 		
	},
	"data":{
		"mission_timer":"8 : 36",
		"sender":"Aptiminer1",
		"addressees": ["Player746"],
		"text": "I'm in room 210"
	}
}
Raw JSON Schema (resolved)
{
  "$id": "http://asist.aptima.com/schemas/chat.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {},
  "properties": {
    "data": {
      "$id": "#/properties/data",
      "properties": {
        "addressees": {
          "$id": "#/properties/data/properties/addressees",
          "default": "",
          "examples": [
            "Player746"
          ],
          "items": {
            "type": "string"
          },
          "title": "The Addressee List",
          "type": "array"
        },
        "elapsed_milliseconds": {
          "$id": "#/properties/event/state/elapsed_milliseconds",
          "examples": [
            5000,
            77459,
            689457
          ],
          "pattern": "^[0-9]+$",
          "title": "The Elapsed Milliseconds Schema",
          "type": "number"
        },
        "mission_timer": {
          "$id": "#/properties/event/state/mission_timer",
          "examples": [
            "8 : 36"
          ],
          "pattern": "^(.*)$",
          "title": "The Mission Timer Schema",
          "type": "string"
        },
        "sender": {
          "$id": "#/properties/data/properties/sender",
          "default": "",
          "examples": [
            "Aptiminer1"
          ],
          "pattern": "^(.*)$",
          "title": "The Sender Schema",
          "type": "string"
        },
        "text": {
          "$id": "#/properties/data/properties/text",
          "default": "",
          "examples": [
            "I\u0027m in room 210"
          ],
          "pattern": "^(.*)$",
          "title": "The Text Schema",
          "type": "string"
        }
      },
      "required": [
        "mission_timer",
        "elapsed_milliseconds",
        "sender",
        "addressees",
        "text"
      ],
      "title": "The Chat Data Schema",
      "type": "object"
    },
    "header": {
      "$id": "http://asist.aptima.com/schemas/common_header.json",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {},
      "properties": {
        "message_type": {
          "$id": "#/properties/message_type",
          "const": "chat",
          "enum": [
            "control",
            "observation",
            "chat",
            "status",
            "trial",
            "event",
            "groundtruth",
            "experiment",
            "metadata",
            "agent"
          ],
          "examples": [
            "observation"
          ],
          "pattern": "^([a-z_]*?)$",
          "title": "The Message_type Schema",
          "type": "string"
        },
        "timestamp": {
          "$id": "#/properties/timestamp",
          "examples": [
            "2019-12-26T12:47:23.1234Z"
          ],
          "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
          "title": "The Timestamp Schema",
          "type": "string"
        },
        "version": {
          "$id": "#/properties/version",
          "examples": [
            "1.0",
            "2.3.1"
          ],
          "pattern": "^([0-9]+\\.)?([0-9]+\\.)?([0-9]+)$",
          "title": "The message format version",
          "type": "string"
        }
      },
      "required": [
        "timestamp",
        "message_type",
        "version"
      ],
      "title": "ASIST message common header Schema",
      "type": "object",
      "version": "0.3"
    },
    "msg": {
      "$id": "http://asist.aptima.com/schemas/event_message.json",
      "$schema": "http://json-schema.org/draft-07/schema#",
      "definitions": {},
      "properties": {
        "experiment_id": {
          "$id": "#/properties/experiment_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|Null|null)",
          "title": "The Experiment Id Schema",
          "type": "string"
        },
        "replay_id": {
          "$id": "#/properties/replay_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
          "title": "The Replay Id Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "replay_parent_id": {
          "$id": "#/properties/replay_parent_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
          "title": "The Replay Parent Id Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "replay_parent_type": {
          "$id": "#/properties/replay_parent_type",
          "enum": [
            "TRIAL",
            "REPLAY",
            null
          ],
          "title": "The Replay Parent Type Schema",
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "$id": "#/properties/source",
          "default": "",
          "examples": [
            "simulator"
          ],
          "pattern": "^(.*)$",
          "title": "The Source Schema",
          "type": "string"
        },
        "sub_type": {
          "$id": "#/properties/sub_type",
          "const": "Event:Chat",
          "default": "",
          "examples": [
            "equip",
            "triage"
          ],
          "pattern": "^([a-zA-Z0-9_:]*?)$",
          "title": "The Sub Type Schema",
          "type": "string"
        },
        "timestamp": {
          "$id": "#/properties/timestamp",
          "default": "",
          "examples": [
            "2019-12-26T14:05:02.3412Z"
          ],
          "pattern": "[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[.]?[0-9]{0,}?Z",
          "title": "The Timestamp Schema",
          "type": "string"
        },
        "trial_id": {
          "$id": "#/properties/trial_id",
          "default": "",
          "examples": [
            "123e4567-e89b-12d3-a456-426655440000"
          ],
          "pattern": "(([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|Not Set|null|Null)",
          "title": "The Trial Id Schema",
          "type": "string"
        },
        "version": {
          "$id": "#/properties/version",
          "default": "",
          "examples": [
            "0.1",
            "1.0.1"
          ],
          "pattern": "^([.]*)|(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
          "title": "The Version Schema",
          "type": "string"
        }
      },
      "required": [
        "experiment_id",
        "timestamp",
        "source",
        "sub_type",
        "version"
      ],
      "title": "The Event Message Schema",
      "type": "object",
      "version": "0.5"
    }
  },
  "required": [
    "header",
    "msg",
    "data"
  ],
  "title": "The Chat Event Schema",
  "type": "object",
  "version": "1.0"
}
Upstream spec documentation

Data Subtype: Chat Message Format

This data message subtype is used to communicate chat information from a human or agent to any component on the message bus that is interested in it.

TOPIC

chat

Message Fields

Field Name Type Description
header object From Common Message Format section
msg.trial_id string The experiment trial id associated with this chat message
msg.replay_id string If the original trial data was replayed, this field indicates a unique uuid for the replay
msg.timestamp string Timestamp of when the data was generated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.ssssZ
msg.source string The name of the testbed component that published this data
data.mission_timer string the mission time of the event
data.elapsed_milliseconds number the number of elapsed milliseconds since mission start
data.sender string the name of the sender
data.addressees [string] an arrary of addressee names
data.text string the text of the chat message

Message Example(s)

{   
    "header": {
        "timestamp": "2019-12-26T12:47:23.1234Z",
        "message_type": "chat",
        "version": "1.1"
    },
    "msg": { 
        "experiment_id":"123e4567-e89b-12d3-a456-426655440000",
        "trial_id": "123e4567-e89b-12d3-a456-426655440000",     
        "timestamp": "2019-12-26T14:05:02.1412Z",
        "source": "simulator",
        "sub_type": "Event:Chat",
        "version": "0.5",   
    },
    "data":{
        "mission_timer":"8 : 36",
        "elapsed_milliseconds": 15113,
        "sender":"Aptiminer1",
        "addressees": ["Player746"],
        "text": "I'm in room 210"
    }
}

{ 
    "header": {
        "timestamp": "2019-12-26T12:47:23.1234Z",
        "message_type": "chat",
        "version": "1.1"
    },
    "msg": { 
        "experiment_id":"123e4567-e89b-12d3-a456-426655440000",
        "trial_id": "123e4567-e89b-12d3-a456-426655440000",
        "replay_id": "876e4567-ab65-cfe7-b208-426305dc1234",
        "timestamp": "2019-12-26T14:05:02.1412Z",
        "source": "simulator",
        "sub_type": "Event:Chat",
        "version": "1.0",       
    },
    "data":{
        "mission_timer":"8 : 36",
        "sender":"Aptiminer1",
        "addressees": ["Player746"],
        "text": "I'm in room 210"
    }
}

CHANGE HISTORY

VERSION | DATE | DETAILS

1.0 | 3/1/2021 | Added elapsed_milliseconds field