- .update_sastoken() will now issue a reauthorization on the pipeline
- because there is now I/O, on the async clients, .update_sastoken() is now a coroutine instead of a method
* Refactored SasToken class into RenewableSasToken
* Added a new type of SasToken class - NonRenewableSasToken
* Modified the SasTokenRenewalStage to only renew RenewableSasTokens
* Added a .create_from_sastoken() API that creates NonRenewableSasTokens from a user's SAS string
* Added a .update_sastoken() API that allows a user to provide a new SAS string, that is used to create a new NonRenewableSasToken
* Removed URL encoding from module id and device id in topic strings
* Left all other URL encoding in topic strings in place for now, since this issue only really affected device and module ids. When Hub makes a new API, we will be able to return to URL encoding all values for consistency
* Fixed bugs in tests due to MagicMocks not being threadsafe
* Optimized tests for better performance
This PR has passed 10 consecutive full pipeline runs with no errors, as well as 1000 consecutive runs on a local machine
* Updated samples to use receive handlers
* Formally deprecated old receive method APIs
* .disconnect() will now allow for a graceful program exit
* Misc. other organizational fixes
* Added a HandlerManager to the synchronous client
* Created shared infrastructure for sync/async HandlerManagers
* Added rough event loop management infrastructure to protect async client processes from invoking code with poor performance (could be expanded in the future to be more robust, but it works just fine as is)
* Better error handling and logging for both sync and async HandlerManagers
* Modified how handler removal works - handlers now will be invoked for all pending items in the inbox at time of handler removal request, prior to the actual removal of the handler. Items added to the inbox AFTER handler removal request will NOT be invoked.
* Ensured iothub client is threadsafe in async contexts
* Added a handler manager to the async client, which will manage tasks and threads related to handlers
* Added additional client infrastructure to support future handler properties on async clients
* Updated InboxManager to allow for unified messages (input + C2D) in order to be compatible with the proposed handler properties
* Updated Message to allow for the user to see what input the message was sent to
* chore: update info on IoT edge for Linux only
* chore: update readme to clarify iot edge for linux
* chore: added explanation for pip vs pip3
* Update README.md
* Update README.md
Based on Thermostat
Connect and transmit modelId
Demonstrate how to:
Set and read desired property (target temperature)
Send telemetry (current temperature)
Register callback and Handle command (reboot)
No facade function in this sample
The sample should be as simple as possible (no abstraction layer, all code in the same file)
Hard coded is ok, if needed.
The code contains comments, that allow a developer (with basic PnP knowledge) to understand the code without open any more doc!