@hello.nrfcloud.com/proto-map 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/LICENSE +29 -0
  2. package/README.md +122 -0
  3. package/dist/generator/addDocBlock.js +5 -0
  4. package/dist/generator/generateLwM2MDefinitions.js +82 -0
  5. package/dist/generator/generateLwM2MDefinitions.spec.js +91 -0
  6. package/dist/generator/generateLwm2mTimestampResources.js +69 -0
  7. package/dist/generator/generateModels.js +142 -0
  8. package/dist/generator/generateType.js +90 -0
  9. package/dist/generator/generateValidator.js +132 -0
  10. package/dist/generator/generateValidators.js +63 -0
  11. package/dist/generator/isDir.js +163 -0
  12. package/dist/generator/isDir.spec.js +212 -0
  13. package/dist/generator/lwm2m.js +106 -0
  14. package/dist/generator/models.js +306 -0
  15. package/dist/generator/printNode.js +8 -0
  16. package/dist/generator/tokenizeName.js +5 -0
  17. package/dist/generator/tokenizeName.spec.js +98 -0
  18. package/dist/generator/types.js +140 -0
  19. package/dist/lwm2m/LWM2MObjectDefinition.js +88 -0
  20. package/dist/lwm2m/LWM2MObjectInfo.js +9 -0
  21. package/dist/lwm2m/LwM2MObject.d.js +1 -0
  22. package/dist/lwm2m/LwM2MObjectID.js +57 -0
  23. package/dist/lwm2m/ParsedLwM2MObjectDefinition.js +1 -0
  24. package/dist/lwm2m/check-lwm2m-rules.js +480 -0
  25. package/dist/lwm2m/definitions.js +596 -0
  26. package/dist/lwm2m/fromXML2JSON.js +194 -0
  27. package/dist/lwm2m/instanceTs.js +9 -0
  28. package/dist/lwm2m/instanceTs.spec.js +16 -0
  29. package/dist/lwm2m/isRegisteredLwM2MObject.js +3 -0
  30. package/dist/lwm2m/isRegisteredLwM2MObject.spec.js +45 -0
  31. package/dist/lwm2m/object/14201.d.js +5 -0
  32. package/dist/lwm2m/object/14202.d.js +5 -0
  33. package/dist/lwm2m/object/14203.d.js +5 -0
  34. package/dist/lwm2m/object/14204.d.js +5 -0
  35. package/dist/lwm2m/object/14205.d.js +5 -0
  36. package/dist/lwm2m/object/14210.d.js +5 -0
  37. package/dist/lwm2m/object/14220.d.js +5 -0
  38. package/dist/lwm2m/object/14230.d.js +5 -0
  39. package/dist/lwm2m/object/validate14201.js +18 -0
  40. package/dist/lwm2m/object/validate14202.js +17 -0
  41. package/dist/lwm2m/object/validate14203.js +19 -0
  42. package/dist/lwm2m/object/validate14204.js +17 -0
  43. package/dist/lwm2m/object/validate14205.js +15 -0
  44. package/dist/lwm2m/object/validate14210.js +13 -0
  45. package/dist/lwm2m/object/validate14220.js +12 -0
  46. package/dist/lwm2m/object/validate14230.js +13 -0
  47. package/dist/lwm2m/objects.js +8 -0
  48. package/dist/lwm2m/parseRangeEnumeration.js +20 -0
  49. package/dist/lwm2m/parseRangeEnumeration.spec.js +27 -0
  50. package/dist/lwm2m/resourceType.js +12 -0
  51. package/dist/lwm2m/timestampResources.js +12 -0
  52. package/dist/lwm2m/unwrapNestedArray.js +114 -0
  53. package/dist/lwm2m/unwrapNestedArray.spec.js +374 -0
  54. package/dist/lwm2m/validate.js +14 -0
  55. package/dist/lwm2m/validation.js +146 -0
  56. package/dist/lwm2m/validators.js +20 -0
  57. package/dist/markdown/getCodeBlock.js +74 -0
  58. package/dist/markdown/getFrontMatter.js +15 -0
  59. package/dist/markdown/parseREADME.js +19 -0
  60. package/dist/models/asset_tracker_v2+AWS/examples/examples.spec.js +489 -0
  61. package/dist/models/check-model-rules.js +137 -0
  62. package/dist/models/models.js +137 -0
  63. package/dist/models/types.js +13 -0
  64. package/dist/senml/SenMLSchema.js +79 -0
  65. package/dist/senml/SenMLSchema.spec.js +23 -0
  66. package/dist/senml/hasValue.js +8 -0
  67. package/dist/senml/hasValue.spec.js +103 -0
  68. package/dist/senml/lwm2mToSenML.js +137 -0
  69. package/dist/senml/lwm2mToSenML.spec.js +104 -0
  70. package/dist/senml/parseResourceId.js +58 -0
  71. package/dist/senml/parseResourceId.spec.js +13 -0
  72. package/dist/senml/senMLtoLwM2M.js +126 -0
  73. package/dist/senml/senMLtoLwM2M.spec.js +226 -0
  74. package/dist/senml/validateSenML.js +6 -0
  75. package/dist/senml/validateSenML.spec.js +31 -0
  76. package/export.js +13 -0
  77. package/index.d.ts +14 -0
  78. package/lwm2m/14201.xml +94 -0
  79. package/lwm2m/14202.xml +84 -0
  80. package/lwm2m/14203.xml +104 -0
  81. package/lwm2m/14204.xml +84 -0
  82. package/lwm2m/14205.xml +64 -0
  83. package/lwm2m/14210.xml +44 -0
  84. package/lwm2m/14220.xml +34 -0
  85. package/lwm2m/14230.xml +44 -0
  86. package/lwm2m/LWM2M-v1_1.xsd +168 -0
  87. package/lwm2m/LWM2MObjectDefinition.ts +84 -0
  88. package/lwm2m/LWM2MObjectInfo.ts +42 -0
  89. package/lwm2m/LwM2MObject.d.ts +19 -0
  90. package/lwm2m/LwM2MObjectID.ts +73 -0
  91. package/lwm2m/ParsedLwM2MObjectDefinition.ts +28 -0
  92. package/lwm2m/check-lwm2m-rules.ts +160 -0
  93. package/lwm2m/definitions.ts +278 -0
  94. package/lwm2m/format.sh +3 -0
  95. package/lwm2m/fromXML2JSON.ts +44 -0
  96. package/lwm2m/instanceTs.spec.ts +19 -0
  97. package/lwm2m/instanceTs.ts +10 -0
  98. package/lwm2m/isRegisteredLwM2MObject.spec.ts +48 -0
  99. package/lwm2m/isRegisteredLwM2MObject.ts +4 -0
  100. package/lwm2m/object/14201.d.ts +73 -0
  101. package/lwm2m/object/14202.d.ts +59 -0
  102. package/lwm2m/object/14203.d.ts +67 -0
  103. package/lwm2m/object/14204.d.ts +55 -0
  104. package/lwm2m/object/14205.d.ts +43 -0
  105. package/lwm2m/object/14210.d.ts +31 -0
  106. package/lwm2m/object/14220.d.ts +25 -0
  107. package/lwm2m/object/14230.d.ts +31 -0
  108. package/lwm2m/object/validate14201.ts +10 -0
  109. package/lwm2m/object/validate14202.ts +10 -0
  110. package/lwm2m/object/validate14203.ts +10 -0
  111. package/lwm2m/object/validate14204.ts +10 -0
  112. package/lwm2m/object/validate14205.ts +10 -0
  113. package/lwm2m/object/validate14210.ts +10 -0
  114. package/lwm2m/object/validate14220.ts +10 -0
  115. package/lwm2m/object/validate14230.ts +10 -0
  116. package/lwm2m/objects.ts +16 -0
  117. package/lwm2m/parseRangeEnumeration.spec.ts +34 -0
  118. package/lwm2m/parseRangeEnumeration.ts +29 -0
  119. package/lwm2m/resourceType.ts +11 -0
  120. package/lwm2m/timestampResources.ts +4 -0
  121. package/lwm2m/unwrapNestedArray.spec.ts +241 -0
  122. package/lwm2m/unwrapNestedArray.ts +27 -0
  123. package/lwm2m/validate.ts +30 -0
  124. package/lwm2m/validation.ts +120 -0
  125. package/lwm2m/validators.ts +21 -0
  126. package/models/PCA20035+solar/README.md +10 -0
  127. package/models/PCA20035+solar/transforms/airQuality.md +48 -0
  128. package/models/PCA20035+solar/transforms/battery.md +46 -0
  129. package/models/PCA20035+solar/transforms/button.md +45 -0
  130. package/models/PCA20035+solar/transforms/deviceInfo.md +72 -0
  131. package/models/PCA20035+solar/transforms/gain.md +45 -0
  132. package/models/PCA20035+solar/transforms/geolocationFromGroundfix.md +67 -0
  133. package/models/PCA20035+solar/transforms/geolocationFromMessage.md +80 -0
  134. package/models/PCA20035+solar/transforms/humidity.md +43 -0
  135. package/models/PCA20035+solar/transforms/networkInfo.md +84 -0
  136. package/models/PCA20035+solar/transforms/pressure.md +43 -0
  137. package/models/PCA20035+solar/transforms/temperature.md +43 -0
  138. package/models/README.md +10 -0
  139. package/models/asset_tracker_v2+AWS/README.md +6 -0
  140. package/models/asset_tracker_v2+AWS/examples/examples.spec.ts +229 -0
  141. package/models/asset_tracker_v2+AWS/examples/shadow/example-1.json +24 -0
  142. package/models/asset_tracker_v2+AWS/examples/shadow/example-2.json +30 -0
  143. package/models/asset_tracker_v2+AWS/examples/shadow/example-3.json +37 -0
  144. package/models/asset_tracker_v2+AWS/examples/shadow/example-4.json +48 -0
  145. package/models/asset_tracker_v2+AWS/examples/shadow/example-5.json +43 -0
  146. package/models/asset_tracker_v2+AWS/transforms/GNSS.md +66 -0
  147. package/models/asset_tracker_v2+AWS/transforms/battery-voltage.md +50 -0
  148. package/models/asset_tracker_v2+AWS/transforms/device-info.md +61 -0
  149. package/models/asset_tracker_v2+AWS/transforms/env.md +69 -0
  150. package/models/asset_tracker_v2+AWS/transforms/fuel-gauge.md +62 -0
  151. package/models/asset_tracker_v2+AWS/transforms/roam.md +100 -0
  152. package/models/asset_tracker_v2+AWS/transforms/solar.md +58 -0
  153. package/models/check-model-rules.ts +125 -0
  154. package/models/kartverket-vasstandsdata/README.md +13 -0
  155. package/models/models.ts +36 -0
  156. package/models/types.ts +17 -0
  157. package/package.json +111 -0
  158. package/senml/SenMLSchema.spec.ts +21 -0
  159. package/senml/SenMLSchema.ts +74 -0
  160. package/senml/hasValue.spec.ts +19 -0
  161. package/senml/hasValue.ts +12 -0
  162. package/senml/lwm2mToSenML.spec.ts +74 -0
  163. package/senml/lwm2mToSenML.ts +62 -0
  164. package/senml/parseResourceId.spec.ts +13 -0
  165. package/senml/parseResourceId.ts +23 -0
  166. package/senml/senMLtoLwM2M.spec.ts +181 -0
  167. package/senml/senMLtoLwM2M.ts +121 -0
  168. package/senml/validateSenML.spec.ts +16 -0
  169. package/senml/validateSenML.ts +8 -0
