Spinnaker C
4.3.0.189
 
Functions
System Access

The functions in this section provide access to information, objects, and functionality of the system object. This includes the system object, interface and camera lists, and interface and logging events. More...

Functions

SPINNAKERC_API spinSystemGetInstance (spinSystem *phSystem)
 Retrieves an instance of the system object; the system is a singleton, so there will only ever be one instance; system instance must be destroyed by calling spinSystemReleaseInstance. More...
 
SPINNAKERC_API spinSystemReleaseInstance (spinSystem hSystem)
 Releases the system; make sure handle is cleaned up properly by setting it to NULL after system is released; the handle can only be used again after calling spinSystemGetInstance. More...
 
SPINNAKERC_API spinSystemGetInterfaces (spinSystem hSystem, spinInterfaceList hInterfaceList)
 Retrieves a list of detected (and enumerable) interfaces on the system; interface lists must be created and destroyed. More...
 
SPINNAKERC_API spinSystemGetCameras (spinSystem hSystem, spinCameraList hCameraList)
 Retrieves a list of detected (and enumerable) cameras on the system; camera lists must be created and destroyed. More...
 
SPINNAKERC_API spinSystemGetCamerasEx (spinSystem hSystem, bool8_t bUpdateInterfaces, bool8_t bUpdateCameras, spinCameraList hCameraList)
 Retrieves a list of detected (and enumerable) cameras on the system; manually set whether to update the current interface and camera lists; camera lists must be created and destroyed. More...
 
SPINNAKERC_API spinSystemSetLoggingLevel (spinSystem hSystem, spinnakerLogLevel logLevel)
 Sets the logging level for all logging events on the system. More...
 
SPINNAKERC_API spinSystemGetLoggingLevel (spinSystem hSystem, spinnakerLogLevel *pLogLevel)
 Retrieves the logging level for all logging events on the system. More...
 
SPINNAKERC_API spinSystemRegisterLogEventHandler (spinSystem hSystem, spinLogEventHandler hLogEventHandler)
 Registers a logging event handler to the system (event handlers registered in this way must be unregistered) More...
 
SPINNAKERC_API spinSystemUnregisterLogEventHandler (spinSystem hSystem, spinLogEventHandler hLogEventHandler)
 Unregisters a selected logging event handler from the system. More...
 
SPINNAKERC_API spinSystemUnregisterAllLogEventHandlers (spinSystem hSystem)
 Unregisters all logging event handlers from the system. More...
 
SPINNAKERC_API spinSystemIsInUse (spinSystem hSystem, bool8_t *pbIsInUse)
 Checks whether a system is currently in use. More...
 
