HandleHelper Class Reference

#include <handleHelper.h>

Inheritance diagram for HandleHelper:
Helper

List of all members.

Classes

struct  etsDate
struct  etsNorm

Public Member Functions

 HandleHelper ()
 ~HandleHelper ()
int setSTS (unsigned int _handle, dbr_short_t a, dbr_short_t s, epicsTimeStamp ets)
 Sets the alarm, severity ts in conduit (used by get method WITH_CALLBACK).
int checkConsistency ()
 Checks what's in the hash table against actual ca server data
Do for all handles.
int checkConsistency (unsigned int _handle)
 Checks what's in the hash table against actual ca server data.
int setChannelDeviceAttribute (std::string deliminator)
 Given the deliminator, sets the device/attribute components of the epics channel, for all handles.
int setChannelDeviceAttribute (unsigned int _handle, std::string deliminator)
 Given the deliminator, sets the device/attribute components of the epics channel for a givem handle.
int getChannelDevice (unsigned int _handle, std::string &device)
 Retrieves device name for a given handle.
int getChannelAttribute (unsigned int _handle, std::string &attribute)
 Retrieves attribute name for a given handle.
int getChannelRegalia (unsigned int _handle, ChannelRegalia &channelInfo)
 Retrieves channel meta deta held in the ChannelRegalia object.
ca_client_context * getContextFromPV (const char *_pv)
 Retrieves context for a first matching of this process variable.
ca_client_context * getContextFromHandle (unsigned int _handle)
 Retrieves the ca_client_context for first matching of handle.
const char * getPVFromHandle (unsigned int _handle)
 Retrieves the process variable from a given handle.
const char * getPVFromHandle (unsigned int _handle, ca_client_context *ccc)
 Retrieves the process variable from a given handle.
unsigned int getHandleFromPV (const char *_pv)
 Retrieves handle for a given process variable.
unsigned int getHandleFromPV (const char *_pv, ca_client_context *ccc)
 Retrieves handle for a given process variable.
unsigned int getHandleFromPVAlias (const char *_pv)
 Retrieves handle for a given process variable.
unsigned int getHandleFromPVAlias (const char *_pv, ca_client_context *ccc)
 Retrieves handle for a given process variable alias.
vector< unsigned intgetHandlesFromWithinGroupV (unsigned int gh)
 Retrieves all handles belonging to a group referenced by its groupHandle.
unsigned intgetHandlesFromWithinGroup (unsigned int gh)
 Retrieves all handles belonging to a group referenced by its groupHandle.
unsigned int getHandleFromPVWithinGroup (const char *_pv, unsigned int gh)
 Retrieves handle for a given process variable with a CAFE group.
unsigned int getHandleFromPVWithinGroup (const char *_pv, ca_client_context *ccc, unsigned int gh)
 Retrieves handle for a given process variable with a CAFE group within a give ca context.
int getStatus (unsigned int h)
 Retrieves last cached status information for given handle.
int getTimeStamp (unsigned int h, epicsTimeStamp &ts)
 Retrieves last cached timestamp information for given handle.
etsNorm getEpicsTimeStampAsUInt32 (unsigned int h)
etsDate getEpicsTimeStampAsDate (unsigned int h)
etsDate epicsTimeStampToDate (epicsTimeStamp ts)
int getPulseID (unsigned int h, unsigned int &pulseID)
unsigned int getPulseIDFromTS (epicsTimeStamp ts)
int getAlarmStatusSeverity (unsigned int h, dbr_short_t as[2])
 Retrieves last cached status information for given handle.
int getAlarmStatusSeverityAsString (unsigned int h, string asas[2])
 Retrieves last cached status information for given handle.
unsigned int getNoHandles ()
 Retrieves the total number of handled.
unsigned int getNextFreeHandle ()
 Retrieves the next available handle.
bool isChannelConnected (unsigned int handle)
 Method returns true if channel is connected, else false.
int printHandle (unsigned int h)
 Prints Conduit member values for all given handle.
int printHandlesV (vector< unsigned int > handleV)
 Prints Conduit member values for all given handles.
int printHandles (unsigned int *handleArray, unsigned int nHandles)
 Prints Conduit member values for all given handles.
unsigned int printHandles ()
 Prints Conduit member values for all Conduit objects (handles).
unsigned int printChannels ()
unsigned int printDisconnectedHandles ()
 Prints Conduit member values for all disconnected CAFEConduit objects (handles).
unsigned int printDisconnectedChannels ()
unsigned int getDisconnectedHandles (vector< unsigned int > &, vector< string > &)
 Retrieves a list of disconnected PVs and their handles.
unsigned int getConnectedHandles (vector< unsigned int > &, vector< string > &)
 Retrieves a list of connected PVs and their handles.
unsigned int getHandles (vector< unsigned int > &, vector< string > &)
 Retrieves a list of handles and PVs, whether connected or disconnected.
unsigned int getHandleStates (vector< unsigned int > &, vector< string > &, vector< unsigned short > &)
 Retrieves a list of handles and PVs, whether connected or disconnected.
unsigned int printMonitors ()
 Prints Conduit member values for all Conduit objects (handles) that have a monitor.
vector< unsigned intgetHandlesWithMonitors ()
 Return a vector of handles that have monitors If a handle has n monitors it appears n time in the return vector. Monitors in waiting are als included in the count.
int getMonitorHandlesAndActions (vector< unsigned int > &handleV, vector< string > &actionV)
 HandleHelper::getMonitorHandlesAndActions retrieves list of handles and their actions to perform on change of value
.
int setCafeDbrTypeV (vector< unsigned int > _handleV, CAFENUM::DBR_TYPE cdt)
 Sets the cafeDbrType (e.g. DBR_TIME) and associated dbrDataTpe (e.g. DBR_TIME_zzz).
int setCafeDbrType (unsigned int _handle, CAFENUM::DBR_TYPE cdt)
 Sets the cafeDbrType (e.g. DBR_TIME) and associated dbrDataTpe (e.g. DBR_TIME_zzz).
int getCafeDbrType (unsigned int _handle, CAFENUM::DBR_TYPE &cdt)
 Gets the cafeDbrType (e.g. DBR_TIME).
bool isEnum (unsigned int _handle)
 Retrieves whether pv is of enumerated type.
short getEnumFromString (unsigned int _handle, string enumStringValue)
 Retrieves enum unsigned short state of enumerated string type.
string getStringFromEnum (unsigned int _handle, unsigned short enumValue)
int getDataTypeNative (unsigned int _handle, chtype &ndt)
 Retrieves the native data type from ChannelRegalia object.
