Sample consumer for c++03 (libember directory)
roelvz opened this issue · comments
For the ANSI C folder (libember_slim) there is some sample consumer code (__sample.consumer.c). Is there any sample code available for the C++03 version (libember)?
For the C++ library there are no simple producer or consumer examples, but "tinyember" is an example of a producer written using the C++ libraries.
I'm trying to create and transmit a GetDirectory request. The documentations has some info in the "Using the glow classes" section:
Creating a GetDirectory Request
root = GlowRootElementCollection::create();
// The create method returns a collection with the application tag
// set to GlowTags::Root.
new GlowCommand(root, CommandType::GetDirectory);
// Encode and transmit
// …
Can I find have any sample code or pointer to how to implement the "Encode and transmit" part using the C++03 version? Imho this is missing in the documentation.
I've been able to send GetDirectory request (and others) by looking at the code of the TinyEmberPlus and TinyEmberPlusRouter examples (have a look at the Consumer class). It's working, but I'm not 100% sure if I'm doing everything in the intended manner. I still think the "Ember+ usage" section needs some more details on how to create a consumer and a provider.
Thanks for your feedback. We plan to provide a simplified guide with one of the upcoming releases.