fastpasta 1.22.0

CLI for verifying or examining readout data from the ALICE detector.
Documentation
//! Example data for use in tests

#[cfg(test)]
pub mod data {
    pub use test_payloads::*;

    pub const DATA_WORDS_OB: [u8; 64] = [
        0xA8, 0x00, 0xC0, 0x01, 0xFE, 0x7F, 0x05, 0xFE, 0x7F, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0xA0, 0x00, 0xC0, 0x01, 0xFE, 0x7F, 0x05, 0xFE, 0x7F, 0x48, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xA0, 0x00, 0xC0, 0x01, 0xFE, 0x7F, 0x05, 0xFE, 0x7F, 0x49, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0xA0, 0x00, 0xC0, 0x01, 0xFE, 0x7F, 0x05, 0xFE, 0x7F, 0x4A, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00,
    ]; // 4 data words with IDs:     46, 48, 49, 4A:
       //   - lane:                   6,  7,  8,  9
       //   - input number connector: 6,  0,  1,  2
       //   - connector number:       0,  1,  1,  1

    /// Payload test values for ITS
    pub mod test_payloads {
        /// The beginning of a payload in flavor 0
        pub const START_PAYLOAD_FLAVOR_0: [u8; 32] = [
            0xC0, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00,
            0x00, 0x00, 0x03, 0x1a, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00,
            0x00, 0x00, 0x00, 0x00,
        ];
        /// The beginning of a payload in flavor 2
        pub const START_PAYLOAD_FLAVOR_2: [u8; 20] = [
            0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x13, 0x08, 0x00, 0x00,
            0x00, 0xD7, 0x39, 0x9B, 0x00, 0xE8,
        ];

        /// Middle of a payload in flavor 0, just one Data Word with padding
        pub const MIDDLE_PAYLOAD_FLAVOR_0: [u8; 16] = [
            0xA7, 0x00, 0xC0, 0x41, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x27, 0x0, 0x0, 0x0, 0x0, 0x0,
            0x0,
        ];

        /// Middle of a payload in flavor 2, two packed Data Words
        pub const MIDDLE_PAYLOAD_FLAVOR_2: [u8; 20] = [
            0xA7, 0x00, 0xC0, 0x41, 0xFF, 0xB0, 0x00, 0x00, 0x00, 0x27, 0xA8, 0x00, 0xC0, 0x41,
            0xFF, 0xB0, 0x00, 0x00, 0x00, 0x28,
        ];

        /// End of a payload in flavor 0: has no 0xFF padding, this is just a TDT followed by the 0x00 padding
        pub const END_PAYLOAD_FLAVOR_0: [u8; 16] = [
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00,
            0x00, 0x00,
        ];
        /// End of a payload in flavor 2: TDT and 0xFF padding
        pub const END_PAYLOAD_FLAVOR_2: [u8; 16] = [
            0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xff, 0xff, 0xff, 0xff,
            0xff, 0xff,
        ];
    }
}