I don?t think this is a good direction to go in, as it would explode the number 
of builtin APIs.
Instead, a code-generation approach should be used where the RAML or Swagger 
definition from oneiota or from introspection
is used to generate the APIs in question.   That?s what we did in AllJoyn, and 
what IPCA is designed to enable.
The result is equivalent to what you propose from an app developer?s point of 
view of what APIs they can call,
but the way to get there is quite different and easier to write and maintain 
over time, and it keeps the iotvity code base much smaller.
Dave
From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of MyeongGi Jeong
Sent: Monday, March 6, 2017 4:51 PM
To: iotivity-dev at lists.iotivity.org
Subject: [dev] Smart Home API proposal.


Hi, IoTivity folk.

I'd like to propose IoTivity Smart Home APIs to implement IoTivity services 
more intuitively.

Current resource layer APIs are not sufficient to implement applications and 
services by application SW developers that don't have exact OCF specification 
details.

Most of SW developers usually want to develop the applications by understanding 
the API usage guide.

But, by using the current APIs, SW developers cannot write their applications 
without knowing OCF specification.

And they should handle the request and response data such as request type, 
device type, resource type and interface type.

These increase the difficulty of developing IoTivity services.

So, I suggest providing the additional APIs, to develop the IoTivity services 
with minimal knowledge of OCF specification.
The new APIs are going to be written by C++, to develop the services by OOP 
design.

For example,

    OCF::Fan ceilingFan( "off" ); // create Fan object with initial status

    ceilingFan.TurnOn( );         // turning on

    ceilingFan.TurnOff( );        // turning off



All devices defined by OCF specification are represented with pre-defined 
classes.

I'll create the wiki page to explain more detaild API design concept soon.

And also I'll create the Jira ticket to discuss about the API design...

I believe that this makes IoTivity more eaisier..

Let's talk together.



Thanks.

Best Regards,

---

MyeongGi Jeong

Principle Engineer, Software Architect

Software R&D Center, Samsung Electronics Co., Ltd.

+82-10-3328-1130 | +82-2-6147-7699





[cid:image001.gif at 01D2969C.18B64A30]

[http://ext.samsung.net/mail/ext/v1/external/status/update?userid=myeong.jeong&do=bWFpbElEPTIwMTcwMzA3MDA1MDM0ZXBjbXMxcDc2MGVkM2Q4Y2EyMTU4NWUwNjE5Yjg1OWQ0ODllOGM1OSZyZWNpcGllbnRBZGRyZXNzPWlvdGl2aXR5LWRldkBsaXN0cy5pb3Rpdml0eS5vcmc_]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170307/6fd882c3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 13402 bytes
Desc: image001.gif
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170307/6fd882c3/attachment.gif>

Reply via email to