Skip to content

Group CSystem

Modules > CSystem

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.

Public Functions

Type Name
spinSystemGetCameras (spinSystem hSystem, spinCameraList hCameraList)
spinSystemGetCamerasEx (spinSystem hSystem, bool8_t bUpdateInterfaces, bool8_t bUpdateCameras, spinCameraList hCameraList)
spinSystemGetInstance (spinSystem * phSystem)
spinSystemGetInterfaces (spinSystem hSystem, spinInterfaceList hInterfaceList)
spinSystemGetLibraryVersion (spinSystem hSystem, spinLibraryVersion * hLibraryVersion)
spinSystemGetLoggingLevel (spinSystem hSystem, spinnakerLogLevel * pLogLevel)
spinSystemGetTLNodeMap (spinSystem hSystem, spinNodeMapHandle * phNodeMap)
spinSystemIsInUse (spinSystem hSystem, bool8_t * pbIsInUse)
spinSystemRegisterDeviceArrivalEventHandler (spinSystem hSystem, spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
spinSystemRegisterDeviceRemovalEventHandler (spinSystem hSystem, spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
spinSystemRegisterInterfaceEventHandler (spinSystem hSystem, spinInterfaceEventHandler hInterfaceEventHandler)
spinSystemRegisterLogEventHandler (spinSystem hSystem, spinLogEventHandler hLogEventHandler)
spinSystemReleaseInstance (spinSystem hSystem)
spinSystemSendActionCommand (spinSystem hSystem, size_t iDeviceKey, size_t iGroupKey, size_t iGroupMask, size_t iActionTime, bool8_t requestAck, size_t * piResultSize, actionCommandResult results)
spinSystemSetLoggingLevel (spinSystem hSystem, spinnakerLogLevel logLevel)
spinSystemUnregisterAllLogEventHandlers (spinSystem hSystem)
spinSystemUnregisterDeviceArrivalEventHandler (spinSystem hSystem, spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
spinSystemUnregisterDeviceRemovalEventHandler (spinSystem hSystem, spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
spinSystemUnregisterInterfaceEventHandler (spinSystem hSystem, spinInterfaceEventHandler hInterfaceEventHandler)
spinSystemUnregisterLogEventHandler (spinSystem hSystem, spinLogEventHandler hLogEventHandler)
spinSystemUpdateCameras (spinSystem hSystem, bool8_t * pbChanged)
spinSystemUpdateCamerasEx (spinSystem hSystem, bool8_t bUpdateInterfaces, bool8_t * pbChanged)

Public Functions Documentation

function spinSystemGetCameras

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()

See also: spinCameraListDestroy()

See also: spinError

Parameters:

  • hSystem The system, from which the camera list is retrieved
  • hCameraList The camera list to house the cameras from the system

Returns:

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


function spinSystemGetCamerasEx

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()

See also: spinCameraListDestroy()

See also: spinError

Parameters:

  • hSystem The system, from which the camera list is retrieved
  • bUpdateInterfaces The boolean of whether to update the interface list
  • bUpdateCameras The boolean of whether to update the camera list
  • hCameraList The camera list to house the cameras from the system

Returns:

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


function spinSystemGetInstance

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

See also: spinError

Parameters:

  • phSystem The system handle pointer in which the system instance is returned

Returns:

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


function spinSystemGetInterfaces

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()

See also: spinInterfaceListDestroy()

See also: spinError

Parameters:

  • hSystem The system, from which the interface list is retrieved
  • hInterfaceList The interface list to house the interfaces from the system

Returns:

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


function spinSystemGetLibraryVersion

spinSystemGetLibraryVersion (
    spinSystem hSystem,
    spinLibraryVersion * hLibraryVersion
) 

Get current library version of Spinnaker.

Returns:

A struct containing the current version of Spinnaker(major, minor, type, build).


function spinSystemGetLoggingLevel

spinSystemGetLoggingLevel (
    spinSystem hSystem,
    spinnakerLogLevel * pLogLevel
) 

Retrieves the logging level for all logging events on the system

See also: spinError

Parameters:

  • hSystem The system, from which the logging level is retrieved
  • logLevel The 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


function spinSystemGetTLNodeMap

spinSystemGetTLNodeMap (
    spinSystem hSystem,
    spinNodeMapHandle * phNodeMap
) 

Retrieves the transport layer nodemap from the system.

See also: spinError

Parameters:

  • hSystem The system handle.
  • phNodeMap The 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


function spinSystemIsInUse

spinSystemIsInUse (
    spinSystem hSystem,
    bool8_t * pbIsInUse
) 

Checks whether a system is currently in use

See also: spinError

Parameters:

  • hSystem The system to check
  • pbIsInUse The 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


function spinSystemRegisterDeviceArrivalEventHandler

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:

  • hSystem The system, on which the device arrival event handler is registered
  • hDeviceArrivalEventHandler The device arrival event handler to register on the system

Returns:

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


function spinSystemRegisterDeviceRemovalEventHandler

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:

  • hSystem The system, on which the device removal event handler is registered
  • hDeviceRemovalEventHandler The device removal event handler to register on the system

Returns:

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


function spinSystemRegisterInterfaceEventHandler

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

See also: spinInterfaceEventHandler

Parameters:

  • hSystem The system, on which the interface event handler is registered
  • hInterfaceEventHandler The 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


function spinSystemRegisterLogEventHandler

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:

  • hSystem The system, on which the logging event handler is registered
  • hLogEventHandler The logging event handler to register on the system

Returns:

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


function spinSystemReleaseInstance

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

See also: spinError

Parameters:

  • hSystem The system handle

Returns:

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


function spinSystemSendActionCommand

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:

  • hSystem The system on which to send the action command to all devices.
  • 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 spinSystemSetLoggingLevel

spinSystemSetLoggingLevel (
    spinSystem hSystem,
    spinnakerLogLevel logLevel
) 

Sets the logging level for all logging events on the system

See also: spinError

Parameters:

  • hSystem The system, on which the logging level is set
  • logLevel The logging level to set

Returns:

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


function spinSystemUnregisterAllLogEventHandlers

spinSystemUnregisterAllLogEventHandlers (
    spinSystem hSystem
) 

Unregisters all logging event handlers from the system

See also: spinError

Parameters:

  • hSystem The system, from which all logging event handlers are unregistered

Returns:

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


function spinSystemUnregisterDeviceArrivalEventHandler

spinSystemUnregisterDeviceArrivalEventHandler (
    spinSystem hSystem,
    spinDeviceArrivalEventHandler hDeviceArrivalEventHandler
) 

Unregisters a device arrival event handler from the system

See also: spinError

See also: spinDeviceArrivalEventHandler

Parameters:

  • hSystem The system, from which the device arrival event handler is unregistered
  • hDeviceArrivalEventHandler The device arrival event handler to unregister from the system

Returns:

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


function spinSystemUnregisterDeviceRemovalEventHandler

spinSystemUnregisterDeviceRemovalEventHandler (
    spinSystem hSystem,
    spinDeviceRemovalEventHandler hDeviceRemovalEventHandler
) 

Unregisters a device removal event handler from the system

See also: spinError

See also: spinDeviceRemovalEventHandler

Parameters:

  • hSystem The system, from which the device removal event handler is unregistered
  • hDeviceRemovalEventHandler The device removal event handler to unregister from the system

Returns:

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


function spinSystemUnregisterInterfaceEventHandler

spinSystemUnregisterInterfaceEventHandler (
    spinSystem hSystem,
    spinInterfaceEventHandler hInterfaceEventHandler
) 

Unregisters an interface event handler from the system

See also: spinError

See also: spinInterfaceEventHandler

Parameters:

  • hSystem The system, from which the interface event handler is unregistered
  • hInterfaceEventHandler The 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


function spinSystemUnregisterLogEventHandler

spinSystemUnregisterLogEventHandler (
    spinSystem hSystem,
    spinLogEventHandler hLogEventHandler
) 

Unregisters a selected logging event handler from the system

See also: spinError

Parameters:

  • hSystem The system, from which the logging event handler is unregistered
  • hLogEventHandler The logging event handler to unregister from the system

Returns:

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


function spinSystemUpdateCameras

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:

  • hSystem The system, on which the list of attached cameras is updated
  • pbChanged The 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


function spinSystemUpdateCamerasEx

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:

  • hSystem The system, on which the list of attached cameras is updated
  • bUpdateInterfaces The boolean of whether to update the interface list
  • pbChanged The 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