Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convenience function DM callback #2578

Closed
HDGUDMUNS opened this issue Feb 13, 2024 · 0 comments
Closed

Convenience function DM callback #2578

HDGUDMUNS opened this issue Feb 13, 2024 · 0 comments

Comments

@HDGUDMUNS
Copy link

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).

@Azure Azure locked and limited conversation to collaborators Feb 29, 2024
@ericwolz ericwolz converted this issue into discussion #2586 Feb 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants