C# interface

24 views
Skip to first unread message

Chris Holt

unread,
Nov 22, 2013, 11:13:01 AM11/22/13
to nonoli...@googlegroups.com
Could someone point me in the right direction for a C# interface with the CEE?  I have a bunch of experience doing real time plotting and interfacing with a serial port but am not familiar with the web interface available with the CEE.

Thanks for any help!

Cheers,

Chris

Kevin Mehall

unread,
Nov 24, 2013, 8:12:46 PM11/24/13
to nonoli...@googlegroups.com
Hi Chris,

There isn't a library specifically for C#, but the API is based on HTTP, so you can make requests with a HTTP client library and JSON library. (I haven't used C#; those might not be the best links).

Check out the documentation at http://wiki.nonolithlabs.com/cee/Simple_REST_API_V1/ and feel free to ask if you have any questions.

--
Kevin Mehall
Nonolith Labs


--
You received this message because you are subscribed to the Google Groups "Nonolith Labs CEE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nonolith-cee...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Chris Holt

unread,
Jan 22, 2014, 4:23:56 PM1/22/14
to nonoli...@googlegroups.com
I got the C# interface working...  not sure if it is the most elegant but it sets the CEE up and also allows for dumping the data.  Once you get the response string it is just a bit of string parsing to get all the values out.

WebClient wc = new WebClient();

string htmlresult = wc.UploadString("http://localhost:9003/rest/v1/devices/com.nonolithlabs.cee*/a/output", "mode=svmi&wave=square&value=0.11&amplitude=.07&frequency=0.1");
                    
            
WebResponse response = request.GetResponse();
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseString = reader.ReadToEnd();
Reply all
Reply to author
Forward
0 new messages