int getDataTypeRequest (unsigned int _handle, chtype &rdt)
 Gets the dataType requested (e.g. DBR_STRING etc.).
int eraseMonitorAction (unsigned int _handle)
 HandleHelper::eraseMonitorAction
.
int clearMonitorAction (unsigned int _handle)
 HandleHelper::clearMonitorAction
.
int clearMonitorAction ()
 HandleHelper::clearMonitorAction for all handles
.
int addMonitorAction (unsigned int _handle, string mAction)
 HandleHelper::addMonitorAction
.
int getMonitorAction (unsigned int _handle, vector< string > &msV)
 HandleHelper::getMonitorAction.
vector< string > getMonitorAction (bool onlyIfNewData)
 HandleHelper::getMonitorAction retrieves list of actions to perform on change of value
If input boolean is true; then only oustantanding actions are listed.
int getMonitorPolicyVector (unsigned int _handle, vector< MonitorPolicy > &mpV)
 Gets the MonitorPolicyVector.
int getMonitorPolicyInWaitingVector (unsigned int _handle, vector< MonitorPolicy > &mpV)
 Gets the MonitorPolicyVector.
int getNmonitor (unsigned int _handle)
 Gets Number of MonitorPolicyVectors.
int getNmonitorData (unsigned int _handle)
 Gets Number of MonitorPolicyVectors for <= DBR_TIME type.
int getNmonitorCtrl (unsigned int _handle)
 Gets Number of MonitorPolicyVectors for CTRL_ type.
vector< unsigned intgetMonitorIDs (unsigned int _handle)
 Gets vector of MonitorIDs.
vector< unsigned intgetMonitorIDsInWaiting (unsigned int _handle)
 Gets vector of MonitorIDs in waiting (value=0), i.e., waiting for channel connection.
unsigned int getUsrArgsAsUInt (unsigned int _handle)
 Gets the user arg as uint in event callback; meant for retrieving the current monitor ID.
chtype getDataTypeCB (unsigned int _handle)
 Gets the datatype of handle from within the callback function.
chtype getDbrDataTypeCB (unsigned int _handle)
 Gets the dbrdatatype of handle from within the callback function.
CAFENUM::DBR_TYPE getCafeDbrTypeCB (unsigned int _handle)
 Gets the cafeDbrType of handle from within the callback function.
int setNelem ()
 Sets the no of elements to read out from an array, e.g. waveform, to native value for all handles.
unsigned int setNelem (unsigned int _handle)
 Sets the no of elements to read out from an array, e.g. waveform, to native value.
unsigned int setNelemToNative (unsigned int _handle)
unsigned int setNelem (unsigned int _handle, unsigned int _nelem)
 Sets the no of elements to read out from an array, e.g. waveform.
unsigned int setNelemToRetrieveFromCache (unsigned int _handle)
 Sets the no of elements to read out from an cached array to native value, e.g. waveform.
unsigned int setNelemToRetrieveFromCache (unsigned int _handle, unsigned int _nelem)
 Sets the no of elements to read out from an cached array, e.g. waveform.
unsigned int setNelemToRetrieveFromCtrlCache (unsigned int _handle)
 Sets the no of elements to read out from an cached array to min(native, ) value, e.g. waveform.
unsigned int setNelemToRetrieveFromCtrlCache (unsigned int _handle, unsigned int _nelem)
 Sets the no of elements to read out from an cached array, e.g. waveform.
unsigned int getNelemToRetrieveFromCache (unsigned int _handle)
 Gets the no of elements to be read out from a cached array, e.g. waveform.
unsigned int getNelemToRetrieveFromCtrlCache (unsigned int _handle)
 Gets the no of elements to be read out from a cached array, e.g. waveform.
char * getPV (unsigned int _handle)
char * getPVAlias (unsigned int _handle)
unsigned int getNelemClient (unsigned int _handle)
 Retrieves the no of elements to read out from an array, e.g. waveform as requested by client.
unsigned int getNelemNative (unsigned int _handle)
 Retrieves the no of native elements.
unsigned int getNelemRequest (unsigned int _handle)
 Retrieves the no of elements to read out from an array, e.g. waveform as delivered to ca.
int getNelem (unsigned int _handle, unsigned int &c, unsigned int &n, unsigned int &r)
 Retrieves the no of elements as initiated by client, no of native elements, no of elements requested to ca.
unsigned int setNelemCtrl (unsigned int _handle, unsigned int _nelem)
 Sets the no of elements to read out from an array, e.g. waveform, via DBR_CTRL.
unsigned int getNelemRequestCtrl (unsigned int _handle)
 Retrieves the no of elements read out from an array e.g. waveform, as delivered to ca through DBR_CTRL.
unsigned int getNelemClientCtrl (unsigned int _handle)
 Retrieves the no of elements read out from an array e.g. waveform, as delivered to ca through DBR_CTRL.
unsigned int setOffset (unsigned int _handle, unsigned int _offset)
 Sets the offset; give element no from which data should be returned.
unsigned int getOffset (unsigned int _handle)
 Retrieves the offset; gives element no from which data should be returned.
unsigned int getOffsetLast (unsigned int _handle)
 Retrieves the last offset; gives element no from which data was actually returned.
void setFirstAndLastArrayElements (unsigned int _handle, unsigned int _start, unsigned int _last)
unsigned int getGroupHandleFromGroupName (const char *_groupName)
unsigned int getGroupHandleFromGroupName (const char *_groupName, ca_client_context *ccc)
 Retrieves groupHandle from groupName from within a given ca context.
string getGroupNameFromGroupHandle (unsigned int groupHandle)
 Retrieves groupName from grouphanlde.
unsigned int getGroupNPV (unsigned int gHandle)
 Retrieves number of process variables within a group as identified by the groupHandle.
unsigned int getGroupNPV (const char *_groupName, ca_client_context *ccc)
 Retrieves number of process variables within a group for a given ca client context.
unsigned int getGroupNPV (const char *_groupName)
void removeLeadingAndTrailingSpacesDbrString (const char *_pv, char pvStripped[MAX_STRING_SIZE])
 Removes leading and trailing blanks.
void removeLeadingAndTrailingSpacesPseudo (const char *_pv, char pvStripped[PVGROUP_PSEUDO_SIZE])
 Removes leading and trailing blanks.
void removeLeadingAndTrailingSpaces (const char *_pv, char pvStripped[PVNAME_SIZE])
 Removes leading and trailing blanks.
