Spinnaker C
4.3.0.189
 
Functions
Event Access

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

Functions

SPINNAKERC_API spinDeviceEventHandlerCreate (spinDeviceEventHandler *phDeviceEventHandler, spinDeviceEventFunction pFunction, void *pUserData)
 Creates a device event handler. More...
 
SPINNAKERC_API spinDeviceEventHandlerDestroy (spinDeviceEventHandler hDeviceEventHandler)
 Destroys a device event handler. More...
 
SPINNAKERC_API spinImageEventHandlerCreate (spinImageEventHandler *phImageEventHandler, spinImageEventFunction pFunction, void *pUserData)
 Creates an image event handler. More...
 
SPINNAKERC_API spinImageEventHandlerDestroy (spinImageEventHandler hImageEventHandler)
 Destroys an image event handler. More...
 
SPINNAKERC_API spinImageListEventHandlerCreate (spinImageListEventHandler *phImageEventHandler, spinImageListEventFunction pFunction, void *pUserData)
 Creates an image list event handler. More...
 
SPINNAKERC_API spinImageListEventHandlerDestroy (spinImageListEventHandler hImageListEventHandler)
 Destroys an image list event handler. More...
 
SPINNAKERC_API spinDeviceArrivalEventHandlerCreate (spinDeviceArrivalEventHandler *phDeviceArrivalEventHandler, spinArrivalEventFunction pFunction, void *pUserData)
 Creates a device arrival event handler. More...
 
SPINNAKERC_API spinDeviceArrivalEventHandlerDestroy (spinDeviceArrivalEventHandler hDeviceArrivalEventHandler)
 Destroys a device arrival event handler. More...
 
SPINNAKERC_API spinDeviceRemovalEventHandlerCreate (spinDeviceRemovalEventHandler *phDeviceRemovalEventHandler, spinRemovalEventFunction pFunction, void *pUserData)
 Creates a device removal event handler. More...
 
SPINNAKERC_API spinDeviceRemovalEventHandlerDestroy (spinDeviceRemovalEventHandler hDeviceRemovalEventHandler)
 Destroys a device removal event handler. More...
 
SPINNAKERC_API spinInterfaceEventHandlerCreate (spinInterfaceEventHandler *phInterfaceEventHandler, spinArrivalEventFunction pArrivalFunction, spinRemovalEventFunction pRemovalFunction, void *pUserData)
 Creates an interface event handler (both device arrival and device removal) More...
 
SPINNAKERC_API spinInterfaceEventHandlerDestroy (spinInterfaceEventHandler hInterfaceEventHandler)
 Destroys an interface event handler (both device arrival and device removal) More...
 
SPINNAKERC_API spinLogEventHandlerCreate (spinLogEventHandler *phLogEventHandler, spinLogEventFunction pFunction, void *pUserData)
 Creates a log event handler. More...
 
SPINNAKERC_API spinLogEventHandlerDestroy (spinLogEventHandler hLogEventHandler)
 Destroys a log event handler. More...
 

Detailed Description

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

Function Documentation

◆ spinDeviceArrivalEventHandlerCreate()

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

Creates a device arrival event handler.

See also
spinError
Parameters
phDeviceArrivalEventHandlerThe device arrival event handler pointer in which the device arrival event context is created
pFunctionThe function to be called at device event occurrences; signature to match: void(<em>spinArrivalEventFunction)(void pUserData)
pUserDataProperties that can be passed into the event function
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinDeviceArrivalEventHandlerDestroy()

SPINNAKERC_API spinDeviceArrivalEventHandlerDestroy ( spinDeviceArrivalEventHandler  hDeviceArrivalEventHandler)

Destroys a device arrival event handler.

See also
spinError
Parameters
hDeviceArrivalEventHandlerThe device arrival event handler to destroy
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinDeviceEventHandlerCreate()

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

Creates a device event handler.

See also
spinError
Parameters
phDeviceEventHandlerThe device event handler pointer in which the device event context is created
pFunctionThe function to be called at device event occurrences; signature to match: void(<em>spinDeviceEventFunction)(const spinDeviceEventData hEventData, const char pEventName, void* pUserData)
pUserDataProperties that can be passed into the event function
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinDeviceEventHandlerDestroy()

