All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Enumerations | Functions
GenApi Interface

Macros

#define GENAPIC_INVALID_HANDLE   ( (void*)0 )
 A value for invalid / uninitialized handles.
 

Typedefs

typedef struct
GENAPI_FILE_HANDLE_ * 
GENAPI_FILE_HANDLE
 A handle for a GenApi file object.
 
typedef struct
NODE_CALLBACK_HANDLE_ * 
NODE_CALLBACK_HANDLE
 A handle for a node callback object.
 
typedef struct NODE_HANDLE_ * NODE_HANDLE
 A handle for a node object.
 
typedef struct NODEMAP_HANDLE_ * NODEMAP_HANDLE
 A handle for a node map object.
 

Enumerations

enum  EGenApiAccessMode {
  NI, NA, WO, RO,
  RW, _UndefinedAccesMode = -1
}
 Access mode of a node. More...
 
enum  EGenApiCachingMode { NoCache, WriteThrough, WriteAround, _UndefinedCachingMode = -1 }
 Node caching modes. More...
 
enum  EGenApiFileAccessMode { GenApiFileReadAccess, GenApiFileWriteAccess }
 File access modes. More...
 
enum  EGenApiNameSpace { Custom, Standard, _UndefinedNameSpace = -1 }
 Node name spaces. More...
 
enum  EGenApiNodeType {
  IntegerNode, BooleanNode, FloatNode, CommandNode,
  StringNode, EnumerationNode, EnumEntryNode, Category,
  _UnknownNodeType = -1
}
 Node type. More...
 
enum  EGenApiRepresentation {
  Linear, Logarithmic, Boolean, PureNumber,
  HexNumber, _UndefinedRepresentation = -1
}
 Node representation. More...
 
enum  EGenApiVisibility {
  Beginner = 0, Expert = 1, Guru = 2, Invisible = 3,
  _UndefinedVisibility = -1
}
 Node visibility. More...
 

Functions

GENAPIC_RESULT GenApiBooleanGetValue (NODE_HANDLE hNode, _Bool *pValue)
 Return a node's boolean value. More...
 
GENAPIC_RESULT GenApiBooleanSetValue (NODE_HANDLE hNode, _Bool value)
 Set a node's boolean value. More...
 
GENAPIC_RESULT GenApiCategoryGetFeatureByIndex (NODE_HANDLE hNode, size_t index, NODE_HANDLE *phEntry)
 Get a feature node from a category by its index. More...
 
GENAPIC_RESULT GenApiCategoryGetNumFeatures (NODE_HANDLE hNode, size_t *pValue)
 Returns the number of features in a category. More...
 
GENAPIC_RESULT GenApiCommandExecute (NODE_HANDLE hNode)
 Trigger the execution of a command. More...
 
GENAPIC_RESULT GenApiCommandIsDone (NODE_HANDLE hNode, _Bool *pValue)
 Check whether command has finished. More...
 
GENAPIC_RESULT GenApiEnumerationEntryGetSymbolic (NODE_HANDLE hNode, char *pBuf, size_t *pBufLen)
 Return the symbolic name of an enumeration entry node. More...
 
GENAPIC_RESULT GenApiEnumerationEntryGetValue (NODE_HANDLE hNode, int *pValue)
 Returns the numerical index of an enumeration entry. More...
 
GENAPIC_RESULT GenApiEnumerationGetEntryByIndex (NODE_HANDLE hNode, size_t index, NODE_HANDLE *pEntry)
 Get an entry from an enumeration by index. More...
 
GENAPIC_RESULT GenApiEnumerationGetEntryByName (NODE_HANDLE hNode, const char *pName, NODE_HANDLE *pEntry)
 Get an entry from an enumeration by name. More...
 
GENAPIC_RESULT GenApiEnumerationGetNumEntries (NODE_HANDLE hNode, size_t *pValue)
 Get the number of entries in an enumeration. More...
 
GENAPIC_RESULT GenApiFileClose (GENAPI_FILE_HANDLE hFile)
 Closes a file. More...
 
GENAPIC_RESULT GenApiFileExists (NODEMAP_HANDLE hMap, const char *pFileName, _Bool *pResult)
 Check whether a file exists. More...
 
GENAPIC_RESULT GenApiFileOpen (NODEMAP_HANDLE hMap, const char *pFileName, EGenApiFileAccessMode accessMode, GENAPI_FILE_HANDLE *phFile)
 Opens a file. More...
 
GENAPIC_RESULT GenApiFileRead (GENAPI_FILE_HANDLE hFile, void *pBuffer, size_t *pLength)
 Reads binary data from a file. More...
 
GENAPIC_RESULT GenApiFilesAreSupported (NODEMAP_HANDLE hMap, _Bool *pResult)
 Check whether the device supports accessing files. More...
 
GENAPIC_RESULT GenApiFileWrite (GENAPI_FILE_HANDLE hFile, const void *pBuffer, size_t length)
 Writes binary data to a file. More...
 
GENAPIC_RESULT GenApiFloatGetMax (NODE_HANDLE hNode, double *pValue)
 Get a node's maximum floating-point value. More...
 
GENAPIC_RESULT GenApiFloatGetMin (NODE_HANDLE hNode, double *pValue)
 Get a node's minimum floating-point value. More...
 
GENAPIC_RESULT GenApiFloatGetRepresentation (NODE_HANDLE hNode, EGenApiRepresentation *pValue)
 Get a node's preferred representation. More...
 
GENAPIC_RESULT GenApiFloatGetUnit (NODE_HANDLE hNode, char *pBuf, size_t *pBufLen)
 Return a floating-point node's unit. More...
 
GENAPIC_RESULT GenApiFloatGetValue (NODE_HANDLE hNode, double *pValue)
 Get a node's floating-point value without validation. More...
 
GENAPIC_RESULT GenApiFloatGetValueEx (NODE_HANDLE hNode, _Bool verify, double *pValue)
 Return a node's floating-point value with optional validation. More...
 