unsigned int convertToUniqueNumber (const char *pv, ca_client_context *ccc, unsigned int ghs)
 Produces a unique identifier from the pvName, ca_client_context, group handle size
for entry into hash table.
unsigned int convertToUniqueNumber (const char *pv, ca_client_context *ccc)
 Produces a unique identifier from the pvName and ca_client_context for entry into hash table.
CAFENUM::DBR_TYPE convertToCAFEDbrTypeClass (const chtype _chtype) const
 enum CAFENUM::DBR_TYPE {DBR_PRIMITIVE=333,DBR_STS,DBR_TIME, DBR_GR,DBR_CTRL,DBR_NONE};
Extracts the CAFENUM::DBR_TYPE from the channel type
std::string concatToString (dbr_char_t *inChar, unsigned int nChar)
 Concatinates dbr_char_t(unsigned char) into a string.

Public Attributes

etsNorm _etsNorm
etsDate _etsDate

Private Attributes

CAFEStatus cafeStatus
cafeConduit_set::iterator itcs
cafeGroup_set::iterator itgs
ChannelRequestMetaDataClient channelRequestMetaDataClient
ChannelRequestMetaData channelRequestMetaData
ChannelRequestMetaDataClient channelRequestMetaCtrlClient
ChannelRequestMetaData channelRequestMetaCtrl
ChannelDeviceAttribute channelDeviceAttribute
CAFEDataTypeCode cafeDataTypeCode

Constructor & Destructor Documentation

HandleHelper::HandleHelper (  )  [inline]
HandleHelper::~HandleHelper (  )  [inline]

Member Function Documentation

int HandleHelper::addMonitorAction ( unsigned int  _handle,
string  monitorAction 
)

HandleHelper::addMonitorAction
.

Parameters:
_handle input: handle identifying Conduit object
monitorAction input: string giviing the monitor action
Returns:
ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE

References cs, ECAFE_INVALID_HANDLE, and ICAFE_NORMAL.

int HandleHelper::checkConsistency ( unsigned int  _handle  ) 
int HandleHelper::checkConsistency (  ) 

Checks what's in the hash table against actual ca server data
Do for all handles.

Returns:
ICAFE_NORMAL or ECAFE_INVALID_HANDLE

References cs, ICAFE_NORMAL, and itcs.

Referenced by Granules::channelExecutePut(), Granules::channelVerifyGet(), Granules::channelVerifyGetCtrl(), and Granules::channelVerifyPut().

int HandleHelper::clearMonitorAction (  ) 

HandleHelper::clearMonitorAction for all handles
.

Returns:
ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE

References cs, ICAFE_NORMAL, and itcs.

int HandleHelper::clearMonitorAction ( unsigned int  _handle  ) 

HandleHelper::clearMonitorAction
.

Parameters:
_handle input: handle identifying Conduit object
Returns:
ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE

References cs, ECAFE_INVALID_HANDLE, and ICAFE_NORMAL.

std::string Helper::concatToString ( dbr_char_t *  inpChar,
unsigned int  nChar 
) [inherited]

Concatinates dbr_char_t(unsigned char) into a string.

Parameters:
inpChar input: Array of dbr_char_t data types
nChar input: size of array
Returns:
std:string The concatinated string
CAFENUM::DBR_TYPE Helper::convertToCAFEDbrTypeClass ( const chtype  _chtype  )  const [inherited]
unsigned int Helper::convertToUniqueNumber ( const char *  pv,
ca_client_context *  ccc 
) [inherited]

Produces a unique identifier from the pvName and ca_client_context for entry into hash table.

Parameters:
pv input: process variable name
ccc input: current context
Returns:
unique identifier

References int.

unsigned int Helper::convertToUniqueNumber ( const char *  pv,
ca_client_context *  ccc,
unsigned int  ghs 
) [inherited]

Produces a unique identifier from the pvName, ca_client_context, group handle size
for entry into hash table.

Parameters:
pv input: process variable name
ccc input: current context
ghs input: size of gs (group handle set)
Returns:
unique identifier

References int.

etsDate HandleHelper::epicsTimeStampToDate ( epicsTimeStamp  ts  )  [inline]
int HandleHelper::eraseMonitorAction ( unsigned int  _handle  ) 

HandleHelper::eraseMonitorAction
.

Parameters:
_handle input: handle identifying Conduit object
Returns:
ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE

References cs, ECAFE_INVALID_HANDLE, and ICAFE_NORMAL.

int HandleHelper::getAlarmStatusSeverity ( unsigned int  _handle,
dbr_short_t  as[2] 
)

Retrieves last cached status information for given handle.

Parameters:
_handle input: handle
as output: alarmStatus [0] and alarmSeverity [1] in array of dbr_short_t[2]
Returns:
ICAFE_NORMAL or ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, and CAFEStatus::report().

int HandleHelper::getAlarmStatusSeverityAsString ( unsigned int  _handle,
string  asas[2] 
)

Retrieves last cached status information for given handle.

Parameters:
_handle input: handle
asas output: alarmStatus [0] and alarmSeverity [1] in array of dbr_short_t[2]
Returns:
ICAFE_NORMAL or ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, and CAFEStatus::report().

int HandleHelper::getCafeDbrType ( unsigned int  _handle,
CAFENUM::DBR_TYPE cdt 
)

Gets the cafeDbrType (e.g. DBR_TIME).

Parameters:
_handle input: Conduit object reference
cdt output: CAFENUM::DBR_TYPE
Returns:
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, channelRequestMetaData, cs, ECAFE_INVALID_HANDLE, ChannelRequestMetaData::getCafeDbrType(), ICAFE_NORMAL, CAFEStatus::report(), and Connect::status.

Referenced by CAFE::get(), getNmonitorCtrl(), and getNmonitorData().

CAFENUM::DBR_TYPE HandleHelper::getCafeDbrTypeCB ( unsigned int  _handle  ) 

Gets the cafeDbrType of handle from within the callback function.

Parameters:
_handle input: handle
Returns:
CAFENUM::DBR_TYPE cafeDbrDataType

References __METHOD__, cafeStatus, cs, CAFENUM::DBR_NONE, ECAFE_INVALID_HANDLE, and CAFEStatus::report().

int HandleHelper::getChannelAttribute ( unsigned int  _handle,
std::string &  attribute 
)

Retrieves attribute name for a given handle.

Parameters:
_handle input: handle to Conduit Objecte
attribute output: attribute name
Returns:
ICAFE_NORMAL if all OK else ERROR

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, and CAFEStatus::report().

int HandleHelper::getChannelDevice ( unsigned int  _handle,
std::string &  device 
)

Retrieves device name for a given handle.

