The output format of SINUMERIK Data Recorder is based on the JSON format mentioned before with some extensions. In this chapter, the output format for various recorded information is specified. The specification defines both the structure of the recorded information and the notations used along the recorded information.
The format supports recording from different asynchronous data sources and ordering of the data. Right now, the ordering is implied explicitly via a counter variable called HFProbeCounter. By default, SINUMERIK Data Recorder use UTF-8 encoding and a default output files size of 100 MB. When the limit is reached the current output file provides a pointer to the next output file. All files coming from one recording routine share common structure.
The object in the file consists of three entries: “Header”, “Payload” and “Footer”. The value of the header is also an object which contains metadata that defines the content of the “Payload”. The structure allows the data objects to collect multiple data sets of the same data type. The footer contains error messages and the paths of the previous, actual and next file.
While the JSON format specification does not consider ordering inside objects, it is enforced in the output format by adding white spaces between entries of the output format. This is enforced by writing first the “Header” part in the output file, followed by a new line with the “Payload” part. This extension is intended for easy access for low level functions such as fgets(). The payload value is an array filled with the data objects, as shown in the following example:
{ "Header": <JSON object>,
"Payload": [<array of JSON object) >],
"Footer": <JSON object> }