SPINNAKERC_API spinSystemRegisterDeviceArrivalEventHandler (spinSystem hSystem, spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
 Registers a device arrival event handler to every interface on the system (event handlers registered this way must be unregistered) More...
 
SPINNAKERC_API spinSystemRegisterDeviceRemovalEventHandler (spinSystem hSystem, spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
 Registers a device removal event handler to the system to every interface on the system (event handlers registered this way must be unregistered) More...
 
SPINNAKERC_API spinSystemUnregisterDeviceArrivalEventHandler (spinSystem hSystem, spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
 Unregisters a device arrival event handler from the system. More...
 
SPINNAKERC_API spinSystemUnregisterDeviceRemovalEventHandler (spinSystem hSystem, spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
 Unregisters a device removal event handler from the system. More...
 
SPINNAKERC_API spinSystemRegisterInterfaceEventHandler (spinSystem hSystem, spinInterfaceEventHandler hInterfaceEventHandler)
 Registers an interface event handler (device arrival and device removal) to every interface on the system (interface events registered this way must be unregistered) If new interfaces are detected by the system after spinSystemRegisterInterfaceEventHandler() is called, those interfaces will be automatically registered with this event. More...
 
SPINNAKERC_API spinSystemUnregisterInterfaceEventHandler (spinSystem hSystem, spinInterfaceEventHandler hInterfaceEventHandler)
 Unregisters an interface event handler from the system. More...
 
SPINNAKERC_API spinSystemUpdateCameras (spinSystem hSystem, bool8_t *pbChanged)
 Updates the list of cameras on the system, informing whether there has been any changes. More...
 
SPINNAKERC_API spinSystemUpdateCamerasEx (spinSystem hSystem, bool8_t bUpdateInterfaces, bool8_t *pbChanged)
 Updates the list of cameras on the system, informing whether there has been any changes; manually set whether to update the current interface lists. More...
 
SPINNAKERC_API spinSystemSendActionCommand (spinSystem hSystem, 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 system. More...
 
SPINNAKERC_API spinSystemGetLibraryVersion (spinSystem hSystem, spinLibraryVersion *hLibraryVersion)
 Get current library version of Spinnaker. More...
 
SPINNAKERC_API spinSystemGetTLNodeMap (spinSystem hSystem, spinNodeMapHandle *phNodeMap)
 Retrieves the transport layer nodemap from the system. More...
 

Detailed Description

The functions in this section provide access to information, objects, and functionality of the system object. This includes the system object, interface and camera lists, and interface and logging events.

Function Documentation

◆ spinSystemGetCameras()

SPINNAKERC_API spinSystemGetCameras ( spinSystem  hSystem,
spinCameraList  hCameraList 
)

Retrieves a list of detected (and enumerable) cameras on the system; camera lists must be created and destroyed.

See also
spinCameraListCreateEmpty()
spinCameraListDestroy()
spinError
Parameters
hSystemThe system, from which the camera list is retrieved
hCameraListThe camera list to house the cameras from the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
Acquisition_C.c, AcquisitionMultipleCamera_C.c, ChunkData_C.c, Enumeration_C.c, Enumeration_C_QuickSpin.c, EnumerationEvents_C.c, Exposure_C.c, Exposure_C_Quickspin.c, ImageEvents_C.c, ImageFormatControl_C.c, ImageFormatControl_C_Quickspin.c, LookupTable_C.c, NodeMapCallback_C.c, NodeMapInfo_C.c, NodeMapInfo_C_QuickSpin.c, SaveToVideo_C.c, Sequencer_C.c, Trigger_C.c, and Trigger_C_QuickSpin.c.

◆ spinSystemGetCamerasEx()

SPINNAKERC_API spinSystemGetCamerasEx ( spinSystem  hSystem,
bool8_t  bUpdateInterfaces,
bool8_t  bUpdateCameras,
spinCameraList  hCameraList 
)

Retrieves a list of detected (and enumerable) cameras on the system; manually set whether to update the current interface and camera lists; camera lists must be created and destroyed.

See also
spinCameraListCreateEmpty()
spinCameraListDestroy()
spinError
Parameters
hSystemThe system, from which the camera list is retrieved
bUpdateInterfacesThe boolean of whether to update the interface list
bUpdateCamerasThe boolean of whether to update the camera list
hCameraListThe camera list to house the cameras from the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemGetInstance()

SPINNAKERC_API spinSystemGetInstance ( spinSystem phSystem)

Retrieves an instance of the system object; the system is a singleton, so there will only ever be one instance; system instance must be destroyed by calling spinSystemReleaseInstance.

See also
spinSystemReleaseInstance
spinError
Parameters
phSystemThe system handle pointer in which the system instance is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
Acquisition_C.c, AcquisitionMultipleCamera_C.c, ChunkData_C.c, Enumeration_C.c, Enumeration_C_QuickSpin.c, EnumerationEvents_C.c, Exposure_C.c, Exposure_C_Quickspin.c, ImageEvents_C.c, ImageFormatControl_C.c, ImageFormatControl_C_Quickspin.c, LookupTable_C.c, NodeMapCallback_C.c, NodeMapInfo_C.c, NodeMapInfo_C_QuickSpin.c, SaveToVideo_C.c, Sequencer_C.c, Trigger_C.c, and Trigger_C_QuickSpin.c.

◆ spinSystemGetInterfaces()

SPINNAKERC_API spinSystemGetInterfaces ( spinSystem  hSystem,
spinInterfaceList  hInterfaceList 
)

Retrieves a list of detected (and enumerable) interfaces on the system; interface lists must be created and destroyed.

See also
spinInterfaceListCreateEmpty()
spinInterfaceListDestroy()
spinError
Parameters
hSystemThe system, from which the interface list is retrieved
hInterfaceListThe interface list to house the interfaces from the system
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.

◆ spinSystemGetLibraryVersion()

SPINNAKERC_API spinSystemGetLibraryVersion ( spinSystem  hSystem,
spinLibraryVersion *  hLibraryVersion 
)

◆ spinSystemGetLoggingLevel()

SPINNAKERC_API spinSystemGetLoggingLevel ( spinSystem  hSystem,
spinnakerLogLevel *  pLogLevel 
)

Retrieves the logging level for all logging events on the system.

See also
spinError
Parameters
hSystemThe system, from which the logging level is retrieved
logLevelThe logging level enum pointer in which the current logging level is returned
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemGetTLNodeMap()

SPINNAKERC_API spinSystemGetTLNodeMap ( spinSystem  hSystem,
spinNodeMapHandle phNodeMap 
)

Retrieves the transport layer nodemap from the system.

See also
spinError
Parameters
hSystemThe system handle.
phNodeMapThe nodemap handle pointer in which the transport layer system nodemap is returned.
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
EnumerationEvents_C.c.

◆ spinSystemIsInUse()

SPINNAKERC_API spinSystemIsInUse ( spinSystem  hSystem,
bool8_t pbIsInUse 
)

Checks whether a system is currently in use.

See also
spinError
Parameters
hSystemThe system to check
pbIsInUseThe boolean pointer to return whether the system is currently in use
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemRegisterDeviceArrivalEventHandler()

SPINNAKERC_API spinSystemRegisterDeviceArrivalEventHandler ( spinSystem  hSystem,
spinDeviceArrivalEventHandler  hDeviceArrivalEventHandler 
)

Registers a device arrival event handler to every interface on the system (event handlers registered this way must be unregistered)

See also
spinError
Parameters
hSystemThe system, on which the device arrival event handler is registered
hDeviceArrivalEventHandlerThe device arrival event handler to register on the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemRegisterDeviceRemovalEventHandler()

SPINNAKERC_API spinSystemRegisterDeviceRemovalEventHandler ( spinSystem  hSystem,
spinDeviceRemovalEventHandler  hDeviceRemovalEventHandler 
)

Registers a device removal event handler to the system to every interface on the system (event handlers registered this way must be unregistered)

See also
spinError
Parameters
hSystemThe system, on which the device removal event handler is registered
hDeviceRemovalEventHandlerThe device removal event handler to register on the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemRegisterInterfaceEventHandler()

SPINNAKERC_API spinSystemRegisterInterfaceEventHandler ( spinSystem  hSystem,
spinInterfaceEventHandler  hInterfaceEventHandler 
)

Registers an interface event handler (device arrival and device removal) to every interface on the system (interface events registered this way must be unregistered) If new interfaces are detected by the system after spinSystemRegisterInterfaceEventHandler() is called, those interfaces will be automatically registered with this event.

See also
spinError
spinInterfaceEventHandler
Parameters
hSystemThe system, on which the interface event handler is registered
hInterfaceEventHandlerThe interface event handler (device arrival and device removal) to register on the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
EnumerationEvents_C.c.

◆ spinSystemRegisterLogEventHandler()

SPINNAKERC_API spinSystemRegisterLogEventHandler ( spinSystem  hSystem,
spinLogEventHandler  hLogEventHandler 
)

Registers a logging event handler to the system (event handlers registered in this way must be unregistered)

See also
spinError
Parameters
hSystemThe system, on which the logging event handler is registered
hLogEventHandlerThe logging event handler to register on the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemReleaseInstance()

SPINNAKERC_API spinSystemReleaseInstance ( spinSystem  hSystem)

Releases the system; make sure handle is cleaned up properly by setting it to NULL after system is released; the handle can only be used again after calling spinSystemGetInstance.

See also
spinSystemGetInstance
spinError
Parameters
hSystemThe system handle
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
Acquisition_C.c, AcquisitionMultipleCamera_C.c, ChunkData_C.c, Enumeration_C.c, Enumeration_C_QuickSpin.c, EnumerationEvents_C.c, Exposure_C.c, Exposure_C_Quickspin.c, ImageEvents_C.c, ImageFormatControl_C.c, ImageFormatControl_C_Quickspin.c, LookupTable_C.c, NodeMapCallback_C.c, NodeMapInfo_C.c, NodeMapInfo_C_QuickSpin.c, SaveToVideo_C.c, Sequencer_C.c, Trigger_C.c, and Trigger_C_QuickSpin.c.

◆ spinSystemSendActionCommand()

SPINNAKERC_API spinSystemSendActionCommand ( spinSystem  hSystem,
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 system.

See also
spinError
Parameters
hSystemThe system on which to send the action command to all devices.
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

◆ spinSystemSetLoggingLevel()

SPINNAKERC_API spinSystemSetLoggingLevel ( spinSystem  hSystem,
spinnakerLogLevel  logLevel 
)

Sets the logging level for all logging events on the system.

See also
spinError
Parameters
hSystemThe system, on which the logging level is set
logLevelThe logging level to set
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemUnregisterAllLogEventHandlers()

SPINNAKERC_API spinSystemUnregisterAllLogEventHandlers ( spinSystem  hSystem)

Unregisters all logging event handlers from the system.

See also
spinError
Parameters
hSystemThe system, from which all logging event handlers are unregistered
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemUnregisterDeviceArrivalEventHandler()

SPINNAKERC_API spinSystemUnregisterDeviceArrivalEventHandler ( spinSystem  hSystem,
spinDeviceArrivalEventHandler  hDeviceArrivalEventHandler 
)

Unregisters a device arrival event handler from the system.

See also
spinError
spinDeviceArrivalEventHandler
Parameters
hSystemThe system, from which the device arrival event handler is unregistered
hDeviceArrivalEventHandlerThe device arrival event handler to unregister from the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemUnregisterDeviceRemovalEventHandler()

SPINNAKERC_API spinSystemUnregisterDeviceRemovalEventHandler ( spinSystem  hSystem,
spinDeviceRemovalEventHandler  hDeviceRemovalEventHandler 
)

Unregisters a device removal event handler from the system.

See also
spinError
spinDeviceRemovalEventHandler
Parameters
hSystemThe system, from which the device removal event handler is unregistered
hDeviceRemovalEventHandlerThe device removal event handler to unregister from the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemUnregisterInterfaceEventHandler()

SPINNAKERC_API spinSystemUnregisterInterfaceEventHandler ( spinSystem  hSystem,
spinInterfaceEventHandler  hInterfaceEventHandler 
)

Unregisters an interface event handler from the system.

See also
spinError
spinInterfaceEventHandler
Parameters
hSystemThe system, from which the interface event handler is unregistered
hInterfaceEventHandlerThe interface event handler (device arrival and device removal) to unregister from the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
EnumerationEvents_C.c.

◆ spinSystemUnregisterLogEventHandler()

SPINNAKERC_API spinSystemUnregisterLogEventHandler ( spinSystem  hSystem,
spinLogEventHandler  hLogEventHandler 
)

Unregisters a selected logging event handler from the system.

See also
spinError
Parameters
hSystemThe system, from which the logging event handler is unregistered
hLogEventHandlerThe logging event handler to unregister from the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemUpdateCameras()

SPINNAKERC_API spinSystemUpdateCameras ( spinSystem  hSystem,
bool8_t pbChanged 
)

Updates the list of cameras on the system, informing whether there has been any changes.

See also
spinError
Parameters
hSystemThe system, on which the list of attached cameras is updated
pbChangedThe boolean pointer to return whether cameras have arrived on or been removed from the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinSystemUpdateCamerasEx()

SPINNAKERC_API spinSystemUpdateCamerasEx ( spinSystem  hSystem,
bool8_t  bUpdateInterfaces,
bool8_t pbChanged 
)

Updates the list of cameras on the system, informing whether there has been any changes; manually set whether to update the current interface lists.

See also
spinError
Parameters
hSystemThe system, on which the list of attached cameras is updated
bUpdateInterfacesThe boolean of whether to update the interface list
pbChangedThe boolean pointer to return whether cameras have arrived or been removed from the system
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error