~aleteoryx/muditaos

ref: 3a793437eaab640986f503e1244c6f0cf2cb37a5 muditaos/test/harness/interface/defs.py -rw-r--r-- 1.0 KiB
3a793437 — Mateusz Grzywacz [EGD-4835] Fix HIL Readme, code, so it works, rename, random GCC 10 fix 5 years ago
                                                                                
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
# Copyright (c) 2017-2020, Mudita Sp. z.o.o. All rights reserved.
# For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
from enum import Enum

endpoint = {
    "deviceInfo": 1,
    "update": 2,
    "filesystemUpload": 3,
    "backup": 4,
    "restore": 5,
    "factory": 6,
    "contacts": 7,
    "messages": 8,
    "calllog": 9,
    "events": 10,
    "developerMode": 11
}

method = {
    "get": 1,
    "post": 2,
    "put": 3,
    "del": 4
}

status = {
    "OK": 200,
    "Accepted": 202,
    "BadRequest": 400,
    "NotAcceptable": 406,
    "InternalServerError": 500,
}

key_codes = {
    "left": ord('a'),
    "right": ord('d'),
    "up": ord('w'),
    "down": ord('s'),
    "enter": ord('\n'),
    "fnLeft": 11,
    "fnRight": 12,
    "volUp": 13,
    "volDown": 14,
    "torch": 15,
    "sliderUp": 16,
    "sliderMid": 18,
    "sliderDown": 17,
    "#": ord('#'),
    "*": ord('*'),
}


class SMSType(Enum):
    DRAFT = 0x01
    FAILED = 0x02
    INBOX = 0x04
    OUTBOX = 0x08
    QUEUED = 0x10
    INPUT = 0x12
    UNKNOWN = 0xFF