/* CTF 1.8 */

typealias integer {size = 8;}  := uint8_t;
typealias integer {size = 16;} := uint16_t;
typealias integer {size = 32;} := uint32_t;
typealias integer {size = 8; signed = true;}  := int8_t;
typealias integer {size = 16; signed = true;} := int16_t;
typealias integer {size = 32; signed = true;} := int32_t;

typealias floating_point {
    exp_dig = 8;
    mant_dig = 24;
    align = 32;
} := float;

typealias floating_point {
    exp_dig = 11;
    mant_dig = 53;
    align = 64;
} := double;

trace {
    major = 1;
    minor = 8;
    byte_order = le;
    packet.header := struct {
        uint32_t magic;
        uint32_t stream_id;
    };
};

clock {
    name = my_clock;
    freq = 1000;
    offset_s = 1421703448;
};

typealias integer {
    size = 64;
    map = clock.my_clock.value;
} := my_clock_int_t;

stream {
    id = 0;
    packet.context := struct {
        uint32_t packet_size;
        uint32_t content_size;
        my_clock_int_t timestamp_begin;
        my_clock_int_t timestamp_end;
    };
    event.header := struct {
        uint32_t id;
        my_clock_int_t timestamp;
    };
};

event {
    id = 0;
    name = "my_event";
    stream_id = 0;
    fields := struct {
        uint32_t a;
        uint32_t b;
        string c;
    };
};
