@fatehan/tsrp 1.0.41 → 1.0.42
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 +16 -27
- package/dist/fatehan/models/models.d.ts.map +1 -1
- package/dist/fatehan/models/models.js +190 -358
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.test.js +12 -9
- 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,11 @@ 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
|
+
organizationId?: Long | undefined;
|
|
139
|
+
formula: string;
|
|
140
|
+
type: SystemIo_SystemIoType;
|
|
148
141
|
unit?: string | undefined;
|
|
149
142
|
description?: string | undefined;
|
|
150
143
|
activeStyle?: SystemIoStyle | undefined;
|
|
@@ -160,31 +153,28 @@ export interface SystemIo {
|
|
|
160
153
|
createdAt?: Date | undefined;
|
|
161
154
|
updatedAt?: Date | undefined;
|
|
162
155
|
}
|
|
156
|
+
export declare enum SystemIo_SystemIoType {
|
|
157
|
+
STRING = 0,
|
|
158
|
+
BOOLEAN = 1,
|
|
159
|
+
NUMERIC = 2,
|
|
160
|
+
FLOAT = 3,
|
|
161
|
+
UNRECOGNIZED = -1
|
|
162
|
+
}
|
|
163
|
+
export declare function systemIo_SystemIoTypeFromJSON(object: any): SystemIo_SystemIoType;
|
|
164
|
+
export declare function systemIo_SystemIoTypeToJSON(object: SystemIo_SystemIoType): string;
|
|
163
165
|
export interface SystemIo_UnknownEntry {
|
|
164
166
|
key: string;
|
|
165
167
|
value: string;
|
|
166
168
|
}
|
|
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
169
|
export interface ShownIo {
|
|
183
170
|
name: string;
|
|
184
171
|
style?: SystemIoStyle | undefined;
|
|
185
172
|
unit?: string | undefined;
|
|
186
173
|
description?: string | undefined;
|
|
187
174
|
value: string;
|
|
175
|
+
active: boolean;
|
|
176
|
+
graphable: boolean;
|
|
177
|
+
sord: number;
|
|
188
178
|
}
|
|
189
179
|
export interface Config {
|
|
190
180
|
id: number;
|
|
@@ -209,7 +199,6 @@ export declare const TrialLog: MessageFns<TrialLog>;
|
|
|
209
199
|
export declare const SystemIoStyle: MessageFns<SystemIoStyle>;
|
|
210
200
|
export declare const SystemIo: MessageFns<SystemIo>;
|
|
211
201
|
export declare const SystemIo_UnknownEntry: MessageFns<SystemIo_UnknownEntry>;
|
|
212
|
-
export declare const DeviceIo: MessageFns<DeviceIo>;
|
|
213
202
|
export declare const ShownIo: MessageFns<ShownIo>;
|
|
214
203
|
export declare const Config: MessageFns<Config>;
|
|
215
204
|
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,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AAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
|
|
@@ -8,60 +8,17 @@ 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,10 @@ 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
|
+
organizationId: undefined,
|
|
2095
|
+
formula: "",
|
|
2094
2096
|
type: 0,
|
|
2095
2097
|
unit: undefined,
|
|
2096
2098
|
description: undefined,
|
|
@@ -2111,50 +2113,56 @@ exports.SystemIo = {
|
|
|
2111
2113
|
if (!message.id.equals(long_1.default.UZERO)) {
|
|
2112
2114
|
writer.uint32(8).uint64(message.id.toString());
|
|
2113
2115
|
}
|
|
2114
|
-
if (message.key !== "") {
|
|
2115
|
-
writer.uint32(18).string(message.key);
|
|
2116
|
-
}
|
|
2117
2116
|
if (message.name !== "") {
|
|
2118
|
-
writer.uint32(
|
|
2117
|
+
writer.uint32(18).string(message.name);
|
|
2118
|
+
}
|
|
2119
|
+
if (message.deviceId !== undefined) {
|
|
2120
|
+
writer.uint32(24).uint64(message.deviceId.toString());
|
|
2121
|
+
}
|
|
2122
|
+
if (message.organizationId !== undefined) {
|
|
2123
|
+
writer.uint32(32).uint64(message.organizationId.toString());
|
|
2124
|
+
}
|
|
2125
|
+
if (message.formula !== "") {
|
|
2126
|
+
writer.uint32(42).string(message.formula);
|
|
2119
2127
|
}
|
|
2120
2128
|
if (message.type !== 0) {
|
|
2121
|
-
writer.uint32(
|
|
2129
|
+
writer.uint32(48).int32(message.type);
|
|
2122
2130
|
}
|
|
2123
2131
|
if (message.unit !== undefined) {
|
|
2124
|
-
writer.uint32(
|
|
2132
|
+
writer.uint32(58).string(message.unit);
|
|
2125
2133
|
}
|
|
2126
2134
|
if (message.description !== undefined) {
|
|
2127
|
-
writer.uint32(
|
|
2135
|
+
writer.uint32(66).string(message.description);
|
|
2128
2136
|
}
|
|
2129
2137
|
if (message.activeStyle !== undefined) {
|
|
2130
|
-
exports.SystemIoStyle.encode(message.activeStyle, writer.uint32(
|
|
2138
|
+
exports.SystemIoStyle.encode(message.activeStyle, writer.uint32(74).fork()).join();
|
|
2131
2139
|
}
|
|
2132
2140
|
if (message.inactiveStyle !== undefined) {
|
|
2133
|
-
exports.SystemIoStyle.encode(message.inactiveStyle, writer.uint32(
|
|
2141
|
+
exports.SystemIoStyle.encode(message.inactiveStyle, writer.uint32(82).fork()).join();
|
|
2134
2142
|
}
|
|
2135
2143
|
if (message.active !== false) {
|
|
2136
|
-
writer.uint32(
|
|
2144
|
+
writer.uint32(88).bool(message.active);
|
|
2137
2145
|
}
|
|
2138
2146
|
if (message.graphable !== false) {
|
|
2139
|
-
writer.uint32(
|
|
2147
|
+
writer.uint32(96).bool(message.graphable);
|
|
2140
2148
|
}
|
|
2141
2149
|
if (message.sord !== 0) {
|
|
2142
|
-
writer.uint32(
|
|
2150
|
+
writer.uint32(104).uint32(message.sord);
|
|
2143
2151
|
}
|
|
2144
2152
|
for (const v of message.hidden) {
|
|
2145
|
-
writer.uint32(
|
|
2153
|
+
writer.uint32(114).string(v);
|
|
2146
2154
|
}
|
|
2147
2155
|
Object.entries(message.unknown).forEach(([key, value]) => {
|
|
2148
|
-
exports.SystemIo_UnknownEntry.encode({ key: key, value }, writer.uint32(
|
|
2156
|
+
exports.SystemIo_UnknownEntry.encode({ key: key, value }, writer.uint32(122).fork()).join();
|
|
2149
2157
|
});
|
|
2150
2158
|
if (message.createdBy !== undefined) {
|
|
2151
|
-
writer.uint32(
|
|
2159
|
+
writer.uint32(128).uint64(message.createdBy.toString());
|
|
2152
2160
|
}
|
|
2153
2161
|
if (message.createdAt !== undefined) {
|
|
2154
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(
|
|
2162
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(138).fork()).join();
|
|
2155
2163
|
}
|
|
2156
2164
|
if (message.updatedAt !== undefined) {
|
|
2157
|
-
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(
|
|
2165
|
+
timestamp_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(146).fork()).join();
|
|
2158
2166
|
}
|
|
2159
2167
|
return writer;
|
|
2160
2168
|
},
|
|
@@ -2176,107 +2184,121 @@ exports.SystemIo = {
|
|
|
2176
2184
|
if (tag !== 18) {
|
|
2177
2185
|
break;
|
|
2178
2186
|
}
|
|
2179
|
-
message.key = reader.string();
|
|
2180
|
-
continue;
|
|
2181
|
-
}
|
|
2182
|
-
case 3: {
|
|
2183
|
-
if (tag !== 26) {
|
|
2184
|
-
break;
|
|
2185
|
-
}
|
|
2186
2187
|
message.name = reader.string();
|
|
2187
2188
|
continue;
|
|
2188
2189
|
}
|
|
2189
|
-
case
|
|
2190
|
-
if (tag !==
|
|
2190
|
+
case 3: {
|
|
2191
|
+
if (tag !== 24) {
|
|
2191
2192
|
break;
|
|
2192
2193
|
}
|
|
2193
|
-
message.
|
|
2194
|
+
message.deviceId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2194
2195
|
continue;
|
|
2195
2196
|
}
|
|
2196
2197
|
case 4: {
|
|
2197
|
-
if (tag !==
|
|
2198
|
+
if (tag !== 32) {
|
|
2198
2199
|
break;
|
|
2199
2200
|
}
|
|
2200
|
-
message.
|
|
2201
|
+
message.organizationId = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2201
2202
|
continue;
|
|
2202
2203
|
}
|
|
2203
2204
|
case 5: {
|
|
2204
2205
|
if (tag !== 42) {
|
|
2205
2206
|
break;
|
|
2206
2207
|
}
|
|
2207
|
-
message.
|
|
2208
|
+
message.formula = reader.string();
|
|
2208
2209
|
continue;
|
|
2209
2210
|
}
|
|
2210
2211
|
case 6: {
|
|
2211
|
-
if (tag !==
|
|
2212
|
+
if (tag !== 48) {
|
|
2212
2213
|
break;
|
|
2213
2214
|
}
|
|
2214
|
-
message.
|
|
2215
|
+
message.type = reader.int32();
|
|
2215
2216
|
continue;
|
|
2216
2217
|
}
|
|
2217
2218
|
case 7: {
|
|
2218
2219
|
if (tag !== 58) {
|
|
2219
2220
|
break;
|
|
2220
2221
|
}
|
|
2221
|
-
message.
|
|
2222
|
+
message.unit = reader.string();
|
|
2222
2223
|
continue;
|
|
2223
2224
|
}
|
|
2224
2225
|
case 8: {
|
|
2225
|
-
if (tag !==
|
|
2226
|
+
if (tag !== 66) {
|
|
2226
2227
|
break;
|
|
2227
2228
|
}
|
|
2228
|
-
message.
|
|
2229
|
+
message.description = reader.string();
|
|
2229
2230
|
continue;
|
|
2230
2231
|
}
|
|
2231
2232
|
case 9: {
|
|
2232
|
-
if (tag !==
|
|
2233
|
+
if (tag !== 74) {
|
|
2233
2234
|
break;
|
|
2234
2235
|
}
|
|
2235
|
-
message.
|
|
2236
|
+
message.activeStyle = exports.SystemIoStyle.decode(reader, reader.uint32());
|
|
2236
2237
|
continue;
|
|
2237
2238
|
}
|
|
2238
2239
|
case 10: {
|
|
2239
|
-
if (tag !==
|
|
2240
|
+
if (tag !== 82) {
|
|
2240
2241
|
break;
|
|
2241
2242
|
}
|
|
2242
|
-
message.
|
|
2243
|
+
message.inactiveStyle = exports.SystemIoStyle.decode(reader, reader.uint32());
|
|
2243
2244
|
continue;
|
|
2244
2245
|
}
|
|
2245
2246
|
case 11: {
|
|
2246
|
-
if (tag !==
|
|
2247
|
+
if (tag !== 88) {
|
|
2247
2248
|
break;
|
|
2248
2249
|
}
|
|
2249
|
-
message.
|
|
2250
|
+
message.active = reader.bool();
|
|
2250
2251
|
continue;
|
|
2251
2252
|
}
|
|
2252
2253
|
case 12: {
|
|
2253
|
-
if (tag !==
|
|
2254
|
+
if (tag !== 96) {
|
|
2254
2255
|
break;
|
|
2255
2256
|
}
|
|
2256
|
-
|
|
2257
|
-
if (entry12.value !== undefined) {
|
|
2258
|
-
message.unknown[entry12.key] = entry12.value;
|
|
2259
|
-
}
|
|
2257
|
+
message.graphable = reader.bool();
|
|
2260
2258
|
continue;
|
|
2261
2259
|
}
|
|
2262
2260
|
case 13: {
|
|
2263
2261
|
if (tag !== 104) {
|
|
2264
2262
|
break;
|
|
2265
2263
|
}
|
|
2266
|
-
message.
|
|
2264
|
+
message.sord = reader.uint32();
|
|
2267
2265
|
continue;
|
|
2268
2266
|
}
|
|
2269
2267
|
case 14: {
|
|
2270
2268
|
if (tag !== 114) {
|
|
2271
2269
|
break;
|
|
2272
2270
|
}
|
|
2273
|
-
message.
|
|
2271
|
+
message.hidden.push(reader.string());
|
|
2274
2272
|
continue;
|
|
2275
2273
|
}
|
|
2276
2274
|
case 15: {
|
|
2277
2275
|
if (tag !== 122) {
|
|
2278
2276
|
break;
|
|
2279
2277
|
}
|
|
2278
|
+
const entry15 = exports.SystemIo_UnknownEntry.decode(reader, reader.uint32());
|
|
2279
|
+
if (entry15.value !== undefined) {
|
|
2280
|
+
message.unknown[entry15.key] = entry15.value;
|
|
2281
|
+
}
|
|
2282
|
+
continue;
|
|
2283
|
+
}
|
|
2284
|
+
case 16: {
|
|
2285
|
+
if (tag !== 128) {
|
|
2286
|
+
break;
|
|
2287
|
+
}
|
|
2288
|
+
message.createdBy = long_1.default.fromString(reader.uint64().toString(), true);
|
|
2289
|
+
continue;
|
|
2290
|
+
}
|
|
2291
|
+
case 17: {
|
|
2292
|
+
if (tag !== 138) {
|
|
2293
|
+
break;
|
|
2294
|
+
}
|
|
2295
|
+
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2296
|
+
continue;
|
|
2297
|
+
}
|
|
2298
|
+
case 18: {
|
|
2299
|
+
if (tag !== 146) {
|
|
2300
|
+
break;
|
|
2301
|
+
}
|
|
2280
2302
|
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
2281
2303
|
continue;
|
|
2282
2304
|
}
|
|
@@ -2291,9 +2313,11 @@ exports.SystemIo = {
|
|
|
2291
2313
|
fromJSON(object) {
|
|
2292
2314
|
return {
|
|
2293
2315
|
id: isSet(object.id) ? long_1.default.fromValue(object.id) : long_1.default.UZERO,
|
|
2294
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2295
2316
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
2296
|
-
|
|
2317
|
+
deviceId: isSet(object.device_id) ? long_1.default.fromValue(object.device_id) : undefined,
|
|
2318
|
+
organizationId: isSet(object.organization_id) ? long_1.default.fromValue(object.organization_id) : undefined,
|
|
2319
|
+
formula: isSet(object.formula) ? globalThis.String(object.formula) : "",
|
|
2320
|
+
type: isSet(object.type) ? systemIo_SystemIoTypeFromJSON(object.type) : 0,
|
|
2297
2321
|
unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
|
|
2298
2322
|
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
2299
2323
|
activeStyle: isSet(object.active_style) ? exports.SystemIoStyle.fromJSON(object.active_style) : undefined,
|
|
@@ -2319,14 +2343,20 @@ exports.SystemIo = {
|
|
|
2319
2343
|
if (!message.id.equals(long_1.default.UZERO)) {
|
|
2320
2344
|
obj.id = (message.id || long_1.default.UZERO).toString();
|
|
2321
2345
|
}
|
|
2322
|
-
if (message.key !== "") {
|
|
2323
|
-
obj.key = message.key;
|
|
2324
|
-
}
|
|
2325
2346
|
if (message.name !== "") {
|
|
2326
2347
|
obj.name = message.name;
|
|
2327
2348
|
}
|
|
2349
|
+
if (message.deviceId !== undefined) {
|
|
2350
|
+
obj.device_id = (message.deviceId || long_1.default.UZERO).toString();
|
|
2351
|
+
}
|
|
2352
|
+
if (message.organizationId !== undefined) {
|
|
2353
|
+
obj.organization_id = (message.organizationId || long_1.default.UZERO).toString();
|
|
2354
|
+
}
|
|
2355
|
+
if (message.formula !== "") {
|
|
2356
|
+
obj.formula = message.formula;
|
|
2357
|
+
}
|
|
2328
2358
|
if (message.type !== 0) {
|
|
2329
|
-
obj.type =
|
|
2359
|
+
obj.type = systemIo_SystemIoTypeToJSON(message.type);
|
|
2330
2360
|
}
|
|
2331
2361
|
if (message.unit !== undefined) {
|
|
2332
2362
|
obj.unit = message.unit;
|
|
@@ -2379,8 +2409,14 @@ exports.SystemIo = {
|
|
|
2379
2409
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
2380
2410
|
const message = createBaseSystemIo();
|
|
2381
2411
|
message.id = (object.id !== undefined && object.id !== null) ? long_1.default.fromValue(object.id) : long_1.default.UZERO;
|
|
2382
|
-
message.
|
|
2383
|
-
message.
|
|
2412
|
+
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
2413
|
+
message.deviceId = (object.deviceId !== undefined && object.deviceId !== null)
|
|
2414
|
+
? long_1.default.fromValue(object.deviceId)
|
|
2415
|
+
: undefined;
|
|
2416
|
+
message.organizationId = (object.organizationId !== undefined && object.organizationId !== null)
|
|
2417
|
+
? long_1.default.fromValue(object.organizationId)
|
|
2418
|
+
: undefined;
|
|
2419
|
+
message.formula = (_b = object.formula) !== null && _b !== void 0 ? _b : "";
|
|
2384
2420
|
message.type = (_c = object.type) !== null && _c !== void 0 ? _c : 0;
|
|
2385
2421
|
message.unit = (_d = object.unit) !== null && _d !== void 0 ? _d : undefined;
|
|
2386
2422
|
message.description = (_e = object.description) !== null && _e !== void 0 ? _e : undefined;
|
|
@@ -2477,326 +2513,107 @@ exports.SystemIo_UnknownEntry = {
|
|
|
2477
2513
|
return message;
|
|
2478
2514
|
},
|
|
2479
2515
|
};
|
|
2480
|
-
function
|
|
2516
|
+
function createBaseShownIo() {
|
|
2481
2517
|
return {
|
|
2482
|
-
id: long_1.default.UZERO,
|
|
2483
|
-
deviceId: long_1.default.UZERO,
|
|
2484
|
-
organizationId: long_1.default.UZERO,
|
|
2485
2518
|
name: "",
|
|
2519
|
+
style: undefined,
|
|
2486
2520
|
unit: undefined,
|
|
2487
|
-
type: 0,
|
|
2488
2521
|
description: undefined,
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
createdAt: undefined,
|
|
2494
|
-
updatedAt: undefined,
|
|
2522
|
+
value: "",
|
|
2523
|
+
active: false,
|
|
2524
|
+
graphable: false,
|
|
2525
|
+
sord: 0,
|
|
2495
2526
|
};
|
|
2496
2527
|
}
|
|
2497
|
-
exports.
|
|
2528
|
+
exports.ShownIo = {
|
|
2498
2529
|
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
2530
|
if (message.name !== "") {
|
|
2509
|
-
writer.uint32(
|
|
2531
|
+
writer.uint32(10).string(message.name);
|
|
2510
2532
|
}
|
|
2511
|
-
if (message.
|
|
2512
|
-
writer.uint32(
|
|
2533
|
+
if (message.style !== undefined) {
|
|
2534
|
+
exports.SystemIoStyle.encode(message.style, writer.uint32(18).fork()).join();
|
|
2513
2535
|
}
|
|
2514
|
-
if (message.
|
|
2515
|
-
writer.uint32(
|
|
2536
|
+
if (message.unit !== undefined) {
|
|
2537
|
+
writer.uint32(26).string(message.unit);
|
|
2516
2538
|
}
|
|
2517
2539
|
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();
|
|
2540
|
+
writer.uint32(34).string(message.description);
|
|
2525
2541
|
}
|
|
2526
|
-
if (message.
|
|
2527
|
-
|
|
2542
|
+
if (message.value !== "") {
|
|
2543
|
+
writer.uint32(42).string(message.value);
|
|
2528
2544
|
}
|
|
2529
|
-
if (message.
|
|
2530
|
-
writer.uint32(
|
|
2545
|
+
if (message.active !== false) {
|
|
2546
|
+
writer.uint32(48).bool(message.active);
|
|
2531
2547
|
}
|
|
2532
|
-
if (message.
|
|
2533
|
-
|
|
2548
|
+
if (message.graphable !== false) {
|
|
2549
|
+
writer.uint32(56).bool(message.graphable);
|
|
2534
2550
|
}
|
|
2535
|
-
if (message.
|
|
2536
|
-
|
|
2551
|
+
if (message.sord !== 0) {
|
|
2552
|
+
writer.uint32(64).uint32(message.sord);
|
|
2537
2553
|
}
|
|
2538
2554
|
return writer;
|
|
2539
2555
|
},
|
|
2540
2556
|
decode(input, length) {
|
|
2541
2557
|
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
2542
2558
|
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2543
|
-
const message =
|
|
2559
|
+
const message = createBaseShownIo();
|
|
2544
2560
|
while (reader.pos < end) {
|
|
2545
2561
|
const tag = reader.uint32();
|
|
2546
2562
|
switch (tag >>> 3) {
|
|
2547
2563
|
case 1: {
|
|
2548
|
-
if (tag !==
|
|
2564
|
+
if (tag !== 10) {
|
|
2549
2565
|
break;
|
|
2550
2566
|
}
|
|
2551
|
-
message.
|
|
2567
|
+
message.name = reader.string();
|
|
2552
2568
|
continue;
|
|
2553
2569
|
}
|
|
2554
2570
|
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) {
|
|
2571
|
+
if (tag !== 18) {
|
|
2563
2572
|
break;
|
|
2564
2573
|
}
|
|
2565
|
-
message.
|
|
2574
|
+
message.style = exports.SystemIoStyle.decode(reader, reader.uint32());
|
|
2566
2575
|
continue;
|
|
2567
2576
|
}
|
|
2568
2577
|
case 3: {
|
|
2569
2578
|
if (tag !== 26) {
|
|
2570
2579
|
break;
|
|
2571
2580
|
}
|
|
2572
|
-
message.
|
|
2581
|
+
message.unit = reader.string();
|
|
2573
2582
|
continue;
|
|
2574
2583
|
}
|
|
2575
2584
|
case 4: {
|
|
2576
2585
|
if (tag !== 34) {
|
|
2577
2586
|
break;
|
|
2578
2587
|
}
|
|
2579
|
-
message.
|
|
2588
|
+
message.description = reader.string();
|
|
2580
2589
|
continue;
|
|
2581
2590
|
}
|
|
2582
2591
|
case 5: {
|
|
2583
|
-
if (tag !==
|
|
2592
|
+
if (tag !== 42) {
|
|
2584
2593
|
break;
|
|
2585
2594
|
}
|
|
2586
|
-
message.
|
|
2595
|
+
message.value = reader.string();
|
|
2587
2596
|
continue;
|
|
2588
2597
|
}
|
|
2589
2598
|
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) {
|
|
2599
|
+
if (tag !== 48) {
|
|
2612
2600
|
break;
|
|
2613
2601
|
}
|
|
2614
|
-
message.
|
|
2602
|
+
message.active = reader.bool();
|
|
2615
2603
|
continue;
|
|
2616
2604
|
}
|
|
2617
2605
|
case 7: {
|
|
2618
2606
|
if (tag !== 56) {
|
|
2619
2607
|
break;
|
|
2620
2608
|
}
|
|
2621
|
-
message.
|
|
2609
|
+
message.graphable = reader.bool();
|
|
2622
2610
|
continue;
|
|
2623
2611
|
}
|
|
2624
2612
|
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) {
|
|
2613
|
+
if (tag !== 64) {
|
|
2797
2614
|
break;
|
|
2798
2615
|
}
|
|
2799
|
-
message.
|
|
2616
|
+
message.sord = reader.uint32();
|
|
2800
2617
|
continue;
|
|
2801
2618
|
}
|
|
2802
2619
|
}
|
|
@@ -2814,6 +2631,9 @@ exports.ShownIo = {
|
|
|
2814
2631
|
unit: isSet(object.unit) ? globalThis.String(object.unit) : undefined,
|
|
2815
2632
|
description: isSet(object.description) ? globalThis.String(object.description) : undefined,
|
|
2816
2633
|
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
2634
|
+
active: isSet(object.active) ? globalThis.Boolean(object.active) : false,
|
|
2635
|
+
graphable: isSet(object.graphable) ? globalThis.Boolean(object.graphable) : false,
|
|
2636
|
+
sord: isSet(object.sord) ? globalThis.Number(object.sord) : 0,
|
|
2817
2637
|
};
|
|
2818
2638
|
},
|
|
2819
2639
|
toJSON(message) {
|
|
@@ -2833,13 +2653,22 @@ exports.ShownIo = {
|
|
|
2833
2653
|
if (message.value !== "") {
|
|
2834
2654
|
obj.value = message.value;
|
|
2835
2655
|
}
|
|
2656
|
+
if (message.active !== false) {
|
|
2657
|
+
obj.active = message.active;
|
|
2658
|
+
}
|
|
2659
|
+
if (message.graphable !== false) {
|
|
2660
|
+
obj.graphable = message.graphable;
|
|
2661
|
+
}
|
|
2662
|
+
if (message.sord !== 0) {
|
|
2663
|
+
obj.sord = Math.round(message.sord);
|
|
2664
|
+
}
|
|
2836
2665
|
return obj;
|
|
2837
2666
|
},
|
|
2838
2667
|
create(base) {
|
|
2839
2668
|
return exports.ShownIo.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2840
2669
|
},
|
|
2841
2670
|
fromPartial(object) {
|
|
2842
|
-
var _a, _b, _c, _d;
|
|
2671
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2843
2672
|
const message = createBaseShownIo();
|
|
2844
2673
|
message.name = (_a = object.name) !== null && _a !== void 0 ? _a : "";
|
|
2845
2674
|
message.style = (object.style !== undefined && object.style !== null)
|
|
@@ -2848,6 +2677,9 @@ exports.ShownIo = {
|
|
|
2848
2677
|
message.unit = (_b = object.unit) !== null && _b !== void 0 ? _b : undefined;
|
|
2849
2678
|
message.description = (_c = object.description) !== null && _c !== void 0 ? _c : undefined;
|
|
2850
2679
|
message.value = (_d = object.value) !== null && _d !== void 0 ? _d : "";
|
|
2680
|
+
message.active = (_e = object.active) !== null && _e !== void 0 ? _e : false;
|
|
2681
|
+
message.graphable = (_f = object.graphable) !== null && _f !== void 0 ? _f : false;
|
|
2682
|
+
message.sord = (_g = object.sord) !== null && _g !== void 0 ? _g : 0;
|
|
2851
2683
|
return message;
|
|
2852
2684
|
},
|
|
2853
2685
|
};
|
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,2BAA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CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyBnE,iBAAiB,CACtB,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,mBAAmB,CAAC;IAyBxB,mBAAmB,CACxB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,2BAA2B,CAAC;IAyBhC,SAAS,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC;IAuBpD,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAyBnE,uBAAuB,CAC5B,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,yBAAyB,CAAC;IAwB9B,eAAe,CACpB,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC;IAwBtB,oBAAoB,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAmB/E,WAAW,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI;IAiClF,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,25 @@ 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
118
|
organizationId: long_1.default.fromNumber(7744),
|
|
119
119
|
id: long_1.default.fromNumber(1),
|
|
120
|
+
active: true,
|
|
121
|
+
graphable: true,
|
|
122
|
+
sord: 1,
|
|
123
|
+
hidden: [],
|
|
124
|
+
unknown: {}
|
|
120
125
|
};
|
|
121
126
|
let systemIos = await c.SystemIoReport({});
|
|
122
127
|
let result = (0, system_io_1.default)(systemIos.ios, [devIo], {
|
|
@@ -366,9 +371,7 @@ const system_io_1 = __importDefault(require("./system.io"));
|
|
|
366
371
|
obdOemElements: undefined,
|
|
367
372
|
bleSensorsIoElements: undefined,
|
|
368
373
|
canAdaptersElements: undefined,
|
|
369
|
-
alerts: [
|
|
370
|
-
0,
|
|
371
|
-
],
|
|
374
|
+
alerts: [0],
|
|
372
375
|
alertValues: {},
|
|
373
376
|
adas: undefined,
|
|
374
377
|
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) {
|