GENAPIC_RESULT GenApiFloatSetValue (NODE_HANDLE hNode, double value)
 Set a node's floating-point value with mandatory validation. More...
 
GENAPIC_RESULT GenApiFloatSetValueEx (NODE_HANDLE hNode, _Bool verify, double value)
 Set a node's floating-point value with optional validation. More...
 
GENAPIC_RESULT GenApiGetLastErrorDetail (char *pBuf, size_t *pBufLen)
 Get detailed textual description for the latest error details, e.g. the origin of the error. More...
 
GENAPIC_RESULT GenApiGetLastErrorMessage (char *pBuf, size_t *pBufLen)
 Get a brief textual description of the latest error. More...
 
GENAPIC_RESULT GenApiIntegerGetInc (NODE_HANDLE hNode, int64_t *pValue)
 Get the value increment from an integer node. More...
 
GENAPIC_RESULT GenApiIntegerGetIncInt32 (NODE_HANDLE hNode, int32_t *pValue)
 Get the value increment from an integer node. More...
 
GENAPIC_RESULT GenApiIntegerGetMax (NODE_HANDLE hNode, int64_t *pValue)
 Get the maximum value from an integer node. More...
 
GENAPIC_RESULT GenApiIntegerGetMaxInt32 (NODE_HANDLE hNode, int32_t *pValue)
 Get the maximum value from an integer node. More...
 
GENAPIC_RESULT GenApiIntegerGetMin (NODE_HANDLE hNode, int64_t *pValue)
 Get the minimum value from an integer node. More...
 
GENAPIC_RESULT GenApiIntegerGetMinInt32 (NODE_HANDLE hNode, int32_t *pValue)
 Get the minimum value from an integer node. More...
 
GENAPIC_RESULT GenApiIntegerGetRepresentation (NODE_HANDLE hNode, EGenApiRepresentation *pValue)
 Get a node's preferred representation. More...
 
GENAPIC_RESULT GenApiIntegerGetValue (NODE_HANDLE hNode, int64_t *pValue)
 Get a node's integer value without validation. More...
 
GENAPIC_RESULT GenApiIntegerGetValueEx (NODE_HANDLE hNode, _Bool verify, int64_t *pValue)
 Return a node's integer value with optional validation. More...
 
GENAPIC_RESULT GenApiIntegerGetValueExInt32 (NODE_HANDLE hNode, _Bool verify, int32_t *pValue)
 Return a node's integer value with optional validation. More...
 
GENAPIC_RESULT GenApiIntegerGetValueInt32 (NODE_HANDLE hNode, int32_t *pValue)
 Get a node's integer value without validation. More...
 
GENAPIC_RESULT GenApiIntegerSetValue (NODE_HANDLE hNode, int64_t value)
 Set a node's integer value with mandatory validation. More...
 
GENAPIC_RESULT GenApiIntegerSetValueEx (NODE_HANDLE hNode, _Bool verify, int64_t value)
 Set a node's integer value with optional validation. More...
 
GENAPIC_RESULT GenApiIntegerSetValueExInt32 (NODE_HANDLE hNode, _Bool verify, int32_t value)
 Set a node's integer value with optional validation. More...
 
GENAPIC_RESULT GenApiIntegerSetValueInt32 (NODE_HANDLE hNode, int32_t value)
 Set a node's integer value with mandatory validation. More...
 
GENAPIC_RESULT GenApiNodeDeregisterCallback (NODE_HANDLE hNode, NODE_CALLBACK_HANDLE hCb)
 Remove a node callback function. More...
 
GENAPIC_RESULT GenApiNodeFromString (NODE_HANDLE hNode, const char *pString)
 Set a node's value from a text string with mandatory validation. More...
 
GENAPIC_RESULT GenApiNodeFromStringEx (NODE_HANDLE hNode, _Bool verify, const char *pString)
 Set a node's value from a text string with optional validation. More...
 
GENAPIC_RESULT GenApiNodeGetAccessMode (NODE_HANDLE hNode, EGenApiAccessMode *pAccessMode)
 Query node for allowed access modes. More...
 
GENAPIC_RESULT GenApiNodeGetAlias (NODE_HANDLE hNode, NODE_HANDLE *phNode)
 Get a node's alias. More...
 
GENAPIC_RESULT GenApiNodeGetCachingMode (NODE_HANDLE hNode, EGenApiCachingMode *pCachingMode)
 Query node for its caching mode. More...
 
GENAPIC_RESULT GenApiNodeGetDescription (NODE_HANDLE hNode, char *pBuf, size_t *pBufLen)
 Return a node's description text. More...
 
GENAPIC_RESULT GenApiNodeGetDisplayName (NODE_HANDLE hNode, char *pBuf, size_t *pBufLen)
 Return a node's user-friendly name. More...
 
GENAPIC_RESULT GenApiNodeGetName (NODE_HANDLE hNode, char *pBuf, size_t *pBufLen)
 Return a node's name. More...
 
GENAPIC_RESULT GenApiNodeGetNameSpace (NODE_HANDLE hNode, EGenApiNameSpace *pNamespace)
 Return a node's name space. More...
 
GENAPIC_RESULT GenApiNodeGetPollingTime (NODE_HANDLE hNode, int64_t *pPollingTime)
 Query a node for its recommended polling interval. More...
 
GENAPIC_RESULT GenApiNodeGetPollingTimeInt32 (NODE_HANDLE hNode, int32_t *pPollingTime)
 Query a node for its recommended polling interval. More...
 
GENAPIC_RESULT GenApiNodeGetToolTip (NODE_HANDLE hNode, char *pBuf, size_t *pBufLen)
 Return a node's tool tip text. More...
 
GENAPIC_RESULT GenApiNodeGetType (NODE_HANDLE hNode, EGenApiNodeType *pType)
 Get node type. More...
 
GENAPIC_RESULT GenApiNodeGetVisibility (NODE_HANDLE hNode, EGenApiVisibility *pVisibility)
 Return a node's visibility. More...
 
