@fatehan/tsrp 1.0.41 → 1.0.43
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/fatehan/models/models.d.ts +15 -27
- package/dist/fatehan/models/models.d.ts.map +1 -1
- package/dist/fatehan/models/models.js +173 -359
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.test.js +12 -10
- package/dist/system.io.d.ts +2 -2
- package/dist/system.io.d.ts.map +1 -1
- package/dist/system.io.js +38 -38
- package/package.json +1 -1
|
@@ -2,15 +2,6 @@ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
|
2
2
|
import Long from "long";
|
|
3
3
|
import { Alert, Data, DeviceStatus, FileType } from "../packets/dataModel";
|
|
4
4
|
export declare const protobufPackage = "com.fatehan.models";
|
|
5
|
-
export declare enum SystemIoType {
|
|
6
|
-
STRING = 0,
|
|
7
|
-
BOOLEAN = 1,
|
|
8
|
-
NUMERIC = 2,
|
|
9
|
-
FLOAT = 3,
|
|
10
|
-
UNRECOGNIZED = -1
|
|
11
|
-
}
|
|
12
|
-
export declare function systemIoTypeFromJSON(object: any): SystemIoType;
|
|
13
|
-
export declare function systemIoTypeToJSON(object: SystemIoType): string;
|
|
14
5
|
export interface Gallery {
|
|
15
6
|
id: Long;
|
|
16
7
|
deviceId: Long;
|
|
@@ -142,9 +133,10 @@ export interface SystemIoStyle {
|
|
|
142
133
|
}
|
|
143
134
|
export interface SystemIo {
|
|
144
135
|
id: Long;
|
|
145
|
-
key: string;
|
|
146
136
|
name: string;
|
|
147
|
-
|
|
137
|
+
deviceId?: Long | undefined;
|
|
138
|
+
formula: string;
|
|
139
|
+
type: SystemIo_SystemIoType;
|
|
148
140
|
unit?: string | undefined;
|
|
149
141
|
description?: string | undefined;
|
|
150
142
|
activeStyle?: SystemIoStyle | undefined;
|
|
@@ -160,31 +152,28 @@ export interface SystemIo {
|
|
|
160
152
|
createdAt?: Date | undefined;
|
|
161
153
|
updatedAt?: Date | undefined;
|
|
162
154
|
}
|
|
155
|
+
export declare enum SystemIo_SystemIoType {
|
|
156
|
+
STRING = 0,
|
|
157
|
+
BOOLEAN = 1,
|
|
158
|
+
NUMERIC = 2,
|
|
159
|
+
FLOAT = 3,
|
|
160
|
+
UNRECOGNIZED = -1
|
|
161
|
+
}
|
|
162
|
+
export declare function systemIo_SystemIoTypeFromJSON(object: any): SystemIo_SystemIoType;
|
|
163
|
+
export declare function systemIo_SystemIoTypeToJSON(object: SystemIo_SystemIoType): string;
|
|
163
164
|
export interface SystemIo_UnknownEntry {
|
|
164
165
|
key: string;
|
|
165
166
|
value: string;
|
|
166
167
|
}
|
|
167
|
-
export interface DeviceIo {
|
|
168
|
-
id: Long;
|
|
169
|
-
deviceId: Long;
|
|
170
|
-
organizationId: Long;
|
|
171
|
-
name: string;
|
|
172
|
-
unit?: string | undefined;
|
|
173
|
-
type: SystemIoType;
|
|
174
|
-
description?: string | undefined;
|
|
175
|
-
formula: string;
|
|
176
|
-
activeStyle?: SystemIoStyle | undefined;
|
|
177
|
-
inactiveStyle?: SystemIoStyle | undefined;
|
|
178
|
-
createdBy?: Long | undefined;
|
|
179
|
-
createdAt?: Date | undefined;
|
|
180
|
-
updatedAt?: Date | undefined;
|
|
181
|
-
}
|
|
182
168
|
export interface ShownIo {
|
|
183
169
|
name: string;
|
|
184
170
|
style?: SystemIoStyle | undefined;
|
|
185
171
|
unit?: string | undefined;
|
|
186
172
|
description?: string | undefined;
|
|
187
173
|
value: string;
|
|
174
|
+
active: boolean;
|
|
175
|
+
graphable: boolean;
|
|
176
|
+
sord: number;
|
|
188
177
|
}
|
|
189
178
|
export interface Config {
|
|
190
179
|
id: number;
|
|
@@ -209,7 +198,6 @@ export declare const TrialLog: MessageFns<TrialLog>;
|
|
|
209
198
|
export declare const SystemIoStyle: MessageFns<SystemIoStyle>;
|
|
210
199
|
export declare const SystemIo: MessageFns<SystemIo>;
|
|
211
200
|
export declare const SystemIo_UnknownEntry: MessageFns<SystemIo_UnknownEntry>;
|
|
212
|
-
export declare const DeviceIo: MessageFns<DeviceIo>;
|
|
213
201
|
export declare const ShownIo: MessageFns<ShownIo>;
|
|
214
202
|
export declare const Config: MessageFns<Config>;
|
|
215
203
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/fatehan/models/models.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,KAAK,EAGL,IAAI,EACJ,YAAY,EACZ,QAAQ,EAGT,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/fatehan/models/models.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EACL,KAAK,EAGL,IAAI,EACJ,YAAY,EACZ,QAAQ,EAGT,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,eAAe,uBAAuB,CAAC;AAEpD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,IAAI,CAAC;IACT,QAAQ,EAAE,IAAI,CAAC;IACf,gBAAgB,EAAE,UAAU,CAAC;IAC7B,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;IAC5B,SAA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@@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.Config = exports.ShownIo = exports.
|
|
12
|
-
exports.systemIoTypeFromJSON = systemIoTypeFromJSON;
|
|
13
|
-
exports.systemIoTypeToJSON = systemIoTypeToJSON;
|
|
11
|
+
exports.Config = exports.ShownIo = exports.SystemIo_UnknownEntry = exports.SystemIo = exports.SystemIoStyle = exports.TrialLog = exports.ChargeLog = exports.DeviceStatusList = exports.PersonalAccessToken = exports.Person = exports.SinotrackCache = exports.HeartbeatCache = exports.IoList_ItemsEntry = exports.IoList = exports.Gallery = exports.SystemIo_SystemIoType = exports.ChargeLog_Type = exports.protobufPackage = void 0;
|
|
14
12
|
exports.chargeLog_TypeFromJSON = chargeLog_TypeFromJSON;
|
|
15
13
|
exports.chargeLog_TypeToJSON = chargeLog_TypeToJSON;
|
|
14
|
+
exports.systemIo_SystemIoTypeFromJSON = systemIo_SystemIoTypeFromJSON;
|
|
15
|
+
exports.systemIo_SystemIoTypeToJSON = systemIo_SystemIoTypeToJSON;
|
|
16
16
|
/* eslint-disable */
|
|
17
17
|
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
18
18
|
const long_1 = __importDefault(require("long"));
|
|
19
19
|
const timestamp_1 = require("../google/protobuf/timestamp");
|
|
20
20
|
const dataModel_1 = require("../packets/dataModel");
|
|
21
21
|
exports.protobufPackage = "com.fatehan.models";
|
|
22
|
-
var SystemIoType;
|
|
23
|
-
(function (SystemIoType) {
|
|
24
|
-
SystemIoType[SystemIoType["STRING"] = 0] = "STRING";
|
|
25
|
-
SystemIoType[SystemIoType["BOOLEAN"] = 1] = "BOOLEAN";
|
|
26
|
-
SystemIoType[SystemIoType["NUMERIC"] = 2] = "NUMERIC";
|
|
27
|
-
SystemIoType[SystemIoType["FLOAT"] = 3] = "FLOAT";
|
|
28
|
-
SystemIoType[SystemIoType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
29
|
-
})(SystemIoType || (exports.SystemIoType = SystemIoType = {}));
|
|
30
|
-
function systemIoTypeFromJSON(object) {
|
|
31
|
-
switch (object) {
|
|
32
|
-
case 0:
|
|
33
|
-
case "STRING":
|
|
34
|
-
return SystemIoType.STRING;
|
|
35
|
-
case 1:
|
|
36
|
-
case "BOOLEAN":
|
|
37
|
-
return SystemIoType.BOOLEAN;
|
|
38
|
-
case 2:
|
|
39
|
-
case "NUMERIC":
|
|
40
|
-
return SystemIoType.NUMERIC;
|
|
41
|
-
case 3:
|
|
42
|
-
case "FLOAT":
|
|
43
|
-
return SystemIoType.FLOAT;
|
|
44
|
-
case -1:
|
|
45
|
-
case "UNRECOGNIZED":
|
|
46
|
-
default:
|
|
47
|
-
return SystemIoType.UNRECOGNIZED;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function systemIoTypeToJSON(object) {
|
|
51
|
-
switch (object) {
|
|
52
|
-
case SystemIoType.STRING:
|
|
53
|
-
return "STRING";
|
|
54
|
-
case SystemIoType.BOOLEAN:
|
|
55
|
-
return "BOOLEAN";
|
|
56
|
-
case SystemIoType.NUMERIC:
|
|
57
|
-
return "NUMERIC";
|
|
58
|
-
case SystemIoType.FLOAT:
|
|
59
|
-
return "FLOAT";
|
|
60
|
-
case SystemIoType.UNRECOGNIZED:
|
|
61
|
-
default:
|
|
62
|
-
return "UNRECOGNIZED";
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
22
|
var ChargeLog_Type;
|
|
66
23
|
(function (ChargeLog_Type) {
|
|
67
24
|
ChargeLog_Type[ChargeLog_Type["None"] = 0] = "None";
|
|
@@ -123,6 +80,49 @@ function chargeLog_TypeToJSON(object) {
|
|
|
123
80
|
return "UNRECOGNIZED";
|
|
124
81
|
}
|
|
125
82
|
}
|
|
83
|
+
var SystemIo_SystemIoType;
|
|
84
|
+
(function (SystemIo_SystemIoType) {
|
|
85
|
+
SystemIo_SystemIoType[SystemIo_SystemIoType["STRING"] = 0] = "STRING";
|
|
86
|
+
SystemIo_SystemIoType[SystemIo_SystemIoType["BOOLEAN"] = 1] = "BOOLEAN";
|
|
87
|
+
SystemIo_SystemIoType[SystemIo_SystemIoType["NUMERIC"] = 2] = "NUMERIC";
|
|
88
|
+
SystemIo_SystemIoType[SystemIo_SystemIoType["FLOAT"] = 3] = "FLOAT";
|
|
89
|
+
SystemIo_SystemIoType[SystemIo_SystemIoType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
90
|
+
})(SystemIo_SystemIoType || (exports.SystemIo_SystemIoType = SystemIo_SystemIoType = {}));
|
|
91
|
+
function systemIo_SystemIoTypeFromJSON(object) {
|
|
92
|
+
switch (object) {
|
|
93
|
+
case 0:
|
|
94
|
+
case "STRING":
|
|
95
|
+
return SystemIo_SystemIoType.STRING;
|
|
96
|
+
case 1:
|
|
97
|
+
case "BOOLEAN":
|
|
98
|
+
return SystemIo_SystemIoType.BOOLEAN;
|
|
99
|
+
case 2:
|
|
100
|
+
case "NUMERIC":
|
|
101
|
+
return SystemIo_SystemIoType.NUMERIC;
|
|
102
|
+
case 3:
|
|
103
|
+
case "FLOAT":
|
|
104
|
+
return SystemIo_SystemIoType.FLOAT;
|
|
105
|
+
case -1:
|
|
106
|
+
case "UNRECOGNIZED":
|
|
107
|
+
default:
|
|
108
|
+
return SystemIo_SystemIoType.UNRECOGNIZED;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function systemIo_SystemIoTypeToJSON(object) {
|
|
112
|
+
switch (object) {
|
|
113
|
+
case SystemIo_SystemIoType.STRING:
|
|
114
|
+
return "STRING";
|
|
115
|
+
case SystemIo_SystemIoType.BOOLEAN:
|
|
116
|
+
return "BOOLEAN";
|
|
117
|
+
case SystemIo_SystemIoType.NUMERIC:
|
|
118
|
+
return "NUMERIC";
|
|
119
|
+
case SystemIo_SystemIoType.FLOAT:
|
|
120
|
+
return "FLOAT";
|
|
121
|
+
case SystemIo_SystemIoType.UNRECOGNIZED:
|
|
122
|
+
default:
|
|
123
|
+
return "UNRECOGNIZED";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
126
|
function createBaseGallery() {
|
|
127
127
|
return {
|
|
128
128
|
id: long_1.default.UZERO,
|
|
@@ -2089,8 +2089,9 @@ exports.SystemIoStyle = {
|
|
|
2089
2089
|
function createBaseSystemIo() {
|
|
2090
2090
|
return {
|
|
2091
2091
|
id: long_1.default.UZERO,
|
|
2092
|
-
key: "",
|
|
2093
2092
|
name: "",
|
|
2093
|
+
deviceId: undefined,
|
|
2094
|
+
formula: "",
|
|
2094
2095
|
type: 0,
|
|
2095
2096
|
unit: undefined,
|
|
2096
2097
|
description: undefined,
|
|
@@ -2111,50 +2112,53 @@ exports.SystemIo = {
|
|
|
2111
2112
|
if (!message.id.equals(long_1.default.UZERO)) {
|
|
2112
2113
|
writer.uint32(8).uint64(message.id.toString());
|
|
2113
2114
|
}
|
|
2114
|
-
if (message.key !== "") {
|
|
2115
|
-
writer.uint32(18).string(message.key);
|
|
2116
|
-
}
|
|
2117
2115
|
if (message.name !== "") {
|
|
2118
|
-
writer.uint32(
|
|
2116
|
+
writer.uint32(18).string(message.name);
|
|
2117
|
+
}
|
|
2118
|
+
if (message.deviceId !== undefined) {
|
|
2119
|
+
writer.uint32(24).uint64(message.deviceId.toString());
|
|
2120
|
+
}
|
|
2121
|
+
if (message.formula !== "") {
|
|
2122
|
+
writer.uint32(42).string(message.formula);
|
|
2119
2123
|
}
|
|
2120
2124
|
if (message.type !== 0) {
|
|
2121
|
-
writer.uint32(
|
|
2125
|
+
writer.uint32(48).int32(message.type);
|
|
2122
2126
|
}
|
|
2123
2127
|
if (message.unit !== undefined) {
|
|
2124
|
-
writer.uint32(
|
|
2128
|
+
writer.uint32(58).string(message.unit);
|
|
2125
2129
|
}
|
|
2126
2130
|
if (message.description !== undefined) {
|
|
2127
|
-
writer.uint32(
|
|
2131
|
+
writer.uint32(66).string(message.description);
|
|
2128
2132
|
}
|
|
2129
2133
|
if (message.activeStyle !== undefined) {
|
|
2130
|
-
exports.SystemIoStyle.encode(message.activeStyle, writer.uint32(
|
|
2134
|
+
exports.SystemIoStyle.encode(message.activeStyle, writer.uint32(74).fork()).join();
|
|
2131
2135
|
}
|
|
2132
2136
|
if (message.inactiveStyle !== undefined) {
|
|
2133
|
-
exports.SystemIoStyle.encode(message.inactiveStyle, writer.uint32(
|
|
2137
|
+
exports.SystemIoStyle.encode(message.inactiveStyle, writer.uint32(82).fork()).join();
|
|
2134
2138
|
}
|
|
2135
2139
|
if (message.active !== false) {
|
|
2136
|
-
writer.uint32(
|
|
2140
|
+
writer.uint32(88).bool(message.active);
|
|
2137
2141
|
}
|
|
2138
2142
|
if (message.graphable !== false) {
|
|
2139
|
-
writer.uint32(
|
|
2143
|
+
writer.uint32(96).bool(message.graphable);
|
|
2140
2144
|
}
|
|
2141
2145
|
if (message.sord !== 0) {
|
|
2142
|
-
writer.uint32(
|
|
2146
|
+
writer.uint32(104).uint32(message.sord);
|
|
2143
2147
|
}
|
|
2144
2148
|
for (const v of message.hidden) {
|
|
2145
|
-
writer.uint32(
|
|
2149
|
+
writer.uint32(114).string(v);
|
|
2146
2150
|
}
|
|
2147
2151
|
Object.entries(message.unknown).forEach(([key, value]) => {
|
|
2148
|
-
exports.SystemIo_UnknownEntry.encode({ key: key, value }, writer.uint32(
|
|
2152
|
+
exports.SystemIo_UnknownEntry.encode({ key: key, value }, writer.uint32(122).fork()).join();
|
|
2149
2153
|
});
|
|
2150
2154
|
if (message.createdBy !== undefined) {
|
|
2151
|
-
writer.uint32(
|
|
2155
|
+
writer.uint32(128).uint64(message.createdBy.toString());
|
|
2152
2156
|
}
|
|
2153
2157
|
if (message.createdAt !== undefined) {
|
|
2154
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(
|
|
2158
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(138).fork()).join();
|
|
2155
2159
|
}
|
|
2156
2160
|
if (message.updatedAt !== undefined) {
|
|
2157
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(
|
|
2161
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(146).fork()).join();
|
|
2158
2162
|
}
|
|
2159
2163
|
return writer;
|
|
2160
2164
|
},
|
|
@@ -2176,105 +2180,112 @@ exports.SystemIo = {
|
|
|
2176
2180
|
if (tag !== 18) {
|
|
2177
2181
|
break;
|
|
2178
2182
|
}
|
|
2179
|
-
message.
|
|
2183
|
+
message.name = reader.string();
|
|
2180
2184
|
continue;
|
|
2181
2185
|
}
|
|
2182
2186
|
case 3: {
|
|
2183
|
-
if (tag !==
|
|
2187
|
+
if (tag !== 24) {
|
|
2184
2188
|
break;
|
|
2185
2189
|
}
|
|
2186
|
-
message.
|
|
2190
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2187
2191
|
continue;
|
|
2188
2192
|
}
|
|
2189
|
-
case
|
|
2190
|
-
if (tag !==
|
|
2193
|
+
case 5: {
|
|
2194
|
+
if (tag !== 42) {
|
|
2195
|
+
break;
|
|
2196
|
+
}
|
|
2197
|
+
message.formula = reader.string();
|
|
2198
|
+
continue;
|
|
2199
|
+
}
|
|
2200
|
+
case 6: {
|
|
2201
|
+
if (tag !== 48) {
|
|
2191
2202
|
break;
|
|
2192
2203
|
}
|
|
2193
2204
|
message.type = reader.int32();
|
|
2194
2205
|
continue;
|
|
2195
2206
|
}
|
|
2196
|
-
case
|
|
2197
|
-
if (tag !==
|
|
2207
|
+
case 7: {
|
|
2208
|
+
if (tag !== 58) {
|
|
2198
2209
|
break;
|
|
2199
2210
|
}
|
|
2200
2211
|
message.unit = reader.string();
|
|
2201
2212
|
continue;
|
|
2202
2213
|
}
|
|
2203
|
-
case
|
|
2204
|
-
if (tag !==
|
|
2214
|
+
case 8: {
|
|
2215
|
+
if (tag !== 66) {
|
|
2205
2216
|
break;
|
|
2206
2217
|
}
|
|
2207
2218
|
message.description = reader.string();
|
|
2208
2219
|
continue;
|
|
2209
2220
|
}
|
|
2210
|
-
case
|
|
2211
|
-
if (tag !==
|
|
2221
|
+
case 9: {
|
|
2222
|
+
if (tag !== 74) {
|
|
2212
2223
|
break;
|
|
2213
2224
|
}
|
|
2214
2225
|
message.activeStyle = exports.SystemIoStyle.decode(reader, reader.uint32());
|
|
2215
2226
|
continue;
|
|
2216
2227
|
}
|
|
2217
|
-
case
|
|
2218
|
-
if (tag !==
|
|
2228
|
+
case 10: {
|
|
2229
|
+
if (tag !== 82) {
|
|
2219
2230
|
break;
|
|
2220
2231
|
}
|
|
2221
2232
|
message.inactiveStyle = exports.SystemIoStyle.decode(reader, reader.uint32());
|
|
2222
2233
|
continue;
|
|
2223
2234
|
}
|
|
2224
|
-
case
|
|
2225
|
-
if (tag !==
|
|
2235
|
+
case 11: {
|
|
2236
|
+
if (tag !== 88) {
|
|
2226
2237
|
break;
|
|
2227
2238
|
}
|
|
2228
2239
|
message.active = reader.bool();
|
|
2229
2240
|
continue;
|
|
2230
2241
|
}
|
|
2231
|
-
case
|
|
2232
|
-
if (tag !==
|
|
2242
|
+
case 12: {
|
|
2243
|
+
if (tag !== 96) {
|
|
2233
2244
|
break;
|
|
2234
2245
|
}
|
|
2235
2246
|
message.graphable = reader.bool();
|
|
2236
2247
|
continue;
|
|
2237
2248
|
}
|
|
2238
|
-
case
|
|
2239
|
-
if (tag !==
|
|
2249
|
+
case 13: {
|
|
2250
|
+
if (tag !== 104) {
|
|
2240
2251
|
break;
|
|
2241
2252
|
}
|
|
2242
2253
|
message.sord = reader.uint32();
|
|
2243
2254
|
continue;
|
|
2244
2255
|
}
|
|
2245
|
-
case
|
|
2246
|
-
if (tag !==
|
|
2256
|
+
case 14: {
|
|
2257
|
+
if (tag !== 114) {
|
|
2247
2258
|
break;
|
|
2248
2259
|
}
|
|
2249
2260
|
message.hidden.push(reader.string());
|
|
2250
2261
|
continue;
|
|
2251
2262
|
}
|
|
2252
|
-
case
|
|
2253
|
-
if (tag !==
|
|
2263
|
+
case 15: {
|
|
2264
|
+
if (tag !== 122) {
|
|
2254
2265
|
break;
|
|
2255
2266
|
}
|
|
2256
|
-
const
|
|
2257
|
-
if (
|
|
2258
|
-
message.unknown[
|
|
2267
|
+
const entry15 = exports.SystemIo_UnknownEntry.decode(reader, reader.uint32());
|
|
2268
|
+
if (entry15.value !== undefined) {
|
|
2269
|
+
message.unknown[entry15.key] = entry15.value;
|
|
2259
2270
|
}
|
|
2260
2271
|
continue;
|
|
2261
2272
|
}
|
|
2262
|
-
case
|
|
2263
|
-
if (tag !==
|
|
2273
|
+
case 16: {
|
|
2274
|
+
if (tag !== 128) {
|
|
2264
2275
|
break;
|
|
2265
2276
|
}
|
|
2266
2277
|
message.createdBy = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2267
2278
|
continue;
|
|
2268
2279
|
}
|
|
2269
|
-
case
|
|
2270
|
-
if (tag !==
|
|
2280
|
+
case 17: {
|
|
2281
|
+
if (tag !== 138) {
|
|
2271
2282
|
break;
|
|
2272
2283
|
}
|
|
2273
2284
|
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2274
2285
|
continue;
|
|
2275
2286
|
}
|
|
2276
|
-
case
|
|
2277
|
-
if (tag !==
|
|
2287
|
+
case 18: {
|
|
2288
|
+
if (tag !== 146) {
|
|
2278
2289
|
break;
|
|
2279
2290
|
}
|
|
2280
2291
|
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
@@ -2291,9 +2302,10 @@ exports.SystemIo = {
|
|
|
2291
2302
|
fromJSON(object) {
|
|
2292
2303
|
return {
|
|
2293
2304
|
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
2294
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2295
2305
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2296
|
-
|
|
2306
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : undefined,
|
|
2307
|
+
formula: isSet(object.formula) ? globalThis.String(object.formula) : "",
|
|
2308
|
+
type: isSet(object.type) ? systemIo_SystemIoTypeFromJSON(object.type) : 0,
|
|
2297
2309
|
unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
|
|
2298
2310
|
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
2299
2311
|
activeStyle: isSet(object.active_style) ? exports.SystemIoStyle.fromJSON(object.active_style) : undefined,
|
|
@@ -2319,14 +2331,17 @@ exports.SystemIo = {
|
|
|
2319
2331
|
if (!message.id.equals(long_1.default.UZERO)) {
|
|
2320
2332
|
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
2321
2333
|
}
|
|
2322
|
-
if (message.key !== "") {
|
|
2323
|
-
obj.key = message.key;
|
|
2324
|
-
}
|
|
2325
2334
|
if (message.name !== "") {
|
|
2326
2335
|
obj.name = message.name;
|
|
2327
2336
|
}
|
|
2337
|
+
if (message.deviceId !== undefined) {
|
|
2338
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
2339
|
+
}
|
|
2340
|
+
if (message.formula !== "") {
|
|
2341
|
+
obj.formula = message.formula;
|
|
2342
|
+
}
|
|
2328
2343
|
if (message.type !== 0) {
|
|
2329
|
-
obj.type =
|
|
2344
|
+
obj.type = systemIo_SystemIoTypeToJSON(message.type);
|
|
2330
2345
|
}
|
|
2331
2346
|
if (message.unit !== undefined) {
|
|
2332
2347
|
obj.unit = message.unit;
|
|
@@ -2379,8 +2394,11 @@ exports.SystemIo = {
|
|
|
2379
2394
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2380
2395
|
const message = createBaseSystemIo();
|
|
2381
2396
|
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
2382
|
-
message.
|
|
2383
|
-
message.
|
|
2397
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
2398
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
2399
|
+
? long_1.default.fromValue(object.deviceId)
|
|
2400
|
+
: undefined;
|
|
2401
|
+
message.formula = (_b = object.formula) !== null && _b !== void 0 ? _b : "";
|
|
2384
2402
|
message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
|
|
2385
2403
|
message.unit = (_d = object.unit) !== null && _d !== void 0 ? _d : undefined;
|
|
2386
2404
|
message.description = (_e = object.description) !== null && _e !== void 0 ? _e : undefined;
|
|
@@ -2477,326 +2495,107 @@ exports.SystemIo_UnknownEntry = {
|
|
|
2477
2495
|
return message;
|
|
2478
2496
|
},
|
|
2479
2497
|
};
|
|
2480
|
-
function
|
|
2498
|
+
function createBaseShownIo() {
|
|
2481
2499
|
return {
|
|
2482
|
-
id: long_1.default.UZERO,
|
|
2483
|
-
deviceId: long_1.default.UZERO,
|
|
2484
|
-
organizationId: long_1.default.UZERO,
|
|
2485
2500
|
name: "",
|
|
2501
|
+
style: undefined,
|
|
2486
2502
|
unit: undefined,
|
|
2487
|
-
type: 0,
|
|
2488
2503
|
description: undefined,
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
createdAt: undefined,
|
|
2494
|
-
updatedAt: undefined,
|
|
2504
|
+
value: "",
|
|
2505
|
+
active: false,
|
|
2506
|
+
graphable: false,
|
|
2507
|
+
sord: 0,
|
|
2495
2508
|
};
|
|
2496
2509
|
}
|
|
2497
|
-
exports.
|
|
2510
|
+
exports.ShownIo = {
|
|
2498
2511
|
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2499
|
-
if (!message.id.equals(long_1.default.UZERO)) {
|
|
2500
|
-
writer.uint32(8).uint64(message.id.toString());
|
|
2501
|
-
}
|
|
2502
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
2503
|
-
writer.uint32(16).uint64(message.deviceId.toString());
|
|
2504
|
-
}
|
|
2505
|
-
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
2506
|
-
writer.uint32(80).uint64(message.organizationId.toString());
|
|
2507
|
-
}
|
|
2508
2512
|
if (message.name !== "") {
|
|
2509
|
-
writer.uint32(
|
|
2513
|
+
writer.uint32(10).string(message.name);
|
|
2510
2514
|
}
|
|
2511
|
-
if (message.
|
|
2512
|
-
writer.uint32(
|
|
2515
|
+
if (message.style !== undefined) {
|
|
2516
|
+
exports.SystemIoStyle.encode(message.style, writer.uint32(18).fork()).join();
|
|
2513
2517
|
}
|
|
2514
|
-
if (message.
|
|
2515
|
-
writer.uint32(
|
|
2518
|
+
if (message.unit !== undefined) {
|
|
2519
|
+
writer.uint32(26).string(message.unit);
|
|
2516
2520
|
}
|
|
2517
2521
|
if (message.description !== undefined) {
|
|
2518
|
-
writer.uint32(
|
|
2519
|
-
}
|
|
2520
|
-
if (message.formula !== "") {
|
|
2521
|
-
writer.uint32(90).string(message.formula);
|
|
2522
|
-
}
|
|
2523
|
-
if (message.activeStyle !== undefined) {
|
|
2524
|
-
exports.SystemIoStyle.encode(message.activeStyle, writer.uint32(98).fork()).join();
|
|
2522
|
+
writer.uint32(34).string(message.description);
|
|
2525
2523
|
}
|
|
2526
|
-
if (message.
|
|
2527
|
-
|
|
2524
|
+
if (message.value !== "") {
|
|
2525
|
+
writer.uint32(42).string(message.value);
|
|
2528
2526
|
}
|
|
2529
|
-
if (message.
|
|
2530
|
-
writer.uint32(
|
|
2527
|
+
if (message.active !== false) {
|
|
2528
|
+
writer.uint32(48).bool(message.active);
|
|
2531
2529
|
}
|
|
2532
|
-
if (message.
|
|
2533
|
-
|
|
2530
|
+
if (message.graphable !== false) {
|
|
2531
|
+
writer.uint32(56).bool(message.graphable);
|
|
2534
2532
|
}
|
|
2535
|
-
if (message.
|
|
2536
|
-
|
|
2533
|
+
if (message.sord !== 0) {
|
|
2534
|
+
writer.uint32(64).uint32(message.sord);
|
|
2537
2535
|
}
|
|
2538
2536
|
return writer;
|
|
2539
2537
|
},
|
|
2540
2538
|
decode(input, length) {
|
|
2541
2539
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2542
2540
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2543
|
-
const message =
|
|
2541
|
+
const message = createBaseShownIo();
|
|
2544
2542
|
while (reader.pos < end) {
|
|
2545
2543
|
const tag = reader.uint32();
|
|
2546
2544
|
switch (tag >>> 3) {
|
|
2547
2545
|
case 1: {
|
|
2548
|
-
if (tag !==
|
|
2546
|
+
if (tag !== 10) {
|
|
2549
2547
|
break;
|
|
2550
2548
|
}
|
|
2551
|
-
message.
|
|
2549
|
+
message.name = reader.string();
|
|
2552
2550
|
continue;
|
|
2553
2551
|
}
|
|
2554
2552
|
case 2: {
|
|
2555
|
-
if (tag !==
|
|
2556
|
-
break;
|
|
2557
|
-
}
|
|
2558
|
-
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2559
|
-
continue;
|
|
2560
|
-
}
|
|
2561
|
-
case 10: {
|
|
2562
|
-
if (tag !== 80) {
|
|
2553
|
+
if (tag !== 18) {
|
|
2563
2554
|
break;
|
|
2564
2555
|
}
|
|
2565
|
-
message.
|
|
2556
|
+
message.style = exports.SystemIoStyle.decode(reader, reader.uint32());
|
|
2566
2557
|
continue;
|
|
2567
2558
|
}
|
|
2568
2559
|
case 3: {
|
|
2569
2560
|
if (tag !== 26) {
|
|
2570
2561
|
break;
|
|
2571
2562
|
}
|
|
2572
|
-
message.
|
|
2563
|
+
message.unit = reader.string();
|
|
2573
2564
|
continue;
|
|
2574
2565
|
}
|
|
2575
2566
|
case 4: {
|
|
2576
2567
|
if (tag !== 34) {
|
|
2577
2568
|
break;
|
|
2578
2569
|
}
|
|
2579
|
-
message.
|
|
2570
|
+
message.description = reader.string();
|
|
2580
2571
|
continue;
|
|
2581
2572
|
}
|
|
2582
2573
|
case 5: {
|
|
2583
|
-
if (tag !==
|
|
2574
|
+
if (tag !== 42) {
|
|
2584
2575
|
break;
|
|
2585
2576
|
}
|
|
2586
|
-
message.
|
|
2577
|
+
message.value = reader.string();
|
|
2587
2578
|
continue;
|
|
2588
2579
|
}
|
|
2589
2580
|
case 6: {
|
|
2590
|
-
if (tag !==
|
|
2591
|
-
break;
|
|
2592
|
-
}
|
|
2593
|
-
message.description = reader.string();
|
|
2594
|
-
continue;
|
|
2595
|
-
}
|
|
2596
|
-
case 11: {
|
|
2597
|
-
if (tag !== 90) {
|
|
2598
|
-
break;
|
|
2599
|
-
}
|
|
2600
|
-
message.formula = reader.string();
|
|
2601
|
-
continue;
|
|
2602
|
-
}
|
|
2603
|
-
case 12: {
|
|
2604
|
-
if (tag !== 98) {
|
|
2605
|
-
break;
|
|
2606
|
-
}
|
|
2607
|
-
message.activeStyle = exports.SystemIoStyle.decode(reader, reader.uint32());
|
|
2608
|
-
continue;
|
|
2609
|
-
}
|
|
2610
|
-
case 13: {
|
|
2611
|
-
if (tag !== 106) {
|
|
2581
|
+
if (tag !== 48) {
|
|
2612
2582
|
break;
|
|
2613
2583
|
}
|
|
2614
|
-
message.
|
|
2584
|
+
message.active = reader.bool();
|
|
2615
2585
|
continue;
|
|
2616
2586
|
}
|
|
2617
2587
|
case 7: {
|
|
2618
2588
|
if (tag !== 56) {
|
|
2619
2589
|
break;
|
|
2620
2590
|
}
|
|
2621
|
-
message.
|
|
2591
|
+
message.graphable = reader.bool();
|
|
2622
2592
|
continue;
|
|
2623
2593
|
}
|
|
2624
2594
|
case 8: {
|
|
2625
|
-
if (tag !==
|
|
2626
|
-
break;
|
|
2627
|
-
}
|
|
2628
|
-
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2629
|
-
continue;
|
|
2630
|
-
}
|
|
2631
|
-
case 9: {
|
|
2632
|
-
if (tag !== 74) {
|
|
2633
|
-
break;
|
|
2634
|
-
}
|
|
2635
|
-
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2636
|
-
continue;
|
|
2637
|
-
}
|
|
2638
|
-
}
|
|
2639
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2640
|
-
break;
|
|
2641
|
-
}
|
|
2642
|
-
reader.skip(tag & 7);
|
|
2643
|
-
}
|
|
2644
|
-
return message;
|
|
2645
|
-
},
|
|
2646
|
-
fromJSON(object) {
|
|
2647
|
-
return {
|
|
2648
|
-
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
2649
|
-
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : long_1.default.UZERO,
|
|
2650
|
-
organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : long_1.default.UZERO,
|
|
2651
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2652
|
-
unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
|
|
2653
|
-
type: isSet(object.type) ? systemIoTypeFromJSON(object.type) : 0,
|
|
2654
|
-
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
2655
|
-
formula: isSet(object.formula) ? globalThis.String(object.formula) : "",
|
|
2656
|
-
activeStyle: isSet(object.active_style) ? exports.SystemIoStyle.fromJSON(object.active_style) : undefined,
|
|
2657
|
-
inactiveStyle: isSet(object.inactive_style) ? exports.SystemIoStyle.fromJSON(object.inactive_style) : undefined,
|
|
2658
|
-
createdBy: isSet(object.created_by) ? long_1.default.fromValue(object.created_by) : undefined,
|
|
2659
|
-
createdAt: isSet(object.created_at) ? fromJsonTimestamp(object.created_at) : undefined,
|
|
2660
|
-
updatedAt: isSet(object.updated_at) ? fromJsonTimestamp(object.updated_at) : undefined,
|
|
2661
|
-
};
|
|
2662
|
-
},
|
|
2663
|
-
toJSON(message) {
|
|
2664
|
-
const obj = {};
|
|
2665
|
-
if (!message.id.equals(long_1.default.UZERO)) {
|
|
2666
|
-
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
2667
|
-
}
|
|
2668
|
-
if (!message.deviceId.equals(long_1.default.UZERO)) {
|
|
2669
|
-
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
2670
|
-
}
|
|
2671
|
-
if (!message.organizationId.equals(long_1.default.UZERO)) {
|
|
2672
|
-
obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
|
|
2673
|
-
}
|
|
2674
|
-
if (message.name !== "") {
|
|
2675
|
-
obj.name = message.name;
|
|
2676
|
-
}
|
|
2677
|
-
if (message.unit !== undefined) {
|
|
2678
|
-
obj.unit = message.unit;
|
|
2679
|
-
}
|
|
2680
|
-
if (message.type !== 0) {
|
|
2681
|
-
obj.type = systemIoTypeToJSON(message.type);
|
|
2682
|
-
}
|
|
2683
|
-
if (message.description !== undefined) {
|
|
2684
|
-
obj.description = message.description;
|
|
2685
|
-
}
|
|
2686
|
-
if (message.formula !== "") {
|
|
2687
|
-
obj.formula = message.formula;
|
|
2688
|
-
}
|
|
2689
|
-
if (message.activeStyle !== undefined) {
|
|
2690
|
-
obj.active_style = exports.SystemIoStyle.toJSON(message.activeStyle);
|
|
2691
|
-
}
|
|
2692
|
-
if (message.inactiveStyle !== undefined) {
|
|
2693
|
-
obj.inactive_style = exports.SystemIoStyle.toJSON(message.inactiveStyle);
|
|
2694
|
-
}
|
|
2695
|
-
if (message.createdBy !== undefined) {
|
|
2696
|
-
obj.created_by = (message.createdBy || long_1.default.UZERO).toString();
|
|
2697
|
-
}
|
|
2698
|
-
if (message.createdAt !== undefined) {
|
|
2699
|
-
obj.created_at = message.createdAt.toISOString();
|
|
2700
|
-
}
|
|
2701
|
-
if (message.updatedAt !== undefined) {
|
|
2702
|
-
obj.updated_at = message.updatedAt.toISOString();
|
|
2703
|
-
}
|
|
2704
|
-
return obj;
|
|
2705
|
-
},
|
|
2706
|
-
create(base) {
|
|
2707
|
-
return exports.DeviceIo.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2708
|
-
},
|
|
2709
|
-
fromPartial(object) {
|
|
2710
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
2711
|
-
const message = createBaseDeviceIo();
|
|
2712
|
-
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
2713
|
-
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
2714
|
-
? long_1.default.fromValue(object.deviceId)
|
|
2715
|
-
: long_1.default.UZERO;
|
|
2716
|
-
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
2717
|
-
? long_1.default.fromValue(object.organizationId)
|
|
2718
|
-
: long_1.default.UZERO;
|
|
2719
|
-
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
2720
|
-
message.unit = (_b = object.unit) !== null && _b !== void 0 ? _b : undefined;
|
|
2721
|
-
message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
|
|
2722
|
-
message.description = (_d = object.description) !== null && _d !== void 0 ? _d : undefined;
|
|
2723
|
-
message.formula = (_e = object.formula) !== null && _e !== void 0 ? _e : "";
|
|
2724
|
-
message.activeStyle = (object.activeStyle !== undefined && object.activeStyle !== null)
|
|
2725
|
-
? exports.SystemIoStyle.fromPartial(object.activeStyle)
|
|
2726
|
-
: undefined;
|
|
2727
|
-
message.inactiveStyle = (object.inactiveStyle !== undefined && object.inactiveStyle !== null)
|
|
2728
|
-
? exports.SystemIoStyle.fromPartial(object.inactiveStyle)
|
|
2729
|
-
: undefined;
|
|
2730
|
-
message.createdBy = (object.createdBy !== undefined && object.createdBy !== null)
|
|
2731
|
-
? long_1.default.fromValue(object.createdBy)
|
|
2732
|
-
: undefined;
|
|
2733
|
-
message.createdAt = (_f = object.createdAt) !== null && _f !== void 0 ? _f : undefined;
|
|
2734
|
-
message.updatedAt = (_g = object.updatedAt) !== null && _g !== void 0 ? _g : undefined;
|
|
2735
|
-
return message;
|
|
2736
|
-
},
|
|
2737
|
-
};
|
|
2738
|
-
function createBaseShownIo() {
|
|
2739
|
-
return { name: "", style: undefined, unit: undefined, description: undefined, value: "" };
|
|
2740
|
-
}
|
|
2741
|
-
exports.ShownIo = {
|
|
2742
|
-
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
2743
|
-
if (message.name !== "") {
|
|
2744
|
-
writer.uint32(10).string(message.name);
|
|
2745
|
-
}
|
|
2746
|
-
if (message.style !== undefined) {
|
|
2747
|
-
exports.SystemIoStyle.encode(message.style, writer.uint32(18).fork()).join();
|
|
2748
|
-
}
|
|
2749
|
-
if (message.unit !== undefined) {
|
|
2750
|
-
writer.uint32(26).string(message.unit);
|
|
2751
|
-
}
|
|
2752
|
-
if (message.description !== undefined) {
|
|
2753
|
-
writer.uint32(34).string(message.description);
|
|
2754
|
-
}
|
|
2755
|
-
if (message.value !== "") {
|
|
2756
|
-
writer.uint32(42).string(message.value);
|
|
2757
|
-
}
|
|
2758
|
-
return writer;
|
|
2759
|
-
},
|
|
2760
|
-
decode(input, length) {
|
|
2761
|
-
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2762
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2763
|
-
const message = createBaseShownIo();
|
|
2764
|
-
while (reader.pos < end) {
|
|
2765
|
-
const tag = reader.uint32();
|
|
2766
|
-
switch (tag >>> 3) {
|
|
2767
|
-
case 1: {
|
|
2768
|
-
if (tag !== 10) {
|
|
2769
|
-
break;
|
|
2770
|
-
}
|
|
2771
|
-
message.name = reader.string();
|
|
2772
|
-
continue;
|
|
2773
|
-
}
|
|
2774
|
-
case 2: {
|
|
2775
|
-
if (tag !== 18) {
|
|
2776
|
-
break;
|
|
2777
|
-
}
|
|
2778
|
-
message.style = exports.SystemIoStyle.decode(reader, reader.uint32());
|
|
2779
|
-
continue;
|
|
2780
|
-
}
|
|
2781
|
-
case 3: {
|
|
2782
|
-
if (tag !== 26) {
|
|
2783
|
-
break;
|
|
2784
|
-
}
|
|
2785
|
-
message.unit = reader.string();
|
|
2786
|
-
continue;
|
|
2787
|
-
}
|
|
2788
|
-
case 4: {
|
|
2789
|
-
if (tag !== 34) {
|
|
2790
|
-
break;
|
|
2791
|
-
}
|
|
2792
|
-
message.description = reader.string();
|
|
2793
|
-
continue;
|
|
2794
|
-
}
|
|
2795
|
-
case 5: {
|
|
2796
|
-
if (tag !== 42) {
|
|
2595
|
+
if (tag !== 64) {
|
|
2797
2596
|
break;
|
|
2798
2597
|
}
|
|
2799
|
-
message.
|
|
2598
|
+
message.sord = reader.uint32();
|
|
2800
2599
|
continue;
|
|
2801
2600
|
}
|
|
2802
2601
|
}
|
|
@@ -2814,6 +2613,9 @@ exports.ShownIo = {
|
|
|
2814
2613
|
unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
|
|
2815
2614
|
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
2816
2615
|
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
2616
|
+
active: isSet(object.active) ? globalThis.Boolean(object.active) : false,
|
|
2617
|
+
graphable: isSet(object.graphable) ? globalThis.Boolean(object.graphable) : false,
|
|
2618
|
+
sord: isSet(object.sord) ? globalThis.Number(object.sord) : 0,
|
|
2817
2619
|
};
|
|
2818
2620
|
},
|
|
2819
2621
|
toJSON(message) {
|
|
@@ -2833,13 +2635,22 @@ exports.ShownIo = {
|
|
|
2833
2635
|
if (message.value !== "") {
|
|
2834
2636
|
obj.value = message.value;
|
|
2835
2637
|
}
|
|
2638
|
+
if (message.active !== false) {
|
|
2639
|
+
obj.active = message.active;
|
|
2640
|
+
}
|
|
2641
|
+
if (message.graphable !== false) {
|
|
2642
|
+
obj.graphable = message.graphable;
|
|
2643
|
+
}
|
|
2644
|
+
if (message.sord !== 0) {
|
|
2645
|
+
obj.sord = Math.round(message.sord);
|
|
2646
|
+
}
|
|
2836
2647
|
return obj;
|
|
2837
2648
|
},
|
|
2838
2649
|
create(base) {
|
|
2839
2650
|
return exports.ShownIo.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2840
2651
|
},
|
|
2841
2652
|
fromPartial(object) {
|
|
2842
|
-
var _a, _b, _c, _d;
|
|
2653
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2843
2654
|
const message = createBaseShownIo();
|
|
2844
2655
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
2845
2656
|
message.style = (object.style !== undefined && object.style !== null)
|
|
@@ -2848,6 +2659,9 @@ exports.ShownIo = {
|
|
|
2848
2659
|
message.unit = (_b = object.unit) !== null && _b !== void 0 ? _b : undefined;
|
|
2849
2660
|
message.description = (_c = object.description) !== null && _c !== void 0 ? _c : undefined;
|
|
2850
2661
|
message.value = (_d = object.value) !== null && _d !== void 0 ? _d : "";
|
|
2662
|
+
message.active = (_e = object.active) !== null && _e !== void 0 ? _e : false;
|
|
2663
|
+
message.graphable = (_f = object.graphable) !== null && _f !== void 0 ? _f : false;
|
|
2664
|
+
message.sord = (_g = object.sord) !== null && _g !== void 0 ? _g : 0;
|
|
2851
2665
|
return message;
|
|
2852
2666
|
},
|
|
2853
2667
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AreaSummaryReviewRequest, AreaSummaryReviewResponse, ChartRequest, ChartResponse, CommandHistoryRequest, CommandHistoryResponse, DashboardIndividualRequest, DashboardIndividualResponse, DeviceDataRequest, DeviceDataResponse, LogRequest, LogResponse, RouteReviewRequest, RouteReviewResponse, RouteStopRequest, RouteStopResponse, SystemIoRequest, SystemIoResponse, TripPerformanceRequest, TripPerformanceResponse, TripReportRequest, TripReportResponse, WorkCycleRequest, WorkCycleResponse } from "./fatehan/reports/report";
|
|
2
|
-
import {
|
|
2
|
+
import { ShownIo, SystemIo } from "./fatehan/models/models";
|
|
3
3
|
import { Data } from "./fatehan/packets/dataModel";
|
|
4
4
|
export declare class ReportService {
|
|
5
5
|
private readonly url;
|
|
@@ -18,7 +18,7 @@ export declare class ReportService {
|
|
|
18
18
|
CommandHistoryReport(request: CommandHistoryRequest): Promise<CommandHistoryResponse>;
|
|
19
19
|
ChartReport(request: ChartRequest, responses: (chunk: ChartResponse) => void): Promise<void>;
|
|
20
20
|
SystemIoReport(request: SystemIoRequest): Promise<SystemIoResponse>;
|
|
21
|
-
SystemIoCast(systemIo: SystemIo[] | null, deviceIo:
|
|
21
|
+
SystemIoCast(systemIo: SystemIo[] | null, deviceIo: SystemIo[], data: Data): Promise<ShownIo[]>;
|
|
22
22
|
Matin(): Promise<void>;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,iBAAiB,EACjB,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,iB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cAAc,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IA6B7D,YAAY,CAAC,QAAQ,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAgB/F,KAAK;CAGnB"}
|
package/dist/index.test.js
CHANGED
|
@@ -7,8 +7,8 @@ const vitest_1 = require("vitest");
|
|
|
7
7
|
const index_1 = require("./index");
|
|
8
8
|
const report_1 = require("./fatehan/reports/report");
|
|
9
9
|
const long_1 = __importDefault(require("long"));
|
|
10
|
-
const models_1 = require("./fatehan/models/models");
|
|
11
10
|
const system_io_1 = __importDefault(require("./system.io"));
|
|
11
|
+
const models_1 = require("./fatehan/models/models");
|
|
12
12
|
(0, vitest_1.describe)("ReportService", () => {
|
|
13
13
|
let url = "http://report.myavl.ir:1272";
|
|
14
14
|
let token = "5|gvRWOzVBVN3a6Q7iajws2uV9TEVELEK81H3RCpzO85369b27";
|
|
@@ -94,7 +94,7 @@ const system_io_1 = __importDefault(require("./system.io"));
|
|
|
94
94
|
deviceIds: [long_1.default.fromInt(119926)],
|
|
95
95
|
ios: ["Speed", "Compact.IoElement.ExternalVoltage"],
|
|
96
96
|
startedAt: new Date("2025-06-28 00:00:00"),
|
|
97
|
-
finishedAt: new Date("2025-06-30 00:00:00")
|
|
97
|
+
finishedAt: new Date("2025-06-30 00:00:00"),
|
|
98
98
|
}, (chunk) => {
|
|
99
99
|
console.log(report_1.ChartResponse.toJSON(chunk));
|
|
100
100
|
});
|
|
@@ -103,20 +103,24 @@ const system_io_1 = __importDefault(require("./system.io"));
|
|
|
103
103
|
let devIo = {
|
|
104
104
|
formula: "($speed / 3.6)",
|
|
105
105
|
name: "سرعت",
|
|
106
|
-
type: models_1.
|
|
106
|
+
type: models_1.SystemIo_SystemIoType.FLOAT,
|
|
107
107
|
activeStyle: {
|
|
108
108
|
color: "#3a3a3a",
|
|
109
|
-
name: "سرعت"
|
|
109
|
+
name: "سرعت",
|
|
110
110
|
},
|
|
111
111
|
inactiveStyle: {
|
|
112
|
-
color:
|
|
113
|
-
name: "سرعت"
|
|
112
|
+
color: "#a3a3a3",
|
|
113
|
+
name: "سرعت",
|
|
114
114
|
},
|
|
115
115
|
description: "سرعت خودرو",
|
|
116
116
|
unit: "m/h",
|
|
117
117
|
deviceId: long_1.default.fromNumber(7744),
|
|
118
|
-
organizationId: long_1.default.fromNumber(7744),
|
|
119
118
|
id: long_1.default.fromNumber(1),
|
|
119
|
+
active: true,
|
|
120
|
+
graphable: true,
|
|
121
|
+
sord: 1,
|
|
122
|
+
hidden: [],
|
|
123
|
+
unknown: {}
|
|
120
124
|
};
|
|
121
125
|
let systemIos = await c.SystemIoReport({});
|
|
122
126
|
let result = (0, system_io_1.default)(systemIos.ios, [devIo], {
|
|
@@ -366,9 +370,7 @@ const system_io_1 = __importDefault(require("./system.io"));
|
|
|
366
370
|
obdOemElements: undefined,
|
|
367
371
|
bleSensorsIoElements: undefined,
|
|
368
372
|
canAdaptersElements: undefined,
|
|
369
|
-
alerts: [
|
|
370
|
-
0,
|
|
371
|
-
],
|
|
373
|
+
alerts: [0],
|
|
372
374
|
alertValues: {},
|
|
373
375
|
adas: undefined,
|
|
374
376
|
fms: undefined,
|
package/dist/system.io.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ShownIo, SystemIo } from "./fatehan/models/models";
|
|
2
2
|
import { Data } from "./fatehan/packets/dataModel";
|
|
3
|
-
declare const SystemIoCast: (systemIo: SystemIo[], deviceIo:
|
|
3
|
+
declare const SystemIoCast: (systemIo: SystemIo[], deviceIo: SystemIo[], data: Data) => ShownIo[];
|
|
4
4
|
export default SystemIoCast;
|
|
5
5
|
//# sourceMappingURL=system.io.d.ts.map
|
package/dist/system.io.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.io.d.ts","sourceRoot":"","sources":["../src/system.io.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"system.io.d.ts","sourceRoot":"","sources":["../src/system.io.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EAET,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAEnD,QAAA,MAAM,YAAY,GAChB,UAAU,QAAQ,EAAE,EACpB,UAAU,QAAQ,EAAE,EACpB,MAAM,IAAI,KACT,OAAO,EA6DT,CAAC;AAuBF,eAAe,YAAY,CAAC"}
|
package/dist/system.io.js
CHANGED
|
@@ -3,28 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const models_1 = require("./fatehan/models/models");
|
|
4
4
|
const SystemIoCast = (systemIo, deviceIo, data) => {
|
|
5
5
|
let list = [];
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
style =
|
|
11
|
-
value === "false"
|
|
12
|
-
? systemIo[i].inactiveStyle
|
|
13
|
-
: systemIo[i].activeStyle;
|
|
14
|
-
}
|
|
15
|
-
if (value != null) {
|
|
16
|
-
list.push({
|
|
17
|
-
value: value,
|
|
18
|
-
name: systemIo[i].name,
|
|
19
|
-
unit: systemIo[i].unit,
|
|
20
|
-
style: style,
|
|
21
|
-
description: systemIo[i].description,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
for (let i = 0; i < deviceIo.length; i++) {
|
|
26
|
-
let items = extractVariables(deviceIo[i].formula);
|
|
27
|
-
let formula = deviceIo[i].formula;
|
|
6
|
+
const tempSystemIo = [...systemIo, ...deviceIo].sort((a, b) => a.sord - b.sord);
|
|
7
|
+
tempSystemIo.forEach((io) => {
|
|
8
|
+
let items = extractVariables(io.formula);
|
|
9
|
+
let formula = io.formula;
|
|
28
10
|
let hasIos = true;
|
|
29
11
|
for (let i = 0; i < items.length; i++) {
|
|
30
12
|
const value = getNestedPropertyValue(data, items[i]);
|
|
@@ -34,23 +16,41 @@ const SystemIoCast = (systemIo, deviceIo, data) => {
|
|
|
34
16
|
}
|
|
35
17
|
formula = formula.replace(new RegExp("\\$" + items[i], "g"), value);
|
|
36
18
|
}
|
|
37
|
-
if (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
19
|
+
if (hasIos) {
|
|
20
|
+
const value = eval(formula);
|
|
21
|
+
let style = io.activeStyle;
|
|
22
|
+
if (io.type === models_1.SystemIo_SystemIoType.BOOLEAN) {
|
|
23
|
+
style =
|
|
24
|
+
value === "false" || value === false
|
|
25
|
+
? io.inactiveStyle
|
|
26
|
+
: io.activeStyle;
|
|
27
|
+
}
|
|
28
|
+
let newValue = value;
|
|
29
|
+
for (const key in io.unknown) {
|
|
30
|
+
if (value.toString().equals(key)) {
|
|
31
|
+
newValue = io.unknown[key];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
let hidden = false;
|
|
35
|
+
io.hidden.forEach((item) => {
|
|
36
|
+
if (newValue.toString().equals(item)) {
|
|
37
|
+
hidden = true;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
if (!hidden) {
|
|
41
|
+
list.push({
|
|
42
|
+
name: io.name,
|
|
43
|
+
style: style,
|
|
44
|
+
unit: io.unit,
|
|
45
|
+
description: io.description,
|
|
46
|
+
value: newValue,
|
|
47
|
+
active: io.active,
|
|
48
|
+
graphable: io.graphable,
|
|
49
|
+
sord: io.sord,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
45
52
|
}
|
|
46
|
-
|
|
47
|
-
value: value,
|
|
48
|
-
name: deviceIo[i].name,
|
|
49
|
-
unit: deviceIo[i].unit,
|
|
50
|
-
style: style,
|
|
51
|
-
description: deviceIo[i].description,
|
|
52
|
-
});
|
|
53
|
-
}
|
|
53
|
+
});
|
|
54
54
|
return list;
|
|
55
55
|
};
|
|
56
56
|
function extractVariables(str) {
|