Skip to content

Group CEvent

Modules > CEvent

The functions in this section allow for the creation and destruction of events.

Public Functions

Type Name
spinDeviceArrivalEventHandlerCreate (spinDeviceArrivalEventHandler * phDeviceArrivalEventHandler, spinArrivalEventFunction pFunction, void * pUserData)
spinDeviceArrivalEventHandlerDestroy (spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
spinDeviceEventHandlerCreate (spinDeviceEventHandler * phDeviceEventHandler, spinDeviceEventFunction pFunction, void * pUserData)
spinDeviceEventHandlerDestroy (spinDeviceEventHandler hDeviceEventHandler)
spinDeviceRemovalEventHandlerCreate (spinDeviceRemovalEventHandler * phDeviceRemovalEventHandler, spinRemovalEventFunction pFunction, void * pUserData)
spinDeviceRemovalEventHandlerDestroy (spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
spinImageEventHandlerCreate (spinImageEventHandler * phImageEventHandler, spinImageEventFunction pFunction, void * pUserData)
spinImageEventHandlerDestroy (spinImageEventHandler hImageEventHandler)
spinImageListEventHandlerCreate (spinImageListEventHandler * phImageEventHandler, spinImageListEventFunction pFunction, void * pUserData)
spinImageListEventHandlerDestroy (spinImageListEventHandler hImageListEventHandler)
spinInterfaceEventHandlerCreate (spinInterfaceEventHandler * phInterfaceEventHandler, spinArrivalEventFunction pArrivalFunction, spinRemovalEventFunction pRemovalFunction, void * pUserData)
spinInterfaceEventHandlerDestroy (spinInterfaceEventHandler hInterfaceEventHandler)
spinLogEventHandlerCreate (spinLogEventHandler * phLogEventHandler, spinLogEventFunction pFunction, void * pUserData)
spinLogEventHandlerDestroy (spinLogEventHandler hLogEventHandler)

Public Functions Documentation

function spinDeviceArrivalEventHandlerCreate

spinDeviceArrivalEventHandlerCreate (
    spinDeviceArrivalEventHandler * phDeviceArrivalEventHandler,
    spinArrivalEventFunction pFunction,
    void * pUserData
) 

Creates a device arrival event handler

See also: spinError

Parameters:

  • phDeviceArrivalEventHandler The device arrival event handler pointer in which the device arrival event context is created
  • pFunction The function to be called at device event occurrences; signature to match: void(<em>spinArrivalEventFunction)(void pUserData)
  • pUserData Properties that can be passed into the event function

Returns:

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


function spinDeviceArrivalEventHandlerDestroy

spinDeviceArrivalEventHandlerDestroy (
    spinDeviceArrivalEventHandler hDeviceArrivalEventHandler
) 

Destroys a device arrival event handler

See also: spinError

Parameters:

  • hDeviceArrivalEventHandler The device arrival event handler to destroy

Returns:

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


function spinDeviceEventHandlerCreate

spinDeviceEventHandlerCreate (
    spinDeviceEventHandler * phDeviceEventHandler,
    spinDeviceEventFunction pFunction,
    void * pUserData
) 

Creates a device event handler

See also: spinError

Parameters:

  • phDeviceEventHandler The device event handler pointer in which the device event context is created
  • pFunction The function to be called at device event occurrences; signature to match: void(<em>spinDeviceEventFunction)(const spinDeviceEventData hEventData, const char pEventName, void* pUserData)
  • pUserData Properties that can be passed into the event function

Returns:

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


function spinDeviceEventHandlerDestroy

spinDeviceEventHandlerDestroy (
    spinDeviceEventHandler hDeviceEventHandler
) 

Destroys a device event handler

See also: spinError

Parameters:

  • hDeviceEventHandler The device event handler to destroy

Returns:

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


function spinDeviceRemovalEventHandlerCreate

spinDeviceRemovalEventHandlerCreate (
    spinDeviceRemovalEventHandler * phDeviceRemovalEventHandler,
    spinRemovalEventFunction pFunction,
    void * pUserData
) 

Creates a device removal event handler

See also: spinError

Parameters:

  • phDeviceRemovalEventHandler The device removal event handler pointer in which the device removal event context is created
  • pFunction The function to be called at device event occurrences; signature to match: void(<em>spinRemovalEventFunction)(uint64_t deviceSerialNumber, void pUserData)
  • pUserData Properties that can be passed into the event function

Returns:

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


function spinDeviceRemovalEventHandlerDestroy

spinDeviceRemovalEventHandlerDestroy (
    spinDeviceRemovalEventHandler hDeviceRemovalEventHandler
) 

Destroys a device removal event handler

See also: spinError

Parameters:

  • hDeviceRemovalEventHandler The device removal event handler to destroy

Returns:

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


function spinImageEventHandlerCreate

spinImageEventHandlerCreate (
    spinImageEventHandler * phImageEventHandler,
    spinImageEventFunction pFunction,
    void * pUserData
) 

Creates an image event handler

See also: spinError

Parameters:

  • phImageEventHandler The image event handler pointer in which the image event context is created
  • pFunction The function to be called at image event occurrences; signature to match: void(<em>spinImageEventFunction)(const spinImage hImage, void pUserData)
  • pUserData Properties that can be passed into the event function

Returns:

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


function spinImageEventHandlerDestroy

spinImageEventHandlerDestroy (
    spinImageEventHandler hImageEventHandler
) 

Destroys an image event handler

See also: spinError

Parameters:

  • hImageEventHandler The image event handler to destroy

Returns:

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


function spinImageListEventHandlerCreate

spinImageListEventHandlerCreate (
    spinImageListEventHandler * phImageEventHandler,
    spinImageListEventFunction pFunction,
    void * pUserData
) 

Creates an image list event handler

See also: spinError

Parameters:

  • phImageListEventHandler The image list event handler pointer in which the image list event context is created
  • pFunction The function to be called at image list event occurrences; signature to match: void(<em>spinImageListEventFunction)(const spinListImage hImage, void pUserData)
  • pUserData Properties that can be passed into the event function

Returns:

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


function spinImageListEventHandlerDestroy

spinImageListEventHandlerDestroy (
    spinImageListEventHandler hImageListEventHandler
) 

Destroys an image list event handler

See also: spinError

Parameters:

  • hImageListEventHandler The image list event handler to destroy

Returns:

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


function spinInterfaceEventHandlerCreate

spinInterfaceEventHandlerCreate (
    spinInterfaceEventHandler * phInterfaceEventHandler,
    spinArrivalEventFunction pArrivalFunction,
    spinRemovalEventFunction pRemovalFunction,
    void * pUserData
) 

Creates an interface event handler (both device arrival and device removal)

See also: spinError

Parameters:

  • phInterfaceEventHandler The interface event handler pointer in which the interface event context is created
  • pArrivalFunction The function to be called at arrival event occurrences; signature to match: void(<em>spinArrivalEventFunction)(void pUserData)
  • hRemovalFunction The function to be called at removal event occurrences; signature to match: void(<em>spinRemovalEventFunction)(uint64_t deviceSerialNumber, void pUserData)
  • pUserData Properties that can be passed into the event function

Returns:

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


function spinInterfaceEventHandlerDestroy

spinInterfaceEventHandlerDestroy (
    spinInterfaceEventHandler hInterfaceEventHandler
) 

Destroys an interface event handler (both device arrival and device removal)

See also: spinError

Parameters:

  • hInterfaceEventHandler The interface event handler to destroy

Returns:

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


function spinLogEventHandlerCreate

spinLogEventHandlerCreate (
    spinLogEventHandler * phLogEventHandler,
    spinLogEventFunction pFunction,
    void * pUserData
) 

Creates a log event handler

See also: spinError

Parameters:

  • phLogEventHandler The log event handler pointer in which the log event context is created
  • pFunction The function to be called at device event occurrences; signature to match: void(<em>spinLogEventFunction)(const spinLogEventData hEventData, void pUserData)
  • pUserData Properties that can be passed into the event function

Returns:

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


function spinLogEventHandlerDestroy

spinLogEventHandlerDestroy (
    spinLogEventHandler hLogEventHandler
) 

Destroys a log event handler

See also: spinError

Parameters:

  • hLogEventHandler The log event handler to destroy

Returns:

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