paramList Class Reference

Class to support parameter library (also called parameter list); set and get values indexed by parameter number (pasynUser->reason) and do asyn callbacks when parameters change. More...

#include <asynPortDriver.h>

List of all members.

Public Member Functions

 paramList (int startVal, int nVals, asynStandardInterfaces *pasynInterfaces)
 Constructor for paramList class.
 ~paramList ()
 Destructor for paramList class; frees resources allocated in constructor.
asynStatus setInteger (int index, int value)
 Sets the value for an integer in the parameter library.
asynStatus setDouble (int index, double value)
 Sets the value for a double in the parameter library.
asynStatus setString (int index, const char *string)
 Sets the value for a string in the parameter library.
asynStatus getInteger (int index, int *value)
 Returns the value for an integer from the parameter library.
asynStatus getDouble (int index, double *value)
 Returns the value for a double from the parameter library.
asynStatus getString (int index, int maxChars, char *value)
 Returns the value for a string from the parameter library.
asynStatus callCallbacks (int addr)
 Calls the registered asyn callback functions for all clients for any parameters that have changed since the last time this function was called.
asynStatus callCallbacks ()
void report ()
 Prints the contents of paramList.


Detailed Description

Class to support parameter library (also called parameter list); set and get values indexed by parameter number (pasynUser->reason) and do asyn callbacks when parameters change.

The parameter class supports 3 types of parameters: int, double and dynamic-length strings.


Constructor & Destructor Documentation

paramList::paramList ( int  startVal,
int  nVals,
asynStandardInterfaces *  pasynInterfaces 
)

Constructor for paramList class.

Parameters:
[in] startVal The first index number for this parameter list, typically 0.
[in] nVals Number of parameters in the list.
[in] pasynInterfaces Pointer to asynStandardInterfaces structure, used for callbacks

paramList::~paramList (  ) 

Destructor for paramList class; frees resources allocated in constructor.


Member Function Documentation

asynStatus paramList::setInteger ( int  index,
int  value 
)

Sets the value for an integer in the parameter library.

Parameters:
[in] index The parameter number
[out] value Value to set.
Returns:
Returns asynError if the index is not valid.

asynStatus paramList::setDouble ( int  index,
double  value 
)

Sets the value for a double in the parameter library.

Parameters:
[in] index The parameter number
[out] value Value to set.
Returns:
Returns asynError if the index is not valid.

asynStatus paramList::setString ( int  index,
const char *  value 
)

Sets the value for a string in the parameter library.

Parameters:
[in] index The parameter number
[out] value Address of value to set.
Returns:
Returns asynError if the index is not valid.

asynStatus paramList::getInteger ( int  index,
int *  value 
)

Returns the value for an integer from the parameter library.

Parameters:
[in] index The parameter number
[out] value Address of value to get.
Returns:
Returns asynError if the index is not valid or if the parameter is not an integer

asynStatus paramList::getDouble ( int  index,
double *  value 
)

Returns the value for a double from the parameter library.

Parameters:
[in] index The parameter number
[out] value Address of value to get.
Returns:
Returns asynError if the index is not valid or if the parameter is not a double

asynStatus paramList::getString ( int  index,
int  maxChars,
char *  value 
)

Returns the value for a string from the parameter library.

Parameters:
[in] index The parameter number
[in] maxChars Maximum number of characters to return.
[out] value Address of value to get.
Returns:
Returns asynError if the index is not valid or if the parameter is not a string

asynStatus paramList::callCallbacks ( int  addr  ) 

Calls the registered asyn callback functions for all clients for any parameters that have changed since the last time this function was called.

Parameters:
[in] addr A client will be called if addr matches the asyn address registered for that client.
TEMPORARY FIX. Dont do anything if interruptAccept=0. There is now a thread that will do all callbacks once when interruptAccept goes to 1. THIS SHOULD BE A TEMPORARY FIX until EPICS supports PINI after interruptAccept, which will then be used for input records that need callbacks after output records that also have PINI and that could affect them.

asynStatus paramList::callCallbacks (  ) 

void paramList::report (  ) 

Prints the contents of paramList.

Prints the number of parameters in the list, and the data type, index and value of each parameter.


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

Generated on Wed Aug 19 15:50:33 2009 for asyn by  doxygen 1.5.6