Structure of JSON Event Files
Introduction
This document describes the format of the JSON event files, which are indicated by file extension .jsonl.
Events are commands, signals, notifications and replies to commands. They are defined in a CommaSuite interface signature. The JSON event files contain a collection of events in the order of their execution with respect to the defined model.
The target audience are engineers that implement event file generators. Event files are not intended to be manually constructed by the users. Usually they are automatically generated from existing system logs and observed client-server communication. The file structure is optimized for machine processing.
Events in JSON Format
Events are written in JSON files with extension .jsonl and they have a different format than the events written in files with .events extension. The events still have the same CommaSuite meaning and rules applied as described in events files, only the structure will be expressed in JSON format. For illustration, the following example trace written in .events file is used to show how this is mapped to JSON format :
import "../IImaging.signature"
import "../ITemprature.signature"
import "../IVacuum.signature"
import "../Imaging.component"
connections
(Client1, p1, IImaging, 0 c0, iImagPort)
(Client2, p2, ITemprature, 0 c0, iTempPort)
(Client3, p3, IVacuum, 0 c0, iVacPort)
components
Imaging c0
events
command 1.0 0.0 Client2 p2 c0 iTempPort ITemperature SetTemperature
int 80
End
Reply 1.002 0.002 c0 iTempPort Client2 p2 ITemperature SetTemperature
End
Events are expressed as JSON elements in a JSON file. Each event (command, signal, notification and reply) is written as a JSONObject. A JSONObject contains a set of objects in the form of a {key:value} pairs. The JSON trace file consists of two types of JSONObjects:
-
Optional declaration of component instances
-
Events