GENAPIC_RESULT GenApiNodeImposeAccessMode (NODE_HANDLE hNode, EGenApiAccessMode imposedAccessMode)
 Modify a node's accessibility. More...
 
GENAPIC_RESULT GenApiNodeImposeVisibility (NODE_HANDLE hNode, EGenApiVisibility imposedVisibility)
 Modify a node's visibility. More...
 
GENAPIC_RESULT GenApiNodeInvalidateNode (NODE_HANDLE hNode)
 Mark node as possibly changed. More...
 
GENAPIC_RESULT GenApiNodeIsAvailable (NODE_HANDLE hNode, _Bool *pResult)
 Check whether a feature's value is available. More...
 
GENAPIC_RESULT GenApiNodeIsImplemented (NODE_HANDLE hNode, _Bool *pResult)
 Check whether a feature is implemented. More...
 
GENAPIC_RESULT GenApiNodeIsReadable (NODE_HANDLE hNode, _Bool *pResult)
 Check whether a feature's value is readable. More...
 
GENAPIC_RESULT GenApiNodeIsWritable (NODE_HANDLE hNode, _Bool *pResult)
 Check whether a feature's value is writable. More...
 
GENAPIC_RESULT GenApiNodeMapGetNode (NODEMAP_HANDLE hMap, const char *pName, NODE_HANDLE *phNode)
 Find a node by its name. More...
 
GENAPIC_RESULT GenApiNodeMapGetNodeByIndex (NODEMAP_HANDLE hMap, size_t index, NODE_HANDLE *phNode)
 Find a node by its index. More...
 
GENAPIC_RESULT GenApiNodeMapGetNumNodes (NODEMAP_HANDLE hMap, size_t *pValue)
 Get the number of nodes contained in a node map. More...
 
GENAPIC_RESULT GenApiNodeMapPoll (NODEMAP_HANDLE hMap, int64_t timestamp)
 Poll all nodes in a node map. More...
 
GENAPIC_RESULT GenApiNodeMapPollInt32 (NODEMAP_HANDLE hMap, int32_t timestamp)
 Poll all nodes in a node map. More...
 
GENAPIC_RESULT GenApiNodeRegisterCallback (NODE_HANDLE hNode, NodeCallbackFunction_t *pCbFunction, NODE_CALLBACK_HANDLE *phCb)
 Install a node callback function. More...
 
GENAPIC_RESULT GenApiNodeToString (NODE_HANDLE hNode, char *pBuf, size_t *pBufLen)
 Return a textual representation of a node's value. More...
 
GENAPIC_RESULT GenApiNodeToStringEx (NODE_HANDLE hNode, _Bool verify, char *pBuf, size_t *pBufLen)
 Return a textual representation of a node's value with optional validation. More...
 
GENAPIC_RESULT GenApiPortRead (NODE_HANDLE hNode, void *pBuffer, int64_t Address, size_t Length)
 Perform a raw read on the port implemented by the node passed. More...
 
GENAPIC_RESULT GenApiPortWrite (NODE_HANDLE hNode, const void *pBuffer, int64_t Address, size_t Length)
 Perform a raw write on the port implemented by the node passed. More...
 
GENAPIC_RESULT GenApiSelectorGetNumSelectedFeatures (NODE_HANDLE hNode, size_t *pValue)
 Return the number of selected nodes. More...
 
GENAPIC_RESULT GenApiSelectorGetNumSelectingFeatures (NODE_HANDLE hNode, size_t *pValue)
 Return the number of selecting features. More...
 
GENAPIC_RESULT GenApiSelectorGetSelectedFeatureByIndex (NODE_HANDLE hNode, size_t index, NODE_HANDLE *phNode)
 Get a selected node by its index. More...
 
GENAPIC_RESULT GenApiSelectorGetSelectingFeatureByIndex (NODE_HANDLE hNode, size_t index, NODE_HANDLE *phNode)
 Return a selecting feature by its index. More...
 

Detailed Description

Enumeration Type Documentation

Access mode of a node.

Enumerator
NI 

Not implemented.

NA 

Not available.

WO 

Write Only.

RO 

Read Only.

RW 

Read and Write.

_UndefinedAccesMode 

Access mode invalid.

Node caching modes.

Enumerator
NoCache 

Do not use cache.

WriteThrough 

Write to cache and register.

WriteAround 

Write to register, write to cache on read.

_UndefinedCachingMode 

Caching mode invalid.

File access modes.

Enumerator
GenApiFileReadAccess 

For specifying file read access on file open.

GenApiFileWriteAccess 

For specifying file write access on file open.

Node name spaces.

Enumerator
Custom 

Name resides in custom name space.

Standard 

Name resides in one of the standard name spaces.

_UndefinedNameSpace 

Name space invalid.

Node type.

Enumerator
IntegerNode 

Node represents an integer-valued parameter.

BooleanNode 

Node represents a boolean (true/false) parameter.

FloatNode 

Node represents a floating point-valued parameter.

CommandNode 

Node can trigger a command.

StringNode 

Node represents a string-valued parameter.

EnumerationNode 

Node represents an enumeration-valued parameter.

EnumEntryNode 

Node represents an 'enumeration entry' parameter.

Category 

Node for grouping parameters in a category.

_UnknownNodeType 

Node type invalid.

Node representation.

Enumerator
Linear 

Slider with linear behavior.

Logarithmic 

Slider with logarithmic behavior.

Boolean 

Checkbox.

PureNumber 

Decimal number in an edit control.

HexNumber 

Hex number in an edit control.

_UndefinedRepresentation 

Representation invalid.

Node visibility.

Enumerator
Beginner 

Visible to everyone.

Expert 

Visible to experts or gurus only.

Guru 

Visible to gurus only.

Invisible 

Not visible at all.

_UndefinedVisibility 

Visibility invalid.

Function Documentation

GENAPIC_RESULT GenApiBooleanGetValue ( NODE_HANDLE  hNode,
_Bool *  pValue 
)

