-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefaults.py
executable file
·51 lines (45 loc) · 1.4 KB
/
defaults.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
serial = False
tcp = True
ethernet = False
windows = False
local = False
if tcp and not local:
import tcpolcblink
network = tcpolcblink.TcpToOlcbLink()
network.host = "174.18.137.234"
network.host = "localhost"
#network.host = "propername.local."
network.port = 12021
elif ethernet and not local:
import ethernetolcblink
network = ethernetolcblink.EthernetToOlcbLink()
network.host = "174.18.137.234"
#network.host = "propername.local."
network.port = 12021
elif windows and not local :
import serialolcblink
network = serialolcblink.SerialOlcbLink()
network.port = "COM9"
network.speed = 500000
network.startdelay = 0
elif serial and not local :
import serialolcblink
network = serialolcblink.SerialOlcbLink()
#network.port = "/dev/cu.usbserial-A900fLVC"
#network.port = "/dev/cu.usbmodem401331"
#network.port = "/dev/cu.usbserial-AE015IZE" # Ioduino
network.port = "/dev/cu.usbserial-A5VRG6OF" # TCH parallel
network.speed = 230400
network.parallel = True
network.startdelay = 2
elif local :
import pipeolcblink
network = pipeolcblink.PipeOlcbLink()
network.name = "pyOlcbBasicNode"
else :
print "Please set one of the options to True"
thisNodeID = [1,2,3,4,5,6]
thisNodeAlias = 0xAAA
testNodeID = [2,3,4,5,6,1]
testNodeAlias = 0xDDD
testEventID = [0x05, 0x02, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00]