I see your issue thanks to the email from sungkyu.ko.

You can see my response to him on the mailing list from a few minutes
before this one.  The issue is that the Home Gateway and regular
IoTivity specifications have an incompatibility that will apparently
need to be solved before anything could happen.

In my opinion, the easiest way to fix that is to change the line 6406 to
instead be:

            example: |
> 
>               {
>                 "rt": "oic.r.mediaSourceList",
>                 "id": "unique_example_id",
>                 "sources": [
>                   { "rep":[
>                       "sourceName": "HDMI-CEC",
>                       "sourceNumber": "1",
>                       "sourceType": "audioPlusVideo",
>                       "status": true
                        ]
>                   },
>                   { "rep":[
>                       "sourceName": "dualRCA",
>                       "sourceNumber": "1",
>                       "sourceType": "audioOnly",
>                       "status": false
                        ]
>                   }
>                 ]
>               }

On Mon, 2015-11-16 at 02:03 +0000, ??? wrote:
> Dear Erich,
> 
>  
> 
> I'm Andy at Samsung.
> 
>  
> 
> We are making OIC server for TV.
> 
> Currently TV specification of OIC SHTG defined three mandatory
> resources including BinarySwitch, Audio and Media Source List.
> 
> The Media Source List resource has the property named 'sources' and
> its type is array.
> 
> They provided the schema of this resource and referenced JSON schema
> that support following example.
> 
> (line 6406 of attached spec file
> 'OIC_Resource_Type_Specification_Project_B_v0.9.9 Errata-r2.docx in
> archive file)
> 
>  
> 
>             example: |
> 
>               {
>                 "rt": "oic.r.mediaSourceList",
>                 "id": "unique_example_id",
>                 "sources": [
>                   {
>                     "sourceName": "HDMI-CEC",
>                     "sourceNumber": "1",
>                     "sourceType": "audioPlusVideo",
>                     "status": true
>                   },
>                   {
>                     "sourceName": "dualRCA",
>                     "sourceNumber": "1",
>                     "sourceType": "audioOnly",
>                     "status": false
>                   }
>                 ]
>               }
> 
>  
> 
> Even we are using CBOR, the structure of it should be aligned to JSON
> style schema.
> 
> I think your understanding and SHTG resource Spec. shows different
> point of view.
> 
>  
> 
> The problem is this. 
> 
> The difference between these two understanding should be removed.
> 
> From current situation, using IoTivity, TV can't pass plugfest #5
> 
>  
> 
> Regards,
> 
> Andy
> 
>  
> 
> ------- Original Message -------
> 
> Sender : Keane, Erich<erich.keane at intel.com>
> 
> Date : 2015-11-14 01:37 (GMT+09:00)
> 
> Title : Re: [dev] Fwd: Array data type problem in IoTivity.
> 
>  
> 
> My understanding is that the {"rep":{...}} part of each message is a
> part of the specification for what makes an OCRepresentation, and is
> thus necessary.
> 
> The "href":"" could potentially be ommitted, but I don't see why that
> would be too big of a problem to ignore.
> 
> Finally, I note that you're showing JSON, the IoTivity stack uses CBOR
> primarily now, so I was wondering if there is a translation happening
> here, or if this is an older version of the code?
> 
> -Erich
> 
> On Fri, 2015-11-13 at 06:43 +0000, ??? wrote:
> > Hi, 
> > 
> > We found a problem when we tested using a 'oic.r.mediaInput'
> resource.
> > 
> > The OIC Core Spec. addressed this resource should exchange array
> > contains multiple source list.
> > 
> > We guess, IoTivity makes incompatible payload with specification.
> > 
> > You can see the details in Jira ( IOT-835,
> > https://jira.iotivity.org/browse/IOT-835 )
> > 
> > And we think the patchset to resolve this problem should be applied
> > before plugfest #5.
> > 
> > To release it very very quickly, developer who has ownership of this
> > source code part would better create patchset.
> > 
> > Unfortunately, we don't know who is the right person..
> > 
> > Please help us...
> > 
> >  
> > 
> > [ IOT-835 ]
> > 
> > When exchanging data which data type is array between client and
> > server,
> > it always add "href" and "rep" in every array's element in OC stack
> > layer.
> > For example, when Client requests "GET" to Server, 
> > (assume data payload which Server makes in application layer is like
> > below.
> > "ABC":[
> > {"name":"name1","value":"value1"}
> > ,
> > {"name":"name2","value":"value2"}
> > ,
> > ] 
> > -> ABC is vector, and its elements are
> > {"name":"name1","value":"value1"}
> > and
> > {"name":"name1","value":"value2"}
> > )
> > Client gets payload by server like this
> > "ABC":[
> > {"href" : "", "rep" :{"name":"name1","value":"value1"}},
> > {"href" : "", "rep" :{"name":"name2","value":"value2"}}
> > ]
> > Problem is that "href" and "rep" is made automatically when making
> > payload.
> > Also, if client is not made of iotivity, and requests "POST" with
> > array payload to iotivty Server, server can not parse payload that
> > client sends. 
> > 
> > 
> > 
> >  
> > 
> > Thanks.
> > 
> > Best Regards,
> > 
> > ---
> > 
> > MyeongGi Jeong
> > 
> > Senior Engineer, Software Architect
> > 
> > Software R&D Center, Samsung Electronics Co., Ltd.
> > 
> > +82-10-3328-1130
> > 
> >  
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > 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
> 
> 
>  
> 
> Regards,
> 
> Andy Minho Lee
> 
>  
> 


> 
> 
> --------
> 
> Lee Min Ho
> Principal Engineer
> 
> 
> 
> IoT Lab.
> S/W Platform Team
> Software Center
> SAMSUNG ELECTRONICS CO.,LTD
> 
> TEL . 82-31-279-7888
> FAX . 82-31-279-0523
> Mobile . 82-10-6228-8340
> E-Mail . minho03.lee at samsung.com
> 
> 
> 
> 
> 
> 
> 
> 
>  
> 
> 
> 
> 
> 

Reply via email to