GithubHelp home page GithubHelp logo

azureiothub's People

Contributors

alexey-nbl avatar blindman2k avatar electricimpsamplecode avatar mm-gmbd avatar monkeygroover avatar myurasov avatar ragrus-nbl avatar smittytone avatar terrencebarr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

azureiothub's Issues

Callback function signatures not following best practice of "error-first"

Refer to http://fredkschott.com/post/2014/03/understanding-error-first-callbacks-in-node-js/. In my opinion, "error-first" callbacks are the appropriate pattern and are worth making a major release of the class over.

retrieveTwinProperties(onRetrieved) follows this pattern with its error, reportedProps, desiredProps signature. All of the callbacks that only take a single parameter of error obviously do too.

However, 2 callbacks are offenders...

Its a minor code/documentation effort for the library and since the libraries are versioned it seems like something that should be considered? Thoughts?

Allow AzureIoTHub.DirectMethodResponse to be provided async to client.enableDirectMethods(onMethod... callback

I have a use case for using a direct method that requires async communication with the device (using something like message manager). Unfortunately, the onMethod callback stipulates that the "The callback MUST return an instance of the of the AzureIoTHub.DirectMethodResponse" in order to reply.

I would like to propose that https://github.com/electricimp/AzureIoTHub/blob/master/AzureIoTHub.agent.lib.nut#L1342 be modified to respect a return value of an instanceof promise in addition to the synchronous callback that is allowed today. The promise would need to resolve with a AzureIoTHub.DirectMethodResponse (perhaps within a timeout?) in order to send the response to IoT Hub.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.