@@ -0,0 +1,596 @@
1
+ function _define_property(obj, key, value) {
2
+ if (key in obj) {
3
+ Object.defineProperty(obj, key, {
4
+ value: value,
5
+ enumerable: true,
6
+ configurable: true,
7
+ writable: true
8
+ });
9
+ } else {
10
+ obj[key] = value;
11
+ }
12
+ return obj;
13
+ }
14
+ import { ResourceType } from "./LWM2MObjectInfo.js";
15
+ import { LwM2MObjectID } from "./LwM2MObjectID.js";
16
+ var _obj;
17
+ /**
18
+ * Contains the ID of the resource that defines the timestamp for each LwM2M object definition
19
+ */ export var definitions = (_obj = {}, _define_property(_obj, LwM2MObjectID.Geolocation_14201, {
20
+ ObjectID: LwM2MObjectID.Geolocation_14201,
21
+ ObjectVersion: "1.0",
22
+ Name: "Geolocation",
23
+ Description: "Describes the geo location of a device",
24
+ Resources: {
25
+ 0: {
26
+ ResourceID: 0,
27
+ Name: "Latitude",
28
+ Mandatory: true,
29
+ Type: ResourceType.Float,
30
+ Description: "The decimal notation of latitude in degrees, e.g. -43.5723 [World Geodetic System 1984].",
31
+ RangeEnumeration: {
32
+ min: -90,
33
+ max: 90
34
+ },
35
+ Units: "\xb0"
36
+ },
37
+ /**
38
+ * Longitude (Float)
39
+ *
40
+ * The decimal notation of longitude in degrees, e.g. 153.21760 [World Geodetic System 1984].
41
+ *
42
+ * Minimum: -180
43
+ * Maximum: 180
44
+ */ 1: {
45
+ ResourceID: 1,
46
+ Name: "Longitude",
47
+ Mandatory: true,
48
+ Type: ResourceType.Float,
49
+ Description: "The decimal notation of longitude in degrees, e.g. 153.21760 [World Geodetic System 1984].",
50
+ RangeEnumeration: {
51
+ min: -180,
52
+ max: 180
53
+ },
54
+ Units: "\xb0"
55
+ },
56
+ /**
57
+ * Altitude (Float)
58
+ *
59
+ * The decimal notation of altitude in meters above sea level.
60
+ */ 2: {
61
+ ResourceID: 2,
62
+ Name: "Altitude",
63
+ Mandatory: false,
64
+ Type: ResourceType.Float,
65
+ Description: "The decimal notation of altitude in meters above sea level.",
66
+ Units: "m"
67
+ },
68
+ /**
69
+ * Radius (Float)
70
+ *
71
+ * The value in this resource indicates the radius of a circular area in meters. The circular area is used to describe uncertainty about a point for coordinates in a two-dimensional coordinate reference systems (CRS). The center point of a circular area is specified by using the Latitude and the Longitude Resources.
72
+ */ 3: {
73
+ ResourceID: 3,
74
+ Name: "Radius",
75
+ Mandatory: false,
76
+ Type: ResourceType.Float,
77
+ Description: "The value in this resource indicates the radius of a circular area in meters. The circular area is used to describe uncertainty about a point for coordinates in a two-dimensional coordinate reference systems (CRS). The center point of a circular area is specified by using the Latitude and the Longitude Resources.",
78
+ Units: "m"
79
+ },
80
+ /**
81
+ * Speed (Float)
82
+ *
83
+ * Speed is the time rate of change in position.
84
+ */ 4: {
85
+ ResourceID: 4,
86
+ Name: "Speed",
87
+ Mandatory: false,
88
+ Type: ResourceType.Float,
89
+ Description: "Speed is the time rate of change in position.",
90
+ Units: "m/s"
91
+ },
92
+ /**
93
+ * Heading (Float)
94
+ *
95
+ * The angle of movement in degrees.
96
+ *
97
+ * Minimum: 0
98
+ * Maximum: 360
99
+ */ 5: {
100
+ ResourceID: 5,
101
+ Name: "Heading",
102
+ Mandatory: false,
103
+ Type: ResourceType.Float,
104
+ Description: "The angle of movement in degrees.",
105
+ RangeEnumeration: {
106
+ min: 0,
107
+ max: 360
108
+ },
109
+ Units: "\xb0"
110
+ },
111
+ /**
112
+ * Source (String)
113
+ *
114
+ * The source of the geo location, e.g. GNSS, SCELL, MCELL, WIFI.
115
+ */ 6: {
116
+ ResourceID: 6,
117
+ Name: "Source",
118
+ Mandatory: true,
119
+ Type: ResourceType.String,
120
+ Description: "The source of the geo location, e.g. GNSS, SCELL, MCELL, WIFI."
121
+ },
122
+ /**
123
+ * Timestamp (Time)
124
+ *
125
+ * The timestamp of when the location measurement was performed.
126
+ */ 99: {
127
+ ResourceID: 99,
128
+ Name: "Timestamp",
129
+ Mandatory: true,
130
+ Type: ResourceType.Time,
131
+ Description: "The timestamp of when the location measurement was performed."
132
+ }
133
+ }
134
+ }), /**
135
+ * Battery and Power (14202)
136
+ *
137
+ * Information about the battery and power status of the device.
138
+ */ _define_property(_obj, LwM2MObjectID.BatteryAndPower_14202, {
139
+ ObjectID: LwM2MObjectID.BatteryAndPower_14202,
140
+ ObjectVersion: "1.0",
141
+ Name: "Battery and Power",
142
+ Description: "Information about the battery and power status of the device.",
143
+ Resources: {
144
+ 0: {
145
+ ResourceID: 0,
146
+ Name: "State of charge",
147
+ Mandatory: false,
148
+ Type: ResourceType.Integer,
149
+ Description: "State of charge in percent. Examples: 23, 1, 100.",
150
+ RangeEnumeration: {
151
+ min: 0,
152
+ max: 100
153
+ },
154
+ Units: "%"
155
+ },
156
+ /**
157
+ * Voltage (Float)
158
+ *
159
+ * Battery voltage in Volt. Examples: 2.754, 3.3.
160
+ */ 1: {
161
+ ResourceID: 1,
162
+ Name: "Voltage",
163
+ Mandatory: false,
164
+ Type: ResourceType.Float,
165
+ Description: "Battery voltage in Volt. Examples: 2.754, 3.3.",
166
+ Units: "V"
167
+ },
168
+ /**
169
+ * Charge current (Float)
170
+ *
171
+ * Charge current in mA. Examples: 429, -244.
172
+ */ 2: {
173
+ ResourceID: 2,
174
+ Name: "Charge current",
175
+ Mandatory: false,
176
+ Type: ResourceType.Float,
177
+ Description: "Charge current in mA. Examples: 429, -244.",
178
+ Units: "mA"
179
+ },
180
+ /**
181
+ * Battery temperature (Float)
182
+ *
183
+ * Battery temperature in Celsius. Examples: 21.7, 23.123.
184
+ */ 3: {
185
+ ResourceID: 3,
186
+ Name: "Battery temperature",
187
+ Mandatory: false,
188
+ Type: ResourceType.Float,
189
+ Description: "Battery temperature in Celsius. Examples: 21.7, 23.123.",
190
+ Units: "C"
191
+ },
192
+ /**
193
+ * Time to full (Integer)
194
+ *
195
+ * Time to full in seconds. Examples: 4652.
196
+ */ 4: {
197
+ ResourceID: 4,
198
+ Name: "Time to full",
199
+ Mandatory: false,
200
+ Type: ResourceType.Integer,
201
+ Description: "Time to full in seconds. Examples: 4652.",
202
+ Units: "s"
203
+ },
204
+ /**
205
+ * Time to empty (Integer)
206
+ *
207
+ * Time to empty in seconds. Examples: 4652.
208
+ */ 5: {
209
+ ResourceID: 5,
210
+ Name: "Time to empty",
211
+ Mandatory: false,
212
+ Type: ResourceType.Integer,
213
+ Description: "Time to empty in seconds. Examples: 4652.",
214
+ Units: "s"
215
+ },
216
+ /**
217
+ * Timestamp (Time)
218
+ *
219
+ * The timestamp of when the measurement was performed.
220
+ */ 99: {
221
+ ResourceID: 99,
222
+ Name: "Timestamp",
223
+ Mandatory: true,
224
+ Type: ResourceType.Time,
225
+ Description: "The timestamp of when the measurement was performed."
226
+ }
227
+ }
228
+ }), /**
229
+ * Connection information (14203)
230
+ *
231
+ * Details about the device's connection.
232
+ */ _define_property(_obj, LwM2MObjectID.ConnectionInformation_14203, {
233
+ ObjectID: LwM2MObjectID.ConnectionInformation_14203,
234
+ ObjectVersion: "1.0",
235
+ Name: "Connection information",
236
+ Description: "Details about the device's connection.",
237
+ Resources: {
238
+ 0: {
239
+ ResourceID: 0,
240
+ Name: "Network mode",
241
+ Mandatory: false,
242
+ Type: ResourceType.String,
243
+ Description: "Examples: LTE-M, NB-IoT."
244
+ },
245
+ /**
246
+ * Band (Integer)
247
+ *
248
+ * E-UTRA Absolute Radio Frequency Channel Number (EARFCN) of the current cell where the EARFCN is as defined in 3GPP TS 36.101. LTE carrier channel number for unique identification of LTE band and carrier frequency. Examples: 262143
249
+ */ 1: {
250
+ ResourceID: 1,
251
+ Name: "Band",
252
+ Mandatory: false,
253
+ Type: ResourceType.Integer,
254
+ Description: "E-UTRA Absolute Radio Frequency Channel Number (EARFCN) of the current cell where the EARFCN is as defined in 3GPP TS 36.101. LTE carrier channel number for unique identification of LTE band and carrier frequency. Examples: 262143"
255
+ },
256
+ /**
257
+ * RSRP (Integer)
258
+ *
259
+ * Reference Signal Received Power (RSRP). The average power level in dBm received from a single reference signal in an LTE (Long-term Evolution) network. Typically this value ranges from -140 to -40 dBm. Examples: -97, -104.
260
+ */ 2: {
261
+ ResourceID: 2,
262
+ Name: "RSRP",
263
+ Mandatory: false,
264
+ Type: ResourceType.Integer,
265
+ Description: "Reference Signal Received Power (RSRP). The average power level in dBm received from a single reference signal in an LTE (Long-term Evolution) network. Typically this value ranges from -140 to -40 dBm. Examples: -97, -104.",
266
+ Units: "dBm"
267
+ },
268
+ /**
269
+ * Area (Integer)
270
+ *
271
+ * Area code. Examples: 12
272
+ */ 3: {
273
+ ResourceID: 3,
274
+ Name: "Area",
275
+ Mandatory: false,
276
+ Type: ResourceType.Integer,
277
+ Description: "Area code. Examples: 12"
278
+ },
279
+ /**
280
+ * Cell (Integer)
281
+ *
282
+ * The cell ID the User Equipment (UE) is camped on. 4-byte Evolved Terrestrial Radio Access Network (E-UTRAN) cell ID. Examples: 33703719
283
+ */ 4: {
284
+ ResourceID: 4,
285
+ Name: "Cell",
286
+ Mandatory: false,
287
+ Type: ResourceType.Integer,
288
+ Description: "The cell ID the User Equipment (UE) is camped on. 4-byte Evolved Terrestrial Radio Access Network (E-UTRAN) cell ID. Examples: 33703719"
289
+ },
290
+ /**
291
+ * Mobile country code and mobile network code (Integer)
292
+ *
293
+ * Examples: 24202, 310410
294
+ */ 5: {
295
+ ResourceID: 5,
296
+ Name: "Mobile country code and mobile network code",
297
+ Mandatory: false,
298
+ Type: ResourceType.Integer,
299
+ Description: "Examples: 24202, 310410"
300
+ },
301
+ /**
302
+ * IP address (String)
303
+ *
304
+ * Examples: 10.81.183.99, 2001:0db8:85a3:0000:0000:8a2e:0370:7334, 2001:db8:85a3::8a2e:370:7334
305
+ */ 6: {
306
+ ResourceID: 6,
307
+ Name: "IP address",
308
+ Mandatory: false,
309
+ Type: ResourceType.String,
310
+ Description: "Examples: 10.81.183.99, 2001:0db8:85a3:0000:0000:8a2e:0370:7334, 2001:db8:85a3::8a2e:370:7334"
311
+ },
312
+ /**
313
+ * Energy Estimate (Integer)
314
+ *
315
+ * The %CONEVAL AT command returns amongst other data the energy estimate: Relative estimated energy consumption of data transmission compared to nominal consumption. A higher value means smaller energy consumption. 5: Difficulties in setting up connections. Maximum number of repetitions might be needed for data. 6: Poor conditions. Setting up a connection might require retries and a higher number of repetitions for data. 7: Normal conditions for cIoT device. No repetitions for data or only a few repetitions in the worst case. 8: Good conditions. Possibly very good conditions for small amounts of data. 9: Very good conditions. Efficient data transfer estimated also for larger amounts of data. Examples: 5, 7
316
+ */ 11: {
317
+ ResourceID: 11,
318
+ Name: "Energy Estimate",
319
+ Mandatory: false,
320
+ Type: ResourceType.Integer,
321
+ Description: "The %CONEVAL AT command returns amongst other data the energy estimate: Relative estimated energy consumption of data transmission compared to nominal consumption. A higher value means smaller energy consumption. 5: Difficulties in setting up connections. Maximum number of repetitions might be needed for data. 6: Poor conditions. Setting up a connection might require retries and a higher number of repetitions for data. 7: Normal conditions for cIoT device. No repetitions for data or only a few repetitions in the worst case. 8: Good conditions. Possibly very good conditions for small amounts of data. 9: Very good conditions. Efficient data transfer estimated also for larger amounts of data. Examples: 5, 7"
322
+ },
323
+ /**
324
+ * Timestamp (Time)
325
+ *
326
+ * The timestamp of when the measurement was performed.
327
+ */ 99: {
328
+ ResourceID: 99,
329
+ Name: "Timestamp",
330
+ Mandatory: true,
331
+ Type: ResourceType.Time,
332
+ Description: "The timestamp of when the measurement was performed."
333
+ }
334
+ }
335
+ }), /**
336
+ * Device information (14204)
337
+ *
338
+ * Details about the device's connection.
339
+ */ _define_property(_obj, LwM2MObjectID.DeviceInformation_14204, {
340
+ ObjectID: LwM2MObjectID.DeviceInformation_14204,
341
+ ObjectVersion: "1.0",
342
+ Name: "Device information",
343
+ Description: "Details about the device's connection.",
344
+ Resources: {
345
+ 0: {
346
+ ResourceID: 0,
347
+ Name: "IMEI",
348
+ Mandatory: true,
349
+ Type: ResourceType.String,
350
+ Description: "Board IMEI. Examples: 352656106111232."
351
+ },
352
+ /**
353
+ * SIM ICCID (String)
354
+ *
355
+ * Examples: 89450421180216216095.
356
+ */ 1: {
357
+ ResourceID: 1,
358
+ Name: "SIM ICCID",
359
+ Mandatory: false,
360
+ Type: ResourceType.String,
361
+ Description: "Examples: 89450421180216216095."
362
+ },
363
+ /**
364
+ * Modem firmware version (String)
365
+ *
366
+ * Examples: mfw_nrf9160_1.0.0.
367
+ */ 2: {
368
+ ResourceID: 2,
369
+ Name: "Modem firmware version",
370
+ Mandatory: true,
371
+ Type: ResourceType.String,
372
+ Description: "Examples: mfw_nrf9160_1.0.0."
373
+ },
374
+ /**
375
+ * Application firmware version (String)
376
+ *
377
+ * Examples: v1.0.0-rc1-327-g6fc8c16b239f.
378
+ */ 3: {
379
+ ResourceID: 3,
380
+ Name: "Application firmware version",
381
+ Mandatory: true,
382
+ Type: ResourceType.String,
383
+ Description: "Examples: v1.0.0-rc1-327-g6fc8c16b239f."
384
+ },
385
+ /**
386
+ * Board version (String)
387
+ *
388
+ * Examples: thingy91_nrf9160.
389
+ */ 4: {
390
+ ResourceID: 4,
391
+ Name: "Board version",
392
+ Mandatory: true,
393
+ Type: ResourceType.String,
394
+ Description: "Examples: thingy91_nrf9160."
395
+ },
396
+ /**
397
+ * Battery model (String)
398
+ *
399
+ * Examples: LP302535, LP502540, LP803035.
400
+ */ 5: {
401
+ ResourceID: 5,
402
+ Name: "Battery model",
403
+ Mandatory: false,
404
+ Type: ResourceType.String,
405
+ Description: "Examples: LP302535, LP502540, LP803035."
406
+ },
407
+ /**
408
+ * Timestamp (Time)
409
+ *
410
+ * The timestamp of when the measurement was performed.
411
+ */ 99: {
412
+ ResourceID: 99,
413
+ Name: "Timestamp",
414
+ Mandatory: true,
415
+ Type: ResourceType.Time,
416
+ Description: "The timestamp of when the measurement was performed."
417
+ }
418
+ }
419
+ }), /**
420
+ * Environment (14205)
421
+ *
422
+ * Environment information.
423
+ */ _define_property(_obj, LwM2MObjectID.Environment_14205, {
424
+ ObjectID: LwM2MObjectID.Environment_14205,
425
+ ObjectVersion: "1.0",
426
+ Name: "Environment",
427
+ Description: "Environment information.",
428
+ Resources: {
429
+ 0: {
430
+ ResourceID: 0,
431
+ Name: "Temperature",
432
+ Mandatory: false,
433
+ Type: ResourceType.Float,
434
+ Description: "Environmental temperature in Celsius. Examples: 23.5, -10.2.",
435
+ Units: "\xb0C"
436
+ },
437
+ /**
438
+ * Humidity (Float)
439
+ *
440
+ * Environmental humidity in percent. Examples: 44.2, 72.
441
+ */ 1: {
442
+ ResourceID: 1,
443
+ Name: "Humidity",
444
+ Mandatory: false,
445
+ Type: ResourceType.Float,
446
+ Description: "Environmental humidity in percent. Examples: 44.2, 72.",
447
+ Units: "%"
448
+ },
449
+ /**
450
+ * Atmospheric pressure (Float)
451
+ *
452
+ * Atmospheric pressure in pascal. Examples: 1003.6, 977.
453
+ */ 2: {
454
+ ResourceID: 2,
455
+ Name: "Atmospheric pressure",
456
+ Mandatory: false,
457
+ Type: ResourceType.Float,
458
+ Description: "Atmospheric pressure in pascal. Examples: 1003.6, 977.",
459
+ Units: "Pa"
460
+ },
461
+ /**
462
+ * Air Quality Index (Integer)
463
+ *
464
+ * The Bosch BME680 sensor calculates an Air Quality Index. See https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf
465
+ */ 10: {
466
+ ResourceID: 10,
467
+ Name: "Air Quality Index",
468
+ Mandatory: false,
469
+ Type: ResourceType.Integer,
470
+ Description: "The Bosch BME680 sensor calculates an Air Quality Index. See https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf"
471
+ },
472
+ /**
473
+ * Timestamp (Time)
474
+ *
475
+ * The timestamp of when the measurement was performed.
476
+ */ 99: {
477
+ ResourceID: 99,
478
+ Name: "Timestamp",
479
+ Mandatory: true,
480
+ Type: ResourceType.Time,
481
+ Description: "The timestamp of when the measurement was performed."
482
+ }
483
+ }
484
+ }), /**
485
+ * Solar charge (14210)
486
+ *
487
+ * Measurements from the solar shield.
488
+ */ _define_property(_obj, LwM2MObjectID.SolarCharge_14210, {
489
+ ObjectID: LwM2MObjectID.SolarCharge_14210,
490
+ ObjectVersion: "1.0",
491
+ Name: "Solar charge",
492
+ Description: "Measurements from the solar shield.",
493
+ Resources: {
494
+ 0: {
495
+ ResourceID: 0,
496
+ Name: "Gain",
497
+ Mandatory: true,
498
+ Type: ResourceType.Float,
499
+ Description: "The current gain from the solar shield, measured in mA. Example: 3.123, -0.0032.",
500
+ Units: "mA"
501
+ },
502
+ /**
503
+ * Voltage (Float)
504
+ *
505
+ * Battery voltage in Volt. Examples: 2.754, 3.3.
506
+ */ 1: {
507
+ ResourceID: 1,
508
+ Name: "Voltage",
509
+ Mandatory: false,
510
+ Type: ResourceType.Float,
511
+ Description: "Battery voltage in Volt. Examples: 2.754, 3.3.",
512
+ Units: "V"
513
+ },
514
+ /**
515
+ * Timestamp (Time)
516
+ *
517
+ * The timestamp of when the measurement was performed.
518
+ */ 99: {
519
+ ResourceID: 99,
520
+ Name: "Timestamp",
521
+ Mandatory: true,
522
+ Type: ResourceType.Time,
523
+ Description: "The timestamp of when the measurement was performed."
524
+ }
525
+ }
526
+ }), /**
527
+ * Button press (14220)
528
+ *
529
+ * Describes a button press event.
530
+ */ _define_property(_obj, LwM2MObjectID.ButtonPress_14220, {
531
+ ObjectID: LwM2MObjectID.ButtonPress_14220,
532
+ ObjectVersion: "1.0",
533
+ Name: "Button press",
534
+ Description: "Describes a button press event.",
535
+ Resources: {
536
+ 0: {
537
+ ResourceID: 0,
538
+ Name: "Button ID",
539
+ Mandatory: true,
540
+ Type: ResourceType.Integer,
541
+ Description: "The ID of the button that was pressed. Examples: 1, 2."
542
+ },
543
+ /**
544
+ * Timestamp (Time)
545
+ *
546
+ * The timestamp of when the button was pressed.
547
+ */ 99: {
548
+ ResourceID: 99,
549
+ Name: "Timestamp",
550
+ Mandatory: true,
551
+ Type: ResourceType.Time,
552
+ Description: "The timestamp of when the button was pressed."
553
+ }
554
+ }
555
+ }), /**
556
+ * Sea Water Level (14230)
557
+ *
558
+ * Describes observed sea water level.
559
+ */ _define_property(_obj, LwM2MObjectID.SeaWaterLevel_14230, {
560
+ ObjectID: LwM2MObjectID.SeaWaterLevel_14230,
561
+ ObjectVersion: "1.0",
562
+ Name: "Sea Water Level",
563
+ Description: "Describes observed sea water level.",
564
+ Resources: {
565
+ 0: {
566
+ ResourceID: 0,
567
+ Name: "Sea Water Level",
568
+ Mandatory: true,
569
+ Type: ResourceType.Float,
570
+ Description: "The observed sea water level relative the the sea level elevation of the sea map. Examples: 134.2, 104.5.",
571
+ Units: "cm"
572
+ },
573
+ /**
574
+ * Station code (String)
575
+ *
576
+ * The code of the observation station. Examples: TRD, SVG.
577
+ */ 1: {
578
+ ResourceID: 1,
579
+ Name: "Station code",
580
+ Mandatory: true,
581
+ Type: ResourceType.String,
582
+ Description: "The code of the observation station. Examples: TRD, SVG."
583
+ },
584
+ /**
585
+ * Timestamp (Time)
586
+ *
587
+ * The timestamp of when the observation was made.
588
+ */ 99: {
589
+ ResourceID: 99,
590
+ Name: "Timestamp",
591
+ Mandatory: true,
592
+ Type: ResourceType.Time,
593
+ Description: "The timestamp of when the observation was made."
594
+ }
595
+ }
596
+ }), _obj);