-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathconstants.py
executable file
·69 lines (60 loc) · 1.83 KB
/
constants.py
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
61
62
63
64
65
66
67
68
69
"""
pyhik.constants
~~~~~~~~~~~~~~~~~~~~
Constants list
Copyright (c) 2016-2021 John Mihalic <https://github.com/mezz64>
Licensed under the MIT license.
"""
MAJOR_VERSION = 0
MINOR_VERSION = 3
SUB_MINOR_VERSION = 1
__version__ = '{}.{}.{}'.format(
MAJOR_VERSION, MINOR_VERSION, SUB_MINOR_VERSION)
CONNECT_TIMEOUT = 10
READ_TIMEOUT = 60
DEFAULT_PORT = 80
XML_ENCODING = 'UTF-8'
XML_NAMESPACE = 'http://www.hikvision.com/ver20/XMLSchema'
DEFAULT_HEADERS = {
'Content-Type': "application/xml; charset='UTF-8'",
'Accept': "*/*"
}
SENSOR_MAP = {
'vmd': 'Motion',
'linedetection': 'Line Crossing',
'fielddetection': 'Field Detection',
'videoloss': 'Video Loss',
'tamperdetection': 'Tamper Detection',
'shelteralarm': 'Tamper Detection',
'defocus': 'Tamper Detection',
'diskfull': 'Disk Full',
'diskerror': 'Disk Error',
'nicbroken': 'Net Interface Broken',
'ipconflict': 'IP Conflict',
'illaccess': 'Illegal Access',
'videomismatch': 'Video Mismatch',
'badvideo': 'Bad Video',
'pir': 'PIR Alarm',
'facedetection': 'Face Detection',
'scenechangedetection': 'Scene Change Detection',
'io': 'I/O',
'unattendedbaggage': 'Unattended Baggage',
'attendedbaggage': 'Attended Baggage',
'recordingfailure': 'Recording Failure',
'regionexiting': "Exiting Region",
'regionentrance': "Entering Region",
'duration': "Ongoing Events",
'thermometry': "Thermometry"
}
# The name 'id' should always be last
CHANNEL_NAMES = ['dynVideoInputChannelID', 'videoInputChannelID',
'dynInputIOPortID', 'inputIOPortID',
'id']
ID_TYPES = ['channelID', 'dynChannelID', 'inputIOPortID',
'dynInputIOPortID']
CAM_DEVICE = 'CAM'
NVR_DEVICE = 'NVR'
CONTEXT_INFO = 'INFO'
CONTEXT_TRIG = 'TRIGGERS'
CONTEXT_ALERT = 'ALERTS'
CONTEXT_MOTION = 'MOTION'