Return a node's boolean value.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Get the boolean value of a node. The function will fail if the node is of a type that has no such value.

GENAPIC_RESULT GenApiBooleanSetValue ( NODE_HANDLE  hNode,
_Bool  value 
)

Set a node's boolean value.

Parameters
[in]hNodeNode to operate on
[in]valueBoolean value to set
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Set the node to a particular boolean value. The function will fail if the node is of a type that has no such value.

GENAPIC_RESULT GenApiCategoryGetFeatureByIndex ( NODE_HANDLE  hNode,
size_t  index,
NODE_HANDLE phEntry 
)

Get a feature node from a category by its index.

Parameters
[in]hNodeCategory node handle
[in]indexIndex in category
[out]phEntryresult node handle pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Returns a NODE_HANDLE for a feature node identified by its index. Using the value returned by GenApiCategoryGetNumFeatures(), this can be used to implement a loop to iterate over all feature nodes in a given category.

GENAPIC_RESULT GenApiCategoryGetNumFeatures ( NODE_HANDLE  hNode,
size_t *  pValue 
)

Returns the number of features in a category.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the number of feature nodes that a category node manages.

GENAPIC_RESULT GenApiCommandExecute ( NODE_HANDLE  hNode)

Trigger the execution of a command.

Parameters
[in]hNodeNode to operate on
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Execute the command associated with a command node.

GENAPIC_RESULT GenApiCommandIsDone ( NODE_HANDLE  hNode,
_Bool *  pValue 
)

Check whether command has finished.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

After initiating a command using GenApiCommandExecute(), use this function to check whether the command has run to completion.

GENAPIC_RESULT GenApiEnumerationEntryGetSymbolic ( NODE_HANDLE  hNode,
char *  pBuf,
size_t *  pBufLen 
)

Return the symbolic name of an enumeration entry node.

Parameters
[in]hNodeNode to operate on
[out]pBufPointer to user-supplied character buffer, or NULL
[in,out]pBufLenPointer to actual buffer size
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the symbolic name of an 'enumeration entry' node. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiEnumerationEntryGetValue ( NODE_HANDLE  hNode,
int *  pValue 
)

Returns the numerical index of an enumeration entry.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the numerical index of an 'enumeration entry' node.

GENAPIC_RESULT GenApiEnumerationGetEntryByIndex ( NODE_HANDLE  hNode,
size_t  index,
NODE_HANDLE pEntry 
)

Get an entry from an enumeration by index.

Parameters
[in]hNodeNode to operate on
[in]indexIndex of entry to get
[out]pEntryPointer to variable receiving result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return a handle for an enumeration entry node identified by a numerical index. Using the number of entries returned by GenApiEnumerationGetNumEntries(), this can be used to iterate over every enumeration entry contained in an enumeration.

GENAPIC_RESULT GenApiEnumerationGetEntryByName ( NODE_HANDLE  hNode,
const char *  pName,
NODE_HANDLE pEntry 
)

Get an entry from an enumeration by name.

Parameters
[in]hNodeNode to operate on
[in]pNameName of entry to get
[out]pEntryPointer to variable receiving result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return a handle for an enumeration entry node identified by its name.

GENAPIC_RESULT GenApiEnumerationGetNumEntries ( NODE_HANDLE  hNode,
size_t *  pValue 
)

Get the number of entries in an enumeration.

Parameters
[in]hNodeNode to operate on
[out]pValuePointer to variable receiving result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Get the number of entries for an enumeration node.

GENAPIC_RESULT GenApiFileClose ( GENAPI_FILE_HANDLE  hFile)

Closes a file.

Parameters
[in]hFileThe file handle.
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Closes a file. The handle is invalid after closing.

GENAPIC_RESULT GenApiFileExists ( NODEMAP_HANDLE  hMap,
const char *  pFileName,
_Bool *  pResult 
)

Check whether a file exists.

Parameters
[in]hMapDevice Node map handle.
[in]pFileNameThe name of the file.
[out]pResultReturns true if the file exists.
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Check whether a file exists.

GENAPIC_RESULT GenApiFileOpen ( NODEMAP_HANDLE  hMap,
const char *  pFileName,
EGenApiFileAccessMode  accessMode,
GENAPI_FILE_HANDLE phFile 
)

Opens a file.

Parameters
[in]hMapDevice Node map handle.
[in]pFileNameThe name of the file.
[in]accessModeSpecifies read or write access.
[out]phFileReturns the file handle.
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Only one file can be opened at a time per node map. The file is automatically closed if the node map is destroyed.

GENAPIC_RESULT GenApiFileRead ( GENAPI_FILE_HANDLE  hFile,
void *  pBuffer,
size_t *  pLength 
)

Reads binary data from a file.

Parameters
[out]hFileThe file handle.
[in]pBufferThe data buffer.
[in,out]pLengthSpecifies the size of the buffer. Returns the count of bytes read.
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

The end of file is reached if zero bytes are returned and the return error code is GENAPI_E_OK.

GENAPIC_RESULT GenApiFilesAreSupported ( NODEMAP_HANDLE  hMap,
_Bool *  pResult 
)

Check whether the device supports accessing files.

Parameters
[in]hMapDevice Node map handle.
[out]pResultReturns true if files are supported.
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Check whether the device supports accessing files.

GENAPIC_RESULT GenApiFileWrite ( GENAPI_FILE_HANDLE  hFile,
const void *  pBuffer,
size_t  length 
)

Writes binary data to a file.

Parameters
[in]hFileThe file handle.
[in]pBufferThe data buffer.
[in]lengthSpecifies the number of bytes to write.
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Writes binary data to a file.

GENAPIC_RESULT GenApiFloatGetMax ( NODE_HANDLE  hNode,
double *  pValue 
)

Get a node's maximum floating-point value.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the maximum floating-point value of a node.

GENAPIC_RESULT GenApiFloatGetMin ( NODE_HANDLE  hNode,
double *  pValue 
)

