NDS3
1.0.0
API reference manual
|
The command epicsNdsControlSystem is an IOC application that is linked again the NDS framwork and provides the NDS functionalities.
After epicsNdsControlSystem has been launched then the classic EPICS IOC shell will appear: the shell will be able to parse and execute the additional NDS3 commands which will allow to load and run generic NDS3 devices into EPICS.
When the EPICS shell appears then you can load one or more NDS3 devices into the shell by using the command ndsLoadDriver.
When the desidered drivers have been loaded then you can instantiate one or more devices by using the command ndsCreateDevice.
The following example loads the so module acquisitionDevice which provide the driver "AcquisitionDevice", then creates 2 acquisition devices named device0 and device1:
$>epicsNdsControlSystem epics> ndsLoadDriver /usr/bin/acquistionDevice.so epics> ndsCreateDevice AcquisitionDevice device0 epics> ndsCreateDevice AcquisitionDevice device1 epics> iocInit
You can list the PVs supplied by the 2 devices by issuing the dbl command.
Each device node or PV may provide additional commands that can be executed by using the NDS command nds.
For instance, to switch on a node connected to a state machine:
epics> nds switchOn device0 epics> nds switchOn device0-channel0 epics> nds start device0-channel0
This section describes the additional IOCSH commands provided by the NDS framework.
Usage: ndsLoadDriver pathToSoModule
Parameters:
The command loads the shared library in memory and checks that it provides the NDS functionalities. If the loaded module does not export the NDS functions then an error message is displayed.
The device provided by the loaded module can be instantiated with the command ndsCreateDevice.
usage: ndsLoadDriver driverName rootNodeName [parameter0 [parameter1 [parameter2[ parameter3...]]]]
Parameters:
usage: ndsLoadNamingRules pathToNamingRules
Parameters:
If the loaded file contains only one set of rules (just one section) then the rules are enabled immediately, otherwise the command ndsEnableNamingRules must be used to enable one of the rules section.
The file must be loaded before creating the device with ndsCreateDevice.
usage: ndsEnableNamingRulessss rulesSection
Parameters:
The command activates the naming rules described in a particular section of a Naming rules definition file.
The rules must be activated before creating the device with ndsCreateDevice.
usage: nds nodeCommand nodeName [parameters]
Parameters:
The command nds enable the execution of custom commands registered by individual nodes that form the device. Each node can register its own set of commands, but once a command has been registered by a node then the same command registered by other node must accept the same number of parameters as the first registered one.
See nds::Base::defineCommand() for more information about the registration of custom commands.
usage: nds switchOn nodeName
Parameters:
This command is automatically provided for all the StateMachine nodes and all the Node objects that have a child StateMachine.
It causes the StateMachine to execute the transition to the state_t::on state.
usage: nds switchOff nodeName
Parameters:
This command is automatically provided for all the StateMachine nodes and all the Node objects that have a child StateMachine.
It causes the StateMachine to execute the transition to the state_t::off state.
usage: nds start nodeName
Parameters:
This command is automatically provided for all the StateMachine nodes and all the Node objects that have a child StateMachine.
It causes the StateMachine to execute the transition to the state_t::running state.
usage: nds stop nodeName
Parameters:
This command is automatically provided for all the StateMachine nodes and all the Node objects that have a child StateMachine.
It causes the StateMachine to execute the transition to the state_t::on state.
usage: nds setLogLevelDebug nodeName
Parameters:
This command is automatically provided for all the nodes and PVs (all the Base derived objects).
It enables the debug log level for the node and its children or for the PV.
usage: nds setLogLevelInfo nodeName
Parameters:
This command is automatically provided for all the nodes and PVs (all the Base derived objects).
It enables the info debug level for the node and its children or for the PV.
usage: nds setLogLevelWarning nodeName
Parameters:
This command is automatically provided for all the nodes and PVs (all the Base derived objects).
It enables the warning log level for the node and its children or for the PV.
usage: nds setLogLevelError nodeName
Parameters:
This command is automatically provided for all the nodes and PVs (all the Base derived objects).
It enables the error log level for the node and its children or for the PV.
usage: nds subscribe destinationPVName sourcePVName
Parameters:
This command connects the inputPV sourcePVName to the output PV destinationPVName: all the data pushed to the inputPV via PVBaseIn::push() or PVVariableIn::setValue() will be written into the output PV via PVBaseOut::write().
The input and output PVs may be part of different NDS devices but must be running into the same process (must be created via ndsCreateDevice in the same IOCSH).
usage: nds replicate destinationPVName sourcePVName
Parameters:
This command causes the input PV destinationPVName to replicate all the push operations performed by the input PV sourcePVName.
This command is useful to replicate the results of calculations performed by a NDS device into another NDS device that wants to expose the calculations as its own.
usage: nds decimation inputPVName decimationFactor
Parameters:
The decimation factor is the ratio of the data pushed to the PV via PVBaseIn::push() versus the data actually pushed to the control system.