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 <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 strcutured 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...
 
static void initCallFunc (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}
 The name of the asyn driver port we will create. More...
 
static const iocshArg initArg1 = { "configSection", iocshArgString}
 section name of configFile to use to configure this asyn port 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 *const initArgs []
 
static const iocshFuncDef initFuncDef = {"lvDCOMConfigure", sizeof(initArgs) / sizeof(iocshArg*), initArgs}
 

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 395 of file lvDCOMDriver.cpp.

References lvDCOMConfigure().

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]portNameThe name of the asyn driver port we will create.
[in]configSectionsection name of configFile to use to configure this asyn port
[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, and st.cmd.

Definition at line 347 of file lvDCOMDriver.cpp.

References registerStructuredExceptionHandler().

Referenced by initCallFunc().

static void lvDCOMRegister ( void  )
static

Register new commands with EPICS IOC shell.

Definition at line 401 of file lvDCOMDriver.cpp.

References initCallFunc().

static void registerStructuredExceptionHandler ( )
static

Register a handler for Win32 strcutured exceptions. This needs to be done on a per thread basis.

Definition at line 46 of file lvDCOMDriver.cpp.

References seTransFunction().

Referenced by lvDCOMConfigure(), 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 40 of file lvDCOMDriver.cpp.

Referenced by registerStructuredExceptionHandler().

Variable Documentation

const char* driverName ="lvDCOMDriver"
static
const iocshArg initArg0 = { "portName", iocshArgString}
static

The name of the asyn driver port we will create.

Definition at line 375 of file lvDCOMDriver.cpp.

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

section name of configFile to use to configure this asyn port

Definition at line 376 of file lvDCOMDriver.cpp.

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

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

Definition at line 377 of file lvDCOMDriver.cpp.

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

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

Definition at line 378 of file lvDCOMDriver.cpp.

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

options as per lvDCOMOptions enum

Definition at line 379 of file lvDCOMDriver.cpp.

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

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

Definition at line 380 of file lvDCOMDriver.cpp.

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

(optional) remote username for host

Definition at line 381 of file lvDCOMDriver.cpp.

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

(optional) remote password for username on host

Definition at line 382 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
The name of the asyn driver port we will create.
static const iocshArg initArg3
host name where LabVIEW is running (&quot;&quot; for localhost)
static const iocshArg initArg1
section name of configFile to use to configure this asyn port
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 384 of file lvDCOMDriver.cpp.

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

Definition at line 393 of file lvDCOMDriver.cpp.