Get a node's minimum floating-point value.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the minimum floating-point value of a node.

GENAPIC_RESULT GenApiFloatGetRepresentation ( NODE_HANDLE  hNode,
EGenApiRepresentation pValue 
)

Get a node's preferred representation.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the preferred representation for the node's value. This value is a hint telling how the value should best be represented in a graphical user interface.

GENAPIC_RESULT GenApiFloatGetUnit ( NODE_HANDLE  hNode,
char *  pBuf,
size_t *  pBufLen 
)

Return a floating-point node's unit.

Parameters
[in]hNodeNode to operate on
[out]pBufBuffer to receive result
[in,out]pBufLenResult buffer size
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Query the node represented by hNode for the unit that applies to its value. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiFloatGetValue ( NODE_HANDLE  hNode,
double *  pValue 
)

Get a node's floating-point value without validation.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the floating-point value of a node. No validation is performed on the value returned.

GENAPIC_RESULT GenApiFloatGetValueEx ( NODE_HANDLE  hNode,
_Bool  verify,
double *  pValue 
)

Return a node's floating-point value with optional validation.

Parameters
[in]hNodeNode to operate on
[in]verifyBoolean switch to enable validation
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the floating-point value of a node. If verify equals true, the result value is checked to ensure that it does not violate any of the node's constraints.

GENAPIC_RESULT GenApiFloatSetValue ( NODE_HANDLE  hNode,
double  value 
)

Set a node's floating-point value with mandatory validation.

Parameters
[in]hNodeNode to operate on
[in]valueValue to set
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Set the node to a particular value. The function will fail if the value to be set conflicts with any relevant constraints.

GENAPIC_RESULT GenApiFloatSetValueEx ( NODE_HANDLE  hNode,
_Bool  verify,
double  value 
)

Set a node's floating-point value with optional validation.

Parameters
[in]hNodeNode to operate on
[in]verifyBoolean switch to enable validation
[in]valueValue to set
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Set the node to a particular value. If verify equals true, the function will fail if the value to be set conflicts with any relevant constraints.

GENAPIC_RESULT GenApiGetLastErrorDetail ( char *  pBuf,
size_t *  pBufLen 
)

Get detailed textual description for the latest error details, e.g. the origin of the error.

Parameters
[out]pBufPointer to the user-supplied character buffer, or NULL
[in,out]pBufLenPointer to the actual buffer size
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Whenever a function reports an error, it also sets up a string that describes the error in more detail than the brief error message returned by GenApiGetLastErrorMessage(). This function can be used to retrieve that description by copying it to a user-provided buffer. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiGetLastErrorMessage ( char *  pBuf,
size_t *  pBufLen 
)

Get a brief textual description of the latest error.

Parameters
[out]pBufPointer to user-supplied character buffer, or NULL
[in,out]pBufLenPointer to the actual buffer size
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Whenever a function reports an error, it also sets up a string description for it. This function can be used to retrieve that description by copying it to a user-provided buffer. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiIntegerGetInc ( NODE_HANDLE  hNode,
int64_t *  pValue 
)

Get the value increment from an integer node.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the integer value increment of a node.

GENAPIC_RESULT GenApiIntegerGetIncInt32 ( NODE_HANDLE  hNode,
int32_t *  pValue 
)

Get the value increment from an integer node.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the integer value increment of a node.

GENAPIC_RESULT GenApiIntegerGetMax ( NODE_HANDLE  hNode,
int64_t *  pValue 
)

Get the maximum value from an integer node.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the maximum integer value of a node.

GENAPIC_RESULT GenApiIntegerGetMaxInt32 ( NODE_HANDLE  hNode,
int32_t *  pValue 
)

Get the maximum value from an integer node.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the maximum integer value of a node.

GENAPIC_RESULT GenApiIntegerGetMin ( NODE_HANDLE  hNode,
int64_t *  pValue 
)

Get the minimum value from an integer node.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the minimum integer value of a node.

GENAPIC_RESULT GenApiIntegerGetMinInt32 ( NODE_HANDLE  hNode,
int32_t *  pValue 
)

Get the minimum value from an integer node.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the minimum integer value of a node.

GENAPIC_RESULT GenApiIntegerGetRepresentation ( NODE_HANDLE  hNode,
EGenApiRepresentation pValue 
)

Get a node's preferred representation.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the preferred representation for the node's value. This value is a hint telling how the value should best be represented in a graphical user interface.

GENAPIC_RESULT GenApiIntegerGetValue ( NODE_HANDLE  hNode,
int64_t *  pValue 
)

Get a node's integer value without validation.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the integer value of a node. No validation is performed on the value returned.

GENAPIC_RESULT GenApiIntegerGetValueEx ( NODE_HANDLE  hNode,
_Bool  verify,
int64_t *  pValue 
)

Return a node's integer value with optional validation.

Parameters
[in]hNodeNode to operate on
[in]verifyBoolean switch to enable validation
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the integer value of a node. If verify equals true, the result value is checked to ensure that it does not violate any of the node's constraints.

GENAPIC_RESULT GenApiIntegerGetValueExInt32 ( NODE_HANDLE  hNode,
_Bool  verify,
int32_t *  pValue 
)

Return a node's integer value with optional validation.

Parameters
[in]hNodeNode to operate on
[in]verifyBoolean switch to enable validation
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the integer value of a node. If verify equals true, the result value is checked to ensure that it does not violate any of the node's constraints.

GENAPIC_RESULT GenApiIntegerGetValueInt32 ( NODE_HANDLE  hNode,
int32_t *  pValue 
)

Get a node's integer value without validation.

Parameters
[in]hNodeNode to operate on
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the integer value of a node. No validation is performed on the value returned.

GENAPIC_RESULT GenApiIntegerSetValue ( NODE_HANDLE  hNode,
int64_t  value 
)

Set a node's integer value with mandatory validation.

Parameters
[in]hNodeNode to operate on
[in]valueValue to set
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Set the node to a particular value. The function will fail if the value to be set conflicts with any relevant constraints.

