1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#[repr(u8)]
#[derive(Debug, Copy, Clone)]
pub enum DvsPolarity {
    Off = 0,
    On = 1,
}

#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct DvsEvent<Timestamp, X, Y> {
    pub t: Timestamp,
    pub x: X,
    pub y: Y,
    pub polarity: DvsPolarity,
}

#[repr(u8)]
#[derive(Debug, Copy, Clone)]
pub enum AtisPolarity {
    Off = 0,
    On = 1,
    ExposureStart = 2,
    ExposureEnd = 3,
}

#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct AtisEvent<Timestamp, X, Y> {
    pub t: Timestamp,
    pub x: X,
    pub y: Y,
    pub polarity: AtisPolarity,
}

#[repr(u8)]
#[derive(Debug, Copy, Clone)]
pub enum TriggerPolarity {
    Falling = 0,
    Rising = 1,
}

#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct TriggerEvent<Timestamp, Id> {
    pub t: Timestamp,
    pub id: Id,
    pub polarity: TriggerPolarity,
}