Spinnaker C
4.3.0.189
 
Functions
Interface Access

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. More...

Functions

SPINNAKERC_API spinInterfaceUpdateCameras (spinInterface hInterface, bool8_t *pbChanged)
 Checks whether any cameras have been connected or disconnected on an interface. More...
 
SPINNAKERC_API spinInterfaceGetCameras (spinInterface hInterface, spinCameraList hCameraList)
 Retrieves a camera list from an interface; camera lists must be created and destroy. More...
 
SPINNAKERC_API 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. More...
 
SPINNAKERC_API spinInterfaceGetTLNodeMap (spinInterface hInterface, spinNodeMapHandle *phNodeMap)
 Retrieves the transport layer nodemap from an interface. More...
 
SPINNAKERC_API spinInterfaceRegisterDeviceArrivalEventHandler (spinInterface hInterface, spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
 Registers a device arrival event handler on an interface (event handlers registered in this way must be unregistered) More...
 
SPINNAKERC_API spinInterfaceRegisterDeviceRemovalEventHandler (spinInterface hInterface, spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
 Registers a device removal event handler on an interface (event handlers registered in this way must be unregistered) More...
 
SPINNAKERC_API spinInterfaceUnregisterDeviceArrivalEventHandler (spinInterface hInterface, spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
 Unregisters a device arrival event handler from an interface. More...
 
SPINNAKERC_API spinInterfaceUnregisterDeviceRemovalEventHandler (spinInterface hInterface, spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
 Unregisters a device removal event handler from an interface. More...
 
SPINNAKERC_API spinInterfaceRegisterInterfaceEventHandler (spinInterface hInterface, spinInterfaceEventHandler hInterfaceEventHandler)
 Registers an interface event handler (both device arrival and device removal) on an interface. More...
 
SPINNAKERC_API spinInterfaceUnregisterInterfaceEventHandler (spinInterface hInterface, spinInterfaceEventHandler hInterfaceEventHandler)
 Unregisters an interface event handler from an interface. More...
 
SPINNAKERC_API spinInterfaceRelease (spinInterface hInterface)
 Releases an interface. More...
 
SPINNAKERC_API spinInterfaceIsInUse (spinInterface hInterface, bool8_t *pbIsInUse)
 Checks whether an interface is in use. More...
 
SPINNAKERC_API 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. More...
 

Detailed Description

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.

Function Documentation

◆ spinInterfaceGetCameras()

SPINNAKERC_API spinInterfaceGetCameras ( spinInterface  hInterface,
spinCameraList  hCameraList 
)

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

See also
spinCameraListCreateEmpty()
spinCameraListDestroy()
spinError
Parameters
hInterfaceThe interface of the camera list to retrieve
hCameraListThe camera list to house the cameras from the interface
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
Enumeration_C.c, and Enumeration_C_QuickSpin.c.

◆ spinInterfaceGetCamerasEx()

SPINNAKERC_API 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()
spinCameraListDestroy()
spinError
Parameters
hInterfaceThe interface of the camera list to retrieve
bUpdateCamerasThe boolean of whether or not to update the cameras
hCameraListThe camera list to house the cameras from the interface
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinInterfaceGetTLNodeMap()

SPINNAKERC_API spinInterfaceGetTLNodeMap ( spinInterface  hInterface,
spinNodeMapHandle phNodeMap 
)

Retrieves the transport layer nodemap from an interface.

See also
spinError
Parameters
hInterfaceThe interface of the nodemap to retrieve
phNodeMapThe 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
Examples
Enumeration_C.c.

◆ spinInterfaceIsInUse()

SPINNAKERC_API spinInterfaceIsInUse ( spinInterface  hInterface,
bool8_t pbIsInUse 
)

Checks whether an interface is in use.

See also
spinError
Parameters
hInterfaceThe interface to check
pbIsInUseThe 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

◆ spinInterfaceRegisterDeviceArrivalEventHandler()

SPINNAKERC_API 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
hInterfaceThe interface on which to register the device arrival event handler
hDeviceArrivalEventHandlerThe device arrival event handler to register
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinInterfaceRegisterDeviceRemovalEventHandler()

SPINNAKERC_API 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
hInterfacethe Interface on which to register the device removal event handler
hDeviceRemovalEventHandlerThe device removal event handler to register
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinInterfaceRegisterInterfaceEventHandler()

SPINNAKERC_API spinInterfaceRegisterInterfaceEventHandler ( spinInterface  hInterface,
spinInterfaceEventHandler  hInterfaceEventHandler 
)

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

See also
spinError
Parameters
hInterfaceThe interface on which to register the interface event handler
hInterfaceEventHandlerThe interface event handler to register
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinInterfaceRelease()

SPINNAKERC_API spinInterfaceRelease ( spinInterface  hInterface)

Releases an interface.

See also
spinError
Parameters
hInterfaceThe interface to release
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
Enumeration_C.c, Enumeration_C_QuickSpin.c, and NodeMapInfo_C_QuickSpin.c.

◆ spinInterfaceSendActionCommand()

SPINNAKERC_API 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
iDeviceKeyThe Action Command's device key
iGroupKeyThe Action Command's group key
iGroupMaskThe 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

◆ spinInterfaceUnregisterDeviceArrivalEventHandler()

SPINNAKERC_API spinInterfaceUnregisterDeviceArrivalEventHandler ( spinInterface  hInterface,
spinDeviceArrivalEventHandler  hDeviceArrivalEventHandler 
)

Unregisters a device arrival event handler from an interface.

See also
spinError
Parameters
hInterfaceThe interface from which to unregister the device arrival event handler
hDeviceArrivalEventHandlerThe device arrival event handler to unregister
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinInterfaceUnregisterDeviceRemovalEventHandler()

SPINNAKERC_API spinInterfaceUnregisterDeviceRemovalEventHandler ( spinInterface  hInterface,
spinDeviceRemovalEventHandler  hDeviceRemovalEventHandler 
)

Unregisters a device removal event handler from an interface.

See also
spinError
Parameters
hInterfaceThe interface from which to unregister the device removal event handler
hDeviceRemovalEventHandlerThe device removal event handler to unregister
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinInterfaceUnregisterInterfaceEventHandler()

SPINNAKERC_API spinInterfaceUnregisterInterfaceEventHandler ( spinInterface  hInterface,
spinInterfaceEventHandler  hInterfaceEventHandler 
)

Unregisters an interface event handler from an interface.

See also
spinError
Parameters
hInterfaceThe interface from which to unregister the interface event handler
hInterfaceEventHandlerThe interface event handler to unregister
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinInterfaceUpdateCameras()

SPINNAKERC_API spinInterfaceUpdateCameras ( spinInterface  hInterface,
bool8_t pbChanged 
)

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

See also
spinError
Parameters
hInterfaceThe interface of the list of attached cameras to update
pbChangedThe 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