ARMmbed / mbed-client

DEPRECATED: C++ API for mbed-client
https://cloud.mbed.com/docs/current
Apache License 2.0
53 stars 85 forks source link

Why separate Object and ObjectInstance into separate classes? #506

Closed 0Grit closed 6 years ago

0Grit commented 7 years ago

The LwM2M spec refers to "Objects" and "Object Instances".

From OMA-TS-LightweightM2M-V1_0-20170208-A Section 6.1:

As an Object only specifies a grouping of Resources, an Object MUST be firstly instantiated so that the LwM2M Client can use the Resources of such an Object and the associated functionalities.

My personal interpretation of this is that the concept of an object in the LwM2M specification is analogous to a class in C++. LwM2M's "Object Instance" is more like a C++ "object" or instance of a class data type.

What is the benefit of having two classes to represent an "Object" and "Object Instance" in m2mObject.h & m2mObjectInstance.h?

ciarmcom commented 7 years ago

ARM Internal Ref: IOTCLT-1856

yogpan01 commented 7 years ago

Hi @loverdeg-ep , we have envisioned the structure to be in this order Object |-- Instance 1 |-- Resource |-- Instance 1 ..... Hence different class concept. Although I see your point and that's a also a valid interpretation.

teetak01 commented 6 years ago

Closing the issue as inactive and due to the repository being deprecated.

Please take a look at our current offering at https://cloud.mbed.com/docs/current. The actively maintained version of this component can be found in http://github.com/armmbed/mbed-cloud-client.

Please open a new issue if this is still valid. We strongly encourage you to migrate to the latest product. New issues in this repository will most likely remain unfixed.