lvDCOM
An EPICS support module to export LabVIEW values as process variables
|
Manager class for LabVIEW DCOM Interaction. Parses an lvinput.xml file and provides access to the LabVIEW VI controls/indicators described within. More...
#include <lvDCOMInterface.h>
Public Member Functions | |
lvDCOMInterface (const char *configSection, const char *configFile, const char *host, int options, const char *progid, const char *username, const char *password) | |
section name of configFile to use to configure this asyn port More... | |
long | nParams () |
void | getParams (std::map< std::string, std::string > &res) |
template<typename T > | |
void | setLabviewValue (const char *param, const T &value) |
template<typename T > | |
void | getLabviewValue (const char *param, T *value) |
template<typename T > | |
void | getLabviewValue (const char *param, T *value, size_t nElements, size_t &nIn) |
~lvDCOMInterface () | |
std::string | doPath (const std::string &xpath) |
std::string | doXPATH (const std::string &xpath) |
bool | doXPATHbool (const std::string &xpath) |
void | report (FILE *fp, int details) |
Helper for EPICS driver report function. More... | |
template<> | |
void | getLabviewValue (const char *param, std::string *value) |
template<> | |
void | setLabviewValue (const char *param, const std::string &value) |
Private Types | |
typedef std::map< std::wstring, ViRef > | vi_map_t |
Private Member Functions | |
void | DomFromCOM () |
void | getViRef (BSTR vi_name, bool reentrant, LabVIEW::VirtualInstrumentPtr &vi) |
void | createViRef (BSTR vi_name, bool reentrant, LabVIEW::VirtualInstrumentPtr &vi) |
void | getLabviewValue (BSTR vi_name, BSTR control_name, VARIANT *value) |
void | setLabviewValue (BSTR vi_name, BSTR control_name, const VARIANT &value) |
void | setLabviewValueExt (BSTR vi_name, BSTR control_name, const VARIANT &value, VARIANT *results) |
void | callLabview (BSTR vi_name, VARIANT &names, VARIANT &values, VARIANT_BOOL reentrant, VARIANT *results) |
void | waitForLabviewBoolean (BSTR vi_name, BSTR control_name, bool value) |
COAUTHIDENTITY * | createIdentity (const std::string &user, const std::string &domain, const std::string &pass) |
HRESULT | setIdentity (COAUTHIDENTITY *pidentity, IUnknown *pUnk) |
void | stopVis (bool only_ones_we_started) |
bool | checkOption (lvDCOMOptions option) |
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 |
std::string | m_host |
std::string | m_progid |
CLSID | m_clsid |
std::string | m_username |
std::string | m_password |
int | m_options |
the various lvDCOMOptions currently in use More... | |
vi_map_t | m_vimap |
epicsMutex | m_lock |
IXMLDOMDocument2 * | m_pxmldom |
CComBSTR | m_extint |
CComPtr< LabVIEW::_Application > | m_lv |
COAUTHIDENTITY * | m_pidentity |
std::map< std::string, std::string > | m_xpath_map |
std::map< std::string, bool > | m_xpath_bool_map |
Manager class for LabVIEW DCOM Interaction. Parses an lvinput.xml file and provides access to the LabVIEW VI controls/indicators described within.
Definition at line 76 of file lvDCOMInterface.h.
|
private |
Definition at line 100 of file lvDCOMInterface.h.
lvDCOMInterface::lvDCOMInterface | ( | const char * | configSection, |
const char * | configFile, | ||
const char * | host, | ||
int | options, | ||
const char * | progid, | ||
const char * | username, | ||
const char * | password | ||
) |
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] | host | host name where LabVIEW is running ("" for localhost) |
[in] | options | options as per lvDCOMOptions enum |
[in] | progid | (optional) DCOM ProgID (required if connecting to a compiled LabVIEW application) |
[in] | username | (optional) remote username for host |
[in] | password | (optional) remote password for username on host |
Definition at line 266 of file lvDCOMInterface.cpp.
References DomFromCOM(), doPath(), epicsExitFunc(), initCOM(), m_clsid, m_configFile, m_extint, m_host, m_progid, m_pxmldom, and onceId.
|
inline |
Definition at line 85 of file lvDCOMInterface.h.
References m_pxmldom.
|
private |
Definition at line 847 of file lvDCOMInterface.cpp.
References getViRef().
Referenced by setLabviewValueExt().
|
inlineprivate |
Definition at line 124 of file lvDCOMInterface.h.
References m_options.
Referenced by createViRef(), and epicsExitFunc().
|
private |
Definition at line 447 of file lvDCOMInterface.cpp.
Referenced by createViRef().
|
private |
Definition at line 508 of file lvDCOMInterface.cpp.
References checkOption(), createIdentity(), initCOM(), m_clsid, m_host, m_lv, m_password, m_pidentity, m_username, m_vimap, onceId, setIdentity(), ViRef::started, viStartIfIdle, and viWarnIfIdle.
Referenced by getViRef().
|
private |
Definition at line 237 of file lvDCOMInterface.cpp.
References m_pxmldom.
Referenced by lvDCOMInterface().
std::string lvDCOMInterface::doPath | ( | const std::string & | xpath | ) |
Definition at line 227 of file lvDCOMInterface.cpp.
References doXPATH().
Referenced by getLabviewValue(), lvDCOMInterface(), and StringItem::StringItem().
std::string lvDCOMInterface::doXPATH | ( | const std::string & | xpath | ) |
Definition at line 101 of file lvDCOMInterface.cpp.
References m_lock, m_pxmldom, and m_xpath_map.
Referenced by doPath(), getLabviewValue(), and StringItem::StringItem().
bool lvDCOMInterface::doXPATHbool | ( | const std::string & | xpath | ) |
Definition at line 135 of file lvDCOMInterface.cpp.
References m_lock, m_pxmldom, and m_xpath_bool_map.
Referenced by BoolItem::BoolItem().
|
staticprivate |
Definition at line 348 of file lvDCOMInterface.cpp.
References checkOption(), stopVis(), viAlwaysStopOnExit, and viStopOnExitIfStarted.
Referenced by lvDCOMInterface().
void lvDCOMInterface::getLabviewValue | ( | const char * | param, |
T * | value | ||
) |
Definition at line 655 of file lvDCOMInterface.cpp.
References doPath(), doXPATH(), m_configSection, and MAX_PATH_LEN.
Referenced by getLabviewValue(), lvDCOMDriver::readArray(), lvDCOMDriver::readOctet(), lvDCOMDriver::readValue(), and waitForLabviewBoolean().
void lvDCOMInterface::getLabviewValue | ( | const char * | param, |
T * | value, | ||
size_t | nElements, | ||
size_t & | nIn | ||
) |
Definition at line 627 of file lvDCOMInterface.cpp.
References doPath(), doXPATH(), getLabviewValue(), m_configSection, and MAX_PATH_LEN.
|
private |
Definition at line 678 of file lvDCOMInterface.cpp.
References getViRef().
void lvDCOMInterface::getLabviewValue | ( | const char * | param, |
std::string * | value | ||
) |
Definition at line 603 of file lvDCOMInterface.cpp.
References doPath(), doXPATH(), getLabviewValue(), m_configSection, and MAX_PATH_LEN.
void lvDCOMInterface::getParams | ( | std::map< std::string, std::string > & | res | ) |
Definition at line 407 of file lvDCOMInterface.cpp.
References m_configSection, m_pxmldom, and MAX_PATH_LEN.
Referenced by lvDCOMDriver::lvDCOMDriver().
|
private |
Definition at line 481 of file lvDCOMInterface.cpp.
References createViRef(), m_lock, and m_vimap.
Referenced by callLabview(), getLabviewValue(), and setLabviewValue().
long lvDCOMInterface::nParams | ( | ) |
Definition at line 392 of file lvDCOMInterface.cpp.
References m_configSection, m_pxmldom, and MAX_PATH_LEN.
void lvDCOMInterface::report | ( | FILE * | fp, |
int | details | ||
) |
Helper for EPICS driver report function.
Definition at line 870 of file lvDCOMInterface.cpp.
References m_configFile, m_configSection, m_host, m_options, m_progid, m_username, m_vimap, m_xpath_bool_map, and m_xpath_map.
Referenced by lvDCOMDriver::report().
|
private |
Definition at line 464 of file lvDCOMInterface.cpp.
Referenced by createViRef().
void lvDCOMInterface::setLabviewValue | ( | const char * | param, |
const T & | value | ||
) |
Definition at line 774 of file lvDCOMInterface.cpp.
References m_configSection, setLabviewValueExt(), and waitForLabviewBoolean().
Referenced by setLabviewValue(), lvDCOMDriver::writeOctet(), and lvDCOMDriver::writeValue().
|
private |
Definition at line 804 of file lvDCOMInterface.cpp.
References getViRef().
void lvDCOMInterface::setLabviewValue | ( | const char * | param, |
const std::string & | value | ||
) |
Definition at line 727 of file lvDCOMInterface.cpp.
References m_configSection, setLabviewValue(), setLabviewValueExt(), and waitForLabviewBoolean().
|
private |
Definition at line 817 of file lvDCOMInterface.cpp.
References callLabview(), and m_extint.
Referenced by setLabviewValue().
|
private |
Definition at line 365 of file lvDCOMInterface.cpp.
References m_vimap.
Referenced by epicsExitFunc().
|
private |
Definition at line 757 of file lvDCOMInterface.cpp.
References getLabviewValue().
Referenced by setLabviewValue().
|
private |
Definition at line 96 of file lvDCOMInterface.h.
Referenced by createViRef(), and lvDCOMInterface().
|
private |
Definition at line 93 of file lvDCOMInterface.h.
Referenced by lvDCOMInterface(), and report().
|
private |
section of configFile to load information from
Definition at line 92 of file lvDCOMInterface.h.
Referenced by getLabviewValue(), getParams(), nParams(), report(), and setLabviewValue().
|
private |
Definition at line 106 of file lvDCOMInterface.h.
Referenced by lvDCOMInterface(), and setLabviewValueExt().
|
private |
Definition at line 94 of file lvDCOMInterface.h.
Referenced by createViRef(), lvDCOMInterface(), and report().
|
private |
Definition at line 102 of file lvDCOMInterface.h.
Referenced by doXPATH(), doXPATHbool(), and getViRef().
|
private |
Definition at line 107 of file lvDCOMInterface.h.
Referenced by createViRef().
|
private |
the various lvDCOMOptions currently in use
Definition at line 99 of file lvDCOMInterface.h.
Referenced by checkOption(), and report().
|
private |
Definition at line 98 of file lvDCOMInterface.h.
Referenced by createViRef().
|
private |
Definition at line 108 of file lvDCOMInterface.h.
Referenced by createViRef().
|
private |
Definition at line 95 of file lvDCOMInterface.h.
Referenced by lvDCOMInterface(), and report().
|
private |
Definition at line 105 of file lvDCOMInterface.h.
Referenced by DomFromCOM(), doXPATH(), doXPATHbool(), getParams(), lvDCOMInterface(), nParams(), and ~lvDCOMInterface().
|
private |
Definition at line 97 of file lvDCOMInterface.h.
Referenced by createViRef(), and report().
|
private |
Definition at line 101 of file lvDCOMInterface.h.
Referenced by createViRef(), getViRef(), report(), and stopVis().
|
private |
Definition at line 110 of file lvDCOMInterface.h.
Referenced by doXPATHbool(), and report().
|
private |
Definition at line 109 of file lvDCOMInterface.h.