Channel Access Client Reference
TABLE 1. Channel Access EPICS Environment Variables
|Environment Variable Name||Range||Default||Section|
When executing under UNIX, EPICS environment variables can be modified by typing 'setenv <EPICS environment variable name> "<new value for the variable>"'. On IOCs, EPICS environment variables can be modified by adding a line of the form '<EPICS environment variable name> DBF_STRING <new value for the variable>' to the resource definition file (typically "resource.def" in the application directory that the IOC boots from). In the IOC start-up script the single argument to iocInit() should be the name (and potentially the file system path) of the resource definition file.
Normally the scope of a broadcasted frame will be limited to an IP subnet however it is possible for a host on one IP subnet to issue a broadcast frame on a different IP subnet. Addresses with the host address portion set to all zeros or all ones are special. Modern IP implementations reserve destination addresses with the host portion set to all ones for the purpose of sending broadcasts to a particular subnet. Therefore in theory we can issue a broadcast frame on any broadcast capable LAN within the interconnected internet by specifying the proper subnet address combined with a host portion set to all ones. In practice this ability to send "directed broadcasts" may be limited by configuration options in routers which determine if these directed broadcasts are discarded.
The proper directed broadcast address required to reach a particular vxWorks host can be obtained by logging into that host and typing "ifShow". Ignore the loop back interface and use the broadcast address associated with the interface along the path to your router (usually there is only one choice here - ei). Similarly the proper broadcast address required to reach a particular UNIX host can be found by typing "netstat -i "followed by "ifconfig <interface name>" (usually "ifconfig leo").
IP ports are positive integers. Within the IP protocols the IP address, port number, and protocol type uniquely identify the source and destination of a particular frame on particular host computers. In practice the port number also uniquely identifies a protocol layered over one of the IP protocols. Servers are usually addressed by a "well known" port number. Clients are usually assigned a unique port number during initialization. IP ports below 1024 are reserved for servers that provide standardized facilities such as mail or file transfer. Port number between 1024 and 5000 are normally reserved for clients and other dynamic port number assignments.
routeShow() hostAdd "the-router", "N.N.N.N" routeAdd "0","the-router"Note that some routers will be configured to not forward directed broadcasts. Note also that by not providing routes outside of a limited set of subnets an EPICS system manager can easily limit access to a particular host.
UNIX: % setenv EPICS_CA_AUTO_ADDR_LIST YES vxWorks: Add the following line to the file "resource.def". EPICS_CA_AUTO_ADDR_LIST DBF_STRING YES % iocInit "resource.def"Next the list of destination addresses is appended to by any IP addresses specified in the EPICS environment variable "EPICS_CA_ADDR_LIST". An identical procedure is followed by the server when it initializes the list of addresses that the server sends beacons to. Proper configuration of CA for multiple subnets requires that CA name resolution (search requests) frames pass from CA clients to the targeted CA servers. Likewise proper operation also requires that beacons issued by the targeted CA servers reach the hosts of all potential clients. For this reason the "EPICS_CA_ADDR_LIST" environment variable parameter will often be identical within a group of clients that communicate between themselves. The contents of EPICS_CA_ADDR_LIST is currently constrained to be a list of dot format IP addresses seperated by white space. Host names may not be substituted for IP addresses because some of the operating system environments in which CA runs do not support host name to IP address translation.
UNIX: % setenv EPICS_CA_ADDR_LIST "126.96.36.199 188.8.131.52" vxWorks: Add the following line to the file "resource.def". EPICS_CA_ADDR_LIST DBF_STRING 184.108.40.206 220.127.116.11 % iocInit "resource.def"Note that there is no requirement that the addresses specified in the EPICS_CA_ADDR_LIST be a broadcast addresses. However this will often be the most convenient choice.
|TCP/IP||5065||Reserved for future expansion|
|UDP/IP||5064||Process variable name resolution|
|UDP/IP||5065||Repeater (broadcast fan out within a host)|
A particular site may choose to reconfigure the IP port numbers used by Channel Access. This will normally occur because a site wants to setup two or more completely independent control systems that will share all or part of the same network. For instance a site may wish to setup an operational control system and a test control system on the same network. The operational system might be assigned special port numbers and the test control system might be assigned the default CA port numbers. This configuration would allow the test system and the operational system to use identical PV names without fear of collision. A site may also need to configure the CA port numbers because some other facility at the site has already reserved the two default port number that are normally used by CA.
UNIX: % setenv EPICS_CA_REPEATER_PORT 20000 % setenv EPICS_CA_SERVER_PORT 20001 vxWorks: Add the following line to the file "resource.def". EPICS_CA_REPEATER_PORT DBF_STRING 20000 EPICS_CA_SERVER_PORT DBF_STRING 20001 % iocInit "resource.def"
UNIX: % setenv EPICS_CA_CONN_TMO 15.0 vxWorks: Add the following line to the file "resource.def". EPICS_CA_CONN_TMO DBF_STRING 15.0 % iocInit "resource.def"When a CA server initializes it initially sends "beacon" messages to each address specified in EPICS_CA_ADDR_LIST, and also any addresses auto configured from network interfaces found, with a very short period between "beacons". However, this short period is doubled each time a "beacon" is sent so that it will rapidly reached a plateau specified by EPICS_CA_BEACON_PERIOD. The parameter EPICS_CA_BEACON_PERIOD is specified in floating point seconds. For efficient operation it is recommended that EPICS_CA_BEACON_PERIOD be set to at least one half of the value specified for EPICS_CA_CONN_TMO.
UNIX: % setenv EPICS_CA_BEACON_PERIOD 7.5 vxWorks: Add the following line to the file "resource.def". EPICS_CA_BEACON_PERIOD DBF_STRING 7.5 % iocInit "resource.def"
UNIX: % setenv EPICS_TS_MIN_WEST 420 vxWorks: Add the following line to the file "resource.def". EPICS_TS_MIN_WEST DBF_STRING 420 % iocInit "resource.def"
Read this section only if you need to configure a CA server which must have a different configuration than then any clients which may be running in the same address space
|Environment Variable Name||Range||Default||Section|