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... | |
enum EGenApiAccessMode |
enum EGenApiCachingMode |
enum EGenApiNameSpace |
enum EGenApiNodeType |
Node type.
enum EGenApiVisibility |
GENAPIC_RESULT GenApiBooleanGetValue | ( | NODE_HANDLE | hNode, |
_Bool * | pValue | ||
) |
Return a node's boolean value.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[in] | value | Boolean value to set |
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.
[in] | hNode | Category node handle |
[in] | index | Index in category |
[out] | phEntry | result node handle pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
Return the number of feature nodes that a category node manages.
GENAPIC_RESULT GenApiCommandExecute | ( | NODE_HANDLE | hNode | ) |
Trigger the execution of a command.
[in] | hNode | Node to operate on |
Execute the command associated with a command node.
GENAPIC_RESULT GenApiCommandIsDone | ( | NODE_HANDLE | hNode, |
_Bool * | pValue | ||
) |
Check whether command has finished.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pBuf | Pointer to user-supplied character buffer, or NULL |
[in,out] | pBufLen | Pointer to actual buffer size |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[in] | index | Index of entry to get |
[out] | pEntry | Pointer to variable receiving result |
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.
[in] | hNode | Node to operate on |
[in] | pName | Name of entry to get |
[out] | pEntry | Pointer to variable receiving result |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Pointer to variable receiving result |
Get the number of entries for an enumeration node.
GENAPIC_RESULT GenApiFileClose | ( | GENAPI_FILE_HANDLE | hFile | ) |
Closes a file.
[in] | hFile | The file handle. |
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.
[in] | hMap | Device Node map handle. |
[in] | pFileName | The name of the file. |
[out] | pResult | Returns true if the file exists. |
Check whether a file exists.
GENAPIC_RESULT GenApiFileOpen | ( | NODEMAP_HANDLE | hMap, |
const char * | pFileName, | ||
EGenApiFileAccessMode | accessMode, | ||
GENAPI_FILE_HANDLE * | phFile | ||
) |
Opens a file.
[in] | hMap | Device Node map handle. |
[in] | pFileName | The name of the file. |
[in] | accessMode | Specifies read or write access. |
[out] | phFile | Returns the file handle. |
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.
[out] | hFile | The file handle. |
[in] | pBuffer | The data buffer. |
[in,out] | pLength | Specifies the size of the buffer. Returns the count of bytes read. |
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.
[in] | hMap | Device Node map handle. |
[out] | pResult | Returns true if files are supported. |
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.
[in] | hFile | The file handle. |
[in] | pBuffer | The data buffer. |
[in] | length | Specifies the number of bytes to write. |
Writes binary data to a file.
GENAPIC_RESULT GenApiFloatGetMax | ( | NODE_HANDLE | hNode, |
double * | pValue | ||
) |
Get a node's maximum floating-point value.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
Return the minimum floating-point value of a node.
GENAPIC_RESULT GenApiFloatGetRepresentation | ( | NODE_HANDLE | hNode, |
EGenApiRepresentation * | pValue | ||
) |
Get a node's preferred representation.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pBuf | Buffer to receive result |
[in,out] | pBufLen | Result buffer size |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[in] | verify | Boolean switch to enable validation |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[in] | value | Value to set |
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.
[in] | hNode | Node to operate on |
[in] | verify | Boolean switch to enable validation |
[in] | value | Value to set |
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.
[out] | pBuf | Pointer to the user-supplied character buffer, or NULL |
[in,out] | pBufLen | Pointer to the actual buffer size |
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.
[out] | pBuf | Pointer to user-supplied character buffer, or NULL |
[in,out] | pBufLen | Pointer to the actual buffer size |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
Return the minimum integer value of a node.
GENAPIC_RESULT GenApiIntegerGetRepresentation | ( | NODE_HANDLE | hNode, |
EGenApiRepresentation * | pValue | ||
) |
Get a node's preferred representation.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[in] | verify | Boolean switch to enable validation |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[in] | verify | Boolean switch to enable validation |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Result value pointer |
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.
[in] | hNode | Node to operate on |
[in] | value | Value to set |
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.
[in] | hNode | Node to operate on |
[in] | verify | Boolean switch to enable validation |
[in] | value | Value to set |
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.
[in] | hNode | Node to operate on |
[in] | verify | Boolean switch to enable validation |
[in] | value | Value to set |
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.
[in] | hNode | Node to operate on |
[in] | value | Value to set |
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.
[in] | hNode | Node to operate on |
[in] | hCb | Callback handle |
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.
[in] | hNode | Node to operate on |
[in] | pString | Buffer containing text string |
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.
[in] | hNode | Node to operate on |
[in] | verify | Boolean switch to enable validation |
[in] | pString | Buffer containing text string |
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.
[in] | hNode | Node to operate on |
[out] | pAccessMode | Pointer to variable receiving access mode |
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.
[in] | hNode | Node to operate on |
[out] | phNode | Result pointer |
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.
[in] | hNode | Node to operate on |
[out] | pCachingMode | Pointer to variable receiving result |
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.
[in] | hNode | Node to operate on |
[out] | pBuf | Buffer to receive result |
[in,out] | pBufLen | Result buffer size on input and buffer size needed on output |
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.
[in] | hNode | Node to operate on |
[out] | pBuf | Buffer to receive result |
[in,out] | pBufLen | Result buffer size on input and buffer size needed on output |
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.
[in] | hNode | Node to operate on |
[out] | pBuf | Buffer to receive result |
[in,out] | pBufLen | Result buffer size on input and buffer size needed on output |
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.
[in] | hNode | Node to operate on |
[out] | pNamespace | Pointer to variable receiving name space |
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.
[in] | hNode | Node to operate on |
[out] | pPollingTime | Pointer to variable receiving result |
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.
[in] | hNode | Node to operate on |
[out] | pPollingTime | Pointer to variable receiving result |
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.
[in] | hNode | Node to operate on |
[out] | pBuf | Buffer to receive result |
[in,out] | pBufLen | Result buffer size on input and buffer size needed on output |
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.
[in] | hNode | Node to operate on |
[in,out] | pType | Result pointer |
Query the node represented by hNode for its type.
GENAPIC_RESULT GenApiNodeGetVisibility | ( | NODE_HANDLE | hNode, |
EGenApiVisibility * | pVisibility | ||
) |
Return a node's visibility.
[in] | hNode | Node to operate on |
[out] | pVisibility | Pointer to variable receiving visibility |
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.
[in] | hNode | Node to operate on |
[in] | imposedAccessMode | Desired new access mode |
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.
[in] | hNode | Node to operate on |
[in] | imposedVisibility | Desired new visibility |
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.
[in] | hNode | Node to operate on |
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.
[in] | hNode | Node to operate on |
[out] | pResult | Pointer to variable receiving boolean result |
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.
[in] | hNode | Node to operate on |
[out] | pResult | Pointer to variable receiving boolean result |
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.
[in] | hNode | Node to operate on |
[out] | pResult | Pointer to variable receiving boolean result |
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.
[in] | hNode | Node to operate on |
[out] | pResult | Pointer to variable receiving boolean result |
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.
[in] | hMap | Node map handle |
[in] | pName | Node name to find |
[out] | phNode | Result pointer |
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.
[in] | hMap | Node map handle |
[in] | index | Index of node to get |
[out] | phNode | Result pointer |
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.
[in] | hMap | Node map handle |
[out] | pValue | Result value pointer |
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.
[in] | hMap | Node map handle |
[in] | timestamp | Current time stamp in ms |
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.
[in] | hMap | Node map handle |
[in] | timestamp | Current time stamp in ms |
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.
[in] | hNode | Node to operate on |
[in] | pCbFunction | Callback function pointer |
[out] | phCb | Callback handle |
Install a callback function, to be called whenever any of the node's attributes changes. This also includes the access mode of the node.
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.
[in] | hNode | Node to operate on |
[out] | pBuf | Buffer to receive result |
[in,out] | pBufLen | Result buffer size |
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.
[in] | hNode | Node to operate on |
[in] | verify | Boolean switch to enable validation |
[out] | pBuf | Buffer to receive result |
[in,out] | pBufLen | Result buffer size |
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.
[in] | hNode | Node of the port to read from. Use GenApiNodeMapGetNode to get the node handle. |
[in] | pBuffer | Points to the buffer to copy the data to. |
[in] | Address | Address to start reading data from. |
[in] | Length | Number of bytes to read starting at Address. |
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.
[in] | hNode | Node of the port to write to. Use GenApiNodeMapGetNode to get the node handle. |
[in] | pBuffer | Points to the buffer to read the data. |
[in] | Address | Address where to start writing data to. |
[in] | Length | Number of bytes to write starting at Address. |
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.
[in] | hNode | Node to operate on |
[out] | pValue | Number of selected nodes |
Returns the number of nodes selected by this node.
GENAPIC_RESULT GenApiSelectorGetNumSelectingFeatures | ( | NODE_HANDLE | hNode, |
size_t * | pValue | ||
) |
Return the number of selecting features.
[in] | hNode | Node to operate on |
[out] | pValue | Number of selecting features |
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.
[in] | hNode | Node to operate on |
[in] | index | Index in selected nodes |
[out] | phNode | result node handle pointer of the selected node |
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.
[in] | hNode | Node to operate on |
[in] | index | Index in selectors |
[out] | phNode | result node handle pointer |
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.