msptiSubscribe
Applicability
Product |
Supported (Yes/No) |
|---|---|
Atlas A3 Training Series Product |
Yes |
Atlas A2 Training Series Product/Atlas 800I A2 Inference Product |
Yes |
Atlas 200/500 A2 Inference Product |
Yes |
Atlas Inference Series Product |
x |
Atlas Training Series Product |
x |
Function Description
Registers callback functions with MSPTI. A user (subscriber) needs to call this API before calling the MSPTI APIs. Only one subscriber is supported at a time.
Prototype
1 | msptiResult msptiSubscribe(msptiSubscriberHandle *subscriber, msptiCallbackFunc callback, void *userdata) |
Options
Option |
Input/Output |
Description |
|---|---|---|
subscriber |
Input |
Handle address of the subscriber. |
callback |
Input |
Callback function, |
userdata |
Input |
Custom data address of the subscriber. The subscriber data is transferred to the callback function through this parameter. |
Return Value
If MSPTI_SUCCESS is returned, the operation is successful. If MSPTI cannot be initialized, MSPTI_ERROR_INNER is returned. If an MSPTI user exists, MSPTI_ERROR_MULTIPLE_SUBSCRIBERS_NOT_SUPPORTED is returned. If the user is empty, MSPTI_ERROR_INVALID_PARAMETER is returned.