AMR_T800/Devices/Libraries/Systems/CANopenSocket/canopencgi/canopen.conf

57 lines
2.5 KiB
Plaintext
Executable File

# Configuration file for canopen.cgi
# canopen.cgi is an application usually accessible by a web server like
# apache. Query string contains commands to canopend. canopend is an
# application, which runs in background. It is a CANopen device with
# master functionality and command interface (via socket). One typical
# command is read or write specific object(variable) in specific device.
# (Each CANopen device has own Object Dictionary, collection of all
# variables. Any variable on any CANopen device can be read or written,
# if we know its address (nodeID + index + subindex). CANopen SDO client
# (master device - canopend) sends Service Data Object (SDO) via CANopen
# network, and one of the SDO servers (slave devices) responses with
# requested information.)
# Name of the local domain socket, link to canopend. */
socketPath /tmp/CO_command_socket
# Whitelist and Blacklist of CANopen objects, which are allowed or not
# allowed to be accessed by canopen.cgi. Whitelist is generated from all
# lines, which begins with 'allow'. Blacklist is generated from all
# lines, which begins with 'deny'.
# Each Object from query string is first NOT allowed, to be accessed. If
# it matches ANY pattern from the whitelist, it is allowed. (Whitelist,
# which allows everything would then be just one line: 'allow *'.) On
# the end, object is verified with blacklist. If it matches any pattern
# from there, it won't be passed as command to canopend.
#
# Format of the parameter in Query string: wnniiiissll=xxxx
# Where w, nn, iiii, ss, ll, xxxx are fixed width fields with the following meaning:
# w - 'W'rite or 'R'ead.
# nn - node ID in hex format.
# iiii - Object Dictionary index in hex format.
# ss - Object Dictionary subindex in hex format.
# ll - length of variable (1 to FFFFFFFF) in hex format. If reading, this value is ignored.
# xxxx - Value to be written in hex and little endian format. If reading, this value is ignored.
#
# Parameter and pattern strings are not case sensitive.
# Communication segment - up to 0x1FFF
allow R??[01]* # allow read all.
# Manufacturer segment - 0x2000 to 0x5FFF
allow R??[2-5]* # allow read all.
# Example of write access to some objects
allow [RW]032110* # allow r/w on NodeId 3, index 0x2110, any subindex.
deny W0321100[2-4E]* # deny write on NodeId 3, index 0x2110, subindex 0x02, 0x03, 0x04 and 0x0E.
allow [RW]0321200[!45]* # allow r/w on NodeId 3, index 0x2120, subindex 0x00-0x03 and 0x06-0x09.
# Device profile segment - above 0x6000
allow R??[6-9A_F]* # allow read all