-
-
Notifications
You must be signed in to change notification settings - Fork 114
/
cpppo.cfg
112 lines (103 loc) · 4 KB
/
cpppo.cfg
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#
# Configuration for EtherNet/IP CIP Objects in Cpppo. Override by configuring:
#
# /etc/cpppo.cfg (or %APPDATA%\cpppo.cfg on Windows)
# ~/.cpppo.cfg
# ./cpppo.cfg
#
# Supports:
# - Using Python 3 style "configparser" files
# - See https://docs.python.org/3/library/configparser.html
# - Interpolation (substituation) of ${section:option} variables:
# - Hash Delimited (#) Comments (full line and trailing)
# - Unfortunately, no # in any value is supported, due to no "escape" symbol
# - Multi-line configuration, if indented (no blank lines supported)
#
# The Originator (client) defaults. These are used when issuing a Forward Open request
# to a Target, where not all parameters have been given values.
[Originator]
Serial Number = 1234567
Vendor Number = 99999
# The currently defined CIP Object Attributes, and their default values:
[Identity]
Vendor Number = 1
Device Type = 14
Product Code Number = 54
Product Revision = 2836
Status Word = 12640
Serial Number = 7079450
Product Name = 1756-L61/B LOGIX5561
State = 255
Configuration Consistency Value = 0
Heartbeat Interval = 0
[TCPIP]
Interface Status = 2 # (Hardware configured)
Configuration Capability = 48 # (Config Settable, Hardware Settable)
Configuration Control = 0 # Statically assigned IP
# These Attributes do not have defaults (are zero/blank, unless specified):
Host Name = controller
# Some Attributes require valid JSON data for configuration:
# The path to the Ethernet Link Object, class 0xF6 == 246, instance 1
Path to Physical Link = [
{ "class": 246 },
{ "instance": 1 }
]
# The IP Configuration
Interface Configuration = {
"ip_address": "10.0.0.4",
"gateway_address": "10.0.0.4",
"network_mask": "255.255.248.0",
"dns_primary": "8.8.8.8",
"dns_secondary": "8.8.4.4",
"domain_name": "example.com"
}
#
# UCMM -- Unconnected Message Manager
#
[UCMM]
# Route Path -- Device's default request route_path (if any) to respond to
#
# o Only uses this configured Route Path if none is supplied on the command-line
# (eg. via -S|--simple|--route_path).
# o null
# - Any Route Path; will ignore the request's provided route_path
# o 0/False
# - no Route Path; only accept "Simple" (non-routing) CIP requests
# o JSON List of Dict: [{"port": <int>, "link": <int>}]
# - Respond to a specific route_path
# - Default value is "port": 1 (Backplane), "link": 0 (First slot),
# which is typically the slot occupied by the *Logix CPU.
#
# Route Path = <JSON>
# ----------
# Route Path = null # Any route_path allowed (the default)
# Route Path = false # No route_path (Simple device)
# Route Path = 0 # ''
# Route Path = 1/0 # [{"port": 1, "link": 0}] allowed
# Route -- Route requests w/ specified route_path "port/link" to an EtherNet/IP CIP server
#
# o <port>/<link> --> <ip>[:<port>]
# o If incoming request's 0'th route_path element matches the given route key,
# then the request is forwarded to the specified EtherNet/IP CIP device, after the
# matching route_path element is removed.
# - If the resulting (trimmed) route_path is empty, a Simple (non-routing) request
# is used (eg. appropriate for a non-routing MicroLogix, A-B Powerflex, etc).
#
# Route = {
# "1/1": "localhost:11001",
# "1/2": "localhost:11002",
# "1/3-7": "localhost:11003",
# "2/1.2.3.3": "localhost:11003",
# "2/1.2.3.4": "192.168.0.4:44818",
# "2/1.2.3.5": "192.168.0.4:44818"
# }
#
# If no Route table is configured, the traditional default behaviour looks only at the UCMM's configured route_path,
# or the default route_path (see cpppo/server/enip/main.py, route_path_default); see above.
#
# eg. route all Backplane (port 1) Slot (link) 1-15 to the same remote EtherNet/IP CIP device:
# All other port/links are invalid, and result in an error status being returned -- unless
# the configured Route Path is null -- then any port/link is accepted as a local request.
# Route = {
# "1/1-15": "localhost:44819"
# }