SPINNAKERC_API spinDeviceEventHandlerDestroy ( spinDeviceEventHandler  hDeviceEventHandler)

Destroys a device event handler.

See also
spinError
Parameters
hDeviceEventHandlerThe device event handler to destroy
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinDeviceRemovalEventHandlerCreate()

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

Creates a device removal event handler.

See also
spinError
Parameters
phDeviceRemovalEventHandlerThe device removal event handler pointer in which the device removal event context is created
pFunctionThe function to be called at device event occurrences; signature to match: void(<em>spinRemovalEventFunction)(uint64_t deviceSerialNumber, void pUserData)
pUserDataProperties that can be passed into the event function
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinDeviceRemovalEventHandlerDestroy()

SPINNAKERC_API spinDeviceRemovalEventHandlerDestroy ( spinDeviceRemovalEventHandler  hDeviceRemovalEventHandler)

Destroys a device removal event handler.

See also
spinError
Parameters
hDeviceRemovalEventHandlerThe device removal event handler to destroy
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageEventHandlerCreate()

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

Creates an image event handler.

See also
spinError
Parameters
phImageEventHandlerThe image event handler pointer in which the image event context is created
pFunctionThe function to be called at image event occurrences; signature to match: void(<em>spinImageEventFunction)(const spinImage hImage, void pUserData)
pUserDataProperties that can be passed into the event function
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
ImageEvents_C.c.

◆ spinImageEventHandlerDestroy()

SPINNAKERC_API spinImageEventHandlerDestroy ( spinImageEventHandler  hImageEventHandler)

Destroys an image event handler.

See also
spinError
Parameters
hImageEventHandlerThe image event handler to destroy
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
ImageEvents_C.c.

◆ spinImageListEventHandlerCreate()

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

Creates an image list event handler.

See also
spinError
Parameters
phImageListEventHandlerThe image list event handler pointer in which the image list event context is created
pFunctionThe function to be called at image list event occurrences; signature to match: void(<em>spinImageListEventFunction)(const spinListImage hImage, void pUserData)
pUserDataProperties that can be passed into the event function
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinImageListEventHandlerDestroy()

SPINNAKERC_API spinImageListEventHandlerDestroy ( spinImageListEventHandler  hImageListEventHandler)

Destroys an image list event handler.

See also
spinError
Parameters
hImageListEventHandlerThe image list event handler to destroy
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinInterfaceEventHandlerCreate()

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

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

See also
spinError
Parameters
phInterfaceEventHandlerThe interface event handler pointer in which the interface event context is created
pArrivalFunctionThe function to be called at arrival event occurrences; signature to match: void(<em>spinArrivalEventFunction)(void pUserData)
hRemovalFunctionThe function to be called at removal event occurrences; signature to match: void(<em>spinRemovalEventFunction)(uint64_t deviceSerialNumber, void pUserData)
pUserDataProperties that can be passed into the event function
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
EnumerationEvents_C.c.

◆ spinInterfaceEventHandlerDestroy()

SPINNAKERC_API spinInterfaceEventHandlerDestroy ( spinInterfaceEventHandler  hInterfaceEventHandler)

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

See also
spinError
Parameters
hInterfaceEventHandlerThe interface event handler to destroy
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error
Examples
EnumerationEvents_C.c.

◆ spinLogEventHandlerCreate()

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

Creates a log event handler.

See also
spinError
Parameters
phLogEventHandlerThe log event handler pointer in which the log event context is created
pFunctionThe function to be called at device event occurrences; signature to match: void(<em>spinLogEventFunction)(const spinLogEventData hEventData, void pUserData)
pUserDataProperties that can be passed into the event function
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error

◆ spinLogEventHandlerDestroy()

SPINNAKERC_API spinLogEventHandlerDestroy ( spinLogEventHandler  hLogEventHandler)

Destroys a log event handler.

See also
spinError
Parameters
hLogEventHandlerThe log event handler to destroy
Returns
spinError The error code; returns SPINNAKER_ERR_SUCCESS (or 0) for no error