Skip to content

GenApiC32BitMethods.h

GenApi C bindings - 32 bit functions.

Functions#

Name
GENAPIC_RESULT GenApiIntegerGetIncInt32(NODE_HANDLE hNode, int32_t * pValue)
Get the value increment from an integer node.
GENAPIC_RESULT GenApiIntegerGetMaxInt32(NODE_HANDLE hNode, int32_t * pValue)
Get the maximum value from an integer node.
GENAPIC_RESULT GenApiIntegerGetMinInt32(NODE_HANDLE hNode, int32_t * pValue)
Get the minimum value from an integer node.
GENAPIC_RESULT GenApiIntegerGetValueExInt32(NODE_HANDLE hNode, _Bool verify, int32_t * pValue)
Return a node's integer value with optional validation.
GENAPIC_RESULT GenApiIntegerGetValueInt32(NODE_HANDLE hNode, int32_t * pValue)
Get a node's integer value without validation.
GENAPIC_RESULT GenApiIntegerSetValueExInt32(NODE_HANDLE hNode, _Bool verify, int32_t value)
Set a node's integer value with optional validation.
GENAPIC_RESULT GenApiIntegerSetValueInt32(NODE_HANDLE hNode, int32_t value)
Set a node's integer value with mandatory validation.
GENAPIC_RESULT GenApiNodeGetPollingTimeInt32(NODE_HANDLE hNode, int32_t * pollingTime)
Query a node for its recommended polling interval.
GENAPIC_RESULT GenApiNodeMapPollInt32(NODEMAP_HANDLE hMap, int32_t timestamp)
Poll all nodes in a node map.

Functions Documentation#

function GenApiIntegerGetIncInt32#

GENAPIC_RESULT GenApiIntegerGetIncInt32(
    NODE_HANDLE hNode,
    int32_t * pValue
)

Get the value increment from an integer node.

Parameters:

  • hNode Node to operate on
  • 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 increment of a node.

function GenApiIntegerGetMaxInt32#

GENAPIC_RESULT GenApiIntegerGetMaxInt32(
    NODE_HANDLE hNode,
    int32_t * pValue
)

Get the maximum value from an integer node.

Parameters:

  • hNode Node to operate on
  • 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 maximum integer value of a node.

function GenApiIntegerGetMinInt32#

GENAPIC_RESULT GenApiIntegerGetMinInt32(
    NODE_HANDLE hNode,
    int32_t * pValue
)

Get the minimum value from an integer node.

Parameters:

  • hNode Node to operate on
  • 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 minimum integer value of a node.

function GenApiIntegerGetValueExInt32#

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

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.

function GenApiIntegerGetValueInt32#

GENAPIC_RESULT GenApiIntegerGetValueInt32(
    NODE_HANDLE hNode,
    int32_t * pValue
)

Get a node's integer value without validation.

Parameters:

  • hNode Node to operate on
  • 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. No validation is performed on the value returned.

function GenApiIntegerSetValueExInt32#

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

Set a node's integer value with optional validation.

Parameters:

  • hNode Node to operate on
  • verify Boolean switch to enable validation
  • value Value to set

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.

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.

function GenApiIntegerSetValueInt32#

GENAPIC_RESULT GenApiIntegerSetValueInt32(
    NODE_HANDLE hNode,
    int32_t value
)

Set a node's integer value with mandatory validation.

Parameters:

  • hNode Node to operate on
  • value Value to set

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.

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

function GenApiNodeGetPollingTimeInt32#

GENAPIC_RESULT GenApiNodeGetPollingTimeInt32(
    NODE_HANDLE hNode,
    int32_t * pollingTime
)

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.

function GenApiNodeMapPollInt32#

GENAPIC_RESULT GenApiNodeMapPollInt32(
    NODEMAP_HANDLE hMap,
    int32_t timestamp
)

Poll all nodes in a node map.

Parameters:

  • hMap Node map handle
  • timestamp Current time stamp in ms

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.

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

Source code#

/*-----------------------------------------------------------------------------
    Basler pylon C SDK
    Copyright (c) 2012-2022 Basler AG
    http://www.baslerweb.com
-----------------------------------------------------------------------------*/
#ifndef GenApiC32BitMethods_h__
#define GenApiC32BitMethods_h__

#include <genapic/GenApiCDefines.h>

#pragma pack(push, GENAPIC_PACKING)

#include <genapic/GenApiCTypes.h>

#ifdef __cplusplus
// avoid namespace ambiguities between std::_Bool (from yvals.h) and ::_Bool (from GenApiCTypes.h)
#  ifdef _MSC_VER
#    define _Bool ::_Bool
#    define PYLONC_BOOL_DEFINED
#  endif

extern "C"
{
#endif /* __cplusplus */

    /*
    * ----------------------------------------------------------------------------
    * Functions doing an implicit cast to 32-bit values
    * ----------------------------------------------------------------------------
    */
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiNodeGetPollingTimeInt32( NODE_HANDLE hNode, int32_t* pollingTime );
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiIntegerSetValueInt32( NODE_HANDLE hNode, int32_t value );
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiIntegerSetValueExInt32( NODE_HANDLE hNode, _Bool verify, int32_t value );
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiIntegerGetValueInt32( NODE_HANDLE hNode, int32_t* pValue );
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiIntegerGetValueExInt32( NODE_HANDLE hNode, _Bool verify, int32_t* pValue );
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiIntegerGetMinInt32( NODE_HANDLE hNode, int32_t* pValue );
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiIntegerGetMaxInt32( NODE_HANDLE hNode, int32_t* pValue );
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiIntegerGetIncInt32( NODE_HANDLE hNode, int32_t* pValue );
    GENAPIC_API GENAPIC_RESULT GENAPIC_CC GenApiNodeMapPollInt32( NODEMAP_HANDLE hMap, int32_t timestamp );

#ifdef __cplusplus
} /* extern "C" */

#ifdef PYLONC_BOOL_DEFINED
#   undef _Bool
#   undef PYLONC_BOOL_DEFINED
#endif

#endif /* __cplusplus */

#pragma pack(pop)

#endif /* GenApiC32BitMethods_h__ */

Updated on 5 July 2022 at 12:01:38