Parameters:
_handle input: handle to Conduit Objecte
device output: device name
Returns:
ICAFE_NORMAL if all OK else ERROR

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, and CAFEStatus::report().

int HandleHelper::getChannelRegalia ( unsigned int  _handle,
ChannelRegalia channelInfo 
)

Retrieves channel meta deta held in the ChannelRegalia object.

Parameters:
_handle input: handle
channelInfo output: ChannelRegalia object
Returns:
ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, and CAFEStatus::report().

Referenced by CAFE::snapshot2XML().

unsigned int HandleHelper::getConnectedHandles ( vector< unsigned int > &  dhV,
vector< string > &  pvV 
)

Retrieves a list of connected PVs and their handles.

Parameters:
dhV output: Vector<unsigned int> of disconnected handles
pvV output: Vector<string> of corresponding disconnected PVs
Returns:
No of disconnected handles

References cs, and itcs.

ca_client_context * HandleHelper::getContextFromHandle ( unsigned int  handle  ) 

Retrieves the ca_client_context for first matching of handle.

Parameters:
handle input: handle
Returns:
ccc output: ca_client_context

References __METHOD__, cs, and itcs.

Referenced by Connect::getClientContext().

ca_client_context * HandleHelper::getContextFromPV ( const char *  _pv  ) 

Retrieves context for a first matching of this process variable.

Parameters:
_pv input: process variable
Returns:
ccc : ca_client_context (NULL if not found)

References cs, itcs, PVNAME_SIZE, and Helper::removeLeadingAndTrailingSpaces().

Referenced by Connect::getClientContext().

chtype HandleHelper::getDataTypeCB ( unsigned int  _handle  ) 

Gets the datatype of handle from within the callback function.

Parameters:
_handle input: handle
Returns:
chtype dataType

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, long, and CAFEStatus::report().

int HandleHelper::getDataTypeNative ( unsigned int  _handle,
chtype &  ndt 
)

Retrieves the native data type from ChannelRegalia object.

Parameters:
_handle input: handle
ndt output: CAFE_DATATYPE object
Returns:
ICAFE_NORMAL if all OK else ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, and CAFEStatus::report().

int HandleHelper::getDataTypeRequest ( unsigned int  _handle,
chtype &  rdt 
)

Gets the dataType requested (e.g. DBR_STRING etc.).

Parameters:
_handle input: Conduit object reference
rdt output: DBR_XXX
Returns:
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, channelRequestMetaData, cs, ECAFE_INVALID_HANDLE, ChannelRequestMetaData::getDataType(), ICAFE_NORMAL, CAFEStatus::report(), and Connect::status.

chtype HandleHelper::getDbrDataTypeCB ( unsigned int  _handle  ) 

Gets the dbrdatatype of handle from within the callback function.

Parameters:
_handle input: handle
Returns:
chtype dataType

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, long, and CAFEStatus::report().

unsigned int HandleHelper::getDisconnectedHandles ( vector< unsigned int > &  dhV,
vector< string > &  pvV 
)

Retrieves a list of disconnected PVs and their handles.

Parameters:
dhV output: Vector<unsigned int> of disconnected handles
pvV output: Vector<string> of corresponding disconnected PVs
Returns:
No of disconnected handles

References cs, and itcs.

Referenced by Connect::getDisconnectedHandles().

short HandleHelper::getEnumFromString ( unsigned int  _handle,
string  enumStringValue 
)

Retrieves enum unsigned short state of enumerated string type.

Parameters:
_handle input: handle
enumStringValue input: enum string state
Returns:
short enum value else -1

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, PVCtrlHolder::getEnumFromString(), getNelemRequestCtrl(), ICAFE_NORMAL, CAFEStatus::report(), PVCtrlHolder::setNelem(), and setNelemToRetrieveFromCache().

Referenced by Instant< dbr_short_t >::setAndGetDbrString(), and Instant< dbr_short_t >::setAndGetString().

etsDate HandleHelper::getEpicsTimeStampAsDate ( unsigned int  h  )  [inline]
etsNorm HandleHelper::getEpicsTimeStampAsUInt32 ( unsigned int  h  )  [inline]
unsigned int HandleHelper::getGroupHandleFromGroupName ( const char *  _groupName,
ca_client_context *  ccc 
)

Retrieves groupHandle from groupName from within a given ca context.

Parameters:
_groupName input: group Name
ccc input: ca client context
Returns:
groupHandle else 0 if group not found

References gs, and itgs.

unsigned int HandleHelper::getGroupHandleFromGroupName ( const char *  _groupName  )  [inline]

Referenced by Connect::groupClose().

std::string HandleHelper::getGroupNameFromGroupHandle ( unsigned int  _groupHandle  ) 

Retrieves groupName from grouphanlde.

Parameters:
_groupHandle input: handle to groupConduit object
Returns:
groupName else "" if groupHandle not found

References cafeStatus, ECAFE_UNKNOWN_GROUP, gs, itgs, and CAFEStatus::report().

Referenced by CAFE::groupAttach(), Connect::groupClose(), and CAFE::groupFetch().

unsigned int HandleHelper::getGroupNPV ( const char *  _groupName  )  [inline]

References getGroupNPV().

unsigned int HandleHelper::getGroupNPV ( const char *  _groupName,
ca_client_context *  ccc 
)

Retrieves number of process variables within a group for a given ca client context.

Parameters:
_groupName input: name of CAFAE PVGroup
ccc input: ca_client_context
Returns:
number of PVs within group

References gs, and itgs.

unsigned int HandleHelper::getGroupNPV ( unsigned int  _groupHandle  ) 

Retrieves number of process variables within a group as identified by the groupHandle.

Parameters:
_groupHandle input: handle to groupConduit object
Returns:
number of PVs within group

References cafeStatus, ECAFE_UNKNOWN_GROUP, gs, itgs, and CAFEStatus::report().

Referenced by getGroupNPV(), and CAFE::setVString().

unsigned int HandleHelper::getHandleFromPV ( const char *  _pv,
ca_client_context *  ccc 
)

Retrieves handle for a given process variable.

Parameters:
_pv input: process variable
ccc input: ca_client_context
Returns:
handle else 0 if no handle exists

References cs, getHandleFromPVAlias(), itcs, PVNAME_SIZE, and Helper::removeLeadingAndTrailingSpaces().

unsigned int HandleHelper::getHandleFromPV ( const char *  _pv  ) 

Retrieves handle for a given process variable.

Parameters:
_pv input: process variable
Returns:
handle else 0 if no handle exists