GENAPIC_RESULT GenApiIntegerSetValueEx ( NODE_HANDLE  hNode,
_Bool  verify,
int64_t  value 
)

Set a node's integer value with optional validation.

Parameters
[in]hNodeNode to operate on
[in]verifyBoolean switch to enable validation
[in]valueValue to set
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Set the node to a particular value. If verify equals true, the function will fail if the value to be set conflicts with any relevant constraints.

GENAPIC_RESULT GenApiIntegerSetValueExInt32 ( NODE_HANDLE  hNode,
_Bool  verify,
int32_t  value 
)

Set a node's integer value with optional validation.

Parameters
[in]hNodeNode to operate on
[in]verifyBoolean switch to enable validation
[in]valueValue to set
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Set the node to a particular value. If verify equals true, the function will fail if the value to be set conflicts with any relevant constraints.

GENAPIC_RESULT GenApiIntegerSetValueInt32 ( NODE_HANDLE  hNode,
int32_t  value 
)

Set a node's integer value with mandatory validation.

Parameters
[in]hNodeNode to operate on
[in]valueValue to set
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Set the node to a particular value. The function will fail if the value to be set conflicts with any relevant constraints.

GENAPIC_RESULT GenApiNodeDeregisterCallback ( NODE_HANDLE  hNode,
NODE_CALLBACK_HANDLE  hCb 
)

Remove a node callback function.

Parameters
[in]hNodeNode to operate on
[in]hCbCallback handle
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Remove a callback function previously installed by GenApiNodeRegisterCallback() from a node.

GENAPIC_RESULT GenApiNodeFromString ( NODE_HANDLE  hNode,
const char *  pString 
)

Set a node's value from a text string with mandatory validation.

Parameters
[in]hNodeNode to operate on
[in]pStringBuffer containing text string
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

This function takes a text string in pString and tries to convert it to a value to set the node to. This may fail for a number of reasons, e.g. due to the node not being writeable or not having a value that could be set. The function will also fail if the value to be set conflicts with any relevant constraints.

GENAPIC_RESULT GenApiNodeFromStringEx ( NODE_HANDLE  hNode,
_Bool  verify,
const char *  pString 
)

Set a node's value from a text string with optional validation.

Parameters
[in]hNodeNode to operate on
[in]verifyBoolean switch to enable validation
[in]pStringBuffer containing text string
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

This function takes a text string in pString and tries to convert it to a value to set the node to. This may fail for a number of reasons, e.g. due to the node not being writeable or not having a value that could be set. If verify equals true, the function will also fail if the value to be set conflicts with any relevant constraints.

GENAPIC_RESULT GenApiNodeGetAccessMode ( NODE_HANDLE  hNode,
EGenApiAccessMode pAccessMode 
)

Query node for allowed access modes.

Parameters
[in]hNodeNode to operate on
[out]pAccessModePointer to variable receiving access mode
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

The value returned in the variable pointed to by pAccessMode indicates what kinds of access are allowed for the node referred to by hNode.

GENAPIC_RESULT GenApiNodeGetAlias ( NODE_HANDLE  hNode,
NODE_HANDLE phNode 
)

Get a node's alias.

Parameters
[in]hNodeNode to operate on
[out]phNodeResult pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

This function returns a node's alias if available. An invalid handle is returned if no alias exists. If an alias exists, a handle for the alias node is returned in the variable pointed to by phNode.

GENAPIC_RESULT GenApiNodeGetCachingMode ( NODE_HANDLE  hNode,
EGenApiCachingMode pCachingMode 
)

Query node for its caching mode.

Parameters
[in]hNodeNode to operate on
[out]pCachingModePointer to variable receiving result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Caching may be implemented differently for nodes with different characteristics. There is an enumerated type EGenApiCachingMode that is used to encode the caching strategy for a particular node. Use this function to get a node's caching mode.

GENAPIC_RESULT GenApiNodeGetDescription ( NODE_HANDLE  hNode,
char *  pBuf,
size_t *  pBufLen 
)

Return a node's description text.

Parameters
[in]hNodeNode to operate on
[out]pBufBuffer to receive result
[in,out]pBufLenResult buffer size on input and buffer size needed on output
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Query the node represented by hNode for its associated 'description' text. This is a text string describing the node and its purpose in some more detail than GenApiNodeGetToolTip(), suitable for being displayed as an on-line help by interactive programs that offer access to the node. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiNodeGetDisplayName ( NODE_HANDLE  hNode,
char *  pBuf,
size_t *  pBufLen 
)

Return a node's user-friendly name.

Parameters
[in]hNodeNode to operate on
[out]pBufBuffer to receive result
[in,out]pBufLenResult buffer size on input and buffer size needed on output
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Query the node represented by hNode for its associated 'user-friendly' name. While the node name returned by GenApiNodeGetName() is meant to be a unique identification tag, this is a more descriptive name meant to be used to identify a node in a dialog. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiNodeGetName ( NODE_HANDLE  hNode,
char *  pBuf,
size_t *  pBufLen 
)

Return a node's name.

Parameters
[in]hNodeNode to operate on
[out]pBufBuffer to receive result
[in,out]pBufLenResult buffer size on input and buffer size needed on output
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Query the node represented by hNode for its name. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiNodeGetNameSpace ( NODE_HANDLE  hNode,
EGenApiNameSpace pNamespace 
)

Return a node's name space.

Parameters
[in]hNodeNode to operate on
[out]pNamespacePointer to variable receiving name space
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Query the node represented by hNode for the name space (custom or standard) it belongs to.

GENAPIC_RESULT GenApiNodeGetPollingTime ( NODE_HANDLE  hNode,
int64_t *  pPollingTime 
)

Query a node for its recommended polling interval.

Parameters
[in]hNodeNode to operate on
[out]pPollingTimePointer to variable receiving result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Nodes that are subject to asynchronous state changes must be periodically queried (polled) in order to detect state changes. Such nodes have an associated attribute specifying a recommended polling interval in milliseconds. Use this function to get that value.

