Implementation of lvDCOMDriver class and lvDCOMConfigure() iocsh command. More...
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <math.h>
#include <exception>
#include <iostream>
#include <map>
#include <epicsTypes.h>
#include <epicsTime.h>
#include <epicsThread.h>
#include <epicsString.h>
#include <epicsTimer.h>
#include <epicsMutex.h>
#include <epicsEvent.h>
#include <errlog.h>
#include <iocsh.h>
#include "lvDCOMDriver.h"
#include <epicsExport.h>
#include "lvDCOMInterface.h"
#include "convertToString.h"
#include "variant_utils.h"
Go to the source code of this file.
Functions | |
static void | seTransFunction (unsigned int u, EXCEPTION_POINTERS *pExp) |
Function to translate a Win32 structured exception into a standard C++ exception. More... | |
static void | registerStructuredExceptionHandler () |
Register a handler for Win32 structured exceptions. This needs to be done on a per thread basis. More... | |
int | lvDCOMConfigure (const char *portName, const char *configSection, const char *configFile, const char *host, int options, const char *progid, const char *username, const char *password) |
EPICS iocsh callable function to call constructor of lvDCOMInterface(). More... | |
int | lvDCOMSECIConfigure (const char *portName, const char *macros, const char *configSection, const char *configFile, const char *dbSubFile, const char *host, int options, const char *blocks_match, const char *progid, const char *username, const char *password) |
A name for the asyn driver instance we will create - used to refer to it from EPICS DB files. More... | |
static void | initCallFunc (const iocshArgBuf *args) |
static void | initCallFuncSECI (const iocshArgBuf *args) |
static void | lvDCOMRegister (void) |
Register new commands with EPICS IOC shell. More... | |
epicsExportRegistrar (lvDCOMRegister) | |
Variables | |
static const char * | driverName ="lvDCOMDriver" |
Name of driver for use in message printing. More... | |
static const iocshArg | initArg0 = { "portName", iocshArgString} |
A name for the asyn driver instance we will create - used to refer to it from EPICS DB files. More... | |
static const iocshArg | initArg1 = { "configSection", iocshArgString} |
section name of configFile we will load settings from More... | |
static const iocshArg | initArg2 = { "configFile", iocshArgString} |
Path to the XML input file to load configuration information from. More... | |
static const iocshArg | initArg3 = { "host", iocshArgString} |
host name where LabVIEW is running ("" for localhost) More... | |
static const iocshArg | initArg4 = { "options", iocshArgInt} |
options as per lvDCOMOptions enum More... | |
static const iocshArg | initArg5 = { "progid", iocshArgString} |
(optional) DCOM ProgID (required if connecting to a compiled LabVIEW application) More... | |
static const iocshArg | initArg6 = { "username", iocshArgString} |
(optional) remote username for host More... | |
static const iocshArg | initArg7 = { "password", iocshArgString} |
(optional) remote password for username on host More... | |
static const iocshArg | initArgSECI0 = { "portName", iocshArgString} |
A name for the asyn driver instance we will create - used to refer to it from EPICS DB files. More... | |
static const iocshArg | initArgSECI1 = { "macros", iocshArgString} |
macros to substitute when generating dbSubFile More... | |
static const iocshArg | initArgSECI2 = { "configSection", iocshArgString} |
section name of configFile to write settings to More... | |
static const iocshArg | initArgSECI3 = { "configFile", iocshArgString} |
Path to the XML output file name to write configuration information to. More... | |
static const iocshArg | initArgSECI4 = { "dbSubFile", iocshArgString} |
Path to the epics db substitution file to generate. More... | |
static const iocshArg | initArgSECI5 = { "host", iocshArgString} |
host name where LabVIEW is running ("" for localhost) More... | |
static const iocshArg | initArgSECI6 = { "options", iocshArgInt} |
options as per lvDCOMOptions enum More... | |
static const iocshArg | initArgSECI7 = { "blocks_match", iocshArgString} |
(optional) PCRE expression for blocks to match, default: all More... | |
static const iocshArg | initArgSECI8 = { "progid", iocshArgString} |
(optional) DCOM ProgID (required if connecting to a compiled LabVIEW application) More... | |
static const iocshArg | initArgSECI9 = { "username", iocshArgString} |
(optional) remote username for host More... | |
static const iocshArg | initArgSECI10 = { "password", iocshArgString} |
(optional) remote password for username on host More... | |
static const iocshArg *const | initArgs [] |
static const iocshArg *const | initArgsSECI [] |
static const iocshFuncDef | initFuncDef = { "lvDCOMConfigure", sizeof(initArgs) / sizeof(iocshArg*), initArgs} |
static const iocshFuncDef | initFuncDefSECI = { "lvDCOMSECIConfigure", sizeof(initArgsSECI) / sizeof(iocshArg*), initArgsSECI} |
Implementation of lvDCOMDriver class and lvDCOMConfigure() iocsh command.
Definition in file lvDCOMDriver.cpp.
epicsExportRegistrar | ( | lvDCOMRegister | ) |
|
static |
Definition at line 482 of file lvDCOMDriver.cpp.
References lvDCOMConfigure().
Referenced by lvDCOMRegister().
|
static |
Definition at line 487 of file lvDCOMDriver.cpp.
References lvDCOMSECIConfigure().
Referenced by lvDCOMRegister().
int lvDCOMConfigure | ( | const char * | portName, |
const char * | configSection, | ||
const char * | configFile, | ||
const char * | host, | ||
int | options, | ||
const char * | progid, | ||
const char * | username, | ||
const char * | password | ||
) |
EPICS iocsh callable function to call constructor of lvDCOMInterface().
The function is registered via lvDCOMRegister().
[in] | portName | A name for the asyn driver instance we will create - used to refer to it from EPICS DB files. |
[in] | configSection | section name of configFile we will load settings from |
[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 367 of file lvDCOMDriver.cpp.
References registerStructuredExceptionHandler().
Referenced by initCallFunc(), and lvDCOMSECIConfigure().
|
static |
Register new commands with EPICS IOC shell.
Definition at line 493 of file lvDCOMDriver.cpp.
References initCallFunc(), and initCallFuncSECI().
int lvDCOMSECIConfigure | ( | const char * | portName, |
const char * | macros, | ||
const char * | configSection, | ||
const char * | configFile, | ||
const char * | dbSubFile, | ||
const char * | host, | ||
int | options, | ||
const char * | blocks_match, | ||
const char * | progid, | ||
const char * | username, | ||
const char * | password | ||
) |
A name for the asyn driver instance we will create - used to refer to it from EPICS DB files.
[in] | portName | |
[in] | macros | macros to substitute when generating dbSubFile |
[in] | configSection | section name of configFile to write settings to |
[in] | configFile | Path to the XML output file name to write configuration information to. |
[in] | dbSubFile | Path to the epics db substitution file to generate. |
[in] | host | host name where LabVIEW is running ("" for localhost) |
[in] | options | options as per lvDCOMOptions enum |
[in] | blocks_match | (optional) PCRE expression for blocks to match, default: all |
[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 404 of file lvDCOMDriver.cpp.
References lvDCOMInterface::generateFilesFromSECI(), lvDCOMConfigure(), lvNoStart, lvSECIConfig, lvSECINoSetter, and registerStructuredExceptionHandler().
Referenced by initCallFuncSECI().
|
static |
Register a handler for Win32 structured exceptions. This needs to be done on a per thread basis.
Definition at line 47 of file lvDCOMDriver.cpp.
References seTransFunction().
Referenced by lvDCOMConfigure(), lvDCOMSECIConfigure(), lvDCOMDriver::lvDCOMTask(), lvDCOMDriver::readArray(), lvDCOMDriver::readOctet(), lvDCOMDriver::readValue(), lvDCOMDriver::writeOctet(), and lvDCOMDriver::writeValue().
|
static |
Function to translate a Win32 structured exception into a standard C++ exception.
This is registered via registerStructuredExceptionHandler()
Definition at line 41 of file lvDCOMDriver.cpp.
Referenced by registerStructuredExceptionHandler().
|
static |
Name of driver for use in message printing.
Definition at line 37 of file lvDCOMDriver.cpp.
Referenced by lvDCOMDriver::lvDCOMDriver(), lvDCOMDriver::readArray(), lvDCOMDriver::readOctet(), lvDCOMDriver::readValue(), lvDCOMDriver::writeOctet(), and lvDCOMDriver::writeValue().
|
static |
A name for the asyn driver instance we will create - used to refer to it from EPICS DB files.
Definition at line 437 of file lvDCOMDriver.cpp.
|
static |
section name of configFile we will load settings from
Definition at line 438 of file lvDCOMDriver.cpp.
|
static |
Path to the XML input file to load configuration information from.
Definition at line 439 of file lvDCOMDriver.cpp.
|
static |
host name where LabVIEW is running ("" for localhost)
Definition at line 440 of file lvDCOMDriver.cpp.
|
static |
options as per lvDCOMOptions enum
Definition at line 441 of file lvDCOMDriver.cpp.
|
static |
(optional) DCOM ProgID (required if connecting to a compiled LabVIEW application)
Definition at line 442 of file lvDCOMDriver.cpp.
|
static |
(optional) remote username for host
Definition at line 443 of file lvDCOMDriver.cpp.
|
static |
(optional) remote password for username on host
Definition at line 444 of file lvDCOMDriver.cpp.
|
static |
Definition at line 458 of file lvDCOMDriver.cpp.
|
static |
A name for the asyn driver instance we will create - used to refer to it from EPICS DB files.
Definition at line 446 of file lvDCOMDriver.cpp.
|
static |
macros to substitute when generating dbSubFile
Definition at line 447 of file lvDCOMDriver.cpp.
|
static |
(optional) remote password for username on host
Definition at line 456 of file lvDCOMDriver.cpp.
|
static |
section name of configFile to write settings to
Definition at line 448 of file lvDCOMDriver.cpp.
|
static |
Path to the XML output file name to write configuration information to.
Definition at line 449 of file lvDCOMDriver.cpp.
|
static |
Path to the epics db substitution file to generate.
Definition at line 450 of file lvDCOMDriver.cpp.
|
static |
host name where LabVIEW is running ("" for localhost)
Definition at line 451 of file lvDCOMDriver.cpp.
|
static |
options as per lvDCOMOptions enum
Definition at line 452 of file lvDCOMDriver.cpp.
|
static |
(optional) PCRE expression for blocks to match, default: all
Definition at line 453 of file lvDCOMDriver.cpp.
|
static |
(optional) DCOM ProgID (required if connecting to a compiled LabVIEW application)
Definition at line 454 of file lvDCOMDriver.cpp.
|
static |
(optional) remote username for host
Definition at line 455 of file lvDCOMDriver.cpp.
|
static |
Definition at line 467 of file lvDCOMDriver.cpp.
|
static |
Definition at line 479 of file lvDCOMDriver.cpp.
|
static |
Definition at line 480 of file lvDCOMDriver.cpp.