You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The signature for the received DM callback is this: static int device_method_callback(const char* method_name, const unsigned char* payload, size_t size, unsigned char** response, size_t* resp_size, void* userContextCallback)
The consequence of this is that you can only obtain the Method Name, no other DM data is passed to the callback (as opposed to the ll functions). Sometimes final result is delayed from time of receipt until processed and an answer can be sent.
At least, we need the "RequestId" of the DM to send a final report using D2C message, or we cannot match these in the Cloud.
Adding an extended version of this that contains the handle to the actual DM message struct would allow us to extract the relevant data. Even better is to also add a flag that makes the SDK delay the reply and an API call to send the reply later by passing the pointer to the DM struct (and it is deallocated at that time).
This discussion was converted from issue #2578 on February 29, 2024 19:44.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The signature for the received DM callback is this:
static int device_method_callback(const char* method_name, const unsigned char* payload, size_t size, unsigned char** response, size_t* resp_size, void* userContextCallback)
The consequence of this is that you can only obtain the Method Name, no other DM data is passed to the callback (as opposed to the ll functions). Sometimes final result is delayed from time of receipt until processed and an answer can be sent.
At least, we need the "RequestId" of the DM to send a final report using D2C message, or we cannot match these in the Cloud.
Adding an extended version of this that contains the handle to the actual DM message struct would allow us to extract the relevant data. Even better is to also add a flag that makes the SDK delay the reply and an API call to send the reply later by passing the pointer to the DM struct (and it is deallocated at that time).
Beta Was this translation helpful? Give feedback.
All reactions