ISIS Logo
NINetVar
An EPICS support module to export National Instruments Network Shared Variables as process variables
Functions | Variables
NINetVarDriver.cpp File Reference

Implementation of NINetVarDriver class and NINetVarConfigure() iocsh command. More...

#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <math.h>
#include <exception>
#include <iostream>
#include <shareLib.h>
#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 <windows.h>
#include "convertToString.h"
#include "NINetVarInterface.h"
#include "NINetVarDriver.h"
#include <epicsExport.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 NINetVarConfigure (const char *portName, const char *configSection, const char *configFile, int pollPeriod, int options)
 EPICS iocsh callable function to call constructor of NINetVarInterface(). More...
 
static void initCallFunc (const iocshArgBuf *args)
 
static void NINetVarRegister (void)
 Register new commands with EPICS IOC shell. More...
 
 epicsExportRegistrar (NINetVarRegister)
 

Variables

static const char * driverName ="NINetVarDriver"
 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 = { "pollPeriod", iocshArgInt}
 poll period (ms) More...
 
static const iocshArg initArg4 = { "options", iocshArgInt}
 options as per NINetVarOptions enum More...
 
static const iocshArg *const initArgs []
 
static const iocshFuncDef initFuncDef = {"NINetVarConfigure", sizeof(initArgs) / sizeof(iocshArg*), initArgs}
 

Detailed Description

Implementation of NINetVarDriver class and NINetVarConfigure() iocsh command.

Author
Freddie Akeroyd, STFC ISIS Facility, GB

Definition in file NINetVarDriver.cpp.

Function Documentation

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

Definition at line 388 of file NINetVarDriver.cpp.

References NINetVarConfigure().

Referenced by NINetVarRegister().

int NINetVarConfigure ( const char *  portName,
const char *  configSection,
const char *  configFile,
int  pollPeriod,
int  options 
)

EPICS iocsh callable function to call constructor of NINetVarInterface().

The function is registered via NINetVarRegister().

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]pollPeriodpoll period (ms)
[in]optionsoptions as per NINetVarOptions enum
Examples:
st.cmd.

Definition at line 347 of file NINetVarDriver.cpp.

References registerStructuredExceptionHandler().

Referenced by initCallFunc().

static void NINetVarRegister ( void  )
static

Register new commands with EPICS IOC shell.

Definition at line 394 of file NINetVarDriver.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 57 of file NINetVarDriver.cpp.

References seTransFunction().

Referenced by NINetVarConfigure(), NINetVarDriver::NINetVarTask(), NINetVarDriver::readArrayValue(), NINetVarDriver::writeArrayValue(), NINetVarDriver::writeOctet(), and NINetVarDriver::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 51 of file NINetVarDriver.cpp.

Referenced by registerStructuredExceptionHandler().

Variable Documentation

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

The name of the asyn driver port we will create.

Definition at line 374 of file NINetVarDriver.cpp.

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

section name of configFile to use to configure this asyn port

Definition at line 375 of file NINetVarDriver.cpp.

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

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

Definition at line 376 of file NINetVarDriver.cpp.

const iocshArg initArg3 = { "pollPeriod", iocshArgInt}
static

poll period (ms)

Definition at line 377 of file NINetVarDriver.cpp.

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

options as per NINetVarOptions enum

Definition at line 378 of file NINetVarDriver.cpp.

const iocshArg* const initArgs[]
static
Initial value:
= { &initArg0,
static const iocshArg initArg4
options as per NINetVarOptions enum
static const iocshArg initArg3
poll period (ms)
static const iocshArg initArg0
The name of the asyn driver port we will create.
static const iocshArg initArg1
section name of configFile to use to configure this asyn port
static const iocshArg initArg2
Path to the XML input file to load configuration information from.

Definition at line 380 of file NINetVarDriver.cpp.

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

Definition at line 386 of file NINetVarDriver.cpp.

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