Referenced by CAFE::getCache(), and Connect::getHandleFromPV().

unsigned int HandleHelper::getHandleFromPVAlias ( const char *  _pv,
ca_client_context *  ccc 
)

Retrieves handle for a given process variable alias.

Parameters:
_pv input: process variable alias
ccc input: ca_client_context
Returns:
handle else 0 if no handle exists

References cs, itcs, PVNAME_SIZE, and Helper::removeLeadingAndTrailingSpaces().

unsigned int HandleHelper::getHandleFromPVAlias ( const char *  _pv  ) 

Retrieves handle for a given process variable.

Parameters:
_pv input: process variable
Returns:
handle else 0 if no handle exists

Referenced by getHandleFromPV().

unsigned int HandleHelper::getHandleFromPVWithinGroup ( const char *  _pv,
ca_client_context *  ccc,
unsigned int  gh 
)

Retrieves handle for a given process variable with a CAFE group within a give ca context.

Parameters:
_pv input: process variable
ccc input: ca_client_context
gh input: groupHandle
Returns:
handle else 0 if no handle exists

References cs, itcs, PVNAME_SIZE, and Helper::removeLeadingAndTrailingSpaces().

unsigned int HandleHelper::getHandleFromPVWithinGroup ( const char *  _pv,
unsigned int  gh 
)

Retrieves handle for a given process variable with a CAFE group.

Parameters:
_pv input: process variable
gh input: groupHandle
Returns:
handle else 0 if no handle exists

Referenced by Connect::getHandleFromPVWithinGroup(), and CAFE::snapshot2XML().

unsigned int HandleHelper::getHandles ( vector< unsigned int > &  dhV,
vector< string > &  pvV 
)

Retrieves a list of handles and PVs, whether connected or disconnected.

Parameters:
dhV output: Vector<unsigned int> of all handles
pvV output: Vector<string> of corresponding PVs
Returns:
No of disconnected handles

References cs, and itcs.

unsigned int * HandleHelper::getHandlesFromWithinGroup ( unsigned int  _groupHandle  ) 

Retrieves all handles belonging to a group referenced by its groupHandle.

Parameters:
_groupHandle input: groupHandle
Returns:
array of handles within Group

References cafeStatus, ECAFE_UNKNOWN_GROUP, gs, itgs, and CAFEStatus::report().

Referenced by CAFE::getPVArray().

vector< unsigned int > HandleHelper::getHandlesFromWithinGroupV ( unsigned int  _groupHandle  ) 

Retrieves all handles belonging to a group referenced by its groupHandle.

Parameters:
_groupHandle input: groupHandle
Returns:
vector of handles within Group

References cafeStatus, ECAFE_UNKNOWN_GROUP, gs, itgs, and CAFEStatus::report().

unsigned int HandleHelper::getHandleStates ( vector< unsigned int > &  dhV,
vector< string > &  pvV,
vector< unsigned short > &  connV 
)

Retrieves a list of handles and PVs, whether connected or disconnected.

Parameters:
dhV output: Vector<unsigned int> of all handles
pvV output: Vector<string> of corresponding PVs
connV output: Vector<unsigned short> of connection states
Returns:
No of disconnected handles

References cs, and itcs.

vector< unsigned int > HandleHelper::getHandlesWithMonitors (  ) 

Return a vector of handles that have monitors If a handle has n monitors it appears n time in the return vector. Monitors in waiting are als included in the count.

Returns:
Total number of handles with monitors (whether started or in waiting);

References cs, getMonitorIDs(), getMonitorIDsInWaiting(), and itcs.

vector< string > HandleHelper::getMonitorAction ( bool  onlyIfNewData  ) 

HandleHelper::getMonitorAction retrieves list of actions to perform on change of value
If input boolean is true; then only oustantanding actions are listed.

Parameters:
onlyIfNewData input: boolean to
Returns:
string of actions

References cafeMutex, cs, itcs, and MUTEX.

int HandleHelper::getMonitorAction ( unsigned int  _handle,
vector< string > &  msV 
)

HandleHelper::getMonitorAction.

Parameters:
_handle input: handle identifying Conduit object
msV output: vector<string> giving the monitor actions
Returns:
ICAFE_NORMAL if OK else ECAFE_INVALID_HANDLE

References cs, ECAFE_INVALID_HANDLE, and ICAFE_NORMAL.

Referenced by getMonitorHandlesAndActions().

int HandleHelper::getMonitorHandlesAndActions ( vector< unsigned int > &  handleV,
vector< string > &  actionV 
)

HandleHelper::getMonitorHandlesAndActions retrieves list of handles and their actions to perform on change of value
.

Parameters:
handleV output: Vector of handles
actionV output: Vector of monitor actios
Returns:
ICAFE_NORMAL

References cs, getMonitorAction(), getMonitorIDs(), getMonitorIDsInWaiting(), ICAFE_NORMAL, and itcs.

vector< unsigned int > HandleHelper::getMonitorIDs ( unsigned int  _handle  ) 

Gets vector of MonitorIDs.

Parameters:
_handle input : Conduit object reference
Returns:
returns vector of MonitorIDs; length 0 is none or invalid handle

References getMonitorPolicyVector().

Referenced by getHandlesWithMonitors(), getMonitorHandlesAndActions(), printDisconnectedHandles(), printHandle(), printHandles(), printHandlesV(), and printMonitors().

vector< unsigned int > HandleHelper::getMonitorIDsInWaiting ( unsigned int  _handle  ) 

Gets vector of MonitorIDs in waiting (value=0), i.e., waiting for channel connection.

Parameters:
_handle input : Conduit object reference
Returns:
returns vector of MonitorIDsInWaiting; length 0 is none or invalid handle

References getMonitorPolicyInWaitingVector().

Referenced by getHandlesWithMonitors(), getMonitorHandlesAndActions(), printHandle(), printHandles(), printHandlesV(), and printMonitors().

int HandleHelper::getMonitorPolicyInWaitingVector ( unsigned int  _handle,
vector< MonitorPolicy > &  mpV 
)

Gets the MonitorPolicyVector.

Parameters:
_handle input : Conduit object reference
mpV output: vector<MonitorPolicy>
Returns:
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, CAFEStatus::report(), and Connect::status.

Referenced by getMonitorIDsInWaiting().

int HandleHelper::getMonitorPolicyVector ( unsigned int  _handle,
vector< MonitorPolicy > &  mpV 
)

Gets the MonitorPolicyVector.

Parameters:
_handle input : Conduit object reference
mpV output: vector<MonitorPolicy>
Returns:
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, CAFEStatus::report(), and Connect::status.

