|
NINetVar
An EPICS support module to export National Instruments Network Shared Variables as process variables
|
Manager class for the NetVar Interaction. Parses an netvarconfig.xml file and provides access to the 9variables described within. More...
#include <NINetVarInterface.h>
Public Member Functions | |
| NINetVarInterface (const char *configSection, const char *configFile, int options) | |
| section name of configFile to use to configure this asyn port More... | |
| long | nParams () |
| ~NINetVarInterface () | |
| void | updateValues () |
| void | createParams (asynPortDriver *driver) |
| void | report (FILE *fp, int details) |
| Helper for EPICS driver report function. More... | |
| template<typename T > | |
| void | setValue (const char *param, const T &value) |
| template<typename T > | |
| void | setArrayValue (const char *param, const T *value, size_t nElements) |
| void | dataTransferredCallback (void *handle, int error, CallbackData *cb_data) |
| called when data has been transferred to the variable More... | |
| void | dataCallback (void *handle, CNVData data, CallbackData *cb_data) |
| called when new data is available on a subscriber connection More... | |
| void | statusCallback (void *handle, CNVConnectionStatus status, int error, CallbackData *cb_data) |
| called when status of a network shared variable changes More... | |
| template<typename T > | |
| void | readArrayValue (const char *paramName, T *value, size_t nElements, size_t *nIn) |
| template<> | |
| void | setValue (const char *param, const std::string &value) |
Private Types | |
| typedef std::map< std::string, NvItem * > | params_t |
Private Member Functions | |
| void | getParams () |
| void | DomFromCOM () |
| void | setValueCNV (const std::string &name, CNVData value) |
| bool | checkOption (NINetVarOptions option) |
| void | connectVars () |
| template<typename T > | |
| void | updateParamValue (int param_index, T val, bool do_asyn_param_callbacks) |
| template<typename T > | |
| void | updateParamArrayValue (int param_index, T *val, size_t nElements) |
| void | updateParamCNV (int param_index, CNVData data, bool do_asyn_param_callbacks) |
| template<CNVDataType cnvType> | |
| void | updateParamCNVImpl (int param_index, CNVData data, CNVDataType type, unsigned int nDims, bool do_asyn_param_callbacks) |
| template<typename T , typename U > | |
| void | updateParamArrayValueImpl (int param_index, T *val, size_t nElements) |
Static Private Member Functions | |
| static void | epicsExitFunc (void *arg) |
Private Attributes | |
| std::string | m_configSection |
| section of configFile to load information from More... | |
| std::string | m_configFile |
| int | m_options |
| the various NINetVarOptions currently in use More... | |
| IXMLDOMDocument2 * | m_pxmldom |
| asynPortDriver * | m_driver |
| params_t | m_params |
Manager class for the NetVar Interaction. Parses an netvarconfig.xml file and provides access to the 9variables described within.
Definition at line 47 of file NINetVarInterface.h.
|
private |
Definition at line 70 of file NINetVarInterface.h.
| NINetVarInterface::NINetVarInterface | ( | const char * | configSection, |
| const char * | configFile, | ||
| int | options | ||
| ) |
section name of configFile to use to configure this asyn port
| [in] | configSection | |
| [in] | configFile | Path to the XML input file to load configuration information from. |
| [in] | options | options as per NINetVarOptions enum |
Definition at line 601 of file NINetVarInterface.cpp.
References DomFromCOM(), epicsExitFunc(), initCV(), m_configFile, m_pxmldom, and onceId.
|
inline |
Definition at line 52 of file NINetVarInterface.h.
References m_pxmldom.
|
inlineprivate |
Definition at line 77 of file NINetVarInterface.h.
|
private |
Definition at line 194 of file NINetVarInterface.cpp.
References NvItem::access, NvItem::b_subscriber, NvItem::b_writer, NvItem::BufferedRead, NvItem::BufferedWrite, DataCallback(), DataTransferredCallback(), ERROR_CHECK, NvItem::id, m_params, NvItem::nv_name, NvItem::Read, StatusCallback(), NvItem::subscriber, NvItem::Write, and NvItem::writer.
Referenced by createParams().
| void NINetVarInterface::createParams | ( | asynPortDriver * | driver | ) |
Definition at line 653 of file NINetVarInterface.cpp.
References connectVars(), driverName, getParams(), NvItem::id, m_driver, m_params, and NvItem::type.
Referenced by NINetVarDriver::NINetVarDriver().
| void NINetVarInterface::dataCallback | ( | void * | handle, |
| CNVData | data, | ||
| CallbackData * | cb_data | ||
| ) |
called when new data is available on a subscriber connection
Definition at line 286 of file NINetVarInterface.cpp.
References CallbackData::param_index, and updateParamCNV().
Referenced by DataCallback().
| void NINetVarInterface::dataTransferredCallback | ( | void * | handle, |
| int | error, | ||
| CallbackData * | cb_data | ||
| ) |
called when data has been transferred to the variable
Definition at line 265 of file NINetVarInterface.cpp.
References CallbackData::nv_name.
Referenced by DataTransferredCallback().
|
private |
Definition at line 577 of file NINetVarInterface.cpp.
References m_pxmldom.
Referenced by NINetVarInterface().
|
staticprivate |
Definition at line 625 of file NINetVarInterface.cpp.
Referenced by NINetVarInterface().
|
private |
Definition at line 702 of file NINetVarInterface.cpp.
References NvItem::BufferedRead, NvItem::BufferedWrite, m_configSection, m_params, m_pxmldom, MAX_PATH_LEN, NvItem::Read, and NvItem::Write.
Referenced by createParams().
| long NINetVarInterface::nParams | ( | ) |
Definition at line 638 of file NINetVarInterface.cpp.
References m_configSection, m_pxmldom, and MAX_PATH_LEN.
| void NINetVarInterface::readArrayValue | ( | const char * | paramName, |
| T * | value, | ||
| size_t | nElements, | ||
| size_t * | nIn | ||
| ) |
Definition at line 385 of file NINetVarInterface.cpp.
References m_params.
Referenced by NINetVarDriver::readArrayValue().
| void NINetVarInterface::report | ( | FILE * | fp, |
| int | details | ||
| ) |
Helper for EPICS driver report function.
Definition at line 889 of file NINetVarInterface.cpp.
References m_configFile, m_configSection, m_options, m_params, and NvItem::report().
Referenced by NINetVarDriver::report().
| void NINetVarInterface::setArrayValue | ( | const char * | param, |
| const T * | value, | ||
| size_t | nElements | ||
| ) |
Definition at line 819 of file NINetVarInterface.cpp.
References ERROR_CHECK, and setValueCNV().
Referenced by NINetVarDriver::writeArrayValue().
| void NINetVarInterface::setValue | ( | const char * | param, |
| const T & | value | ||
| ) |
Definition at line 810 of file NINetVarInterface.cpp.
References ERROR_CHECK, and setValueCNV().
Referenced by NINetVarDriver::writeOctet(), and NINetVarDriver::writeValue().
| void NINetVarInterface::setValue | ( | const char * | param, |
| const std::string & | value | ||
| ) |
Definition at line 801 of file NINetVarInterface.cpp.
References ERROR_CHECK, and setValueCNV().
|
private |
Definition at line 828 of file NINetVarInterface.cpp.
References NvItem::access, NvItem::b_writer, NvItem::BufferedWrite, ERROR_CHECK, NvItem::field, m_params, NvItem::nv_name, NvItem::Write, and NvItem::writer.
Referenced by setArrayValue(), and setValue().
| void NINetVarInterface::statusCallback | ( | void * | handle, |
| CNVConnectionStatus | status, | ||
| int | error, | ||
| CallbackData * | cb_data | ||
| ) |
called when status of a network shared variable changes
Definition at line 556 of file NINetVarInterface.cpp.
References connectionStatus(), and CallbackData::nv_name.
Referenced by StatusCallback().
|
private |
Definition at line 352 of file NINetVarInterface.cpp.
References m_driver, and m_params.
Referenced by updateParamCNVImpl().
|
private |
Definition at line 333 of file NINetVarInterface.cpp.
|
private |
Definition at line 427 of file NINetVarInterface.cpp.
References dataQuality(), ERROR_CHECK, m_driver, and m_params.
Referenced by dataCallback(), and updateValues().
|
private |
Definition at line 398 of file NINetVarInterface.cpp.
References ERROR_CHECK, CNV2C< type >::free(), updateParamArrayValue(), and updateParamValue().
|
private |
Definition at line 304 of file NINetVarInterface.cpp.
References m_driver, and m_params.
Referenced by updateParamCNVImpl().
| void NINetVarInterface::updateValues | ( | ) |
Definition at line 853 of file NINetVarInterface.cpp.
References NvItem::access, NvItem::b_subscriber, NvItem::BufferedRead, ERROR_CHECK, NvItem::id, m_driver, m_params, NvItem::nv_name, NvItem::Read, and updateParamCNV().
Referenced by NINetVarDriver::updateValues().
|
private |
Definition at line 65 of file NINetVarInterface.h.
Referenced by NINetVarInterface(), and report().
|
private |
section of configFile to load information from
Definition at line 64 of file NINetVarInterface.h.
Referenced by getParams(), nParams(), and report().
|
private |
Definition at line 69 of file NINetVarInterface.h.
Referenced by createParams(), updateParamArrayValue(), updateParamArrayValueImpl(), updateParamCNV(), updateParamValue(), and updateValues().
|
private |
the various NINetVarOptions currently in use
Definition at line 66 of file NINetVarInterface.h.
Referenced by report().
|
private |
Definition at line 71 of file NINetVarInterface.h.
Referenced by connectVars(), createParams(), getParams(), readArrayValue(), report(), setValueCNV(), updateParamArrayValue(), updateParamArrayValueImpl(), updateParamCNV(), updateParamValue(), and updateValues().
|
private |
Definition at line 68 of file NINetVarInterface.h.
Referenced by DomFromCOM(), getParams(), NINetVarInterface(), nParams(), and ~NINetVarInterface().
1.8.8