Hi Sakari,
My colleagues and I are making a JavaScript-IoTivity binding for node.js as a
part of Web Service Interface project.
findResource, CRUDN functions are immature but working, so you can use IoTivity
functionality in node.js code.
Basic callback machanisms have been implemented by using libuv.
Node.js code looks like:
IoTivity.findResource('', '/oic/res?rt=core.light', 'CT_ADAPTER_IP',
function(resourceid) {
console.log(resourceid);
IoTivity.get(resourceid, function(resource) {
IoTivity.post(resourceid, "power", 20, function(resource__) {
console.log(resource__);
IoTivity.observe(resourceid, 0,function(resource3) {
console.log(resource3);
}
IoTivity.cancelObserve(resourceid,function(resource5) {
console.log(resource5);
});
});
});
});
We are making node.js wrapping layer for IoTivity. So we haven't defined any
Web IDL with JavaScript.
I think we can collaborate to make node.js module for IoTivity.
I'd like to know your opinion.
Regards,
Sung.
------- Original Message -------
Sender : RAVI NANJUNDAPPA<nravi.n at samsung.com> Chief
Engineer/SRI-Bangalore-Open Source/Samsung Electronics
Date : 2015-10-15 14:02 (GMT+09:00)
Title : Re: [dev] [request for feedback] Proposal - IoTivity Bindings
Generation Using SWIG
Hi Sakari,
Thanks for the reply.
Sure. We will exclude the JS bindings from our plan and provide the bindings
for others (initially to start with Python and perl).
I hope this is fine.
Thanks and Best Regards,
N Ravi
------- Original Message -------
Sender : Poussa, Sakari<sakari.poussa at intel.com>
Date : Oct 08, 2015 13:14 (GMT+05:30)
Title : Re: [dev] [request for feedback] Proposal - IoTivity Bindings
Generation Using SWIG
Hi Ravi,
I think the plan is OK. But as Gabriel pointed out, we would like to leave the
JS APIs out of it and have the JS APIs to be how it is now being implement for
Node.js, Tizen and Crosswalk.
The JS API spec is here:
https://github.com/otcshare/iotivity-node/blob/master/spec/iot-js-spec.md#web-idl-of-the-javascript-api
Sakari
From: > on behalf of RAVI NANJUNDAPPA >
Reply-To: "nravi.n at samsung.com" >
Date: Thursday, October 8, 2015 at 08:34
To: RAVI NANJUNDAPPA >
Cc: iotivity-dev >
Subject: Re: [dev] [request for feedback] Proposal - IoTivity Bindings
Generation Using SWIG
Dear All,
Gentle reminder.
In case of no issues on this proposal, I'll start working on this proposal.
Thanks and Best Regards,
N Ravi
------- Original Message -------
Sender : RAVI NANJUNDAPPA> Chief Engineer/SRI-Bangalore-Open Source/Samsung
Electronics
Date : Oct 05, 2015 09:57 (GMT+05:30)
Title : Re: Re: [dev] [request for feedback] Proposal - IoTivity Bindings
Generation Using SWIG
Hello Gabriel,
Thanks for the information.
As mentioned in the proposal document, the initial plan is to support for
Python and perl language bindings.
Once these are completed and depending on the community's response, we will
take this further to consider other bindings.
Thanks and Best Regards,
N Ravi
------- Original Message -------
Sender : Schulhof, Gabriel>
Date : Oct 01, 2015 18:56 (GMT+05:30)
Title : Re: [dev] [request for feedback] Proposal - IoTivity Bindings
Generation Using SWIG
Hey, all!
We're already writing JS bindings for the CSDK to be used with node.js, and we
have higher level binding that mimic the C++ API as well. Writing JS bindings
is not as simple as producing them using SWIG. You need to know for which
environment you wish to write bindings. Bindings for Chromium are completely
different than bindings for Node.js, for example.
As far as the node.js bindings are concerned, it might be beneficial to
integrate them with iotivity itself, because the contents of the bindings is
determined by the build flags used to build iotivity. For example, certain
constants are not defined if remote access is not enabled, and they are defined
otherwise. Right now, I have to parse the header files using a bash script,
which is super-undesirable because it doesn't recognize which C preprocessor
directives were used during the compilation of iotivity itself.
In addition, the interface between node.js and the bindings to native libraries
changes all the time - so much so, that a second project called "native
abstractions for node" (NAN) has sprung up to provide C preprocessor macros and
C++ classes that allow developers to address multiple versions of node.js using
the same C++ code.
https://github.com/otcshare/iotivity-node
Cheers!
Gabriel
[http://www.samsung.net/service/ml/AttachController/201510081105792_Z5JE7EUA.gif?cmd=downdirectly&filepath=/LOCAL/ML/CACHE/n/20151015/BGFC2LL5XOK0
at
namo.co.kr388nravi.n&contentType=IMAGE/GIF;charset=ISO-8859-1&msgno=388&partno=1&foldername=INBOX&msguid=37642]