Skip to content

Group CDeviceEventData

Modules > CDeviceEventData

The functions in this section allow for the retrieval of device event data.

Public Functions

Type Name
spinDeviceEventGetId (spinDeviceEventData hDeviceEventData, uint64_t * pEventId)
spinDeviceEventGetName (spinDeviceEventData hDeviceEventData, char * pBuf, size_t * pBufLen)
spinDeviceEventGetPayloadData (spinDeviceEventData hDeviceEventData, const uint8_t * pBuf, size_t * pBufSize)
spinDeviceEventGetPayloadDataSize (spinDeviceEventData hDeviceEventData, size_t * pBufSize)

Public Functions Documentation

function spinDeviceEventGetId

spinDeviceEventGetId (
    spinDeviceEventData hDeviceEventData,
    uint64_t * pEventId
) 

Retrieves the event ID of a device event

See also: spinError

Parameters:

  • hDeviceEventData The log event data received from the log event
  • pEventId The unsigned integer pointer in which the event ID is returned

Returns:

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


function spinDeviceEventGetName

spinDeviceEventGetName (
    spinDeviceEventData hDeviceEventData,
    char * pBuf,
    size_t * pBufLen
) 

Retrieves the event name of a device event

See also: spinError

Parameters:

  • hDeviceEventData The log event data received from the log event
  • pBuf The c-string character buffer in which the name of the device event is returned
  • pBufLen The unsigned integer pointer in which the length of the c-string is returned; the input value is the maximum length

Returns:

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


function spinDeviceEventGetPayloadData

spinDeviceEventGetPayloadData (
    spinDeviceEventData hDeviceEventData,
    const uint8_t * pBuf,
    size_t * pBufSize
) 

Retrieves the payload data of a device event

See also: spinError

Parameters:

  • hDeviceEventData The log event data received from the log event
  • pBuf The unsigned integer pointer in which the event payload is returned
  • pBufSize The unsigned integer pointer in which the size of the payload is returned

Returns:

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


function spinDeviceEventGetPayloadDataSize

spinDeviceEventGetPayloadDataSize (
    spinDeviceEventData hDeviceEventData,
    size_t * pBufSize
) 

Retrieves the payload data size of a device event

See also: spinError

Parameters:

  • hDeviceEventData The log event data received from the log event
  • pBufSize The unsigned integer pointer in which the size of the payload is returned

Returns:

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