Referenced by CAFE::get(), getMonitorIDs(), getNmonitor(), getNmonitorCtrl(), getNmonitorData(), Instant< CTYPE >::matchMany(), Instant< CTYPE >::setAndMatch(), and Instant< CTYPE >::setAndMatchMany().

int HandleHelper::getNelem ( unsigned int  _handle,
unsigned int c,
unsigned int n,
unsigned int r 
)

Retrieves the no of elements as initiated by client, no of native elements, no of elements requested to ca.

Parameters:
_handle input: Conduit object reference
c output: no of elements as stated by client
n output: no of native elements
r output: no of elements as requested to ca
Returns:
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, and CAFEStatus::report().

unsigned int HandleHelper::getNelemClient ( unsigned int  _handle  ) 

Retrieves the no of elements to read out from an array, e.g. waveform as requested by client.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements from (*it_handle).getChannelRequestMetaDataClient().getNelem() else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, and CAFEStatus::report().

Referenced by CAFE::get(), Connect::getNelemClient(), CAFE::groupGet(), CAFE::groupSet(), Instant< CTYPE >::matchMany(), Instant< CTYPE >::set(), CAFE::set(), Instant< CTYPE >::setAndGet(), Instant< CTYPE >::setAndMatch(), Instant< CTYPE >::setAndMatchMany(), CAFE::setNelemToOne(), and CAFE::setNelemToPrevious().

unsigned int HandleHelper::getNelemClientCtrl ( unsigned int  _handle  ) 

Retrieves the no of elements read out from an array e.g. waveform, as delivered to ca through DBR_CTRL.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements from (*it_handle).getChannelRequestMetaCtrl().getNelem() else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, and CAFEStatus::report().

unsigned int HandleHelper::getNelemNative ( unsigned int  _handle  ) 

Retrieves the no of native elements.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements from (*it_handle).getChannelRegalia().getNelem() else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, and CAFEStatus::report().

Referenced by CAFE::get(), Instant< CTYPE >::getCache(), Connect::getNelemNative(), Instant< CTYPE >::matchMany(), Instant< CTYPE >::set(), CAFE::set(), Instant< CTYPE >::setAndMatchMany(), and CAFE::setNelemToPrevious().

unsigned int HandleHelper::getNelemRequest ( unsigned int  _handle  ) 

Retrieves the no of elements to read out from an array, e.g. waveform as delivered to ca.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements from (*it_handle).getChannelRequestMetaData().getNelem() else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, and CAFEStatus::report().

Referenced by CAFE::get(), CAFE::getCache(), Connect::getNelemRequest(), Instant< CTYPE >::matchMany(), Instant< CTYPE >::setAndMatch(), Instant< CTYPE >::setAndMatchMany(), and CAFE::setNelemToRetrieveFromCacheToOne().

unsigned int HandleHelper::getNelemRequestCtrl ( unsigned int  _handle  ) 

Retrieves the no of elements read out from an array e.g. waveform, as delivered to ca through DBR_CTRL.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements from (*it_handle).getChannelRequestMetaCtrl().getNelem() else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, and CAFEStatus::report().

Referenced by getEnumFromString(), getStringFromEnum(), and isEnum().

unsigned int HandleHelper::getNelemToRetrieveFromCache ( unsigned int  _handle  ) 

Gets the no of elements to be read out from a cached array, e.g. waveform.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements from channelRequestMetaData.getNelemCache(); else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, channelRequestMetaData, cs, ECAFE_INVALID_HANDLE, ChannelRequestMetaData::getNelemCache(), and CAFEStatus::report().

Referenced by CAFE::setNelemToRetrieveFromCacheToOne().

unsigned int HandleHelper::getNelemToRetrieveFromCtrlCache ( unsigned int  _handle  ) 

Gets the no of elements to be read out from a cached array, e.g. waveform.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, channelRequestMetaCtrl, cs, ECAFE_INVALID_HANDLE, ChannelRequestMetaData::getNelemCache(), and CAFEStatus::report().

unsigned int HandleHelper::getNextFreeHandle (  ) 

Retrieves the next available handle.

Returns:
handle: value of next available handle

References __METHOD__, cs, getNoHandles(), and itcs.

int HandleHelper::getNmonitor ( unsigned int  _handle  ) 

Gets Number of MonitorPolicyVectors.

Parameters:
_handle input : Conduit object reference
Returns:
nmon output: No. of monitors
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References getMonitorPolicyVector().

int HandleHelper::getNmonitorCtrl ( unsigned int  _handle  ) 

Gets Number of MonitorPolicyVectors for CTRL_ type.

Parameters:
_handle input : Conduit object reference
Returns:
nmon output: No. of CTRL_ type monitors
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References CAFENUM::DBR_CTRL, CAFENUM::DBR_GR, getCafeDbrType(), and getMonitorPolicyVector().

Referenced by CAFE::getCtrlCache().

int HandleHelper::getNmonitorData ( unsigned int  _handle  ) 

Gets Number of MonitorPolicyVectors for <= DBR_TIME type.

Parameters:
_handle input : Conduit object reference
Returns:
nmon output: No. of <= DBR_TIME type monitors
ICAFE_NORMAL else ECAFE_INVILID_HANDLE

References CAFENUM::DBR_TIME, getCafeDbrType(), and getMonitorPolicyVector().

Referenced by Instant< CTYPE >::get(), CAFE::get(), Instant< CTYPE >::getCache(), and CAFE::getCache().

unsigned int HandleHelper::getNoHandles (  ) 

Retrieves the total number of handled.

Returns:
noHandles: Total no. of handles

References cs, and itcs.

Referenced by getNextFreeHandle().

unsigned int HandleHelper::getOffset ( unsigned int  _handle  ) 

Retrieves the offset; gives element no from which data should be returned.

Parameters:
_handle input: Conduit object reference
Returns:
offset: Offset valu

References __METHOD__, cafeStatus, channelRequestMetaDataClient, cs, ECAFE_INVALID_HANDLE, ChannelRequestMetaData::getOffset(), and CAFEStatus::report().

unsigned int HandleHelper::getOffsetLast ( unsigned int  _handle  ) 

Retrieves the last offset; gives element no from which data was actually returned.

Parameters:
_handle input: Conduit object reference
Returns:
offset: Offset valu

References __METHOD__, cafeStatus, channelRequestMetaData, cs, ECAFE_INVALID_HANDLE, ChannelRequestMetaData::getOffset(), and CAFEStatus::report().

