| /////////////////////////////////////////////////////////////////////////////// |
| // |
| // Copyright (c) 2000-2020 Ericsson Telecom AB |
| // |
| // All rights reserved. This program and the accompanying materials |
| // are made available under the terms of the Eclipse Public License v2.0 |
| // which accompanies this distribution, and is available at |
| // https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html |
| /////////////////////////////////////////////////////////////////////////////// |
| // File: EPTF_LwM2M_Object_Definitions.ttcn |
| // Description: |
| // Rev: R1A |
| // Prodnr: CNL 113 859 |
| // Updated: 2020-03-04 |
| // Contact: http://ttcn.ericsson.se |
| /////////////////////////////////////////////////////////////////////////////// |
| |
| /////////////////////////////////////////////////////////// |
| // Module: EPTF_LwM2M_Object_Definitions |
| // |
| // Purpose: |
| // This module contains the smart object definitions for the LWM2M load generator component |
| // |
| // Class Diagram: |
| // (see EPTF_LwM2M_Object_Definitions.classes.jpg) |
| /////////////////////////////////////////////////////////////// |
| module EPTF_LwM2M_Object_Definitions |
| { |
| |
| import from LightweightM2M_Types all; |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.classes.jpg |
| class LwM2M_Resource { |
| integer id |
| integer objId |
| integer objInstId |
| boolean observed |
| LwM2M_DataSample_Information dataSample |
| LwM2M_ResourceValue val |
| f_LwM2M_resourceHash_forResource(in LwM2M_Resource p_res) |
| f_LwM2M_Resource_setNextDataSample(inout LwM2M_Resource p_res, inout LwM2M_DataSamples_DB p_db) |
| } |
| LwM2M_Resource "1" --> "0..1\n.dataSample" LwM2M_DataSample_Information |
| LwM2M_Resource "1" --> "1\n.objId" LwM2M_Object |
| LwM2M_Resource "1" --> "1\n.objInstanceId" LwM2M_ObjectInstance |
| LwM2M_Resource "1" --> "1\n.id" LwM2M_ResourceSpecification |
| |
| class LwM2M_DataSample_Information { |
| charstring samplesName |
| integer samplesPointer |
| integer valuePointer |
| } |
| LwM2M_DataSample_Information "1" --> "1\n.samplesPointer" LwM2M_DataSamples |
| LwM2M_DataSample_Information "1" --> "1\n.valuePointer" LwM2M_DataSamples |
| |
| class LwM2M_ObjectDB { |
| integer id |
| LwM2M_Object_List objs |
| LwM2M_Resource_List resources |
| integer objHashRef |
| integer resHashRef |
| f_LwM2M_ObjectDB_init(inout LwM2M_ObjectDB p_db, in integer p_id) |
| f_LwM2M_ObjectDB_cleanUp(inout LwM2M_ObjectDB p_db) |
| f_LwM2M_ObjectDB_createObject(inout LwM2M_ObjectDB p_db, in LwM2M_ObjectSpecification p_spec) |
| f_LwM2M_ObjectDB_getObject(in LwM2M_ObjectDB p_db, in integer p_id, inout LwM2M_Object p_obj) |
| f_LwM2M_ObjectDB_getObjectIdx(in LwM2M_ObjectDB p_db, in integer p_id) |
| f_LwM2M_ObjectDB_createObjectInstance(inout LwM2M_ObjectDB p_db, in LwM2M_ObjectSpecificationDB p_spec_db, in integer p_id, in boolean p_createResources := true) |
| f_LwM2M_ObjectDB_addResource(inout LwM2M_ObjectDB p_db, in LwM2M_Resource p_resource) |
| f_LwM2M_ObjectDB_getObjectInstance(in LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, inout LwM2M_ObjectInstance p_objInst) |
| f_LwM2M_ObjectDB_getResource(in LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, inout LwM2M_Resource p_resource) |
| f_LwM2M_ObjectDB_setResource(inout LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, in LwM2M_Resource p_resource) |
| f_LwM2M_ObjectDB_getResourceValue(in LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, inout LwM2M_ResourceValue p_value) |
| f_LwM2M_ObjectDB_setResourceValue(inout LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, in LwM2M_ResourceValue p_value) |
| f_LwM2M_ObjectDB_setResourceObserved(inout LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, in boolean p_observed) |
| f_LwM2M_ObjectDB_getObjectPaths(in LwM2M_ObjectDB p_db, inout ObjectPath_List p_paths) |
| } |
| LwM2M_ObjectDB "1" --> "*\n.objs[]" LwM2M_Object |
| LwM2M_ObjectDB "1" --> "*\n.resources[]" LwM2M_Resource |
| |
| class LwM2M_Object { |
| integer id, |
| LwM2M_ObjectInstance_List instances |
| } |
| LwM2M_Object "1" --> "*\n.instances[]" LwM2M_ObjectInstance |
| LwM2M_Object "1" --> "1\n.id" LwM2M_ObjectSpecification |
| |
| class LwM2M_ObjectInstance { |
| integer id, |
| integer objId, |
| LwM2M_ResourceIdx_List resources |
| f_LwM2M_createResource(inout LwM2M_ObjectInstance p_oi, in LwM2M_ResourceSpecification p_spec) |
| } |
| LwM2M_ObjectInstance "1" --> "*\n.resources[]" LwM2M_Resource |
| LwM2M_ObjectInstance "1" --> "1\n.id" LwM2M_Object |
| |
| class LwM2M_ObjectSpecificationDB { |
| integer id, |
| LwM2M_ObjectSpecification_List specs, |
| integer hashRef |
| f_LwM2M_ObjectSpecificationDB_init(inout LwM2M_ObjectSpecificationDB p_db, in integer p_id) |
| f_LwM2M_ObjectSpecificationDB_cleanUp(inout LwM2M_ObjectSpecificationDB p_db) |
| f_LwM2M_ObjectSpecificationDB_add(inout LwM2M_ObjectSpecificationDB p_db, LwM2M_ObjectSpecification p_spec) |
| f_LwM2M_ObjectSpecificationDB_lookUp(in LwM2M_ObjectSpecificationDB p_db, in integer p_objId) |
| f_LwM2M_ObjectSpecificationDB_getResourceSpecification(LwM2M_ObjectSpecificationDB p_spec_db, integer p_objId, integer p_resId, inout LwM2M_ResourceSpecification p_spec) |
| f_LwM2M_ObjectSpecificationDB_fillInOmaSpecs(inout LwM2M_ObjectSpecificationDB p_db) |
| } |
| LwM2M_ObjectSpecificationDB "1" --> "*\n.specs[]" LwM2M_ObjectSpecification |
| |
| class LwM2M_ObjectSpecification { |
| charstring name |
| integer id |
| LwM2M_InstanceTypeEnum instancetype |
| boolean mandatory |
| charstring description |
| LwM2M_ResourceSpecification_List resourcedefs |
| } |
| LwM2M_ObjectSpecification "1" --> "*\n.resourcedefs[]" LwM2M_ResourceSpecification |
| |
| class LwM2M_ResourceSpecification { |
| integer id |
| charstring name |
| LwM2M_OperationTypeEnum operations |
| LwM2M_InstanceTypeEnum instancetype |
| boolean mandatory |
| LwM2M_TypeEnum type_ |
| charstring range |
| charstring units |
| charstring description |
| } |
| |
| class LwM2M_DataSamples { |
| charstring name, |
| LwM2M_ResourceValue_List values |
| } |
| |
| class LwM2M_DataSamples_DB { |
| charstring name, |
| LwM2M_DataSamples_List data, |
| integer hashRef |
| f_LwM2M_DataSamples_DB_init(inout LwM2M_DataSamples_DB p_db, in charstring p_name) |
| f_LwM2M_DataSamples_DB_add(inout LwM2M_DataSamples_DB p_db, in LwM2M_DataSamples p_samples) |
| f_LwM2M_DataSamples_DB_lookUp(inout LwM2M_DataSamples_DB p_db, in charstring p_sampleName) |
| f_LwM2M_DataSamples_DB_get(inout LwM2M_DataSamples_DB p_db, in integer p_idx, inout LwM2M_DataSamples p_samples) |
| f_LwM2M_DataSamples_DB_cleanUp(inout LwM2M_DataSamples_DB p_db) |
| } |
| LwM2M_DataSamples_DB "1" --> "*.data[]" LwM2M_DataSamples |
| |
| @enduml |
| ******************************************************************/ |
| |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.LwM2M_ObjectDB.jpg |
| class LwM2M_ObjectDB { |
| integer id |
| LwM2M_Object_List objs |
| LwM2M_Resource_List resources |
| integer objHashRef |
| integer resHashRef |
| f_LwM2M_ObjectDB_init(inout LwM2M_ObjectDB p_db, in integer p_id) |
| f_LwM2M_ObjectDB_cleanUp(inout LwM2M_ObjectDB p_db) |
| f_LwM2M_ObjectDB_createObject(inout LwM2M_ObjectDB p_db, in LwM2M_ObjectSpecification p_spec) |
| f_LwM2M_ObjectDB_getObject(in LwM2M_ObjectDB p_db, in integer p_id, inout LwM2M_Object p_obj) |
| f_LwM2M_ObjectDB_getObjectIdx(in LwM2M_ObjectDB p_db, in integer p_id) |
| f_LwM2M_ObjectDB_createObjectInstance(inout LwM2M_ObjectDB p_db, in LwM2M_ObjectSpecificationDB p_spec_db, in integer p_id, in boolean p_createResources := true) |
| f_LwM2M_ObjectDB_addResource(inout LwM2M_ObjectDB p_db, in LwM2M_Resource p_resource) |
| f_LwM2M_ObjectDB_getObjectInstance(in LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, inout LwM2M_ObjectInstance p_objInst) |
| f_LwM2M_ObjectDB_getResource(in LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, inout LwM2M_Resource p_resource) |
| f_LwM2M_ObjectDB_setResource(inout LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, in LwM2M_Resource p_resource) |
| f_LwM2M_ObjectDB_getResourceValue(in LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, inout LwM2M_ResourceValue p_value) |
| f_LwM2M_ObjectDB_setResourceValue(inout LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, in LwM2M_ResourceValue p_value) |
| f_LwM2M_ObjectDB_setResourceObserved(inout LwM2M_ObjectDB p_db, in integer p_objId, in integer p_objInstId, in integer p_resourceId, in boolean p_observed) |
| f_LwM2M_ObjectDB_getObjectPaths(in LwM2M_ObjectDB p_db, inout ObjectPath_List p_paths) |
| } |
| @enduml |
| ******************************************************************/ |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ObjectDB |
| // |
| // Purpose: |
| // Storing <LwM2M_Object> instances |
| // |
| // Class: |
| // (see EPTF_LwM2M_Object_Definitions.LwM2M_ObjectDB.jpg) |
| // |
| // Elements: |
| // id - *integer* - unique id of the <LwM2M_ObjectDB> instance |
| // objs - <LwM2M_Object_List> - object instance elements |
| // resources - <LwM2M_Resource_List> - smart resource instance elements |
| // objHashRef - *integer* - hashmap id for looking up <LwM2M_Object> instances |
| // resHashRef - *integer* - hashmap id for looking up <LwM2M_Resource> instances |
| // |
| // Related Functions: |
| // - <f_LwM2M_ObjectDB_init> (*inout* <LwM2M_ObjectDB> p_db, *in integer* p_id) |
| // - <f_LwM2M_ObjectDB_cleanUp> (*inout* <LwM2M_ObjectDB> p_db) |
| // - <f_LwM2M_ObjectDB_createObject> (*inout* <LwM2M_ObjectDB> p_db, *in* <LwM2M_ObjectSpecification> p_spec) |
| // - <f_LwM2M_ObjectDB_getObject> (*in* <LwM2M_ObjectDB> p_db, *in integer* p_id, *inout* <LwM2M_Object> p_obj) |
| // - <f_LwM2M_ObjectDB_getObjectIdx> (*in* <LwM2M_ObjectDB> p_db, *in integer* p_id) |
| // - <f_LwM2M_ObjectDB_createObjectInstance> (*inout* <LwM2M_ObjectDB> p_db, *in* <LwM2M_ObjectSpecificationDB> p_spec_db, *in integer* p_id, *in boolean* p_createResources := true) |
| // - <f_LwM2M_ObjectDB_addResource> (*inout* <LwM2M_ObjectDB> p_db, *in* <LwM2M_Resource> p_resource) |
| // - <f_LwM2M_ObjectDB_getObjectInstance> (*in* <LwM2M_ObjectDB> p_db, *in integer* p_objId, *in integer* p_objInstId, *inout* <LwM2M_ObjectInstance> p_objInst) |
| // - <f_LwM2M_ObjectDB_getResource> (*in* <LwM2M_ObjectDB> p_db, *in integer* p_objId, *in integer* p_objInstId, *in integer* p_resourceId, *inout* <LwM2M_Resource> p_resource) |
| // - <f_LwM2M_ObjectDB_setResource> (*inout* <LwM2M_ObjectDB> p_db, *in integer* p_objId, *in integer* p_objInstId, *in integer* p_resourceId, *in* <LwM2M_Resource> p_resource) |
| // - <f_LwM2M_ObjectDB_getResourceValue> (*in* <LwM2M_ObjectDB> p_db, *in integer* p_objId, *in integer* p_objInstId, *in integer* p_resourceId, *inout* <LwM2M_ResourceValue> p_value) |
| // - <f_LwM2M_ObjectDB_setResourceValue> (*inout* <LwM2M_ObjectDB> p_db, *in integer* p_objId, *in integer* p_objInstId, *in integer* p_resourceId, *in* <LwM2M_ResourceValue> p_value) |
| // - <f_LwM2M_ObjectDB_setResourceObserved> (*inout* <LwM2M_ObjectDB> p_db, *in integer* p_objId, *in integer* p_objInstId, *in integer* p_resourceId, *in boolean* p_observed) |
| // - <f_LwM2M_ObjectDB_getObjectPaths> (*in* <LwM2M_ObjectDB> p_db, *inout* <ObjectPath_List> p_paths) |
| /////////////////////////////////////////////////////////// |
| type record LwM2M_ObjectDB |
| { |
| integer id, |
| LwM2M_Object_List objs, |
| LwM2M_Resource_List resources, |
| integer objHashRef, |
| integer resHashRef |
| } |
| |
| const LwM2M_ObjectDB c_LwM2M_ObjectDB_init := |
| { |
| id := -1, |
| objs := {}, |
| resources := {}, |
| objHashRef := -1, |
| resHashRef := -1 |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_Object_List |
| // |
| // Purpose: |
| // List of <LwM2M_Object> |
| /////////////////////////////////////////////////////////// |
| type record of LwM2M_Object LwM2M_Object_List; |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.LwM2M_Object.jpg |
| class LwM2M_Object { |
| integer id, |
| LwM2M_ObjectInstance_List instances |
| } |
| @enduml |
| ******************************************************************/ |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_Object |
| // |
| // Purpose: |
| // This structure models a LwM2M smart object |
| // |
| // Class: |
| // (see EPTF_LwM2M_Object_Definitions.LwM2M_Object.jpg) |
| // |
| // Elements: |
| // id - *integer* - smart object id |
| // instances - <LwM2M_ObjectInstance_List> - objec instances of the smart object |
| /////////////////////////////////////////////////////////// |
| type record LwM2M_Object |
| { |
| integer id, |
| LwM2M_ObjectInstance_List instances |
| } |
| |
| const LwM2M_Object c_LwM2M_Object_init := |
| { |
| id := -1, |
| instances := {} |
| } |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.LwM2M_ObjectInstance.jpg |
| class LwM2M_ObjectInstance { |
| integer id, |
| integer objId, |
| LwM2M_ResourceIdx_List resources |
| f_LwM2M_createResource(inout LwM2M_ObjectInstance p_oi, in LwM2M_ResourceSpecification p_spec) |
| } |
| @enduml |
| ******************************************************************/ |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ObjectInstance |
| // |
| // Purpose: |
| // Models a smart object instance of a <LwM2M_Object> |
| // |
| // Class: |
| // (see EPTF_LwM2M_Object_Definitions.LwM2M_ObjectInstance.jpg) |
| // |
| // Elements: |
| // id - *integer* - instance id of the <LwM2M_Object> |
| // objId - *integer* - object id of the parent <LwM2M_Object> |
| // resources - <LwM2M_ResourceIdx_List> - pointers to the resources of the object instance's own resources (stored in the parent <LwM2M_Object>.resources) |
| // |
| // Related Functions: |
| // - <f_LwM2M_createResource> (*inout* <LwM2M_ObjectInstance> p_oi, *in* <LwM2M_ResourceSpecification> p_spec) |
| /////////////////////////////////////////////////////////// |
| type record LwM2M_ObjectInstance |
| { |
| integer id, |
| integer objId, |
| LwM2M_ResourceIdx_List resources |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ResourceIdx_List |
| // |
| // Purpose: |
| // List of *integer* |
| /////////////////////////////////////////////////////////// |
| type record of integer LwM2M_ResourceIdx_List; |
| |
| const LwM2M_ObjectInstance c_LwM2M_ObjectInstance_init := |
| { |
| id := -1, |
| objId := -1, |
| resources := {} |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ObjectInstance_List |
| // |
| // Purpose: |
| // List of <LwM2M_ObjectInstance> |
| /////////////////////////////////////////////////////////// |
| type record of LwM2M_ObjectInstance LwM2M_ObjectInstance_List; |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.LwM2M_ObjectSpecificationDB.jpg |
| class LwM2M_ObjectSpecificationDB { |
| integer id, |
| LwM2M_ObjectSpecification_List specs, |
| integer hashRef |
| f_LwM2M_ObjectSpecificationDB_init(inout LwM2M_ObjectSpecificationDB p_db, in integer p_id) |
| f_LwM2M_ObjectSpecificationDB_cleanUp(inout LwM2M_ObjectSpecificationDB p_db) |
| f_LwM2M_ObjectSpecificationDB_add(inout LwM2M_ObjectSpecificationDB p_db, LwM2M_ObjectSpecification p_spec) |
| f_LwM2M_ObjectSpecificationDB_lookUp(in LwM2M_ObjectSpecificationDB p_db, in integer p_objId) |
| f_LwM2M_ObjectSpecificationDB_getResourceSpecification(LwM2M_ObjectSpecificationDB p_spec_db, integer p_objId, integer p_resId, inout LwM2M_ResourceSpecification p_spec) |
| f_LwM2M_ObjectSpecificationDB_fillInOmaSpecs(inout LwM2M_ObjectSpecificationDB p_db) |
| } |
| @enduml |
| ******************************************************************/ |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ObjectSpecificationDB |
| // |
| // Purpose: |
| // Storing <LwM2M_ObjectSpecification> instances |
| // |
| // Class: |
| // (see EPTF_LwM2M_Object_Definitions.LwM2M_ObjectSpecificationDB.jpg) |
| // |
| // Elements: |
| // id - *integer* - unique id of the <LwM2M_ObjectSpecificationDB> instance |
| // specs - <LwM2M_ObjectSpecification_List> - the stored <LwM2M_ObjectSpecification> instances |
| // hashRef - *integer* - hashmap id for looking up <LwM2M_ObjectSpecification> instances based on their id |
| // |
| // Related Functions: |
| // - <f_LwM2M_ObjectSpecificationDB_init> (*inout* <LwM2M_ObjectSpecificationDB> p_db, *in integer* p_id) |
| // - <f_LwM2M_ObjectSpecificationDB_cleanUp> (*inout* <LwM2M_ObjectSpecificationDB> p_db) |
| // - <f_LwM2M_ObjectSpecificationDB_add> (*inout* <LwM2M_ObjectSpecificationDB> p_db, <LwM2M_ObjectSpecification> p_spec) |
| // - <f_LwM2M_ObjectSpecificationDB_lookUp> (*in* <LwM2M_ObjectSpecificationDB> p_db, *in integer* p_objId) |
| // - <f_LwM2M_ObjectSpecificationDB_getResourceSpecification> (<LwM2M_ObjectSpecificationDB> p_spec_db, *integer* p_objId, *integer* p_resId, *inout* <LwM2M_ResourceSpecification> p_spec) |
| // - <f_LwM2M_ObjectSpecificationDB_fillInOmaSpecs> (*inout* <LwM2M_ObjectSpecificationDB> p_db) |
| /////////////////////////////////////////////////////////// |
| type record LwM2M_ObjectSpecificationDB |
| { |
| integer id, |
| LwM2M_ObjectSpecification_List specs, |
| integer hashRef // obj id to idx in specs |
| } |
| |
| const LwM2M_ObjectSpecificationDB c_LwM2M_ObjectSpecificationDB_init := |
| { |
| id := -1, |
| specs := {}, |
| hashRef := -1 |
| } |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.LwM2M_ObjectSpecification.jpg |
| class LwM2M_ObjectSpecification { |
| charstring name |
| integer id |
| LwM2M_InstanceTypeEnum instancetype |
| boolean mandatory |
| charstring description |
| LwM2M_ResourceSpecification_List resourcedefs |
| } |
| @enduml |
| ******************************************************************/ |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ObjectSpecification |
| // |
| // Purpose: |
| // Defines a smart oject |
| // |
| // Class: |
| // (see EPTF_LwM2M_Object_Definitions.LwM2M_ObjectSpecification.jpg) |
| // |
| // Elements: |
| // name - *charstring* - name of the smart object |
| // id - *integer* - unique id of the smart object |
| // instancetype - <LwM2M_InstanceTypeEnum> - instantiation restrictions |
| // mandatory - *boolean* - shall it be supported by a device in a compulsory fashion? |
| // description - *charstring* - textual description (purpose) of the smart boject definition |
| // resourcedefs - <LwM2M_ResourceSpecification_List> - resource definitions used by the smart boject |
| /////////////////////////////////////////////////////////// |
| type record LwM2M_ObjectSpecification |
| { |
| charstring name, |
| integer id, |
| LwM2M_InstanceTypeEnum instancetype, |
| boolean mandatory, |
| charstring description, |
| LwM2M_ResourceSpecification_List resourcedefs |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ObjectSpecification_List |
| // |
| // Purpose: |
| // List of <LwM2M_ObjectSpecification> |
| /////////////////////////////////////////////////////////// |
| type record of LwM2M_ObjectSpecification LwM2M_ObjectSpecification_List; |
| |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ResourceSpecification_List |
| // |
| // Purpose: |
| // List of <LwM2M_ResourceSpecification> |
| /////////////////////////////////////////////////////////// |
| type record of LwM2M_ResourceSpecification LwM2M_ResourceSpecification_List; |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.LwM2M_ResourceSpecification.jpg |
| class LwM2M_ObjectSpecification { |
| integer id |
| charstring name |
| LwM2M_OperationTypeEnum operations |
| LwM2M_InstanceTypeEnum instancetype |
| boolean mandatory |
| LwM2M_TypeEnum type_ |
| charstring range |
| charstring units |
| charstring description |
| } |
| @enduml |
| ******************************************************************/ |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_ResourceSpecification |
| // |
| // Purpose: |
| // Defines a smart resource |
| // |
| // Class: |
| // (see EPTF_LwM2M_Object_Definitions.LwM2M_ResourceSpecification.jpg) |
| // |
| // Elements: |
| // name - *charstring* - name of the smart resource |
| // id - *integer* - unique id of the smart resource |
| // operations - <LwM2M_OperationTypeEnum> - allowed operations on the resource |
| // instancetype - <LwM2M_InstanceTypeEnum> - instantiation restrictions |
| // mandatory - *boolean* - shall it be supported by a device in a compulsory fashion? |
| // type_ - <LwM2M_TypeEnum> - type of the resource value |
| // range - *charstring* - the allowed value range of the resource |
| // units - *charstring* - units of the resource value |
| // description - *charstring* - textual description (purpose) of the smart boject definition |
| /////////////////////////////////////////////////////////// |
| type record LwM2M_ResourceSpecification |
| { |
| integer id, |
| charstring name, |
| LwM2M_OperationTypeEnum operations, |
| LwM2M_InstanceTypeEnum instancetype, |
| boolean mandatory, |
| LwM2M_TypeEnum type_, |
| charstring range, |
| charstring units, |
| charstring description |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Enum: LwM2M_OperationTypeEnum |
| // |
| // Purpose: |
| // Operation types of a <LwM2M_Resource> |
| // |
| // Elements: |
| // - NONE |
| // - W |
| // - R |
| // - RW |
| // - RE |
| // - E |
| // - RWE |
| /////////////////////////////////////////////////////////// |
| type enumerated LwM2M_OperationTypeEnum |
| { |
| NONE, |
| W, |
| R, |
| RW, |
| RE, |
| E, |
| RWE |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Enum: LwM2M_InstanceTypeEnum |
| // |
| // Purpose: |
| // Instantiation types of a <LwM2M_Resource> |
| // |
| // Elements: |
| // - SINGLE |
| // - MULTIPLE |
| /////////////////////////////////////////////////////////// |
| type enumerated LwM2M_InstanceTypeEnum |
| { |
| SINGLE, |
| MULTIPLE |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Enum: LwM2M_InstanceTypeEnum |
| // |
| // Purpose: |
| // Possible types of a <LwM2M_Resource>'s value |
| // |
| // Elements: |
| // - STRING |
| // - FLOAT |
| // - BOOLEAN |
| // - INTEGER |
| // - OPAQUE |
| // - TIME |
| // - NONE |
| /////////////////////////////////////////////////////////// |
| type enumerated LwM2M_TypeEnum |
| { |
| STRING, |
| FLOAT, |
| BOOLEAN, |
| INTEGER, |
| OPAQUE, |
| TIME, |
| NONE |
| } |
| |
| const integer c_LwM2M_Security_obj_id := 0; |
| const integer c_LwM2M_Server_obj_id := 1; |
| const integer c_LwM2M_Device_obj_id := 3; |
| const integer c_LwM2M_FirmwareUpdate_obj_id := 5; |
| const integer c_LwM2M_Location_obj_id := 6; |
| const integer c_LwM2M_Temperature_obj_id := 3303; |
| const integer c_LwM2M_PowerMeasurement_obj_id := 3305; |
| |
| const LwM2M_ObjectSpecification c_LwM2M_Security_spec := |
| { |
| name := "LWM2M Security", |
| id := c_LwM2M_Security_obj_id, |
| instancetype := MULTIPLE, |
| mandatory := true, |
| description := "", |
| resourcedefs := |
| { |
| { |
| id := 0, |
| name := "LWM2M Server URI", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := STRING, |
| range := "0-255 bytes", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 1, |
| name := "Bootstrap Server", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := BOOLEAN, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 2, |
| name := "Security Mode", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "0-3", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 3, |
| name := "Public Key or Identity", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := OPAQUE, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 4, |
| name := "Server Public Key or Identity", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := OPAQUE, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 5, |
| name := "Secret Key", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := OPAQUE, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 6, |
| name := "SMS Security Mode", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "0-255", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 7, |
| name := "SMS Binding Key Parameters", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := OPAQUE, |
| range := "6 bytes", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 8, |
| name := "SMS Binding Secret Keys", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := OPAQUE, |
| range := "32-48 bytes", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 9, |
| name := "LWM2M Server SMS Number", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 10, |
| name := "Short Server ID", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "1-65535", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 11, |
| name := "Client Hold Off Time", |
| operations := NONE, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "", |
| units := "s", |
| description := "" |
| } |
| } |
| } |
| |
| const LwM2M_ObjectSpecification c_LwM2M_Server_spec := |
| { |
| name := "LWM2M Server", |
| id := c_LwM2M_Server_obj_id, |
| instancetype := MULTIPLE, |
| mandatory := true, |
| description := "", |
| resourcedefs := |
| { |
| { |
| id := 0, |
| name := "Short Server ID", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "1-65535", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 1, |
| name := "Lifetime", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "", |
| units := "s", |
| description := "" |
| }, |
| { |
| id := 2, |
| name := "Default Minimum Period", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "", |
| units := "s", |
| description := "" |
| }, |
| { |
| id := 3, |
| name := "Default Maximum Period", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "", |
| units := "s", |
| description := "" |
| }, |
| { |
| id := 4, |
| name := "Disable", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 5, |
| name := "Disable Timeout", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "", |
| units := "s", |
| description := "" |
| }, |
| { |
| id := 6, |
| name := "Notification Storing When Disabled or Offline", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := BOOLEAN, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 7, |
| name := "Binding", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := STRING, |
| range := "The possible values of Resource are listed in 5.2.1.1", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 8, |
| name := "Registration Update Trigger", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| } |
| } |
| } |
| |
| const integer c_LwM2M_Device_Manufacturer := 0; |
| const integer c_LwM2M_Device_ModelNumber := 1; |
| const integer c_LwM2M_Device_SerialNumberNumber := 2; |
| |
| const LwM2M_ObjectSpecification c_LwM2M_Device_spec := |
| { |
| name := "Device", |
| id := 3, |
| instancetype := SINGLE, |
| mandatory := true, |
| description := "", |
| resourcedefs := |
| { |
| { |
| id := 0, |
| name := "Manufacturer", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 1, |
| name := "Model Number", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 2, |
| name := "Serial Number", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 3, |
| name := "Firmware Version", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 4, |
| name := "Reboot", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 5, |
| name := "Factory Reset", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 6, |
| name := "Available Power Sources", |
| operations := R, |
| instancetype := MULTIPLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "0-7", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 7, |
| name := "Power Source Voltage", |
| operations := R, |
| instancetype := MULTIPLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "", |
| units := "mV", |
| description := "" |
| }, |
| { |
| id := 8, |
| name := "Power Source Current", |
| operations := R, |
| instancetype := MULTIPLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "", |
| units := "mA", |
| description := "" |
| }, |
| { |
| id := 9, |
| name := "Battery Level", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "0-100", |
| units := "%", |
| description := "" |
| }, |
| { |
| id := 10, |
| name := "Memory Free", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "", |
| units := "KB", |
| description := "" |
| }, |
| { |
| id := 11, |
| name := "Error Code", |
| operations := R, |
| instancetype := MULTIPLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 12, |
| name := "Reset Error Code", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 13, |
| name := "Current Time", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := TIME, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 14, |
| name := "UTC Offset", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 15, |
| name := "Timezone", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 16, |
| name := "Supported Binding and Modes", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "" |
| } |
| } |
| } |
| |
| const LwM2M_ObjectSpecification c_LwM2M_FirmwareUpdate_spec := |
| { |
| name := "LWM2M Firmware Update", |
| id := c_LwM2M_FirmwareUpdate_obj_id, |
| instancetype := SINGLE, |
| mandatory := false, |
| description := "", |
| resourcedefs := |
| { |
| { |
| id := 0, |
| name := "Package", |
| operations := W, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := OPAQUE, |
| range := "", |
| units := "", |
| description := "Firmware package" |
| }, |
| { |
| id := 1, |
| name := "Package URI", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := STRING, |
| range := "0-255 bytes", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 2, |
| name := "Update", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := NONE, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 3, |
| name := "State", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "0-3", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 5, |
| name := "Update Result", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "0-9", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 6, |
| name := "PkgName", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "0-255 bytes", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 7, |
| name := "PkgVersion", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := STRING, |
| range := "0-255 bytes", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 8, |
| name := "Firmware Update Protocol Support", |
| operations := R, |
| instancetype := MULTIPLE, |
| mandatory := false, |
| type_ := INTEGER, |
| range := "", |
| units := "", |
| description := "" |
| }, |
| { |
| id := 9, |
| name := "Firmware Update Delivery Method", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := INTEGER, |
| range := "", |
| units := "", |
| description := "" |
| } |
| } |
| } |
| |
| const LwM2M_ObjectSpecification c_LwM2M_Location_spec := |
| { |
| |
| name := "Location", |
| id := c_LwM2M_Location_obj_id, |
| instancetype := SINGLE, |
| mandatory := false, |
| description := "", |
| resourcedefs := |
| { |
| { |
| id := 0, |
| name := "Latitude", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := FLOAT, |
| range := "", |
| units := "Deg", |
| description := "" |
| }, |
| { |
| id := 1, |
| name := "Longitude", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := FLOAT, |
| range := "", |
| units := "Deg", |
| description := "" |
| }, |
| { |
| id := 2, |
| name := "Altitude", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "m", |
| description := "" |
| }, |
| { |
| id := 3, |
| name := "Radius", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "m", |
| description := "" |
| }, |
| { |
| id := 4, |
| name := "Velocity", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := OPAQUE, |
| range := "", |
| units := "Refers to 3GPP GAD specs", |
| description := "" |
| }, |
| { |
| id := 5, |
| name := "Timestamp", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := TIME, |
| range := "0-6", |
| units := "", |
| description := "" |
| } |
| } |
| } |
| |
| const LwM2M_ObjectSpecification c_LwM2M_IPSO_Temperature_spec := |
| { |
| |
| name := "IPSO Temperature", |
| id := c_LwM2M_Temperature_obj_id, |
| instancetype := MULTIPLE, |
| mandatory := false, |
| description := "Description: This IPSO object should be used with a temperature sensor to report a temperature measurement. It also provides resources for minimum/maximum measured values and the minimum/maximum range that can be measured by the temperature sensor. An example measurement unit is degrees Celsius (ucum:Cel). ", |
| resourcedefs := |
| { |
| { |
| id := 5601, |
| name := "Min Measured Value", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The minimum value measured by the sensor since power ON or reset" |
| }, |
| { |
| id := 5602, |
| name := "Max Measured Value", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The maximum value measured by the sensor since power ON or reset" |
| }, |
| { |
| id := 5603, |
| name := "Min Range Value", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The minimum value that can be measured by the sensor" |
| }, |
| { |
| id := 5604, |
| name := "Max Range Value", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The maximum value that can be measured by the sensor" |
| }, |
| { |
| id := 5605, |
| name := "Reset Min and Max Measured Values", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := OPAQUE, |
| range := "", |
| units := "", |
| description := "Reset the Min and Max Measured Values to Current Value" |
| }, |
| { |
| id := 5700, |
| name := "Sensor Value", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "Last or Current Measured Value from the Sensor" |
| }, |
| { |
| id := 5701, |
| name := "Sensor Units", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := STRING, |
| range := "", |
| units := "", |
| description := "Measurement Units Definition e.g. Cel for Temperature in Celsius." |
| } |
| } |
| } |
| |
| |
| |
| const LwM2M_ObjectSpecification c_LwM2M_PowerMeasurement_spec := |
| { |
| |
| name := "Power Measurement", |
| id := c_LwM2M_PowerMeasurement_obj_id, |
| instancetype := MULTIPLE, |
| mandatory := false, |
| description := "Description: This IPSO object should be used with a temperature sensor to report a temperature measurement. It also provides resources for minimum/maximum measured values and the minimum/maximum range that can be measured by the temperature sensor. An example measurement unit is degrees Celsius (ucum:Cel). ", |
| resourcedefs := |
| { |
| { |
| id := 5800, |
| name := "Instantaneous active power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := true, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The current active power" |
| }, |
| { |
| id := 5801, |
| name := "Min Measured active power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The minimum active power measured by the sensor since it is ON" |
| }, |
| { |
| id := 5802, |
| name := "Max Measured active power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The maximum active power measured by the sensor since it is ON" |
| }, |
| { |
| id := 5803, |
| name := "Min Range active power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The minimum active power that can be measured by the sensor" |
| }, |
| { |
| id := 5804, |
| name := "Max Range active power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The maximum active power that can be measured by the sensor" |
| }, |
| { |
| id := 5805, |
| name := "Cumulative active power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The cumulative active power since the last cumulative energy reset or device start" |
| }, |
| { |
| id := 5806, |
| name := "Active Power Calibration", |
| operations := W, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "Request an active power calibration by writing the value of a calibrated load" |
| }, |
| { |
| id := 5810, |
| name := "Instantaneous reactive power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The current reactive power" |
| }, |
| { |
| id := 5811, |
| name := "Min Measured reactive power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The minimum reactive power measured by the sensor since it is ON" |
| }, |
| { |
| id := 5812, |
| name := "Max Measured reactive power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The maximum reactive power measured by the sensor since it is ON" |
| }, |
| { |
| id := 5813, |
| name := "Min Range reactive power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The minimum active power that can be measured by the sensor" |
| }, |
| { |
| id := 5814, |
| name := "Max Range reactive power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The maximum reactive power that can be measured by the sensor" |
| }, |
| { |
| id := 5815, |
| name := "Cumulative reactive power", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "The cumulative reactive power since the last cumulative energy reset or device start" |
| }, |
| { |
| id := 5816, |
| name := "Reactive Power Calibration", |
| operations := W, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "Request a reactive power calibration by writing the value of a calibrated load" |
| }, |
| { |
| id := 5820, |
| name := "Power Factor", |
| operations := R, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "If applicable, the power factor of the current consumption" |
| }, |
| { |
| id := 5821, |
| name := "Current Calibration", |
| operations := RW, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := FLOAT, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "If applicable, the power factor of the current consumption" |
| }, |
| { |
| id := 5822, |
| name := "Reset Cumulative energy", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := OPAQUE, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "Reset both cumulative active/reactive power" |
| }, |
| { |
| id := 5605, |
| name := "Reset Min and Max Measured Values", |
| operations := E, |
| instancetype := SINGLE, |
| mandatory := false, |
| type_ := OPAQUE, |
| range := "", |
| units := "Defined by Units resource.", |
| description := "Reset the Min and Max Measured Values to Current Value" |
| } |
| } |
| } |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.LwM2M_DataSamples.jpg |
| class LwM2M_DataSamples { |
| charstring name, |
| LwM2M_ResourceValue_List values |
| } |
| @enduml |
| ******************************************************************/ |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_DataSamples |
| // |
| // Purpose: |
| // Storing a list of resource values that can be played back to mimic resource value changes |
| // |
| // Class: |
| // (see EPTF_LwM2M_Object_Definitions.LwM2M_DataSamples.jpg) |
| // |
| // Elements: |
| // name - *charstring* - unique name of the data samples |
| // values - <LwM2M_ResourceValue_List> - data samples consisting of resource values |
| /////////////////////////////////////////////////////////// |
| type record LwM2M_DataSamples |
| { |
| charstring name, |
| LwM2M_ResourceValue_List values |
| } |
| |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_DataSamples_List |
| // |
| // Purpose: |
| // List of <LwM2M_DataSamples> |
| /////////////////////////////////////////////////////////// |
| type record of LwM2M_DataSamples LwM2M_DataSamples_List; |
| |
| const LwM2M_DataSamples c_LwM2M_DataSamples_init := |
| { |
| name := "", |
| values := {} |
| } |
| |
| /***************************************************************** |
| @startuml EPTF_LwM2M_Object_Definitions.LwM2M_DataSamples_DB.jpg |
| class LwM2M_DataSamples_DB { |
| charstring name, |
| LwM2M_DataSamples_List data, |
| integer hashRef |
| f_LwM2M_DataSamples_DB_init(inout LwM2M_DataSamples_DB p_db, in charstring p_name) |
| f_LwM2M_DataSamples_DB_add(inout LwM2M_DataSamples_DB p_db, in LwM2M_DataSamples p_samples) |
| f_LwM2M_DataSamples_DB_lookUp(inout LwM2M_DataSamples_DB p_db, in charstring p_sampleName) |
| f_LwM2M_DataSamples_DB_get(inout LwM2M_DataSamples_DB p_db, in integer p_idx, inout LwM2M_DataSamples p_samples) |
| f_LwM2M_DataSamples_DB_cleanUp(inout LwM2M_DataSamples_DB p_db) |
| } |
| @enduml |
| ******************************************************************/ |
| /////////////////////////////////////////////////////////// |
| // Type: LwM2M_DataSamples_DB |
| // |
| // Purpose: |
| // Storing <LwM2M_DataSamples> instances |
| // |
| // Class: |
| // (see EPTF_LwM2M_Object_Definitions.LwM2M_DataSamples_DB.jpg) |
| // |
| // Elements: |
| // name - *charstring* - unique name of the data samples database |
| // data - <LwM2M_DataSamples_List> - elements |
| // hashRef - *integer* - hashmap id for looking up <LwM2M_DataSamples> instances |
| // |
| // Related Functions: |
| // - <f_LwM2M_DataSamples_DB_init> (*inout* <LwM2M_DataSamples_DB> p_db, *in charstring* p_name) |
| // - <f_LwM2M_DataSamples_DB_add> (*inout* <LwM2M_DataSamples_DB> p_db, *in* <LwM2M_DataSamples> p_samples) |
| // - <f_LwM2M_DataSamples_DB_lookUp> (*inout* <LwM2M_DataSamples_DB> p_db, *in charstring* p_sampleName) |
| // - <f_LwM2M_DataSamples_DB_get> (*inout* <LwM2M_DataSamples_DB> p_db, *in integer* p_idx, *inout* <LwM2M_DataSamples> p_samples) |
| // - <f_LwM2M_DataSamples_DB_cleanUp> (*inout* <LwM2M_DataSamples_DB> p_db) |
| /////////////////////////////////////////////////////////// |
| type record LwM2M_DataSamples_DB |
| { |
| charstring name, |
| LwM2M_DataSamples_List data, |
| integer hashRef |
| } |
| |
| const LwM2M_DataSamples_DB c_LwM2M_DataSamples_DB_init := |
| { |
| name := "", |
| data := {}, |
| hashRef := -1 |
| } |
| |
| template LwM2M_ResourceSpecification t_LwM2M_ResourceSpecification_Readable := |
| { |
| id := ?, |
| name := ?, |
| operations := (R, RW, RE, RWE), |
| instancetype := ?, |
| mandatory := ?, |
| type_ := ?, |
| range := ?, |
| units := ?, |
| description := ? |
| } |
| |
| template LwM2M_ResourceSpecification t_LwM2M_ResourceSpecification_Writeable := |
| { |
| id := ?, |
| name := ?, |
| operations := (W, RW, RWE), |
| instancetype := ?, |
| mandatory := ?, |
| type_ := ?, |
| range := ?, |
| units := ?, |
| description := ? |
| } |
| |
| template LwM2M_ResourceSpecification t_LwM2M_ResourceSpecification_Executable := |
| { |
| id := ?, |
| name := ?, |
| operations := (E, RE), |
| instancetype := ?, |
| mandatory := ?, |
| type_ := ?, |
| range := ?, |
| units := ?, |
| description := ? |
| } |
| |
| } |