Comments (2)
Hello Charles,
Thanks for reaching out! Happy to hear that you enjoy using my library.
I think I got what you want to do here, basically use an element of the
linked list as a variable right? I think it would be more like:
rest.variable(me->name, me->value, "element");
As you always need to give a name to the variable you are using. Can you
tell me which library you are using for linked lists? I will check if it
doesn't raise the memory footprint of the library too much.
Cheers,
Marco Schwartz
On Thu, Jul 2, 2015 at 11:48 PM, Charles [email protected] wrote:
Marco,
just started to play with your lib today on a ESP8266, I love it :-)I'm also using another lib, in this lib I've got a linked list of data.
Each linked list entry contains a pointer to a variable name and another to
variable value (+ another on next item entry if any). both are char *
Would it be possible to have the option to create variable(char *, char *)
? To be able as a stupid example to do something like that :MyLinkedList * me = Entry;
rest.variable(me->name, me->value);I could have done it, but I'm very old school, and I like to know exactly
what my code is doing. And to be honest, String class always provided so
much pain (mainly because I'm far away for expert in C++) that when I can
avoid them I do. All my var affectation and management is done in the other
lib, I just need to pass to rest the pointer to the pair of name/values.Hope this makes sense
Charles
—
Reply to this email directly or view it on GitHub
#56.
from arest.
Marco,
You got it, and we're lucky, because on my linked list, the me->name element is already the variable name I want to expose, so it's fine. My problem is on the 2nd element which in my case is a char * instead of a string.
The library I'm using is a custom one I created (and currently working on), I will push it on github soon (need to check compilation is fine with other targets), lot of stuff to do.
By the way, I modified your lib to allow char *, as 2nd param, seems to work fine but I will be more confortable if you want to check what I done because you know your lib far better than me. I used new command code 'c' 'seems it was not used. Once I will validate I will do a push request, I've just forked your repo ;-)
Talk to you soon
Cheers,
from arest.
Related Issues (20)
- arest.io problem HOT 3
- output pin set to low at startup
- Issue with multiple Custom functions
- Unable to create a new account HOT 2
- Request example sketch for local use of API key HOT 1
- function name gets confused after 6 characters HOT 1
- 'class aREST' has no member named 'get_topic' HOT 3
- Limitations HOT 1
- ethernet_cloud sketch don't run HOT 2
- https://dashboard.arest.io/devices is not providing any way to add devices HOT 1
- Why is support for text and float variables restricted?
- aREST using UIPEthernet stack failed HOT 1
- Multiple warnings ISO C++ forbids converting a string constant to 'char*' [-Write-strings]
- To support Ethernet2.h library, this should be "ethernet_h"
- Does aREST support the Arduino Uno WiFi r2 Board ? HOT 4
- ESP8266WiFi.h: No such file or directory compilation terminated.
- rest.function() bug: command is improperly passed to function
- How to force send a HTTP 200 command in a rest.function
- CONTROLLINO MAXI AUTOMATION WITH AREST
- Freezes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arest.