@ricado/api-client 1.4.1 → 2.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.
- package/dist/ricado.api.client.js +1 -1
- package/lib/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
- package/lib/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
- package/lib/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
- package/lib/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackingLineController.js +4 -4
- package/lib/Controllers/Packhouse/Site/PackrunController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
- package/lib/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
- package/lib/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
- package/lib/Controllers/Packhouse/Site/VarietyController.js +4 -4
- package/lib/Controllers/Site/AlarmController.js +4 -4
- package/lib/Controllers/Site/AlarmGroupController.js +4 -4
- package/lib/Controllers/Site/DefinitionController.js +4 -4
- package/lib/Controllers/Site/PermanentObjectController.js +4 -4
- package/lib/Controllers/Site/PermanentObjectDataController.js +4 -4
- package/lib/Controllers/Site/PointController.js +4 -4
- package/lib/Controllers/Site/TemporaryObjectController.js +4 -4
- package/lib/Models/AccountPolicyModel.js +26 -130
- package/lib/Models/ApiAccountModel.js +26 -130
- package/lib/Models/CompanyModel.js +20 -98
- package/lib/Models/FirebaseTokenModel.js +29 -146
- package/lib/Models/Packhouse/Site/BinTipWeightModel.js +40 -192
- package/lib/Models/Packhouse/Site/CompacSizerBatchModel.js +37 -176
- package/lib/Models/Packhouse/Site/CompacSizerModel.js +55 -272
- package/lib/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +43 -208
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +37 -176
- package/lib/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +31 -144
- package/lib/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +49 -240
- package/lib/Models/Packhouse/Site/DowntimeEventModel.js +55 -272
- package/lib/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +37 -176
- package/lib/Models/Packhouse/Site/GrowingMethodModel.js +31 -144
- package/lib/Models/Packhouse/Site/PackTypeModel.js +37 -176
- package/lib/Models/Packhouse/Site/PackingLineModel.js +58 -288
- package/lib/Models/Packhouse/Site/PackrunModel.js +58 -288
- package/lib/Models/Packhouse/Site/RejectBinModel.js +40 -192
- package/lib/Models/Packhouse/Site/RejectBinScaleModel.js +49 -240
- package/lib/Models/Packhouse/Site/RejectBinWeightModel.js +43 -208
- package/lib/Models/Packhouse/Site/ShiftFocusMeetingModel.js +49 -240
- package/lib/Models/Packhouse/Site/ShiftHourlyEntryModel.js +124 -640
- package/lib/Models/Packhouse/Site/ShiftModel.js +70 -352
- package/lib/Models/Packhouse/Site/VarietyModel.js +37 -176
- package/lib/Models/RTUModel.js +23 -114
- package/lib/Models/RTUPluginModel.js +20 -98
- package/lib/Models/Site/AlarmGroupModel.js +34 -160
- package/lib/Models/Site/AlarmModel.js +64 -320
- package/lib/Models/Site/DefinitionModel.js +31 -144
- package/lib/Models/Site/PermanentObjectDataModel.js +37 -176
- package/lib/Models/Site/PermanentObjectModel.js +34 -160
- package/lib/Models/Site/PointModel.js +46 -224
- package/lib/Models/Site/TemporaryObjectModel.js +31 -144
- package/lib/Models/Site/index.js +0 -3
- package/lib/Models/SiteModel.js +23 -114
- package/lib/Models/TokenModel.js +35 -178
- package/lib/Models/UserAccountActionTokenModel.js +38 -194
- package/lib/Models/UserAccountModel.js +35 -178
- package/lib/PackageVersion.js +1 -1
- package/lib/index.d.ts +834 -1589
- package/package.json +1 -1
- package/src/Controllers/Packhouse/Site/BinTipWeightController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerBatchController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletProductChangeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeChangeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerOutletTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/CompacSizerPackrunSummaryController.js +4 -4
- package/src/Controllers/Packhouse/Site/DowntimeEventController.js +4 -4
- package/src/Controllers/Packhouse/Site/FreshPackPackrunSummaryController.js +4 -4
- package/src/Controllers/Packhouse/Site/GrowingMethodController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackTypeController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackingLineController.js +4 -4
- package/src/Controllers/Packhouse/Site/PackrunController.js +4 -4
- package/src/Controllers/Packhouse/Site/RejectBinController.js +4 -4
- package/src/Controllers/Packhouse/Site/RejectBinScaleController.js +4 -4
- package/src/Controllers/Packhouse/Site/RejectBinWeightController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftFocusMeetingController.js +4 -4
- package/src/Controllers/Packhouse/Site/ShiftHourlyEntryController.js +4 -4
- package/src/Controllers/Packhouse/Site/VarietyController.js +4 -4
- package/src/Controllers/Site/AlarmController.js +4 -4
- package/src/Controllers/Site/AlarmGroupController.js +4 -4
- package/src/Controllers/Site/DefinitionController.js +4 -4
- package/src/Controllers/Site/PermanentObjectController.js +4 -4
- package/src/Controllers/Site/PermanentObjectDataController.js +4 -4
- package/src/Controllers/Site/PointController.js +4 -4
- package/src/Controllers/Site/TemporaryObjectController.js +4 -4
- package/src/Models/AccountPolicyModel.js +21 -117
- package/src/Models/ApiAccountModel.js +21 -117
- package/src/Models/CompanyModel.js +15 -87
- package/src/Models/FirebaseTokenModel.js +24 -132
- package/src/Models/Packhouse/Site/BinTipWeightModel.js +33 -174
- package/src/Models/Packhouse/Site/CompacSizerBatchModel.js +30 -159
- package/src/Models/Packhouse/Site/CompacSizerModel.js +48 -249
- package/src/Models/Packhouse/Site/CompacSizerOutletProductChangeModel.js +36 -189
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeChangeModel.js +30 -159
- package/src/Models/Packhouse/Site/CompacSizerOutletTypeModel.js +24 -129
- package/src/Models/Packhouse/Site/CompacSizerPackrunSummaryModel.js +42 -219
- package/src/Models/Packhouse/Site/DowntimeEventModel.js +48 -249
- package/src/Models/Packhouse/Site/FreshPackPackrunSummaryModel.js +30 -159
- package/src/Models/Packhouse/Site/GrowingMethodModel.js +24 -129
- package/src/Models/Packhouse/Site/PackTypeModel.js +30 -159
- package/src/Models/Packhouse/Site/PackingLineModel.js +51 -264
- package/src/Models/Packhouse/Site/PackrunModel.js +51 -264
- package/src/Models/Packhouse/Site/RejectBinModel.js +33 -174
- package/src/Models/Packhouse/Site/RejectBinScaleModel.js +42 -219
- package/src/Models/Packhouse/Site/RejectBinWeightModel.js +36 -189
- package/src/Models/Packhouse/Site/ShiftFocusMeetingModel.js +42 -219
- package/src/Models/Packhouse/Site/ShiftHourlyEntryModel.js +117 -594
- package/src/Models/Packhouse/Site/ShiftModel.js +63 -324
- package/src/Models/Packhouse/Site/VarietyModel.js +30 -159
- package/src/Models/RTUModel.js +18 -102
- package/src/Models/RTUPluginModel.js +15 -87
- package/src/Models/Site/AlarmGroupModel.js +27 -144
- package/src/Models/Site/AlarmModel.js +57 -294
- package/src/Models/Site/DefinitionModel.js +24 -129
- package/src/Models/Site/PermanentObjectDataModel.js +30 -159
- package/src/Models/Site/PermanentObjectModel.js +27 -144
- package/src/Models/Site/PointModel.js +39 -204
- package/src/Models/Site/TemporaryObjectModel.js +24 -129
- package/src/Models/Site/index.js +0 -2
- package/src/Models/SiteModel.js +18 -102
- package/src/Models/TokenModel.js +30 -162
- package/src/Models/UserAccountActionTokenModel.js +33 -177
- package/src/Models/UserAccountModel.js +30 -162
- package/src/PackageVersion.js +1 -1
- package/lib/Models/Site/BaseSiteModel.js +0 -58
- package/src/Models/Site/BaseSiteModel.js +0 -30
|
@@ -4,24 +4,23 @@
|
|
|
4
4
|
* Do Not Edit this File Manually!
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import
|
|
7
|
+
import BaseModel from '../../Models/BaseModel';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Model Class for a Alarm
|
|
11
11
|
*
|
|
12
12
|
* @class
|
|
13
13
|
* @hideconstructor
|
|
14
|
-
* @extends
|
|
14
|
+
* @extends BaseModel
|
|
15
15
|
*/
|
|
16
|
-
class AlarmModel extends
|
|
16
|
+
class AlarmModel extends BaseModel
|
|
17
17
|
{
|
|
18
18
|
/**
|
|
19
19
|
* AlarmModel Constructor
|
|
20
20
|
*
|
|
21
21
|
* @protected
|
|
22
|
-
* @param {number} siteId The Site ID associated with this Alarm
|
|
23
22
|
*/
|
|
24
|
-
constructor(
|
|
23
|
+
constructor()
|
|
25
24
|
{
|
|
26
25
|
super();
|
|
27
26
|
|
|
@@ -29,372 +28,137 @@ class AlarmModel extends BaseSiteModel
|
|
|
29
28
|
* The Alarm ID
|
|
30
29
|
*
|
|
31
30
|
* @type {string}
|
|
32
|
-
* @
|
|
31
|
+
* @public
|
|
33
32
|
*/
|
|
34
|
-
this.
|
|
33
|
+
this.id = undefined;
|
|
35
34
|
|
|
36
35
|
/**
|
|
37
36
|
* The RTU this Alarm belongs to
|
|
38
37
|
*
|
|
39
38
|
* @type {?number}
|
|
40
|
-
* @
|
|
39
|
+
* @public
|
|
41
40
|
*/
|
|
42
|
-
this.
|
|
41
|
+
this.rtuId = undefined;
|
|
43
42
|
|
|
44
43
|
/**
|
|
45
44
|
* The Alarm Group this Alarm is a part of
|
|
46
45
|
*
|
|
47
46
|
* @type {string}
|
|
48
|
-
* @
|
|
47
|
+
* @public
|
|
49
48
|
*/
|
|
50
|
-
this.
|
|
49
|
+
this.groupId = undefined;
|
|
51
50
|
|
|
52
51
|
/**
|
|
53
52
|
* The Alarm Name
|
|
54
53
|
*
|
|
55
54
|
* @type {string}
|
|
56
|
-
* @
|
|
55
|
+
* @public
|
|
57
56
|
*/
|
|
58
|
-
this.
|
|
57
|
+
this.name = undefined;
|
|
59
58
|
|
|
60
59
|
/**
|
|
61
60
|
* Whether the Alarm is Critical or not
|
|
62
61
|
*
|
|
63
62
|
* @type {boolean}
|
|
64
|
-
* @
|
|
63
|
+
* @public
|
|
65
64
|
*/
|
|
66
|
-
this.
|
|
65
|
+
this.critical = undefined;
|
|
67
66
|
|
|
68
67
|
/**
|
|
69
68
|
* The Python Script with the Conditions to Trip this Alarm
|
|
70
69
|
*
|
|
71
70
|
* @type {string}
|
|
72
|
-
* @
|
|
71
|
+
* @public
|
|
73
72
|
*/
|
|
74
|
-
this.
|
|
73
|
+
this.tripScript = undefined;
|
|
75
74
|
|
|
76
75
|
/**
|
|
77
76
|
* The Python Script with the Conditions to Reset this Alarm
|
|
78
77
|
*
|
|
79
78
|
* @type {?string}
|
|
80
|
-
* @
|
|
79
|
+
* @public
|
|
81
80
|
*/
|
|
82
|
-
this.
|
|
81
|
+
this.resetScript = undefined;
|
|
83
82
|
|
|
84
83
|
/**
|
|
85
84
|
* The Delay before this Alarm will Trip in Milliseconds
|
|
86
85
|
*
|
|
87
86
|
* @type {number}
|
|
88
|
-
* @
|
|
87
|
+
* @public
|
|
89
88
|
*/
|
|
90
|
-
this.
|
|
89
|
+
this.tripDelay = undefined;
|
|
91
90
|
|
|
92
91
|
/**
|
|
93
92
|
* The Delay before this Alarm will Reset in Milliseconds
|
|
94
93
|
*
|
|
95
94
|
* @type {number}
|
|
96
|
-
* @
|
|
95
|
+
* @public
|
|
97
96
|
*/
|
|
98
|
-
this.
|
|
97
|
+
this.resetDelay = undefined;
|
|
99
98
|
|
|
100
99
|
/**
|
|
101
100
|
* Whether the Alarm should Automatically Reset
|
|
102
101
|
*
|
|
103
102
|
* @type {boolean}
|
|
104
|
-
* @
|
|
103
|
+
* @public
|
|
105
104
|
*/
|
|
106
|
-
this.
|
|
105
|
+
this.autoReset = undefined;
|
|
107
106
|
|
|
108
107
|
/**
|
|
109
108
|
* The Delay before this Alarm should Auto Reset in Milliseconds
|
|
110
109
|
*
|
|
111
110
|
* @type {number}
|
|
112
|
-
* @
|
|
111
|
+
* @public
|
|
113
112
|
*/
|
|
114
|
-
this.
|
|
113
|
+
this.autoResetDelay = undefined;
|
|
115
114
|
|
|
116
115
|
/**
|
|
117
116
|
* The Point used to store the Alarm Tripped State
|
|
118
117
|
*
|
|
119
118
|
* @type {number}
|
|
120
|
-
* @
|
|
119
|
+
* @public
|
|
121
120
|
*/
|
|
122
|
-
this.
|
|
121
|
+
this.trippedStatePoint = undefined;
|
|
123
122
|
|
|
124
123
|
/**
|
|
125
124
|
* The Point used to store the Alarm Tripped Timestamp
|
|
126
125
|
*
|
|
127
126
|
* @type {number}
|
|
128
|
-
* @
|
|
127
|
+
* @public
|
|
129
128
|
*/
|
|
130
|
-
this.
|
|
129
|
+
this.trippedTimestampPoint = undefined;
|
|
131
130
|
|
|
132
131
|
/**
|
|
133
132
|
* The Point used to store the Alarm's Internal Trip Start
|
|
134
133
|
*
|
|
135
134
|
* @type {number}
|
|
136
|
-
* @
|
|
135
|
+
* @public
|
|
137
136
|
*/
|
|
138
|
-
this.
|
|
137
|
+
this.internalTripStartPoint = undefined;
|
|
139
138
|
|
|
140
139
|
/**
|
|
141
140
|
* The Point used to store the Alarm's Internal Reset Start
|
|
142
141
|
*
|
|
143
142
|
* @type {number}
|
|
144
|
-
* @
|
|
143
|
+
* @public
|
|
145
144
|
*/
|
|
146
|
-
this.
|
|
145
|
+
this.internalResetStartPoint = undefined;
|
|
147
146
|
|
|
148
147
|
/**
|
|
149
148
|
* Whether the Alarm has been deleted
|
|
150
149
|
*
|
|
151
150
|
* @type {boolean}
|
|
152
|
-
* @
|
|
151
|
+
* @public
|
|
153
152
|
*/
|
|
154
|
-
this.
|
|
153
|
+
this.deleted = undefined;
|
|
155
154
|
|
|
156
155
|
/**
|
|
157
156
|
* When the Alarm was last updated
|
|
158
157
|
*
|
|
159
158
|
* @type {Date}
|
|
160
|
-
* @
|
|
159
|
+
* @public
|
|
161
160
|
*/
|
|
162
|
-
this.
|
|
163
|
-
|
|
164
|
-
/**
|
|
165
|
-
* The Site ID associated with this Alarm
|
|
166
|
-
*
|
|
167
|
-
* @type {number}
|
|
168
|
-
* @private
|
|
169
|
-
*/
|
|
170
|
-
this._siteId = siteId;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* The Alarm ID
|
|
175
|
-
*
|
|
176
|
-
* @public
|
|
177
|
-
* @type {string}
|
|
178
|
-
*/
|
|
179
|
-
get id()
|
|
180
|
-
{
|
|
181
|
-
return this._id;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* The RTU this Alarm belongs to
|
|
186
|
-
*
|
|
187
|
-
* @public
|
|
188
|
-
* @type {?number}
|
|
189
|
-
*/
|
|
190
|
-
get rtuId()
|
|
191
|
-
{
|
|
192
|
-
return this._rtuId;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* The Alarm Group this Alarm is a part of
|
|
197
|
-
*
|
|
198
|
-
* @public
|
|
199
|
-
* @type {string}
|
|
200
|
-
*/
|
|
201
|
-
get groupId()
|
|
202
|
-
{
|
|
203
|
-
return this._groupId;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* The Alarm Name
|
|
208
|
-
*
|
|
209
|
-
* @public
|
|
210
|
-
* @type {string}
|
|
211
|
-
*/
|
|
212
|
-
get name()
|
|
213
|
-
{
|
|
214
|
-
return this._name;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Whether the Alarm is Critical or not
|
|
219
|
-
*
|
|
220
|
-
* @public
|
|
221
|
-
* @type {boolean}
|
|
222
|
-
*/
|
|
223
|
-
get critical()
|
|
224
|
-
{
|
|
225
|
-
return this._critical;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* The Python Script with the Conditions to Trip this Alarm
|
|
230
|
-
*
|
|
231
|
-
* @public
|
|
232
|
-
* @type {string}
|
|
233
|
-
*/
|
|
234
|
-
get tripScript()
|
|
235
|
-
{
|
|
236
|
-
return this._tripScript;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* The Python Script with the Conditions to Reset this Alarm
|
|
241
|
-
*
|
|
242
|
-
* @public
|
|
243
|
-
* @type {?string}
|
|
244
|
-
*/
|
|
245
|
-
get resetScript()
|
|
246
|
-
{
|
|
247
|
-
return this._resetScript;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/**
|
|
251
|
-
* The Delay before this Alarm will Trip in Milliseconds
|
|
252
|
-
*
|
|
253
|
-
* @public
|
|
254
|
-
* @type {number}
|
|
255
|
-
*/
|
|
256
|
-
get tripDelay()
|
|
257
|
-
{
|
|
258
|
-
return this._tripDelay;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* The Delay before this Alarm will Reset in Milliseconds
|
|
263
|
-
*
|
|
264
|
-
* @public
|
|
265
|
-
* @type {number}
|
|
266
|
-
*/
|
|
267
|
-
get resetDelay()
|
|
268
|
-
{
|
|
269
|
-
return this._resetDelay;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* Whether the Alarm should Automatically Reset
|
|
274
|
-
*
|
|
275
|
-
* @public
|
|
276
|
-
* @type {boolean}
|
|
277
|
-
*/
|
|
278
|
-
get autoReset()
|
|
279
|
-
{
|
|
280
|
-
return this._autoReset;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* The Delay before this Alarm should Auto Reset in Milliseconds
|
|
285
|
-
*
|
|
286
|
-
* @public
|
|
287
|
-
* @type {number}
|
|
288
|
-
*/
|
|
289
|
-
get autoResetDelay()
|
|
290
|
-
{
|
|
291
|
-
return this._autoResetDelay;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* The Point used to store the Alarm Tripped State
|
|
296
|
-
*
|
|
297
|
-
* @public
|
|
298
|
-
* @type {number}
|
|
299
|
-
*/
|
|
300
|
-
get trippedStatePoint()
|
|
301
|
-
{
|
|
302
|
-
return this._trippedStatePoint;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
/**
|
|
306
|
-
* The Point used to store the Alarm Tripped Timestamp
|
|
307
|
-
*
|
|
308
|
-
* @public
|
|
309
|
-
* @type {number}
|
|
310
|
-
*/
|
|
311
|
-
get trippedTimestampPoint()
|
|
312
|
-
{
|
|
313
|
-
return this._trippedTimestampPoint;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* The Point used to store the Alarm's Internal Trip Start
|
|
318
|
-
*
|
|
319
|
-
* @public
|
|
320
|
-
* @type {number}
|
|
321
|
-
*/
|
|
322
|
-
get internalTripStartPoint()
|
|
323
|
-
{
|
|
324
|
-
return this._internalTripStartPoint;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/**
|
|
328
|
-
* The Point used to store the Alarm's Internal Reset Start
|
|
329
|
-
*
|
|
330
|
-
* @public
|
|
331
|
-
* @type {number}
|
|
332
|
-
*/
|
|
333
|
-
get internalResetStartPoint()
|
|
334
|
-
{
|
|
335
|
-
return this._internalResetStartPoint;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* Whether the Alarm has been deleted
|
|
340
|
-
*
|
|
341
|
-
* @public
|
|
342
|
-
* @type {boolean}
|
|
343
|
-
*/
|
|
344
|
-
get deleted()
|
|
345
|
-
{
|
|
346
|
-
return this._deleted;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
* When the Alarm was last updated
|
|
351
|
-
*
|
|
352
|
-
* @public
|
|
353
|
-
* @type {Date}
|
|
354
|
-
*/
|
|
355
|
-
get updateTimestamp()
|
|
356
|
-
{
|
|
357
|
-
return this._updateTimestamp;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* The Site ID associated with this Alarm
|
|
362
|
-
*
|
|
363
|
-
* @public
|
|
364
|
-
* @type {number}
|
|
365
|
-
*/
|
|
366
|
-
get siteId()
|
|
367
|
-
{
|
|
368
|
-
return this._siteId;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Convert this **AlarmModel** to a JSON Object
|
|
373
|
-
*
|
|
374
|
-
* @public
|
|
375
|
-
* @return {Object<string, any>}
|
|
376
|
-
*/
|
|
377
|
-
toJSON()
|
|
378
|
-
{
|
|
379
|
-
return {
|
|
380
|
-
id: this._id,
|
|
381
|
-
rtuId: this._rtuId,
|
|
382
|
-
groupId: this._groupId,
|
|
383
|
-
name: this._name,
|
|
384
|
-
critical: this._critical,
|
|
385
|
-
tripScript: this._tripScript,
|
|
386
|
-
resetScript: this._resetScript,
|
|
387
|
-
tripDelay: this._tripDelay,
|
|
388
|
-
resetDelay: this._resetDelay,
|
|
389
|
-
autoReset: this._autoReset,
|
|
390
|
-
autoResetDelay: this._autoResetDelay,
|
|
391
|
-
trippedStatePoint: this._trippedStatePoint,
|
|
392
|
-
trippedTimestampPoint: this._trippedTimestampPoint,
|
|
393
|
-
internalTripStartPoint: this._internalTripStartPoint,
|
|
394
|
-
internalResetStartPoint: this._internalResetStartPoint,
|
|
395
|
-
deleted: this._deleted,
|
|
396
|
-
updateTimestamp: this._updateTimestamp
|
|
397
|
-
};
|
|
161
|
+
this.updateTimestamp = undefined;
|
|
398
162
|
}
|
|
399
163
|
|
|
400
164
|
/**
|
|
@@ -403,12 +167,11 @@ class AlarmModel extends BaseSiteModel
|
|
|
403
167
|
* @static
|
|
404
168
|
* @public
|
|
405
169
|
* @param {Object<string, any>|string} json A JSON Object or JSON String
|
|
406
|
-
* @param {number} siteId The Site ID associated with this Alarm
|
|
407
170
|
* @return {AlarmModel}
|
|
408
171
|
*/
|
|
409
|
-
static fromJSON(json
|
|
172
|
+
static fromJSON(json)
|
|
410
173
|
{
|
|
411
|
-
let model = new AlarmModel(
|
|
174
|
+
let model = new AlarmModel();
|
|
412
175
|
|
|
413
176
|
/**
|
|
414
177
|
* The JSON Object
|
|
@@ -428,7 +191,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
428
191
|
|
|
429
192
|
if('id' in jsonObject)
|
|
430
193
|
{
|
|
431
|
-
model.
|
|
194
|
+
model.id = (function(){
|
|
432
195
|
if(typeof jsonObject['id'] !== 'string')
|
|
433
196
|
{
|
|
434
197
|
return String(jsonObject['id']);
|
|
@@ -440,7 +203,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
440
203
|
|
|
441
204
|
if('rtuId' in jsonObject)
|
|
442
205
|
{
|
|
443
|
-
model.
|
|
206
|
+
model.rtuId = (function(){
|
|
444
207
|
if(jsonObject['rtuId'] === null)
|
|
445
208
|
{
|
|
446
209
|
return null;
|
|
@@ -457,7 +220,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
457
220
|
|
|
458
221
|
if('groupId' in jsonObject)
|
|
459
222
|
{
|
|
460
|
-
model.
|
|
223
|
+
model.groupId = (function(){
|
|
461
224
|
if(typeof jsonObject['groupId'] !== 'string')
|
|
462
225
|
{
|
|
463
226
|
return String(jsonObject['groupId']);
|
|
@@ -469,7 +232,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
469
232
|
|
|
470
233
|
if('name' in jsonObject)
|
|
471
234
|
{
|
|
472
|
-
model.
|
|
235
|
+
model.name = (function(){
|
|
473
236
|
if(typeof jsonObject['name'] !== 'string')
|
|
474
237
|
{
|
|
475
238
|
return String(jsonObject['name']);
|
|
@@ -481,7 +244,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
481
244
|
|
|
482
245
|
if('critical' in jsonObject)
|
|
483
246
|
{
|
|
484
|
-
model.
|
|
247
|
+
model.critical = (function(){
|
|
485
248
|
if(typeof jsonObject['critical'] !== 'boolean')
|
|
486
249
|
{
|
|
487
250
|
return Boolean(jsonObject['critical']);
|
|
@@ -493,7 +256,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
493
256
|
|
|
494
257
|
if('tripScript' in jsonObject)
|
|
495
258
|
{
|
|
496
|
-
model.
|
|
259
|
+
model.tripScript = (function(){
|
|
497
260
|
if(typeof jsonObject['tripScript'] !== 'string')
|
|
498
261
|
{
|
|
499
262
|
return String(jsonObject['tripScript']);
|
|
@@ -505,7 +268,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
505
268
|
|
|
506
269
|
if('resetScript' in jsonObject)
|
|
507
270
|
{
|
|
508
|
-
model.
|
|
271
|
+
model.resetScript = (function(){
|
|
509
272
|
if(jsonObject['resetScript'] === null)
|
|
510
273
|
{
|
|
511
274
|
return null;
|
|
@@ -522,7 +285,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
522
285
|
|
|
523
286
|
if('tripDelay' in jsonObject)
|
|
524
287
|
{
|
|
525
|
-
model.
|
|
288
|
+
model.tripDelay = (function(){
|
|
526
289
|
if(typeof jsonObject['tripDelay'] !== 'number')
|
|
527
290
|
{
|
|
528
291
|
return Number.isInteger(Number(jsonObject['tripDelay'])) ? Number(jsonObject['tripDelay']) : Math.floor(Number(jsonObject['tripDelay']));
|
|
@@ -534,7 +297,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
534
297
|
|
|
535
298
|
if('resetDelay' in jsonObject)
|
|
536
299
|
{
|
|
537
|
-
model.
|
|
300
|
+
model.resetDelay = (function(){
|
|
538
301
|
if(typeof jsonObject['resetDelay'] !== 'number')
|
|
539
302
|
{
|
|
540
303
|
return Number.isInteger(Number(jsonObject['resetDelay'])) ? Number(jsonObject['resetDelay']) : Math.floor(Number(jsonObject['resetDelay']));
|
|
@@ -546,7 +309,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
546
309
|
|
|
547
310
|
if('autoReset' in jsonObject)
|
|
548
311
|
{
|
|
549
|
-
model.
|
|
312
|
+
model.autoReset = (function(){
|
|
550
313
|
if(typeof jsonObject['autoReset'] !== 'boolean')
|
|
551
314
|
{
|
|
552
315
|
return Boolean(jsonObject['autoReset']);
|
|
@@ -558,7 +321,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
558
321
|
|
|
559
322
|
if('autoResetDelay' in jsonObject)
|
|
560
323
|
{
|
|
561
|
-
model.
|
|
324
|
+
model.autoResetDelay = (function(){
|
|
562
325
|
if(typeof jsonObject['autoResetDelay'] !== 'number')
|
|
563
326
|
{
|
|
564
327
|
return Number.isInteger(Number(jsonObject['autoResetDelay'])) ? Number(jsonObject['autoResetDelay']) : Math.floor(Number(jsonObject['autoResetDelay']));
|
|
@@ -570,7 +333,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
570
333
|
|
|
571
334
|
if('trippedStatePoint' in jsonObject)
|
|
572
335
|
{
|
|
573
|
-
model.
|
|
336
|
+
model.trippedStatePoint = (function(){
|
|
574
337
|
if(typeof jsonObject['trippedStatePoint'] !== 'number')
|
|
575
338
|
{
|
|
576
339
|
return Number.isInteger(Number(jsonObject['trippedStatePoint'])) ? Number(jsonObject['trippedStatePoint']) : Math.floor(Number(jsonObject['trippedStatePoint']));
|
|
@@ -582,7 +345,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
582
345
|
|
|
583
346
|
if('trippedTimestampPoint' in jsonObject)
|
|
584
347
|
{
|
|
585
|
-
model.
|
|
348
|
+
model.trippedTimestampPoint = (function(){
|
|
586
349
|
if(typeof jsonObject['trippedTimestampPoint'] !== 'number')
|
|
587
350
|
{
|
|
588
351
|
return Number.isInteger(Number(jsonObject['trippedTimestampPoint'])) ? Number(jsonObject['trippedTimestampPoint']) : Math.floor(Number(jsonObject['trippedTimestampPoint']));
|
|
@@ -594,7 +357,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
594
357
|
|
|
595
358
|
if('internalTripStartPoint' in jsonObject)
|
|
596
359
|
{
|
|
597
|
-
model.
|
|
360
|
+
model.internalTripStartPoint = (function(){
|
|
598
361
|
if(typeof jsonObject['internalTripStartPoint'] !== 'number')
|
|
599
362
|
{
|
|
600
363
|
return Number.isInteger(Number(jsonObject['internalTripStartPoint'])) ? Number(jsonObject['internalTripStartPoint']) : Math.floor(Number(jsonObject['internalTripStartPoint']));
|
|
@@ -606,7 +369,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
606
369
|
|
|
607
370
|
if('internalResetStartPoint' in jsonObject)
|
|
608
371
|
{
|
|
609
|
-
model.
|
|
372
|
+
model.internalResetStartPoint = (function(){
|
|
610
373
|
if(typeof jsonObject['internalResetStartPoint'] !== 'number')
|
|
611
374
|
{
|
|
612
375
|
return Number.isInteger(Number(jsonObject['internalResetStartPoint'])) ? Number(jsonObject['internalResetStartPoint']) : Math.floor(Number(jsonObject['internalResetStartPoint']));
|
|
@@ -618,7 +381,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
618
381
|
|
|
619
382
|
if('deleted' in jsonObject)
|
|
620
383
|
{
|
|
621
|
-
model.
|
|
384
|
+
model.deleted = (function(){
|
|
622
385
|
if(typeof jsonObject['deleted'] !== 'boolean')
|
|
623
386
|
{
|
|
624
387
|
return Boolean(jsonObject['deleted']);
|
|
@@ -630,7 +393,7 @@ class AlarmModel extends BaseSiteModel
|
|
|
630
393
|
|
|
631
394
|
if('updateTimestamp' in jsonObject)
|
|
632
395
|
{
|
|
633
|
-
model.
|
|
396
|
+
model.updateTimestamp = (function(){
|
|
634
397
|
if(typeof jsonObject['updateTimestamp'] !== 'string')
|
|
635
398
|
{
|
|
636
399
|
return new Date(String(jsonObject['updateTimestamp']));
|