Skip to content
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

Missing module documentation for crypto, rc, CoAP and DHT #486

Closed
marcelstoer opened this issue Jun 18, 2015 · 11 comments
Closed

Missing module documentation for crypto, rc, CoAP and DHT #486

marcelstoer opened this issue Jun 18, 2015 · 11 comments

Comments

@marcelstoer
Copy link
Member

https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en-(dev096) is missing documentation for the 3 new modules crypto, rc, and DHT as well as CoAP.

@vowstar
Copy link
Member

vowstar commented Jun 18, 2015

TODO:@vowstar
Write crypto, rc, DHTLib documents, etc
New usage:
id = 5
status, temp, humi, tempdec, humidec = dht.read( id )
print(dht.read( id ))
Note myself

@vowstar
Copy link
Member

vowstar commented Jun 22, 2015

DHTLib is OK.
Other is under construction.

@jmattsson
Copy link
Member

I should be able to get some time on Monday to document the crypto module. Can/should I edit the wiki directly, or post text here for someone else to merge in?

@vowstar
Copy link
Member

vowstar commented Jun 27, 2015

@jmattsson You could edit wiki directly, everyone can edit it ;)

@jmattsson
Copy link
Member

Okay, I'll do that then. I just didn't want to step on somebody's toes accidentaly.

@jmattsson
Copy link
Member

Crypto module docs added. Writing it made me think that the hex & base64 encoding should go in a different module or two, plus get the corresponding decode functions. E.g. hex.encode(str) + hex.decode(str) and base64.encode(str) + base64.decode(str). Thoughts?

@marcelstoer marcelstoer changed the title Missing module documentation for crypto, rc, and DHT Missing module documentation for crypto, rc, CoAP and DHT Jun 30, 2015
@wanghjsg
Copy link

wanghjsg commented Jul 1, 2015

Don;t have CoAP doc.

@TerryE
Copy link
Collaborator

TerryE commented Dec 22, 2015

Writing it made me think that the hex & base64 encoding should go in a different module or two, plus get the corresponding decode functions. E.g. hex.encode(str) + hex.decode(str) and base64.encode(str) + base64.decode(str). Thoughts?

@jmattsson Johny, I am going to do a PR for the fromBase64(). I agree that the separate modules make sense, but do we think that the backwards compatibility break is an issue? Should we leave call hooks in the crypto so old code doesn't break?

@jmattsson
Copy link
Member

Yeah backwards compatibility is important, so I'd say leave the crypto entries in there for now. Once we're fully on top of documentation we can look at deprecating it officially. Maybe even add a c_printf() on use to that effect.

Since you're looking at tackling this one, can I suggest another slightly different approach, where we have the modules encode and decode, and then just functions hex, base64 etc on those? I had been thinking about a single module named codec, but that term is so closely tied to audio & video these days that it might be confusing. A single .c file for both encode and decode would be recommended though.

@marcelstoer
Copy link
Member Author

we have the modules encode and decode, and then just functions hex, base64 etc on those? I had been thinking about a single module named codec, but that term is so closely tied to audio & video

I like that but I agree on the naming issue. Other libraries/languages sometimes call those things "endecoder".

@marcelstoer
Copy link
Member Author

The main issue here, "missing documentation", is fixed in or tracked with #774. Closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants