RecCaster configuration¶
RecCaster is an EPICS support module that sends PV names and IOC metadata to a “RecCeiver” server. This setup is often used to send such metadata to a ChannelFinder database.
See also
If you want to set up a RecCeiver and ChannelFinder server, examine the guide ChannelFinder service setup.
Configuration¶
To configure RecCaster, first add it to your build environment:
# Add your support modules here:
# ---
- #support.modules = with pkgs.epnix.support; [ StreamDevice mySupportModule ];
+ support.modules = with pkgs.epnix.support; [ reccaster ];
Make sure your app depends on the RecCaster library and DBD file:
# Replace "example" by the name of your application
example_DBD += reccaster.dbd
example_LIBS += reccaster
And load the RecCaster database:
## Load RecCaster records
## Optional but useful for checking the synchronization state
## Make sure to choose your prefix by setting the 'P' macro
dbLoadRecords("${RECCASTER}/db/reccaster.db", "P=YOUR-PV-PREFIX:")
This configuration is enough to start the RecCaster client.
Note
RecCaster doesn’t need the address of the RecCeiver server. The RecCeiver server scans for available IOCs on the network.
Firewall¶
To accept connection from the RecCeiver service, the firewall needs to allow the UDP announcert port, which by default is 5049.
If your IOC is a NixOS machine, you can open the firewall with this NixOS configuration:
networking.firewall.allowedUDPPorts = [5049];
Checking synchronization status¶
To check the RecCaster status of your IOC, you can run:
# Replace 'YOUR-PV-PREFIX:' with your PV prefix
caget "YOUR-PV-PREFIX:Msg-I"
caget "YOUR-PV-PREFIX:State-Sts"
Adding IOC metadata¶
You can choose to send more information to the RecCeiver server.
If you want to add metadata about the global IOC,
set it as environment variable
and expose it using the addReccasterEnvVars
function.
For example:
epicsEnvSet("CONTACT", "mycontact")
addReccasterEnvVars("CONTACT")
Make sure RecCeveiver forward those variables to ChannelFinder. See the RecCeiver guide’s Custom metadata.
For more information about what information RecCaster sends to the server, examine the RecSync README.
Tip
RecCaster automatically sends some environment variables to RecCeiver,
without needing to call addReccasterEnvVars
,
for example:
PWD
EPICS_VERSION
EPICS_HOST_ARCH
IOCNAME
HOSTNAME
ENGINEER
LOCATION
But those variables aren’t automatically forwarded to ChannelFinder. For how to forward them to ChannelFinder, examine the RecCeiver guide’s Custom metadata.