NDS3
1.0.0
API reference manual
|
Typedefs | |
typedef std::function< void(timespec *, std::int32_t *)> | nds::PVAction::initValue_t |
Definition of the method used to read the initial PV value. More... | |
typedef std::function< void(const timespec &, const std::int32_t &)> | nds::PVAction::write_t |
Definition of the method used to write. | |
typedef std::function< void(timespec *, T *)> | nds::PVDelegateIn< T >::read_t |
Definition of the method used to read the PV value. More... | |
typedef std::function< void(timespec *, T *)> | nds::PVDelegateOut< T >::initValue_t |
Definition of the method used to read the initial PV value. More... | |
typedef std::function< void(const timespec &, const T &)> | nds::PVDelegateOut< T >::write_t |
Definition of the method used to write. | |
Functions | |
void | nds::DataAcquisition< T >::push (const timespec ×tamp, const T &data) |
Push acquired data to the control system. More... | |
template<typename T > | |
void | nds::PVBaseIn::read (timespec *pTimestamp, T *pValue) const |
Call to read the value of the PV. More... | |
template<typename T > | |
void | nds::PVBaseIn::push (const timespec ×tamp, const T &value) |
Pushes a value to the control system. More... | |
void | nds::PVBaseIn::setDecimation (const std::uint32_t decimation) |
Specifies the decimation factor used when pushing data to the control system. More... | |
template<typename T > | |
void | nds::PVBaseOut::read (timespec *pTimestamp, T *pValue) const |
Call to read the value of the PV. More... | |
template<typename T > | |
void | nds::PVBaseOut::write (const timespec ×tamp, const T &value) |
Call to write the value into the PV. More... | |
void | nds::PVVariableIn< T >::setValue (const T &value) |
Set the variable's value. More... | |
void | nds::PVVariableIn< T >::setValue (const timespec ×tamp, const T &value) |
Set the variable's value. More... | |
T | nds::PVVariableOut< T >::getValue () const |
Retrieve the value stored in the PV. More... | |
void | nds::PVVariableOut< T >::getValue (timespec *pTime, T *pValue) const |
Retrieve the value and the timestamp stored in the PV. More... | |
The control system can access the data via PVs (process variables). The base PV class is PVBase, from which PVDelegate and PVVariable are derived.
Both PVDelegate and PVVariable provide the read and write methods (inherited from PVBase), but while PVDelegate calls two user-defined delegate functions to perform the read and write operation, PVVariable takes care of storing the value so it does not need to refer to delegate functions and can carry out the read and write operations by itself.
PVBase also provides a PVBase::push() method that allow to push data directly to the control system without waiting for it to poll it.
typedef std::function<void (timespec*, std::int32_t*)> nds::PVAction::initValue_t |
Definition of the method used to read the initial PV value.
The init function will receive two pointers to the timestamp and value that the function will have to fill with proper data.
typedef std::function<void (timespec*, T*)> nds::PVDelegateOut< T >::initValue_t |
Definition of the method used to read the initial PV value.
The init function will receive two pointers to the timestamp and value that the function will have to fill with proper data.
typedef std::function<void (timespec*, T*)> nds::PVDelegateIn< T >::read_t |
Definition of the method used to read the PV value.
The read function will receive two pointers to the timestamp and value that the function will have to fill with proper data.
T nds::PVVariableOut< T >::getValue | ( | ) | const |
Retrieve the value stored in the PV.
void nds::PVVariableOut< T >::getValue | ( | timespec * | pTime, |
T * | pValue | ||
) | const |
Retrieve the value and the timestamp stored in the PV.
pTime | pointer to a timespec structure taht will be filled with the PV's timestamp |
pValue | pointer to a variable that will be filled with the PV's value |
void nds::PVBaseIn::push | ( | const timespec & | timestamp, |
const T & | value | ||
) |
Pushes a value to the control system.
Depending on the decimation value set with setDecimation() the control system will receive the value immediately, regardless of when it calls the read() function.
If one or more output PVs have been suscribed to this PV via Factory::subscribe() then the value will be pushed immediately to all the subscribed PVs via PVBaseOut::write().
See also Factory::subscribe() and PVBaseOut::subscribeTo().
timestamp | the new value's timestamp |
value | the value to push to the control system |
void nds::DataAcquisition< T >::push | ( | const timespec & | timestamp, |
const T & | data | ||
) |
Push acquired data to the control system.
Usually your device implementation will call this function from the data acquisition thread in order to push the acquired data.
timestamp | the timestamp for the data |
data | the data to push to the control system |
void nds::PVBaseIn::read | ( | timespec * | pTimestamp, |
T * | pValue | ||
) | const |
Call to read the value of the PV.
If this object manages a delegated PV then the delegated function will be called.
T | the data type to read |
pTimestamp | a pointer to a timestamp value that the called function will fill with the proper timestamp |
pValue | a pointer to a variable that the called function will fill with the proper value |
void nds::PVBaseOut::read | ( | timespec * | pTimestamp, |
T * | pValue | ||
) | const |
Call to read the value of the PV.
If this object manages a delegated PV then the delegated function will be called.
T | the data type to read |
pTimestamp | a pointer to a timestamp value that the called function will fill with the proper timestamp |
pValue | a pointer to a variable that the called function will fill with the proper value |
void nds::PVBaseIn::setDecimation | ( | const std::uint32_t | decimation | ) |
Specifies the decimation factor used when pushing data to the control system.
When calling push() the data is transferred to the subscribed output PVs (see PVBaseOut::subscribeTo() ) and to the control system. However, the data pushed to the control system also takes into account the decimation factor.
If the decimation factor is 1 (the default value) then all the pushed data is also passed to the control system, if the decimation factor is 0 then none of the data is passed to the control system, if the decimation factor is higher than one then it specifies the ratio pushed_data/passed_to_CS which express the number of pushed data versus the number of data actually passed to the control system.
decimation | the decimation factor (ratio pusehd_data/data_passd_to_cs) |
void nds::PVVariableIn< T >::setValue | ( | const T & | value | ) |
Set the variable's value.
The control system will retrieve the value when it choses to do so.
If one or more output PVs have been suscribed to this PV via Factory::subscribe() then the value will be pushed immediately to all the subscribed PVs via PVBaseOut::write().
See also Factory::subscribe() and PVBaseOut::subscribeTo().
value | the value to write into the variable. The timestamp will be taken via the getTimestamp() method. |
void nds::PVVariableIn< T >::setValue | ( | const timespec & | timestamp, |
const T & | value | ||
) |
Set the variable's value.
The control system will retrieve the value when it choses to do so.
If one or more output PVs have been suscribed to this PV via Factory::subscribe() then the value will be pushed immediately to all the subscribed PVs via PVBaseOut::write().
See also Factory::subscribe() and PVBaseOut::subscribeTo().
timestamp | the timestamp to assign to the variable |
value | the value to write into the variable |
void nds::PVBaseOut::write | ( | const timespec & | timestamp, |
const T & | value | ||
) |
Call to write the value into the PV.
If this object manages a delegated PV then the delegated function will be called.
T | the data type to write |
timestamp | the timestamp to assign to the new value |
value | the new value for the PV |