?One of? is very complex syntax to implement. 

Resource property list can be different for some condition which requires 
dynamic resource change beyond RAML file parsing.



BR, Uze Choi

From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Senthil Kumar G
Sent: Monday, September 19, 2016 7:28 PM
To: Max Kholmyansky
Cc: iotivity-dev at lists.iotivity.org
Subject: Re: [dev] Error while simulator reading raml file



Hello Max,



Sorry for the delayed response.

The reason for the issue you were facing with the temperature resource was the 
usage of "oneOf" keyword in oic.r.temperature.json.


....................

         "units":  {
          "oneOf": [
            {
              "enum": ["C","F","K"],
              "description": "ReadOnly, Units for the temperature value"
            },
            {
              "type": "array",
              "items": {
                "enum": ["C","F","K"]
              }
            }
          ]
        }

....................

Simulator doesn't support the usage of "oneOf", that's why it was not able to 
create a resource.

Please make either of the following changes to the "units" property in 
oic.r.temperature.json file to make use of it.


Value of units property can be one among the values given in the enum.

        "units":  {
          "enum": ["C","F","K"],
          "description": "ReadOnly, Units for the temperature value"
        } 

                 (or)

Value of units property can be an array of strings where each string in the 
array should be one among the values in the enum.

        "units":  {
          "type": "array",
          "items": {
            "enum": ["C","F","K"]
            }
        }

I've attached the oic.r.temperature.json for your reference, it adopts the 
first change given above.



Thanks & Regards,

Senthil Kumar G S



--------- Original Message ---------

Sender : Max Kholmyansky <max001 at gmail.com>

Date : 2016-09-04 16:14 (GMT+5:30)

Title : Re: [dev] Error while simulator reading raml file



Hello Senthil 



I am facing similar issue (failed to load RAML file) using the 
"temperature.raml".

I tried to load the "battery" example reported by another developer, and it 
works well.





I am attaching the RAML and JSON file for "temperature" (copied from the OCF 
site) + 2 resource files you recommended to use last time.

The 4 files are placed in the same folder of my Ubuntu machine.



Can you please kind point me to a specific issue?



Thanks and best regards

Max



Software Architect - Tekoa Ltd







On Wed, Aug 31, 2016 at 6:10 PM, Senthil Kumar G <senthil.gs at samsung.com> 
wrote:

Hello Injung Hwang,



The oic.r.energy.battery.json file has a dependency on two more 
files(oic.core.json and oic.baseResource.json).


oic.r.energy.battery.json file

........

   "allOf": [
    {"$ref": "oic.core.json#/definitions/oic.core"},
    {"$ref": "oic.baseResource.json#/definitions/oic.r.baseresource"},
    {"$ref": "#/definitions/oic.r.energy.battery"}
  ],

Resources can't be created if the referenced files are not available in the 
same path.

I have attached the dependent files which you may use for creating the 
resources. Please paste these files in the same path.

And also, as Mr. Uze Choi said, simulator provides support for creating a 
resource manually without RAMLs. Please have a look into that.



Thanks & Regards,

Senthil Kumar G S



--------- Original Message ---------

Sender : InJung Hwang <sinban04 at gmail.com>

Date : 2016-08-31 07:26 (GMT+5:30)

Title : Re: [dev] Error while simulator reading raml file





Ah, okay, thank you so much for your reply about my problem.

I used raml, json file from the Web site OCF.

I can't download the file, so i made file, copy and paste the content.



I attached one of those files.

please check it out.


Thanks.

Injung.





2016? 8? 30? (?) ?? 6:32, ???(Uze Choi) <uzchoi at samsung.com>?? ??:

Hi Injung,



Simulator has the functionality to load the RAML&JSON file for resource setting.

However, RAML and JSON file are not completely exact from syntax perspective.

File parser in the Simulator usually adapt some of incompleteness by some 
manipulation logic.

Whenever spec file is updated, there is still possibility to fail to parse it. 
Please understand this situation.



Anyway, If you share the raml&json file which you tested, it will be good to 
analyze from someone who manage it.

Please remind you can make the resource in the simulator by manual setting also.



BR, Uze Choi

From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of InJung Hwang
Sent: Wednesday, August 31, 2016 10:23 AM
To: iotivity-dev at lists.iotivity.org
Subject: [dev] Error while simulator reading raml file





Hello, now i'm testing IoTivity simulator to read raml resource file.

However, when i try to create resource with raml file in simulator,

it returns error "failed to create resource" and does not work.



When i try to create several resource instances with raml, 

It returns same error and additional "SIMULATOR_BAD_OBJECT" error.

Is simulator being used now? or in the middle of test?

If not, how can i fix the problem of creating resource with raml?

I made raml file with json file in the same directory.

(e.g. battery.raml, oic.r.energy.battery.json)

If someone knows the problem and solution, please let me know. 

Thanks.

Injung.

-- 



? ? ?

?????? ?????????? ???????

???? ????? ???



InJung, Hwang

SungKyunKwan University

Combined Master & Ph.D Course in Electronic, Electrical & Computer Engineering

Embedded Software Lab.

e-mail :sinban at skku.edu / sinban04 at gmail.com

phone : +82 10-8558-4364



_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

-- 



? ? ?

?????? ?????????? ???????

???? ????? ???



InJung, Hwang

SungKyunKwan University

Combined Master & Ph.D Course in Electronic, Electrical & Computer Engineering

Embedded Software Lab.

e-mail :sinban at skku.edu / sinban04 at gmail.com

phone : +82 10-8558-4364



_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev







_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev






  
<http://v70ext.samsung.net/mail/ext/v1/external/status/update?userid=senthil.gs&do=bWFpbElEPTIwMTYwOTE5MTAyODMwZXBjbXM1cDQ0OGE2NjgwZmI4MGM4Y2E0MzNjMThhZWIxMmNiZDhkYSZyZWNpcGllbnRBZGRyZXNzPWlvdGl2aXR5LWRldkBsaXN0cy5pb3Rpdml0eS5vcmc_>
 

-------------- next part --------------
HTML ?????? ??????????????...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160919/e94ff2a4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 33527 bytes
Desc: ?????? ?? ????????.
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160919/e94ff2a4/attachment.png>

Reply via email to