-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Event.php
60 lines (55 loc) · 1003 Bytes
/
Event.php
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
49
50
51
52
53
54
55
56
57
58
59
60
<?php
namespace GPIO;
/**
* Represents an Event.
*/
final class Event {
/**
* The event type.
* Possible values:
* - RISING_EDGE
* - FALLING_EDGE
*
* @var int
*/
private int $type;
/**
* The event timestamp in nanoseconds.
*
* @var int
*/
private int $timestamp;
/**
* Rising edge event.
* Value map:
* - ABI v2: GPIO_V2_LINE_EVENT_RISING_EDGE
* - ABI v1: GPIOEVENT_EVENT_RISING_EDGE
*
* @var int
*/
public const RISING_EDGE = 0x01;
/**
* Falling edge event.
* Value map:
* - ABI v2: GPIO_V2_LINE_EVENT_FALLING_EDGE
* - ABI v1: GPIOEVENT_EVENT_FALLING_EDGE
*
* @var int
*/
public const FALLING_EDGE = 0x02;
/**
* Get the event type.
* Possible return values:
* - RISING_EDGE
* - FALLING_EDGE
*
* @return int
*/
public function getType(): int {}
/**
* Get the event timestamp in microseconds.
*
* @return int
*/
public function getTimestamp(): int {}
}