ISIS Logo
lvDCOM
An EPICS support module to export LabVIEW values as process variables
Functions | Variables
lvDCOMDriver.cpp File Reference

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}
 

Detailed Description

Implementation of lvDCOMDriver class and lvDCOMConfigure() iocsh command.

Author
Freddie Akeroyd, STFC ISIS Facility, GB

Definition in file lvDCOMDriver.cpp.

Function Documentation

epicsExportRegistrar ( lvDCOMRegister  )
static void initCallFunc ( const iocshArgBuf *  args)
static

Definition at line 482 of file lvDCOMDriver.cpp.

References lvDCOMConfigure().

Referenced by lvDCOMRegister().

static void initCallFuncSECI ( const iocshArgBuf *  args)
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().

Parameters
[in]portNameA name for the asyn driver instance we will create - used to refer to it from EPICS DB files.
[in]configSectionsection name of configFile we will load settings from
[in]configFilePath to the XML input file to load configuration information from.
[in]hosthost name where LabVIEW is running ("" for localhost)
[in]optionsoptions 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
Examples:
lvDCOMinput.xsd, lvinput.xml, lvstrings2input.xsl, and st.cmd.

Definition at line 367 of file lvDCOMDriver.cpp.

References registerStructuredExceptionHandler().

Referenced by initCallFunc(), and lvDCOMSECIConfigure().

static void lvDCOMRegister ( void  )
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.

Parameters
[in]portName
[in]macrosmacros to substitute when generating dbSubFile
[in]configSectionsection name of configFile to write settings to
[in]configFilePath to the XML output file name to write configuration information to.
[in]dbSubFilePath to the epics db substitution file to generate.
[in]hosthost name where LabVIEW is running ("" for localhost)
[in]optionsoptions 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 void registerStructuredExceptionHandler ( )
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 void seTransFunction ( unsigned int  u,
EXCEPTION_POINTERS *  pExp 
)
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().

Variable Documentation

const char* driverName ="lvDCOMDriver"
static
const iocshArg initArg0 = { "portName", iocshArgString}
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.

const iocshArg initArg1 = { "configSection", iocshArgString}
static

section name of configFile we will load settings from

Definition at line 438 of file lvDCOMDriver.cpp.

const iocshArg initArg2 = { "configFile", iocshArgString}
static

Path to the XML input file to load configuration information from.

Definition at line 439 of file lvDCOMDriver.cpp.

const iocshArg initArg3 = { "host", iocshArgString}
static

host name where LabVIEW is running ("" for localhost)

Definition at line 440 of file lvDCOMDriver.cpp.

const iocshArg initArg4 = { "options", iocshArgInt}
static

options as per lvDCOMOptions enum

Definition at line 441 of file lvDCOMDriver.cpp.

const iocshArg initArg5 = { "progid", iocshArgString}
static

(optional) DCOM ProgID (required if connecting to a compiled LabVIEW application)

Definition at line 442 of file lvDCOMDriver.cpp.

const iocshArg initArg6 = { "username", iocshArgString}
static

(optional) remote username for host

Definition at line 443 of file lvDCOMDriver.cpp.

const iocshArg initArg7 = { "password", iocshArgString}
static

(optional) remote password for username on host

Definition at line 444 of file lvDCOMDriver.cpp.

const iocshArg* const initArgs[]
static
Initial value:
= { &initArg0,
static const iocshArg initArg2
Path to the XML input file to load configuration information from.
static const iocshArg initArg0
A name for the asyn driver instance we will create - used to refer to it from EPICS DB files...
static const iocshArg initArg3
host name where LabVIEW is running (&quot;&quot; for localhost)
static const iocshArg initArg1
section name of configFile we will load settings from
static const iocshArg initArg6
(optional) remote username for host
static const iocshArg initArg5
(optional) DCOM ProgID (required if connecting to a compiled LabVIEW application) ...
static const iocshArg initArg7
(optional) remote password for username on host
static const iocshArg initArg4
options as per lvDCOMOptions enum

Definition at line 458 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI0 = { "portName", iocshArgString}
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.

const iocshArg initArgSECI1 = { "macros", iocshArgString}
static

macros to substitute when generating dbSubFile

Definition at line 447 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI10 = { "password", iocshArgString}
static

(optional) remote password for username on host

Definition at line 456 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI2 = { "configSection", iocshArgString}
static

section name of configFile to write settings to

Definition at line 448 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI3 = { "configFile", iocshArgString}
static

Path to the XML output file name to write configuration information to.

Definition at line 449 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI4 = { "dbSubFile", iocshArgString}
static

Path to the epics db substitution file to generate.

Definition at line 450 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI5 = { "host", iocshArgString}
static

host name where LabVIEW is running ("" for localhost)

Definition at line 451 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI6 = { "options", iocshArgInt}
static

options as per lvDCOMOptions enum

Definition at line 452 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI7 = { "blocks_match", iocshArgString}
static

(optional) PCRE expression for blocks to match, default: all

Definition at line 453 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI8 = { "progid", iocshArgString}
static

(optional) DCOM ProgID (required if connecting to a compiled LabVIEW application)

Definition at line 454 of file lvDCOMDriver.cpp.

const iocshArg initArgSECI9 = { "username", iocshArgString}
static

(optional) remote username for host

Definition at line 455 of file lvDCOMDriver.cpp.

const iocshArg* const initArgsSECI[]
static
Initial value:
static const iocshArg initArgSECI9
(optional) remote username for host
static const iocshArg initArgSECI1
macros to substitute when generating dbSubFile
static const iocshArg initArgSECI7
(optional) PCRE expression for blocks to match, default: all
static const iocshArg initArgSECI2
section name of configFile to write settings to
static const iocshArg initArgSECI0
A name for the asyn driver instance we will create - used to refer to it from EPICS DB files...
static const iocshArg initArgSECI4
Path to the epics db substitution file to generate.
static const iocshArg initArgSECI5
host name where LabVIEW is running (&quot;&quot; for localhost)
static const iocshArg initArgSECI10
(optional) remote password for username on host
static const iocshArg initArgSECI3
Path to the XML output file name to write configuration information to.
static const iocshArg initArgSECI6
options as per lvDCOMOptions enum
static const iocshArg initArgSECI8
(optional) DCOM ProgID (required if connecting to a compiled LabVIEW application) ...

Definition at line 467 of file lvDCOMDriver.cpp.

const iocshFuncDef initFuncDef = { "lvDCOMConfigure", sizeof(initArgs) / sizeof(iocshArg*), initArgs}
static

Definition at line 479 of file lvDCOMDriver.cpp.

const iocshFuncDef initFuncDefSECI = { "lvDCOMSECIConfigure", sizeof(initArgsSECI) / sizeof(iocshArg*), initArgsSECI}
static

Definition at line 480 of file lvDCOMDriver.cpp.

Copyright © 2013 Science and Technology Facilities Council | Generated by   doxygen 1.8.5