GENAPIC_RESULT GenApiNodeGetPollingTimeInt32 ( NODE_HANDLE  hNode,
int32_t *  pPollingTime 
)

Query a node for its recommended polling interval.

Parameters
[in]hNodeNode to operate on
[out]pPollingTimePointer to variable receiving result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Nodes that are subject to asynchronous state changes must be periodically queried (polled) in order to detect state changes. Such nodes have an associated attribute specifying a recommended polling interval in milliseconds. Use this function to get that value.

GENAPIC_RESULT GenApiNodeGetToolTip ( NODE_HANDLE  hNode,
char *  pBuf,
size_t *  pBufLen 
)

Return a node's tool tip text.

Parameters
[in]hNodeNode to operate on
[out]pBufBuffer to receive result
[in,out]pBufLenResult buffer size on input and buffer size needed on output
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Query the node represented by hNode for its associated 'tool tip' text. This is a text string briefly describing the node and its purpose, suitable for being displayed as a pop-up by interactive programs that offer access to the node. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiNodeGetType ( NODE_HANDLE  hNode,
EGenApiNodeType pType 
)

Get node type.

Parameters
[in]hNodeNode to operate on
[in,out]pTypeResult pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Query the node represented by hNode for its type.

GENAPIC_RESULT GenApiNodeGetVisibility ( NODE_HANDLE  hNode,
EGenApiVisibility pVisibility 
)

Return a node's visibility.

Parameters
[in]hNodeNode to operate on
[out]pVisibilityPointer to variable receiving visibility
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Query the node represented by hNode for its level of visibility (Beginner, Expert, Guru, or Invisible).

GENAPIC_RESULT GenApiNodeImposeAccessMode ( NODE_HANDLE  hNode,
EGenApiAccessMode  imposedAccessMode 
)

Modify a node's accessibility.

Parameters
[in]hNodeNode to operate on
[in]imposedAccessModeDesired new access mode
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Whether a particular node allows read, write, or any access at all, is encoded in its access mode. The original access mode for a node, which is computed taking into account node interdependencies, can be further restricted by means of this function. It is not possible to set the access mode to one more permissive than the original mode. An attempt to do so will be ignored.

GENAPIC_RESULT GenApiNodeImposeVisibility ( NODE_HANDLE  hNode,
EGenApiVisibility  imposedVisibility 
)

Modify a node's visibility.

Parameters
[in]hNodeNode to operate on
[in]imposedVisibilityDesired new visibility
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

A particular node is only visible if the current user level is set at least as high as the node's visibility. This function can be used to further limit a node's visibility. The function cannot be used to increase a node's visibility (so that it would become visible at a lower user level). Any attempt to do so will have no effect.

GENAPIC_RESULT GenApiNodeInvalidateNode ( NODE_HANDLE  hNode)

Mark node as possibly changed.

Parameters
[in]hNodeNode to operate on
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Calling this function invalidates the currently cached status for the node. Then, callbacks for all dependent nodes are triggered.

GENAPIC_RESULT GenApiNodeIsAvailable ( NODE_HANDLE  hNode,
_Bool *  pResult 
)

Check whether a feature's value is available.

Parameters
[in]hNodeNode to operate on
[out]pResultPointer to variable receiving boolean result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Check whether the value of the feature represented by hNode is currently accessible (GenApiNodeGetAccessMode() returns neither NA nor NI).

GENAPIC_RESULT GenApiNodeIsImplemented ( NODE_HANDLE  hNode,
_Bool *  pResult 
)

Check whether a feature is implemented.

Parameters
[in]hNodeNode to operate on
[out]pResultPointer to variable receiving boolean result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Check whether the feature represented by hNode is actually implemented (GenApiNodeGetAccessMode() returns not NI).

GENAPIC_RESULT GenApiNodeIsReadable ( NODE_HANDLE  hNode,
_Bool *  pResult 
)

Check whether a feature's value is readable.

Parameters
[in]hNodeNode to operate on
[out]pResultPointer to variable receiving boolean result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Check whether the value of the feature represented by hNode can be read (GenApiNodeGetAccessMode() returns RO or RW).

GENAPIC_RESULT GenApiNodeIsWritable ( NODE_HANDLE  hNode,
_Bool *  pResult 
)

Check whether a feature's value is writable.

Parameters
[in]hNodeNode to operate on
[out]pResultPointer to variable receiving boolean result
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Check whether the value of the feature represented by hNode can be written (GenApiNodeGetAccessMode() returns WO or RW).

GENAPIC_RESULT GenApiNodeMapGetNode ( NODEMAP_HANDLE  hMap,
const char *  pName,
NODE_HANDLE phNode 
)

Find a node by its name.

Parameters
[in]hMapNode map handle
[in]pNameNode name to find
[out]phNodeResult pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Use this function to search a node map for a node with a given name. An invalid handle is returned if not found. If found, a handle for the node is returned in the variable pointed to by phNode.

GENAPIC_RESULT GenApiNodeMapGetNodeByIndex ( NODEMAP_HANDLE  hMap,
size_t  index,
NODE_HANDLE phNode 
)

Find a node by its index.

Parameters
[in]hMapNode map handle
[in]indexIndex of node to get
[out]phNodeResult pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Translate a numerical index to a node handle. By using GenApiNodeMapGetNumNodes() to get the number of nodes in a node map, this function can be used to get a handle for every node contained, without having to know its name.

GENAPIC_RESULT GenApiNodeMapGetNumNodes ( NODEMAP_HANDLE  hMap,
size_t *  pValue 
)

Get the number of nodes contained in a node map.

Parameters
[in]hMapNode map handle
[out]pValueResult value pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Return the number of nodes contained in a node map. This value can be used to traverse a node map, visiting every node using GenApiNodeMapGetNodeByIndex().

