Rhopoint Instruments Manual
Cette page n'est pas encore traduite et s'affiche en anglais.

File Header

The file header, encoded using the CBOR format, contains critical metadata about the RAE file and its content. The RaeBinaryFile is the root record for the RAE file format in its binary representation. It starts directly after the terminator byte of the magic string (see File Identification) and extends to the end of the file.

Properties

  • Format (required):
    Identifies the data format contained within the file. For now, only "MeasurementComponentMetaTuple[]" is supported — an array of MeasurementComponentMetaTuple records.
  • Version (required):
    Indicates the version of the file format. The current version is 1.
  • Compression (optional):
    Specifies the compression algorithm used for the Data byte array. If not set, it defaults to "none". Currently, only "gzip" is supported.
  • EncryptionAlgorithm (optional):
    Specifies the encryption algorithm applied to the data (if any). Encryption is not implemented in the current version; files are written with "none".
  • HashAlgorithm (optional):
    Describes the hashing algorithm used to validate data integrity. Currently "sha256".
  • Hash (optional):
    A hash string used for data integrity checks. It is calculated over the Data byte array as stored in the file (i.e. after compression), using the algorithm specified in HashAlgorithm.
  • DataContainer (required):
    Indicates the encoding of the payload inside Data after decompression. Currently, this is always "cbor".
  • DataSize (required):
    The size of the Data byte array in bytes.
  • Data (required):
    The actual measurement data stored as a byte array. The data is compressed using the specified compression algorithm (or left uncompressed if Compression = "none") and contains a CBOR-encoded container matching the Format.

In the CBOR encoding, the map keys are the property names in lowerCamelCase: format, version, compression, encryptionAlgorithm, hashAlgorithm, hash, dataContainer, dataSize, data. The Data byte array is stored as a CBOR byte string.

Declaration

public record RaeBinaryFile
{
    public required string Format { get; set; }
    public required int Version { get; set; }
    public string? Compression { get; set; }
    public string? EncryptionAlgorithm { get; set; }
    public string? HashAlgorithm { get; set; }
    public string? Hash { get; set; }

    public required string DataContainer { get; set; }
    public required int DataSize { get; set; }
    public required byte[] Data { get; set; }
}