int HandleHelper::getPulseID ( unsigned int  h,
unsigned int pulseID 
) [inline]

References getTimeStamp(), and ICAFE_NORMAL.

unsigned int HandleHelper::getPulseIDFromTS ( epicsTimeStamp  ts  )  [inline]
char* HandleHelper::getPV ( unsigned int  _handle  ) 
char* HandleHelper::getPVAlias ( unsigned int  _handle  ) 
const char * HandleHelper::getPVFromHandle ( unsigned int  handle,
ca_client_context *  ccc 
)

Retrieves the process variable from a given handle.

Parameters:
handle input: handle
ccc input: ca_client_context
Returns:
pv else NULL if no handle exists

References __METHOD__, cs, and itcs.

const char * HandleHelper::getPVFromHandle ( unsigned int  handle  ) 
int HandleHelper::getStatus ( unsigned int  _handle  ) 

Retrieves last cached status information for given handle.

Parameters:
_handle input: handle
Returns:
status

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, and CAFEStatus::report().

Referenced by Instant< CTYPE >::matchMany(), Instant< CTYPE >::setAndMatch(), and Instant< CTYPE >::setAndMatchMany().

string HandleHelper::getStringFromEnum ( unsigned int  _handle,
unsigned short  enumValue 
)
int HandleHelper::getTimeStamp ( unsigned int  _handle,
epicsTimeStamp &  ts 
)

Retrieves last cached timestamp information for given handle.

Parameters:
_handle input: handle
ts output: epicsTimeStamp
Returns:
ICAFE_NORMAL or ECAFE_INVALID_HANDLE

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, and CAFEStatus::report().

Referenced by getEpicsTimeStampAsDate(), getEpicsTimeStampAsUInt32(), and getPulseID().

unsigned int HandleHelper::getUsrArgsAsUInt ( unsigned int  _handle  ) 

Gets the user arg as uint in event callback; meant for retrieving the current monitor ID.

Parameters:
_handle input: handle
Returns:
(uint) usr.args; meant for monitorID

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, long, and CAFEStatus::report().

bool HandleHelper::isChannelConnected ( unsigned int  handle  ) 

Method returns true if channel is connected, else false.

Parameters:
handle input: handle
Returns:
bool

References cs.

Referenced by Instant< CTYPE >::matchMany(), Instant< CTYPE >::setAndMatch(), and Instant< CTYPE >::setAndMatchMany().

bool HandleHelper::isEnum ( unsigned int  _handle  ) 

Retrieves whether pv is of enumerated type.

Parameters:
_handle input: handle
Returns:
true if enum type else false

References __METHOD__, cafeStatus, cs, ECAFE_INVALID_HANDLE, getNelemRequestCtrl(), PVCtrlHolder::getNoEnumStrings(), ICAFE_NORMAL, CAFEStatus::report(), PVCtrlHolder::setNelem(), and setNelemToRetrieveFromCtrlCache().

Referenced by Connect::isEnum().

unsigned int HandleHelper::printChannels (  )  [inline]

References printHandles().

unsigned int HandleHelper::printDisconnectedChannels (  )  [inline]
unsigned int HandleHelper::printDisconnectedHandles ( void   ) 

Prints Conduit member values for all disconnected CAFEConduit objects (handles).

Returns:
Total number of disconnected handles;

References cs, getMonitorIDs(), and itcs.

Referenced by Connect::printDisconnectedHandles().

int HandleHelper::printHandle ( unsigned int  _handle  ) 
unsigned int HandleHelper::printHandles ( void   ) 

Prints Conduit member values for all Conduit objects (handles).

Returns:
Total number of handles;

References cafeDataTypeCode, cs, getMonitorIDs(), getMonitorIDsInWaiting(), PolicyHelper::getSGTimeout(), PolicyHelper::getTimeout(), gs, itcs, and CAFEDataTypeCode::message().

Referenced by printChannels().

int HandleHelper::printHandles ( unsigned int handleArray,
unsigned int  nHandles 
)
int HandleHelper::printHandlesV ( vector< unsigned int handleV  ) 
unsigned int HandleHelper::printMonitors (  ) 

Prints Conduit member values for all Conduit objects (handles) that have a monitor.

Returns:
Total number of handles;

References cafeDataTypeCode, cs, getMonitorIDs(), getMonitorIDsInWaiting(), PolicyHelper::getTimeout(), itcs, and CAFEDataTypeCode::message().

void Helper::removeLeadingAndTrailingSpaces ( const char *  pv,
char  pvStripped[PVNAME_SIZE] 
) [inherited]
void Helper::removeLeadingAndTrailingSpacesDbrString ( const char *  pv,
char  pvStripped[MAX_STRING_SIZE] 
) [inherited]

Removes leading and trailing blanks.

Parameters:
pv input: process variable name
pvStripped output: process variable name stripped of forward and trailing spaces
void Helper::removeLeadingAndTrailingSpacesPseudo ( const char *  pv,
char  pvStripped[PVGROUP_PSEUDO_SIZE] 
) [inherited]

Removes leading and trailing blanks.

Parameters:
pv input: process variable name
pvStripped output: process variable name stripped of forward and trailing spaces

Referenced by Connect::getPVData().

int HandleHelper::setCafeDbrType ( unsigned int  _handle,
CAFENUM::DBR_TYPE  cdt 
)

Sets the cafeDbrType (e.g. DBR_TIME) and associated dbrDataTpe (e.g. DBR_TIME_zzz).

Parameters:
_handle input: Conduit object reference
cdt input: CAFENUM::DBR_TYPE
Returns:
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaData, channelRequestMetaDataClient, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, MUTEX, CAFEStatus::report(), ChannelRequestMetaData::setDbrTypesFromCafeDbrType(), and Connect::status.

Referenced by CAFE::get(), and CAFE::groupGet().

int HandleHelper::setCafeDbrTypeV ( vector< unsigned int _handleV,
CAFENUM::DBR_TYPE  cdt 
)

Sets the cafeDbrType (e.g. DBR_TIME) and associated dbrDataTpe (e.g. DBR_TIME_zzz).

Parameters:
_handleV input: vector<unsigned int> Conduit object references
cdt input: CAFENUM::DBR_TYPE
Returns:
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaData, channelRequestMetaDataClient, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, MUTEX, CAFEStatus::report(), ChannelRequestMetaData::setDbrTypesFromCafeDbrType(), and Connect::status.

int HandleHelper::setChannelDeviceAttribute ( unsigned int  _handle,
std::string  deliminator 
)

Given the deliminator, sets the device/attribute components of the epics channel for a givem handle.