GENAPIC_RESULT GenApiNodeMapPoll ( NODEMAP_HANDLE  hMap,
int64_t  timestamp 
)

Poll all nodes in a node map.

Parameters
[in]hMapNode map handle
[in]timestampCurrent time stamp in ms
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Poll all nodes in the node map and execute callbacks for those that are expired.

GENAPIC_RESULT GenApiNodeMapPollInt32 ( NODEMAP_HANDLE  hMap,
int32_t  timestamp 
)

Poll all nodes in a node map.

Parameters
[in]hMapNode map handle
[in]timestampCurrent time stamp in ms
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Poll all nodes in the node map and execute callbacks for those that are expired.

GENAPIC_RESULT GenApiNodeRegisterCallback ( NODE_HANDLE  hNode,
NodeCallbackFunction_t *  pCbFunction,
NODE_CALLBACK_HANDLE phCb 
)

Install a node callback function.

Parameters
[in]hNodeNode to operate on
[in]pCbFunctionCallback function pointer
[out]phCbCallback handle
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Install a callback function, to be called whenever any of the node's attributes changes. This also includes the access mode of the node.

Note
If you need to perform special processing whenever the node's value changes you need to retrieve the value using any of the GetValue functions.

The callback handle returned can be used to remove the callback using GenApiNodeDeregisterCallback().

GENAPIC_RESULT GenApiNodeToString ( NODE_HANDLE  hNode,
char *  pBuf,
size_t *  pBufLen 
)

Return a textual representation of a node's value.

Parameters
[in]hNodeNode to operate on
[out]pBufBuffer to receive result
[in,out]pBufLenResult buffer size
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Convert a node's value to a human-readable text string. The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiNodeToStringEx ( NODE_HANDLE  hNode,
_Bool  verify,
char *  pBuf,
size_t *  pBufLen 
)

Return a textual representation of a node's value with optional validation.

Parameters
[in]hNodeNode to operate on
[in]verifyBoolean switch to enable validation
[out]pBufBuffer to receive result
[in,out]pBufLenResult buffer size
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Convert a node's value to a human-readable text string, with optional validation. If verify equals true, the node's value is first checked against any relevant constraints, and an error is returned if the value is invalid. This check is not done if verify equals false, in this case, the function behaves identically to GenApiNodeToString(). The buffer passed to this function must be large enough to hold the entire string, including a terminating zero. If the function is called with pBuf set to NULL, the variable pointed to by pBufLen is set to the required buffer size.

GENAPIC_RESULT GenApiPortRead ( NODE_HANDLE  hNode,
void *  pBuffer,
int64_t  Address,
size_t  Length 
)

Perform a raw read on the port implemented by the node passed.

Parameters
[in]hNodeNode of the port to read from. Use GenApiNodeMapGetNode to get the node handle.
[in]pBufferPoints to the buffer to copy the data to.
[in]AddressAddress to start reading data from.
[in]LengthNumber of bytes to read starting at Address.
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Reads raw data from a port implemented by a node. Some nodes (i.e. the "Device" node) can be used to read- and write directly to the device. Specify the address from where to read data. The count of data bytes passed in Length is read. The data read will be written to the buffer passed in pBuffer. Make sure the buffer has at least a size of Length-bytes.

GENAPIC_RESULT GenApiPortWrite ( NODE_HANDLE  hNode,
const void *  pBuffer,
int64_t  Address,
size_t  Length 
)

Perform a raw write on the port implemented by the node passed.

Parameters
[in]hNodeNode of the port to write to. Use GenApiNodeMapGetNode to get the node handle.
[in]pBufferPoints to the buffer to read the data.
[in]AddressAddress where to start writing data to.
[in]LengthNumber of bytes to write starting at Address.
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Writes raw data to a port implemented by a node. Some nodes (i.e. the "Device" node) can be used to read- and write directly to the device. Specify the address from where to read data. The count of data bytes passed in Length is read. The data written will be read from the buffer passed in pBuffer. Make sure the buffer has at least a size of Length-bytes.

GENAPIC_RESULT GenApiSelectorGetNumSelectedFeatures ( NODE_HANDLE  hNode,
size_t *  pValue 
)

Return the number of selected nodes.

Parameters
[in]hNodeNode to operate on
[out]pValueNumber of selected nodes
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Returns the number of nodes selected by this node.

GENAPIC_RESULT GenApiSelectorGetNumSelectingFeatures ( NODE_HANDLE  hNode,
size_t *  pValue 
)

Return the number of selecting features.

Parameters
[in]hNodeNode to operate on
[out]pValueNumber of selecting features
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

Returns the number of features selecting this node.

GENAPIC_RESULT GenApiSelectorGetSelectedFeatureByIndex ( NODE_HANDLE  hNode,
size_t  index,
NODE_HANDLE phNode 
)

Get a selected node by its index.

Parameters
[in]hNodeNode to operate on
[in]indexIndex in selected nodes
[out]phNoderesult node handle pointer of the selected node
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

A feature node may select one or more other features. This function returns a NODE_HANDLE for a selected node identified by its index. Using the value returned by GenApiNodeGetNumSelectedFeatures(), this can be used to implement a loop to iterate over all selected nodes of a given node.

GENAPIC_RESULT GenApiSelectorGetSelectingFeatureByIndex ( NODE_HANDLE  hNode,
size_t  index,
NODE_HANDLE phNode 
)

Return a selecting feature by its index.

Parameters
[in]hNodeNode to operate on
[in]indexIndex in selectors
[out]phNoderesult node handle pointer
Returns
If the function succeeds, the return value is GENAPI_E_OK.
If the function fails, the return value will be any of error codes described in the section Error Codes.

A feature node may be selected by one or more other features. This function returns a NODE_HANDLE for a selector node identified by its index. Using the value returned by GenApiNodeGetNumSelectingFeatures(), this can be used to implement a loop to iterate over all selectors of a given node.


pylon C 5.0.5
Copyright © 2006-2016 Basler AG (Thu Aug 11 2016 18:01:26)