ISIS Logo
NetShrVar
An EPICS support module to export National Instruments Network Shared Variables as process variables
Classes | Macros | Functions | Variables
NetShrVarInterface.cpp File Reference

Implementation of NetShrVarInterface class. More...

#include <stdio.h>
#include <math.h>
#include <unistd.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <stdexcept>
#include <sstream>
#include <fstream>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <limits>
#include <cvirte.h>
#include <userint.h>
#include <cvinetv.h>
#include <shareLib.h>
#include <macLib.h>
#include <epicsGuard.h>
#include <epicsString.h>
#include <errlog.h>
#include <cantProceed.h>
#include <epicsTime.h>
#include <alarm.h>
#include "pugixml.hpp"
#include "asynPortDriver.h"
#include <epicsExport.h>
#include "NetShrVarInterface.h"
#include "cnvconvert.h"

Go to the source code of this file.

Classes

struct  lv_timestamp
 
class  NetShrVarException
 An STL exception object encapsulating a shared variable error message. More...
 
class  ScopedCNVData
 A CNVData item that automatically "disposes" itself. More...
 
struct  NvItem
 details about a network shared variable we have connected to an asyn parameter More...
 
struct  CallbackData
 Stores information to be passed back via a shared variable callback on a subscriber connection. More...
 

Macros

#define MAX_PATH_LEN   256
 
#define ERROR_CHECK(__func, __code)
 
#define ERROR_PRINT_CONTINUE(__func, __code)
 

Functions

static const char * connectionStatus (CNVConnectionStatus status)
 connection status of a network shared variable More...
 
static void CVICALLBACK DataCallback (void *handle, CNVData data, void *callbackData)
 called when new data is available on a subscriber connection More...
 
static void CVICALLBACK StatusCallback (void *handle, CNVConnectionStatus status, int error, void *callbackData)
 called when status of a network shared variable changes More...
 
static void CVICALLBACK DataTransferredCallback (void *handle, int error, void *callbackData)
 called when data has been transferred to the variable More...
 
static const char * getBrowseType (CNVBrowseType browseType)
 
static std::string dataQuality (CNVDataQuality quality)
 the quality of the data in a network shared variable More...
 
static void convertLabviewTimeToEpicsTime (const uint64_t *lv_time, epicsTimeStamp *epicsTS)
 
static void initCV (void *)
 

Variables

static const char * driverName ="NetShrVarInterface"
 Name of driver for use in message printing. More...
 
static epicsThreadOnceId onceId = EPICS_THREAD_ONCE_INIT
 

Detailed Description

Implementation of NetShrVarInterface class.

Author
Freddie Akeroyd, STFC ISIS Facility, GB

Definition in file NetShrVarInterface.cpp.

Macro Definition Documentation

#define ERROR_CHECK (   __func,
  __code 
)
#define ERROR_PRINT_CONTINUE (   __func,
  __code 
)
Value:
if (__code < 0) \
{ \
std::cerr << NetShrVarException::ni_message(__func, __code); \
continue; \
}
static std::string ni_message(const std::string &function, int code)

Definition at line 85 of file NetShrVarInterface.cpp.

Referenced by NetShrVarInterface::connectVars().

#define MAX_PATH_LEN   256

Function Documentation

static const char* connectionStatus ( CNVConnectionStatus  status)
static

connection status of a network shared variable

Definition at line 93 of file NetShrVarInterface.cpp.

Referenced by NvItem::report(), and NetShrVarInterface::statusCallback().

static void convertLabviewTimeToEpicsTime ( const uint64_t *  lv_time,
epicsTimeStamp *  epicsTS 
)
static

Definition at line 638 of file NetShrVarInterface.cpp.

Referenced by NetShrVarInterface::updateParamArrayValue().

static void CVICALLBACK DataCallback ( void *  handle,
CNVData  data,
void *  callbackData 
)
static

called when new data is available on a subscriber connection

Definition at line 517 of file NetShrVarInterface.cpp.

References NetShrVarInterface::dataCallback(), and CallbackData::intf.

Referenced by NetShrVarInterface::connectVars().

static std::string dataQuality ( CNVDataQuality  quality)
static

the quality of the data in a network shared variable

Definition at line 478 of file NetShrVarInterface.cpp.

Referenced by NetShrVarInterface::updateParamCNV().

static void CVICALLBACK DataTransferredCallback ( void *  handle,
int  error,
void *  callbackData 
)
static

called when data has been transferred to the variable

Definition at line 496 of file NetShrVarInterface.cpp.

References NetShrVarInterface::dataTransferredCallback(), and CallbackData::intf.

Referenced by NetShrVarInterface::connectVars().

static const char* getBrowseType ( CNVBrowseType  browseType)
static

Definition at line 264 of file NetShrVarInterface.cpp.

Referenced by NetShrVarInterface::pathExists().

static void initCV ( void *  )
static

Definition at line 1093 of file NetShrVarInterface.cpp.

Referenced by NetShrVarInterface::NetShrVarInterface().

static void CVICALLBACK StatusCallback ( void *  handle,
CNVConnectionStatus  status,
int  error,
void *  callbackData 
)
static

called when status of a network shared variable changes

Definition at line 1067 of file NetShrVarInterface.cpp.

References CallbackData::intf, and NetShrVarInterface::statusCallback().

Referenced by NetShrVarInterface::connectVars().

Variable Documentation

const char* driverName ="NetShrVarInterface"
static

Name of driver for use in message printing.

Definition at line 59 of file NetShrVarInterface.cpp.

Referenced by NetShrVarInterface::initAsynParamIds().

epicsThreadOnceId onceId = EPICS_THREAD_ONCE_INIT
static

Definition at line 1091 of file NetShrVarInterface.cpp.

Referenced by NetShrVarInterface::NetShrVarInterface().

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