Skip to content

Group CInterface

Modules > CInterface

The functions in this section provide access to information, objects, and functionality of interfaces. This includes camera list and nodemap retrieval, event handler registration, and interface release.

Public Functions

Type Name
spinInterfaceGetCameras (spinInterface hInterface, spinCameraList hCameraList)
spinInterfaceGetCamerasEx (spinInterface hInterface, bool8_t bUpdateCameras, spinCameraList hCameraList)
spinInterfaceGetTLNodeMap (spinInterface hInterface, spinNodeMapHandle * phNodeMap)
spinInterfaceIsInUse (spinInterface hInterface, bool8_t * pbIsInUse)
spinInterfaceRegisterDeviceArrivalEventHandler (spinInterface hInterface, spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
spinInterfaceRegisterDeviceRemovalEventHandler (spinInterface hInterface, spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
spinInterfaceRegisterInterfaceEventHandler (spinInterface hInterface, spinInterfaceEventHandler hInterfaceEventHandler)
spinInterfaceRelease (spinInterface hInterface)
spinInterfaceSendActionCommand (spinInterface hInterface, size_t iDeviceKey, size_t iGroupKey, size_t iGroupMask, size_t iActionTime, bool8_t requestAck, size_t * piResultSize, actionCommandResult results)
spinInterfaceUnregisterDeviceArrivalEventHandler (spinInterface hInterface, spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
spinInterfaceUnregisterDeviceRemovalEventHandler (spinInterface hInterface, spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
spinInterfaceUnregisterInterfaceEventHandler (spinInterface hInterface, spinInterfaceEventHandler hInterfaceEventHandler)
spinInterfaceUpdateCameras (spinInterface hInterface, bool8_t * pbChanged)

Public Functions Documentation

function spinInterfaceGetCameras

spinInterfaceGetCameras (
    spinInterface hInterface,
    spinCameraList hCameraList
) 

Retrieves a camera list from an interface; camera lists must be created and destroy

See also: spinCameraListCreateEmpty()

See also: spinCameraListDestroy()

See also: spinError

Parameters:

  • hInterface The interface of the camera list to retrieve
  • hCameraList The camera list to house the cameras from the interface

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceGetCamerasEx

spinInterfaceGetCamerasEx (
    spinInterface hInterface,
    bool8_t bUpdateCameras,
    spinCameraList hCameraList
) 

Retrieves a camera list from an interface; manually set whether to update the cameras; camera lists must be created and destroyed

See also: spinCameraListCreateEmpty()

See also: spinCameraListDestroy()

See also: spinError

Parameters:

  • hInterface The interface of the camera list to retrieve
  • bUpdateCameras The boolean of whether or not to update the cameras
  • hCameraList The camera list to house the cameras from the interface

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceGetTLNodeMap

spinInterfaceGetTLNodeMap (
    spinInterface hInterface,
    spinNodeMapHandle * phNodeMap
) 

Retrieves the transport layer nodemap from an interface

See also: spinError

Parameters:

  • hInterface The interface of the nodemap to retrieve
  • phNodeMap The nodemap handle pointer in which the transport layer interface nodemap is returned

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceIsInUse

spinInterfaceIsInUse (
    spinInterface hInterface,
    bool8_t * pbIsInUse
) 

Checks whether an interface is in use

See also: spinError

Parameters:

  • hInterface The interface to check
  • pbIsInUse The boolean pointer to return whether or not the interface is in use

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceRegisterDeviceArrivalEventHandler

spinInterfaceRegisterDeviceArrivalEventHandler (
    spinInterface hInterface,
    spinDeviceArrivalEventHandler hDeviceArrivalEventHandler
) 

Registers a device arrival event handler on an interface (event handlers registered in this way must be unregistered)

See also: spinError

Parameters:

  • hInterface The interface on which to register the device arrival event handler
  • hDeviceArrivalEventHandler The device arrival event handler to register

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceRegisterDeviceRemovalEventHandler

spinInterfaceRegisterDeviceRemovalEventHandler (
    spinInterface hInterface,
    spinDeviceRemovalEventHandler hDeviceRemovalEventHandler
) 

Registers a device removal event handler on an interface (event handlers registered in this way must be unregistered)

See also: spinError

Parameters:

  • hInterface the Interface on which to register the device removal event handler
  • hDeviceRemovalEventHandler The device removal event handler to register

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceRegisterInterfaceEventHandler

spinInterfaceRegisterInterfaceEventHandler (
    spinInterface hInterface,
    spinInterfaceEventHandler hInterfaceEventHandler
) 

Registers an interface event handler (both device arrival and device removal) on an interface

See also: spinError

Parameters:

  • hInterface The interface on which to register the interface event handler
  • hInterfaceEventHandler The interface event handler to register

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceRelease

spinInterfaceRelease (
    spinInterface hInterface
) 

Releases an interface

See also: spinError

Parameters:

  • hInterface The interface to release

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceSendActionCommand

spinInterfaceSendActionCommand (
    spinInterface hInterface,
    size_t iDeviceKey,
    size_t iGroupKey,
    size_t iGroupMask,
    size_t iActionTime,
    bool8_t requestAck,
    size_t * piResultSize,
    actionCommandResult results
) 

Broadcast an Action Command to all devices on interface

See also: spinError

Parameters:

  • iDeviceKey The Action Command's device key
  • iGroupKey The Action Command's group key
  • iGroupMask The Action Command's group mask
  • iActionTime (Optional) Time when to assert a future action. Zero means immediate action.
  • requestAck (Optional) Whether to request an ACK from the camera. True is to send ack.
  • piResultSize (Optional) The number of results in the results array. The value passed should be equal to the expected number of devices that acknowledge the command. Returns the number of received results.
  • results (Optional) An Array with *piResultSize elements to hold the action command result status. The buffer is filled starting from index 0. If received results are less than expected number of devices that acknowledge the command, remaining results are not changed. If received results are more than expected number of devices that acknowledge the command, extra results are ignored and not appended to array. This parameter is ignored if piResultSize is 0. Thus this parameter can be NULL if pResultSize is 0 or NULL.

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceUnregisterDeviceArrivalEventHandler

spinInterfaceUnregisterDeviceArrivalEventHandler (
    spinInterface hInterface,
    spinDeviceArrivalEventHandler hDeviceArrivalEventHandler
) 

Unregisters a device arrival event handler from an interface

See also: spinError

Parameters:

  • hInterface The interface from which to unregister the device arrival event handler
  • hDeviceArrivalEventHandler The device arrival event handler to unregister

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceUnregisterDeviceRemovalEventHandler

spinInterfaceUnregisterDeviceRemovalEventHandler (
    spinInterface hInterface,
    spinDeviceRemovalEventHandler hDeviceRemovalEventHandler
) 

Unregisters a device removal event handler from an interface

See also: spinError

Parameters:

  • hInterface The interface from which to unregister the device removal event handler
  • hDeviceRemovalEventHandler The device removal event handler to unregister

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceUnregisterInterfaceEventHandler

spinInterfaceUnregisterInterfaceEventHandler (
    spinInterface hInterface,
    spinInterfaceEventHandler hInterfaceEventHandler
) 

Unregisters an interface event handler from an interface

See also: spinError

Parameters:

  • hInterface The interface from which to unregister the interface event handler
  • hInterfaceEventHandler The interface event handler to unregister

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error


function spinInterfaceUpdateCameras

spinInterfaceUpdateCameras (
    spinInterface hInterface,
    bool8_t * pbChanged
) 

Checks whether any cameras have been connected or disconnected on an interface

See also: spinError

Parameters:

  • hInterface The interface of the list of attached cameras to update
  • pbChanged The boolean pointer to return whether or not the cameras have changed

Returns:

spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error