Callback mechanism.
More...
|
|
typedef enum ProfisharkApiGlobalCallbackType | ProfisharkApiGlobalCallbackType |
| | Global callback types.
|
|
typedef enum ProfisharkApiDeviceCallbackType | ProfisharkApiDeviceCallbackType |
| | Device specific callback types.
|
| typedef void * | ProfisharkApiCallbackValue |
| | Profishark callback value.
|
| typedef void(* | ProfisharkApiCallback) (ProfisharkApiDeviceHandle, void *) |
| | Callback function.
|
| typedef void(* | ProfisharkApiCallbackExt) (ProfisharkApiDeviceHandle, ProfisharkApiCallbackValue *, void *) |
| | Callback function.
|
|
typedef struct ProfisharkApiCallbackValue_DiskDump | ProfisharkApiCallbackValue_DiskDump |
| | A structure describing the event passed to a ProfisharkApiDeviceCallbackType_DiskDump callback.
|
|
typedef struct ProfisharkApiCallbackValue_DiskDumpNewFile | ProfisharkApiCallbackValue_DiskDumpNewFile |
| | A structure describing the event passed to a ProfisharkApiDeviceCallbackType_DiskDumpNewFile callback.
|
|
typedef struct ProfisharkApiCallbackValue_LinkStatus | ProfisharkApiCallbackValue_LinkStatus |
| | A structure describing the event passed to a ProfisharkApiDeviceCallbackType_LinkStatus callback.
|
|
| PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet | ProfisharkAPIAddNewDeviceCallback (ProfisharkApiCallback callback, void *context) |
| | Add a new function to be called when a new Profishark device is detected.
|
| PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet | ProfisharkAPIRemoveNewDeviceCallback (ProfisharkApiCallback callback) |
| | Remove a function from the list of functions called when a new Profishark device is detected.
|
| PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet | ProfisharkAPIAddDeviceGoneCallback (ProfisharkApiCallback callback, void *context) |
| | Add a new function to be called when a Profishark device is disconnected.
|
| PROFISHARKAPI_API_DEPRECATED ProfisharkAPIRet | ProfisharkAPIRemoveDeviceGoneCallback (ProfisharkApiCallback callback) |
| | Remove a function from the list of functions called when a new Profishark device is disconnected.
|
| PROFISHARKAPI_API ProfisharkAPIRet | ProfisharkAPIAddGlobalCallback (ProfisharkApiGlobalCallbackType type, ProfisharkApiCallbackExt callback, void *context) |
| | Add a global callback function.
|
| PROFISHARKAPI_API ProfisharkAPIRet | ProfisharkAPIAddDeviceCallback (ProfisharkApiDeviceHandle handle, ProfisharkApiDeviceCallbackType type, ProfisharkApiCallbackExt callback, void *context) |
| | Add a device callback function.
|
| PROFISHARKAPI_API ProfisharkAPIRet | ProfisharkAPIRemoveGlobalCallback (ProfisharkApiGlobalCallbackType type, ProfisharkApiCallbackExt callback) |
| | Remove a global callback function.
|
| PROFISHARKAPI_API ProfisharkAPIRet | ProfisharkAPIRemoveDeviceCallback (ProfisharkApiDeviceHandle handle, ProfisharkApiDeviceCallbackType type, ProfisharkApiCallbackExt callback) |
| | Remove a device callback function.
|
Callback mechanism.
◆ ProfisharkApiCallback
Callback function.
- Parameters
-
| handle | a Profishark device handle |
| context | a user defined value |
- Deprecated
- Functions using this type are deprecated. See ProfisharkApiCallbackExt.
◆ ProfisharkApiCallbackExt
Callback function.
- Parameters
-
◆ ProfisharkApiCallbackValue
Profishark callback value.
Opaque type used by callback functions. To be used, this needs to be cast to the proper type depending on the callback type
◆ ProfisharkApiDeviceCallbackType
Device specific callback types.
◆ ProfisharkApiGlobalCallbackType
◆ ProfisharkAPIAddDeviceCallback()
Add a device callback function.
- Parameters
-
| handle | a handle to the device |
| type | the type of callback to add. This defines when the function is called. |
| callback | the function to be called |
| context | a pointer passed to the callback function |
- Return values
-
| ProfisharkAPIRet_Success | on success |
◆ ProfisharkAPIAddDeviceGoneCallback()
Add a new function to be called when a Profishark device is disconnected.
- Parameters
-
| callback | the function to be called |
| context | the parameter passed to the function to be called |
- Return values
-
| ProfisharkAPIRet_Success | on success |
| ProfisharkAPIRet_Exist | if the function is already registered |
- Deprecated
- Deprecated, use ProfisharkAPIAddGlobalCallback
◆ ProfisharkAPIAddGlobalCallback()
Add a global callback function.
- Parameters
-
| type | the type of callback to add. This defines when the function is called. |
| callback | the function to be called |
| context | a pointer passed to the callback function |
- Return values
-
| ProfisharkAPIRet_Success | on success |
◆ ProfisharkAPIAddNewDeviceCallback()
Add a new function to be called when a new Profishark device is detected.
- Parameters
-
| callback | the function to be called |
| context | the parameter passed to the function to be called |
- Return values
-
| ProfisharkAPIRet_Success | on success |
| ProfisharkAPIRet_Exist | if the function is already registered |
- Deprecated
- Deprecated, use ProfisharkAPIAddGlobalCallback
◆ ProfisharkAPIRemoveDeviceCallback()
Remove a device callback function.
- Parameters
-
| handle | a handle to the device |
| type | the type of callback to remove. Must be the same as the one used for the ProfisharkAPIAddDeviceCallback call. |
| callback | the function to be removed |
- Return values
-
| ProfisharkAPIRet_Success | on success |
| ProfisharkAPIRet_NotExist | if the function was not registered |
◆ ProfisharkAPIRemoveDeviceGoneCallback()
Remove a function from the list of functions called when a new Profishark device is disconnected.
- Parameters
-
| callback | the function to be removed |
- Return values
-
| ProfisharkAPIRet_Success | on success |
| ProfisharkAPIRet_NotExist | if the function was not registered |
- Deprecated
- Deprecated, use ProfisharkAPIRemoveGlobalCallback
◆ ProfisharkAPIRemoveGlobalCallback()
Remove a global callback function.
- Parameters
-
- Return values
-
| ProfisharkAPIRet_Success | on success |
| ProfisharkAPIRet_NotExist | if the function was not registered |
◆ ProfisharkAPIRemoveNewDeviceCallback()
Remove a function from the list of functions called when a new Profishark device is detected.
- Parameters
-
| callback | the function to be removed |
- Return values
-
| ProfisharkAPIRet_Success | on success |
| ProfisharkAPIRet_NotExist | if the function was not registered |
- Deprecated
- Deprecated, use ProfisharkAPIRemoveGlobalCallback