GenApiNodeToString(NODE_HANDLE hNode, char * pBuf, size_t * pBufLen) Return a textual representation of a node's value.
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.
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.
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.
Return: 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 ErrorCodes.
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.
Return the symbolic name of an enumeration entry node.
Parameters:
hNode Node to operate on
pBuf Pointer to user-supplied character buffer, or NULL
pBufLen Pointer to actual buffer size
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return a node's floating-point value with optional validation.
Parameters:
hNode Node to operate on
verify Boolean switch to enable validation
pValue Result value pointer
Return: 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 ErrorCodes.
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.
Get detailed textual description for the latest error details, e.g. the origin of the error.
Parameters:
pBuf Pointer to the user-supplied character buffer, or NULL
pBufLen Pointer to the actual buffer size
Return: 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 ErrorCodes.
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.
Get a brief textual description of the latest error.
Parameters:
pBuf Pointer to user-supplied character buffer, or NULL
pBufLen Pointer to the actual buffer size
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return a node's integer value with optional validation.
Parameters:
hNode Node to operate on
verify Boolean switch to enable validation
pValue Result value pointer
Return: 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 ErrorCodes.
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.
Set a node's value from a text string with mandatory validation.
Parameters:
hNode Node to operate on
pString Buffer containing text string
Return: 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 ErrorCodes.
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.
Set a node's value from a text string with optional validation.
Parameters:
hNode Node to operate on
verify Boolean switch to enable validation
pString Buffer containing text string
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
pBufLen Result buffer size on input and buffer size needed on output
Return: 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 ErrorCodes.
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.
pBufLen Result buffer size on input and buffer size needed on output
Return: 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 ErrorCodes.
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.
pBufLen Result buffer size on input and buffer size needed on output
Return: 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 ErrorCodes.
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.
Query a node for its recommended polling interval.
Parameters:
hNode Node to operate on
pPollingTime Pointer to variable receiving result
Return: 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 ErrorCodes.
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.
pBufLen Result buffer size on input and buffer size needed on output
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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.
Return: 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 ErrorCodes.
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().
Return a textual representation of a node's value.
Parameters:
hNode Node to operate on
pBuf Buffer to receive result
pBufLen Result buffer size
Return: 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 ErrorCodes.
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.
Return a textual representation of a node's value with optional validation.
Parameters:
hNode Node to operate on
verify Boolean switch to enable validation
pBuf Buffer to receive result
pBufLen Result buffer size
Return: 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 ErrorCodes.
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.
Perform a raw read on the port implemented by the node passed.
Parameters:
hNode Node of the port to read from. Use GenApiNodeMapGetNode to get the node handle.
pBuffer Points to the buffer to copy the data to.
Address Address to start reading data from.
Length Number of bytes to read starting at Address.
Return: 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 ErrorCodes.
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.
Perform a raw write on the port implemented by the node passed.
Parameters:
hNode Node of the port to write to. Use GenApiNodeMapGetNode to get the node handle.
pBuffer Points to the buffer to read the data.
Address Address where to start writing data to.
Length Number of bytes to write starting at Address.
Return: 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 ErrorCodes.
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.
pBuffer Points to the buffer for storing the data read from the node. This parameter must not be NULL.
pLength On input, the value points to size in bytes of the buffer passed in pBuffer. Use GenApiRegisterGetLength() to get the length of the register. On successful return, it will point to the number of bytes written to pBuffer. This parameter must not be NULL.
Return: 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 ErrorCodes.
Read binary data from a register node. The data retrieved will be written to the buffer passed in pBuffer. You can retrieve the length of the register by calling GenApiRegisterGetLength().
pBuffer Points to the buffer holding the data to write to the node. This parameter must not be NULL.
length The number of bytes of the buffer passed in pBuffer. Use GenApiRegisterGetLength() to get the length of the register. This parameter must be less or equal to the value returned by GenApiRegisterGetLength().
Return: 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 ErrorCodes.
Writes binary data to a register node. You can retrieve the length of the register by calling GenApiRegisterGetLength().
phNode result node handle pointer of the selected node
Return: 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 ErrorCodes.
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.
function GenApiSelectorGetSelectingFeatureByIndex#
Return: 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 ErrorCodes.
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.