Parameters:
_handle input: handle to Conduit Objecte
deliminator input: string (at PSI this is ususally a colon, i.e. ":")
Returns:
ICAFE_NORMAL if all OK else ERROR

References __METHOD__, cafeMutex, cafeStatus, channelDeviceAttribute, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, ChannelDeviceAttribute::init(), MUTEX, and CAFEStatus::report().

int HandleHelper::setChannelDeviceAttribute ( std::string  deliminator  ) 

Given the deliminator, sets the device/attribute components of the epics channel, for all handles.

Parameters:
deliminator deliminator: string (at PSI this is ususally a colon, i.e. ":")
Returns:
ICAFE_NORMAL if all OK else ERROR

References cs, ICAFE_NORMAL, and itcs.

void HandleHelper::setFirstAndLastArrayElements ( unsigned int  _handle,
unsigned int  _start,
unsigned int  _last 
) [inline]

References setNelem(), and setOffset().

unsigned int HandleHelper::setNelem ( unsigned int  _handle,
unsigned int  _nelem 
)

Sets the no of elements to read out from an array, e.g. waveform.

Parameters:
_handle input: Conduit object reference
_nelem input: No of elements for ca data transfer
Returns:
no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaDataClient, cs, ECAFE_INVALID_HANDLE, MUTEX, CAFEStatus::report(), and ChannelRequestMetaData::setNelem().

unsigned int HandleHelper::setNelem ( unsigned int  _handle  ) 

Sets the no of elements to read out from an array, e.g. waveform, to native value.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaDataClient, cs, ECAFE_INVALID_HANDLE, MUTEX, CAFEStatus::report(), and ChannelRequestMetaData::setNelem().

int HandleHelper::setNelem (  ) 

Sets the no of elements to read out from an array, e.g. waveform, to native value for all handles.

Returns:
ICAFE_NORMAL or ECAFE_INVALID_HANDLE

References cs, ICAFE_NORMAL, and itcs.

Referenced by CAFE::groupSet(), main(), Instant< CTYPE >::matchMany(), Instant< CTYPE >::set(), CAFE::set(), Instant< CTYPE >::setAndGet(), Instant< CTYPE >::setAndMatch(), Instant< CTYPE >::setAndMatchMany(), setFirstAndLastArrayElements(), setNelemToNative(), CAFE::setNelemToOne(), and CAFE::setNelemToPrevious().

unsigned int HandleHelper::setNelemCtrl ( unsigned int  _handle,
unsigned int  _nelem 
)

Sets the no of elements to read out from an array, e.g. waveform, via DBR_CTRL.

Parameters:
_handle input: Conduit object reference
_nelem input: No of elements for ca data transfer
Returns:
no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaCtrlClient, cs, ECAFE_INVALID_HANDLE, MAX_NELEM_FOR_CTRL_BUFFER, MUTEX, CAFEStatus::report(), and ChannelRequestMetaData::setNelem().

unsigned int HandleHelper::setNelemToNative ( unsigned int  _handle  )  [inline]

References setNelem().

Referenced by main().

unsigned int HandleHelper::setNelemToRetrieveFromCache ( unsigned int  _handle,
unsigned int  _nelem 
)

Sets the no of elements to read out from an cached array, e.g. waveform.

Parameters:
_handle input: Conduit object reference
_nelem input: No of elements for data transfer from cache
Returns:
no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaData, cs, ECAFE_INVALID_HANDLE, MUTEX, CAFEStatus::report(), and ChannelRequestMetaData::setNelemCache().

unsigned int HandleHelper::setNelemToRetrieveFromCache ( unsigned int  _handle  ) 
unsigned int HandleHelper::setNelemToRetrieveFromCtrlCache ( unsigned int  _handle,
unsigned int  _nelem 
)

Sets the no of elements to read out from an cached array, e.g. waveform.

Parameters:
_handle input: Conduit object reference
_nelem input: No of elements for data transfer from cache
Returns:
no of elements set = min( (*it_handle).getChannelRegalia().getNelem(),_nelem) else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaCtrl, cs, ECAFE_INVALID_HANDLE, MAX_NELEM_FOR_CTRL_BUFFER, MUTEX, CAFEStatus::report(), and ChannelRequestMetaData::setNelemCache().

unsigned int HandleHelper::setNelemToRetrieveFromCtrlCache ( unsigned int  _handle  ) 

Sets the no of elements to read out from an cached array to min(native, ) value, e.g. waveform.

Parameters:
_handle input: Conduit object reference
Returns:
no of elements (*it_handle).getChannelRegalia().getNelem() else 0 if ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaCtrl, cs, ECAFE_INVALID_HANDLE, MAX_NELEM_FOR_CTRL_BUFFER, MUTEX, CAFEStatus::report(), and ChannelRequestMetaData::setNelemCache().

Referenced by CAFE::getCtrl(), and isEnum().

unsigned int HandleHelper::setOffset ( unsigned int  _handle,
unsigned int  _offset 
)

Sets the offset; give element no from which data should be returned.

Parameters:
_handle input: Conduit object reference
_offset input: Offset value
Returns:
offset: min( (*it_handle).getChannelRegalia().getNelem()-1, _offset))

References __METHOD__, cafeMutex, cafeStatus, channelRequestMetaDataClient, cs, ECAFE_INVALID_HANDLE, MUTEX, CAFEStatus::report(), and ChannelRequestMetaData::setOffset().

Referenced by main(), and setFirstAndLastArrayElements().

int HandleHelper::setSTS ( unsigned int  _handle,
dbr_short_t  a,
dbr_short_t  s,
epicsTimeStamp  ets 
)

Sets the alarm, severity ts in conduit (used by get method WITH_CALLBACK).

Parameters:
_handle input: Conduit object reference
a input: alarm
s input: severity
ets input: epicsTimeStamp
Returns:
ICAFE_NORMAL else ECAFE_INVALID_HANDLE

References __METHOD__, cafeMutex, cafeStatus, cs, ECAFE_INVALID_HANDLE, ICAFE_NORMAL, MUTEX, CAFEStatus::report(), and Connect::status.

Referenced by Transpose< CTYPE >::get(), Transpose< CAFE_DATATYPE_UNION >::get(), Transpose< dbr_string_t >::get(), and CAFE::get().


Member Data Documentation

Referenced by setNelemCtrl().

cafeConduit_set::iterator HandleHelper::itcs [private]
cafeGroup_set::iterator HandleHelper::itgs [private]

The documentation for this class was generated from the following files:

Generated on 3 May 2017 for CAFE by  doxygen 1.6.1