fossekall-interface 0.1.128 → 0.1.131
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/generated/ecu/commands.d.ts +46 -59
- package/dist/generated/ecu/commands.js +38 -44
- package/dist/generated/ecu/commands.json +27 -33
- package/dist/generated/ecu/telemetry.d.ts +77 -161
- package/dist/generated/ecu/telemetry.js +49 -90
- package/dist/generated/ecu/telemetry.json +50 -138
- package/dist/generated/fs/commands.d.ts +221 -0
- package/dist/generated/fs/commands.js +189 -0
- package/dist/generated/fs/commands.json +212 -0
- package/dist/generated/fs/index.d.ts +4 -0
- package/dist/generated/fs/index.js +4 -0
- package/dist/generated/fs/telemetry.d.ts +361 -0
- package/dist/generated/fs/telemetry.js +250 -0
- package/dist/generated/fs/telemetry.json +383 -0
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import bin, { MaxValue, Schema, type IMeasurer, type ISerialInput, type ISerialOutput } from 'typed-binary';
|
|
2
|
+
declare class UInt64Schema extends Schema<bigint> {
|
|
3
|
+
readonly maxSize = 8;
|
|
4
|
+
read(input: ISerialInput): bigint;
|
|
5
|
+
write(output: ISerialOutput, value: bigint): void;
|
|
6
|
+
measure(_: bigint | typeof MaxValue, measurer?: IMeasurer): IMeasurer;
|
|
7
|
+
}
|
|
8
|
+
export declare const StateId: {
|
|
9
|
+
readonly Safe: 0;
|
|
10
|
+
readonly RecoveryFill: 1;
|
|
11
|
+
readonly PostRecoveryFill: 2;
|
|
12
|
+
readonly N2Fill: 3;
|
|
13
|
+
readonly PostN2Fill: 4;
|
|
14
|
+
readonly OxFill: 5;
|
|
15
|
+
readonly PostOxFill: 6;
|
|
16
|
+
readonly QDDisconnect: 7;
|
|
17
|
+
readonly Hold: 8;
|
|
18
|
+
};
|
|
19
|
+
export type StateId = (typeof StateId)[keyof typeof StateId];
|
|
20
|
+
export declare const Event: {
|
|
21
|
+
readonly Boot: 0;
|
|
22
|
+
readonly NextState: 1;
|
|
23
|
+
readonly PreviousState: 2;
|
|
24
|
+
readonly Timeout: 3;
|
|
25
|
+
readonly Abort: 4;
|
|
26
|
+
readonly None: 5;
|
|
27
|
+
readonly Count: 6;
|
|
28
|
+
};
|
|
29
|
+
export type Event = (typeof Event)[keyof typeof Event];
|
|
30
|
+
export declare const fsm_AbortReason: {
|
|
31
|
+
readonly None: 0;
|
|
32
|
+
readonly Manual: 1;
|
|
33
|
+
};
|
|
34
|
+
export type fsm_AbortReason = (typeof fsm_AbortReason)[keyof typeof fsm_AbortReason];
|
|
35
|
+
export declare const sensors_pressure_Id: {
|
|
36
|
+
readonly OxSupply: 0;
|
|
37
|
+
readonly N2_200: 1;
|
|
38
|
+
readonly N2_300: 2;
|
|
39
|
+
readonly Count: 3;
|
|
40
|
+
};
|
|
41
|
+
export type sensors_pressure_Id = (typeof sensors_pressure_Id)[keyof typeof sensors_pressure_Id];
|
|
42
|
+
export declare const actuators_servo_Id: {
|
|
43
|
+
readonly OxSupply: 0;
|
|
44
|
+
readonly Count: 1;
|
|
45
|
+
};
|
|
46
|
+
export type actuators_servo_Id = (typeof actuators_servo_Id)[keyof typeof actuators_servo_Id];
|
|
47
|
+
export declare const actuators_servo_PowerState: {
|
|
48
|
+
readonly Unknown: 0;
|
|
49
|
+
readonly Off: 1;
|
|
50
|
+
readonly Booting: 2;
|
|
51
|
+
readonly On: 3;
|
|
52
|
+
};
|
|
53
|
+
export type actuators_servo_PowerState = (typeof actuators_servo_PowerState)[keyof typeof actuators_servo_PowerState];
|
|
54
|
+
export declare const actuators_solenoid_Id: {
|
|
55
|
+
readonly OxBleed: 0;
|
|
56
|
+
readonly N2_200_Supply: 1;
|
|
57
|
+
readonly N2_200_Bleed: 2;
|
|
58
|
+
readonly N2_300_Supply: 3;
|
|
59
|
+
readonly N2_300_Bleed: 4;
|
|
60
|
+
readonly QD_1: 5;
|
|
61
|
+
readonly QD_2: 6;
|
|
62
|
+
readonly Count: 7;
|
|
63
|
+
};
|
|
64
|
+
export type actuators_solenoid_Id = (typeof actuators_solenoid_Id)[keyof typeof actuators_solenoid_Id];
|
|
65
|
+
export declare const actuators_solenoid_PowerState: {
|
|
66
|
+
readonly Unknown: 0;
|
|
67
|
+
readonly Off: 1;
|
|
68
|
+
readonly On: 2;
|
|
69
|
+
};
|
|
70
|
+
export type actuators_solenoid_PowerState = (typeof actuators_solenoid_PowerState)[keyof typeof actuators_solenoid_PowerState];
|
|
71
|
+
export declare const actuators_solenoid_Opening: {
|
|
72
|
+
readonly Unknown: 0;
|
|
73
|
+
readonly Closed: 1;
|
|
74
|
+
readonly Open: 2;
|
|
75
|
+
};
|
|
76
|
+
export type actuators_solenoid_Opening = (typeof actuators_solenoid_Opening)[keyof typeof actuators_solenoid_Opening];
|
|
77
|
+
export declare const sensors_load_cell_Id: {
|
|
78
|
+
readonly LoadCell0: 0;
|
|
79
|
+
readonly LoadCell1: 1;
|
|
80
|
+
readonly LoadCell2: 2;
|
|
81
|
+
readonly Count: 3;
|
|
82
|
+
};
|
|
83
|
+
export type sensors_load_cell_Id = (typeof sensors_load_cell_Id)[keyof typeof sensors_load_cell_Id];
|
|
84
|
+
export declare const HeartBeatTelemetry: import("typed-binary").ObjectSchema<{
|
|
85
|
+
message: import("typed-binary").ArraySchema<import("typed-binary").Int8Schema>;
|
|
86
|
+
status_flags: import("typed-binary").ByteSchema;
|
|
87
|
+
}>;
|
|
88
|
+
export type HeartBeatTelemetry = bin.Parsed<typeof HeartBeatTelemetry>;
|
|
89
|
+
export declare const fsm_FsmStatus: import("typed-binary").ObjectSchema<{
|
|
90
|
+
state_entry_time_ms: UInt64Schema;
|
|
91
|
+
state_time_ms: UInt64Schema;
|
|
92
|
+
current_state: import("typed-binary").ByteSchema;
|
|
93
|
+
previous_state: import("typed-binary").ByteSchema;
|
|
94
|
+
last_event: import("typed-binary").ByteSchema;
|
|
95
|
+
last_abort_reason: import("typed-binary").ByteSchema;
|
|
96
|
+
}>;
|
|
97
|
+
export type fsm_FsmStatus = bin.Parsed<typeof fsm_FsmStatus>;
|
|
98
|
+
export declare const FsmStatusPacket: import("typed-binary").ObjectSchema<{
|
|
99
|
+
status: import("typed-binary").ObjectSchema<{
|
|
100
|
+
state_entry_time_ms: UInt64Schema;
|
|
101
|
+
state_time_ms: UInt64Schema;
|
|
102
|
+
current_state: import("typed-binary").ByteSchema;
|
|
103
|
+
previous_state: import("typed-binary").ByteSchema;
|
|
104
|
+
last_event: import("typed-binary").ByteSchema;
|
|
105
|
+
last_abort_reason: import("typed-binary").ByteSchema;
|
|
106
|
+
}>;
|
|
107
|
+
timestamp_ms: import("typed-binary").Uint32Schema;
|
|
108
|
+
}>;
|
|
109
|
+
export type FsmStatusPacket = bin.Parsed<typeof FsmStatusPacket>;
|
|
110
|
+
export declare const sensors_pressure_PressureBatch: import("typed-binary").ObjectSchema<{
|
|
111
|
+
t0_us: UInt64Schema;
|
|
112
|
+
dt_us: import("typed-binary").Uint32Schema;
|
|
113
|
+
count: import("typed-binary").ByteSchema;
|
|
114
|
+
seq: import("typed-binary").ByteSchema;
|
|
115
|
+
samples: import("typed-binary").ArraySchema<import("typed-binary").Int16Schema>;
|
|
116
|
+
}>;
|
|
117
|
+
export type sensors_pressure_PressureBatch = bin.Parsed<typeof sensors_pressure_PressureBatch>;
|
|
118
|
+
export declare const PressureSensorPacket: import("typed-binary").ObjectSchema<{
|
|
119
|
+
sensor_id: import("typed-binary").ByteSchema;
|
|
120
|
+
pressure_batch: import("typed-binary").ObjectSchema<{
|
|
121
|
+
t0_us: UInt64Schema;
|
|
122
|
+
dt_us: import("typed-binary").Uint32Schema;
|
|
123
|
+
count: import("typed-binary").ByteSchema;
|
|
124
|
+
seq: import("typed-binary").ByteSchema;
|
|
125
|
+
samples: import("typed-binary").ArraySchema<import("typed-binary").Int16Schema>;
|
|
126
|
+
}>;
|
|
127
|
+
}>;
|
|
128
|
+
export type PressureSensorPacket = bin.Parsed<typeof PressureSensorPacket>;
|
|
129
|
+
export declare const actuators_servo_ServoStatus: import("typed-binary").ObjectSchema<{
|
|
130
|
+
commanded_angle_deg: import("typed-binary").Float32Schema;
|
|
131
|
+
target_angle_deg: import("typed-binary").Float32Schema;
|
|
132
|
+
measured_angle_deg: import("typed-binary").Float32Schema;
|
|
133
|
+
current_ma: import("typed-binary").Float32Schema;
|
|
134
|
+
power_state: import("typed-binary").ByteSchema;
|
|
135
|
+
}>;
|
|
136
|
+
export type actuators_servo_ServoStatus = bin.Parsed<typeof actuators_servo_ServoStatus>;
|
|
137
|
+
export declare const ServoStatusPacket: import("typed-binary").ObjectSchema<{
|
|
138
|
+
servo_id: import("typed-binary").ByteSchema;
|
|
139
|
+
timestamp_ms: import("typed-binary").Uint32Schema;
|
|
140
|
+
status: import("typed-binary").ObjectSchema<{
|
|
141
|
+
commanded_angle_deg: import("typed-binary").Float32Schema;
|
|
142
|
+
target_angle_deg: import("typed-binary").Float32Schema;
|
|
143
|
+
measured_angle_deg: import("typed-binary").Float32Schema;
|
|
144
|
+
current_ma: import("typed-binary").Float32Schema;
|
|
145
|
+
power_state: import("typed-binary").ByteSchema;
|
|
146
|
+
}>;
|
|
147
|
+
}>;
|
|
148
|
+
export type ServoStatusPacket = bin.Parsed<typeof ServoStatusPacket>;
|
|
149
|
+
export declare const actuators_solenoid_SolenoidStatus: import("typed-binary").ObjectSchema<{
|
|
150
|
+
power_state: import("typed-binary").ByteSchema;
|
|
151
|
+
opening: import("typed-binary").ByteSchema;
|
|
152
|
+
current_ma: import("typed-binary").Float32Schema;
|
|
153
|
+
}>;
|
|
154
|
+
export type actuators_solenoid_SolenoidStatus = bin.Parsed<typeof actuators_solenoid_SolenoidStatus>;
|
|
155
|
+
export declare const SolenoidStatusPacket: import("typed-binary").ObjectSchema<{
|
|
156
|
+
solenoid_id: import("typed-binary").ByteSchema;
|
|
157
|
+
timestamp_ms: import("typed-binary").Uint32Schema;
|
|
158
|
+
status: import("typed-binary").ObjectSchema<{
|
|
159
|
+
power_state: import("typed-binary").ByteSchema;
|
|
160
|
+
opening: import("typed-binary").ByteSchema;
|
|
161
|
+
current_ma: import("typed-binary").Float32Schema;
|
|
162
|
+
}>;
|
|
163
|
+
}>;
|
|
164
|
+
export type SolenoidStatusPacket = bin.Parsed<typeof SolenoidStatusPacket>;
|
|
165
|
+
export declare const sensors_load_cell_LoadCellBatch: import("typed-binary").ObjectSchema<{
|
|
166
|
+
t0_us: UInt64Schema;
|
|
167
|
+
dt_us: import("typed-binary").Uint32Schema;
|
|
168
|
+
count: import("typed-binary").ByteSchema;
|
|
169
|
+
seq: import("typed-binary").ByteSchema;
|
|
170
|
+
samples: import("typed-binary").ArraySchema<import("typed-binary").Int16Schema>;
|
|
171
|
+
}>;
|
|
172
|
+
export type sensors_load_cell_LoadCellBatch = bin.Parsed<typeof sensors_load_cell_LoadCellBatch>;
|
|
173
|
+
export declare const LoadCellPacket: import("typed-binary").ObjectSchema<{
|
|
174
|
+
load_cell_id: import("typed-binary").ByteSchema;
|
|
175
|
+
data: import("typed-binary").ObjectSchema<{
|
|
176
|
+
t0_us: UInt64Schema;
|
|
177
|
+
dt_us: import("typed-binary").Uint32Schema;
|
|
178
|
+
count: import("typed-binary").ByteSchema;
|
|
179
|
+
seq: import("typed-binary").ByteSchema;
|
|
180
|
+
samples: import("typed-binary").ArraySchema<import("typed-binary").Int16Schema>;
|
|
181
|
+
}>;
|
|
182
|
+
}>;
|
|
183
|
+
export type LoadCellPacket = bin.Parsed<typeof LoadCellPacket>;
|
|
184
|
+
export declare const spec: {
|
|
185
|
+
HeartBeatTelemetry: {
|
|
186
|
+
port: number;
|
|
187
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
188
|
+
message: import("typed-binary").ArraySchema<import("typed-binary").Int8Schema>;
|
|
189
|
+
status_flags: import("typed-binary").ByteSchema;
|
|
190
|
+
}>;
|
|
191
|
+
enums: {};
|
|
192
|
+
};
|
|
193
|
+
FsmStatusPacket: {
|
|
194
|
+
port: number;
|
|
195
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
196
|
+
status: import("typed-binary").ObjectSchema<{
|
|
197
|
+
state_entry_time_ms: UInt64Schema;
|
|
198
|
+
state_time_ms: UInt64Schema;
|
|
199
|
+
current_state: import("typed-binary").ByteSchema;
|
|
200
|
+
previous_state: import("typed-binary").ByteSchema;
|
|
201
|
+
last_event: import("typed-binary").ByteSchema;
|
|
202
|
+
last_abort_reason: import("typed-binary").ByteSchema;
|
|
203
|
+
}>;
|
|
204
|
+
timestamp_ms: import("typed-binary").Uint32Schema;
|
|
205
|
+
}>;
|
|
206
|
+
enums: {
|
|
207
|
+
status: {
|
|
208
|
+
current_state: {
|
|
209
|
+
readonly Safe: 0;
|
|
210
|
+
readonly RecoveryFill: 1;
|
|
211
|
+
readonly PostRecoveryFill: 2;
|
|
212
|
+
readonly N2Fill: 3;
|
|
213
|
+
readonly PostN2Fill: 4;
|
|
214
|
+
readonly OxFill: 5;
|
|
215
|
+
readonly PostOxFill: 6;
|
|
216
|
+
readonly QDDisconnect: 7;
|
|
217
|
+
readonly Hold: 8;
|
|
218
|
+
};
|
|
219
|
+
previous_state: {
|
|
220
|
+
readonly Safe: 0;
|
|
221
|
+
readonly RecoveryFill: 1;
|
|
222
|
+
readonly PostRecoveryFill: 2;
|
|
223
|
+
readonly N2Fill: 3;
|
|
224
|
+
readonly PostN2Fill: 4;
|
|
225
|
+
readonly OxFill: 5;
|
|
226
|
+
readonly PostOxFill: 6;
|
|
227
|
+
readonly QDDisconnect: 7;
|
|
228
|
+
readonly Hold: 8;
|
|
229
|
+
};
|
|
230
|
+
last_event: {
|
|
231
|
+
readonly Boot: 0;
|
|
232
|
+
readonly NextState: 1;
|
|
233
|
+
readonly PreviousState: 2;
|
|
234
|
+
readonly Timeout: 3;
|
|
235
|
+
readonly Abort: 4;
|
|
236
|
+
readonly None: 5;
|
|
237
|
+
readonly Count: 6;
|
|
238
|
+
};
|
|
239
|
+
last_abort_reason: {
|
|
240
|
+
readonly None: 0;
|
|
241
|
+
readonly Manual: 1;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
PressureSensorPacket: {
|
|
247
|
+
port: number;
|
|
248
|
+
fragment: string;
|
|
249
|
+
packed: null;
|
|
250
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
251
|
+
sensor_id: import("typed-binary").ByteSchema;
|
|
252
|
+
pressure_batch: import("typed-binary").ObjectSchema<{
|
|
253
|
+
t0_us: UInt64Schema;
|
|
254
|
+
dt_us: import("typed-binary").Uint32Schema;
|
|
255
|
+
count: import("typed-binary").ByteSchema;
|
|
256
|
+
seq: import("typed-binary").ByteSchema;
|
|
257
|
+
samples: import("typed-binary").ArraySchema<import("typed-binary").Int16Schema>;
|
|
258
|
+
}>;
|
|
259
|
+
}>;
|
|
260
|
+
enums: {
|
|
261
|
+
sensor_id: {
|
|
262
|
+
readonly OxSupply: 0;
|
|
263
|
+
readonly N2_200: 1;
|
|
264
|
+
readonly N2_300: 2;
|
|
265
|
+
readonly Count: 3;
|
|
266
|
+
};
|
|
267
|
+
pressure_batch: {};
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
ServoStatusPacket: {
|
|
271
|
+
port: number;
|
|
272
|
+
fragment: string;
|
|
273
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
274
|
+
servo_id: import("typed-binary").ByteSchema;
|
|
275
|
+
timestamp_ms: import("typed-binary").Uint32Schema;
|
|
276
|
+
status: import("typed-binary").ObjectSchema<{
|
|
277
|
+
commanded_angle_deg: import("typed-binary").Float32Schema;
|
|
278
|
+
target_angle_deg: import("typed-binary").Float32Schema;
|
|
279
|
+
measured_angle_deg: import("typed-binary").Float32Schema;
|
|
280
|
+
current_ma: import("typed-binary").Float32Schema;
|
|
281
|
+
power_state: import("typed-binary").ByteSchema;
|
|
282
|
+
}>;
|
|
283
|
+
}>;
|
|
284
|
+
enums: {
|
|
285
|
+
servo_id: {
|
|
286
|
+
readonly OxSupply: 0;
|
|
287
|
+
readonly Count: 1;
|
|
288
|
+
};
|
|
289
|
+
status: {
|
|
290
|
+
power_state: {
|
|
291
|
+
readonly Unknown: 0;
|
|
292
|
+
readonly Off: 1;
|
|
293
|
+
readonly Booting: 2;
|
|
294
|
+
readonly On: 3;
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
SolenoidStatusPacket: {
|
|
300
|
+
port: number;
|
|
301
|
+
fragment: string;
|
|
302
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
303
|
+
solenoid_id: import("typed-binary").ByteSchema;
|
|
304
|
+
timestamp_ms: import("typed-binary").Uint32Schema;
|
|
305
|
+
status: import("typed-binary").ObjectSchema<{
|
|
306
|
+
power_state: import("typed-binary").ByteSchema;
|
|
307
|
+
opening: import("typed-binary").ByteSchema;
|
|
308
|
+
current_ma: import("typed-binary").Float32Schema;
|
|
309
|
+
}>;
|
|
310
|
+
}>;
|
|
311
|
+
enums: {
|
|
312
|
+
solenoid_id: {
|
|
313
|
+
readonly OxBleed: 0;
|
|
314
|
+
readonly N2_200_Supply: 1;
|
|
315
|
+
readonly N2_200_Bleed: 2;
|
|
316
|
+
readonly N2_300_Supply: 3;
|
|
317
|
+
readonly N2_300_Bleed: 4;
|
|
318
|
+
readonly QD_1: 5;
|
|
319
|
+
readonly QD_2: 6;
|
|
320
|
+
readonly Count: 7;
|
|
321
|
+
};
|
|
322
|
+
status: {
|
|
323
|
+
power_state: {
|
|
324
|
+
readonly Unknown: 0;
|
|
325
|
+
readonly Off: 1;
|
|
326
|
+
readonly On: 2;
|
|
327
|
+
};
|
|
328
|
+
opening: {
|
|
329
|
+
readonly Unknown: 0;
|
|
330
|
+
readonly Closed: 1;
|
|
331
|
+
readonly Open: 2;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
LoadCellPacket: {
|
|
337
|
+
port: number;
|
|
338
|
+
fragment: string;
|
|
339
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
340
|
+
load_cell_id: import("typed-binary").ByteSchema;
|
|
341
|
+
data: import("typed-binary").ObjectSchema<{
|
|
342
|
+
t0_us: UInt64Schema;
|
|
343
|
+
dt_us: import("typed-binary").Uint32Schema;
|
|
344
|
+
count: import("typed-binary").ByteSchema;
|
|
345
|
+
seq: import("typed-binary").ByteSchema;
|
|
346
|
+
samples: import("typed-binary").ArraySchema<import("typed-binary").Int16Schema>;
|
|
347
|
+
}>;
|
|
348
|
+
}>;
|
|
349
|
+
enums: {
|
|
350
|
+
load_cell_id: {
|
|
351
|
+
readonly LoadCell0: 0;
|
|
352
|
+
readonly LoadCell1: 1;
|
|
353
|
+
readonly LoadCell2: 2;
|
|
354
|
+
readonly Count: 3;
|
|
355
|
+
};
|
|
356
|
+
data: {};
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
export default spec;
|
|
361
|
+
export type Spec = typeof spec;
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import bin, { Measurer, Schema } from 'typed-binary';
|
|
2
|
+
// This file was generated by FRICC on 2026-06-29 21:56:01. Do not edit manually!
|
|
3
|
+
// The current version of typed-binary does not support 64-bit primitives.
|
|
4
|
+
// So for we'll implement our own schemas. :)
|
|
5
|
+
const __littleEndian = true;
|
|
6
|
+
class UInt64Schema extends Schema {
|
|
7
|
+
maxSize = 8;
|
|
8
|
+
read(input) {
|
|
9
|
+
const bytes = new Uint8Array(8);
|
|
10
|
+
input.readSlice(bytes, 0, 8);
|
|
11
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
12
|
+
return view.getBigUint64(0, __littleEndian);
|
|
13
|
+
}
|
|
14
|
+
write(output, value) {
|
|
15
|
+
const bytes = new Uint8Array(8);
|
|
16
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
17
|
+
view.setBigUint64(0, value, __littleEndian);
|
|
18
|
+
output.writeSlice(bytes);
|
|
19
|
+
}
|
|
20
|
+
measure(_, measurer = new Measurer()) {
|
|
21
|
+
return measurer.add(8);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
class Int64Schema extends Schema {
|
|
25
|
+
maxSize = 8;
|
|
26
|
+
read(input) {
|
|
27
|
+
const bytes = new Uint8Array(8);
|
|
28
|
+
input.readSlice(bytes, 0, 8);
|
|
29
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
30
|
+
return view.getBigInt64(0, __littleEndian);
|
|
31
|
+
}
|
|
32
|
+
write(output, value) {
|
|
33
|
+
const bytes = new Uint8Array(8);
|
|
34
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
35
|
+
view.setBigInt64(0, value, __littleEndian);
|
|
36
|
+
output.writeSlice(bytes);
|
|
37
|
+
}
|
|
38
|
+
measure(_, measurer = new Measurer()) {
|
|
39
|
+
return measurer.add(8);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
class Float64Schema extends Schema {
|
|
43
|
+
maxSize = 8;
|
|
44
|
+
read(input) {
|
|
45
|
+
const bytes = new Uint8Array(8);
|
|
46
|
+
input.readSlice(bytes, 0, 8);
|
|
47
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
48
|
+
return view.getFloat64(0, __littleEndian);
|
|
49
|
+
}
|
|
50
|
+
write(output, value) {
|
|
51
|
+
const bytes = new Uint8Array(8);
|
|
52
|
+
const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
53
|
+
view.setFloat64(0, value, __littleEndian);
|
|
54
|
+
output.writeSlice(bytes);
|
|
55
|
+
}
|
|
56
|
+
measure(_, measurer = new Measurer()) {
|
|
57
|
+
return measurer.add(8);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const u64 = new UInt64Schema();
|
|
61
|
+
const i64 = new Int64Schema();
|
|
62
|
+
const f64 = new Float64Schema();
|
|
63
|
+
export const StateId = {
|
|
64
|
+
Safe: 0,
|
|
65
|
+
RecoveryFill: 1,
|
|
66
|
+
PostRecoveryFill: 2,
|
|
67
|
+
N2Fill: 3,
|
|
68
|
+
PostN2Fill: 4,
|
|
69
|
+
OxFill: 5,
|
|
70
|
+
PostOxFill: 6,
|
|
71
|
+
QDDisconnect: 7,
|
|
72
|
+
Hold: 8,
|
|
73
|
+
};
|
|
74
|
+
export const Event = {
|
|
75
|
+
Boot: 0,
|
|
76
|
+
NextState: 1,
|
|
77
|
+
PreviousState: 2,
|
|
78
|
+
Timeout: 3,
|
|
79
|
+
Abort: 4,
|
|
80
|
+
None: 5,
|
|
81
|
+
Count: 6,
|
|
82
|
+
};
|
|
83
|
+
export const fsm_AbortReason = {
|
|
84
|
+
None: 0,
|
|
85
|
+
Manual: 1,
|
|
86
|
+
};
|
|
87
|
+
export const sensors_pressure_Id = {
|
|
88
|
+
OxSupply: 0,
|
|
89
|
+
N2_200: 1,
|
|
90
|
+
N2_300: 2,
|
|
91
|
+
Count: 3,
|
|
92
|
+
};
|
|
93
|
+
export const actuators_servo_Id = {
|
|
94
|
+
OxSupply: 0,
|
|
95
|
+
Count: 1,
|
|
96
|
+
};
|
|
97
|
+
export const actuators_servo_PowerState = {
|
|
98
|
+
Unknown: 0,
|
|
99
|
+
Off: 1,
|
|
100
|
+
Booting: 2,
|
|
101
|
+
On: 3,
|
|
102
|
+
};
|
|
103
|
+
export const actuators_solenoid_Id = {
|
|
104
|
+
OxBleed: 0,
|
|
105
|
+
N2_200_Supply: 1,
|
|
106
|
+
N2_200_Bleed: 2,
|
|
107
|
+
N2_300_Supply: 3,
|
|
108
|
+
N2_300_Bleed: 4,
|
|
109
|
+
QD_1: 5,
|
|
110
|
+
QD_2: 6,
|
|
111
|
+
Count: 7,
|
|
112
|
+
};
|
|
113
|
+
export const actuators_solenoid_PowerState = {
|
|
114
|
+
Unknown: 0,
|
|
115
|
+
Off: 1,
|
|
116
|
+
On: 2,
|
|
117
|
+
};
|
|
118
|
+
export const actuators_solenoid_Opening = {
|
|
119
|
+
Unknown: 0,
|
|
120
|
+
Closed: 1,
|
|
121
|
+
Open: 2,
|
|
122
|
+
};
|
|
123
|
+
export const sensors_load_cell_Id = {
|
|
124
|
+
LoadCell0: 0,
|
|
125
|
+
LoadCell1: 1,
|
|
126
|
+
LoadCell2: 2,
|
|
127
|
+
Count: 3,
|
|
128
|
+
};
|
|
129
|
+
export const HeartBeatTelemetry = bin.object({
|
|
130
|
+
message: bin.arrayOf(bin.i8, 16), // char[16]
|
|
131
|
+
status_flags: bin.u8, // unsigned char
|
|
132
|
+
});
|
|
133
|
+
export const fsm_FsmStatus = bin.object({
|
|
134
|
+
state_entry_time_ms: u64, // unsigned long long
|
|
135
|
+
state_time_ms: u64, // unsigned long long
|
|
136
|
+
current_state: bin.u8, // StateId
|
|
137
|
+
previous_state: bin.u8, // StateId
|
|
138
|
+
last_event: bin.u8, // Event
|
|
139
|
+
last_abort_reason: bin.u8, // fsm::AbortReason
|
|
140
|
+
});
|
|
141
|
+
export const FsmStatusPacket = bin.object({
|
|
142
|
+
status: fsm_FsmStatus, // fsm::FsmStatus
|
|
143
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
144
|
+
});
|
|
145
|
+
export const sensors_pressure_PressureBatch = bin.object({
|
|
146
|
+
t0_us: u64, // unsigned long long
|
|
147
|
+
dt_us: bin.u32, // unsigned int
|
|
148
|
+
count: bin.u8, // unsigned char
|
|
149
|
+
seq: bin.u8, // unsigned char
|
|
150
|
+
samples: bin.arrayOf(bin.i16, 20), // short[20]
|
|
151
|
+
});
|
|
152
|
+
export const PressureSensorPacket = bin.object({
|
|
153
|
+
sensor_id: bin.u8, // sensors::pressure::Id
|
|
154
|
+
pressure_batch: sensors_pressure_PressureBatch, // sensors::pressure::PressureBatch
|
|
155
|
+
});
|
|
156
|
+
export const actuators_servo_ServoStatus = bin.object({
|
|
157
|
+
commanded_angle_deg: bin.f32, // float
|
|
158
|
+
target_angle_deg: bin.f32, // float
|
|
159
|
+
measured_angle_deg: bin.f32, // float
|
|
160
|
+
current_ma: bin.f32, // float
|
|
161
|
+
power_state: bin.u8, // actuators::servo::PowerState
|
|
162
|
+
});
|
|
163
|
+
export const ServoStatusPacket = bin.object({
|
|
164
|
+
servo_id: bin.u8, // actuators::servo::Id
|
|
165
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
166
|
+
status: actuators_servo_ServoStatus, // actuators::servo::ServoStatus
|
|
167
|
+
});
|
|
168
|
+
export const actuators_solenoid_SolenoidStatus = bin.object({
|
|
169
|
+
power_state: bin.u8, // actuators::solenoid::PowerState
|
|
170
|
+
opening: bin.u8, // actuators::solenoid::Opening
|
|
171
|
+
current_ma: bin.f32, // float
|
|
172
|
+
});
|
|
173
|
+
export const SolenoidStatusPacket = bin.object({
|
|
174
|
+
solenoid_id: bin.u8, // actuators::solenoid::Id
|
|
175
|
+
timestamp_ms: bin.u32, // unsigned int
|
|
176
|
+
status: actuators_solenoid_SolenoidStatus, // actuators::solenoid::SolenoidStatus
|
|
177
|
+
});
|
|
178
|
+
export const sensors_load_cell_LoadCellBatch = bin.object({
|
|
179
|
+
t0_us: u64, // unsigned long long
|
|
180
|
+
dt_us: bin.u32, // unsigned int
|
|
181
|
+
count: bin.u8, // unsigned char
|
|
182
|
+
seq: bin.u8, // unsigned char
|
|
183
|
+
samples: bin.arrayOf(bin.i16, 20), // short[20]
|
|
184
|
+
});
|
|
185
|
+
export const LoadCellPacket = bin.object({
|
|
186
|
+
load_cell_id: bin.u8, // sensors::load_cell::Id
|
|
187
|
+
data: sensors_load_cell_LoadCellBatch, // sensors::load_cell::LoadCellBatch
|
|
188
|
+
});
|
|
189
|
+
export const spec = {
|
|
190
|
+
HeartBeatTelemetry: {
|
|
191
|
+
port: 57005,
|
|
192
|
+
schema: HeartBeatTelemetry,
|
|
193
|
+
enums: {},
|
|
194
|
+
},
|
|
195
|
+
FsmStatusPacket: {
|
|
196
|
+
port: 5001,
|
|
197
|
+
schema: FsmStatusPacket,
|
|
198
|
+
enums: {
|
|
199
|
+
status: {
|
|
200
|
+
current_state: StateId,
|
|
201
|
+
previous_state: StateId,
|
|
202
|
+
last_event: Event,
|
|
203
|
+
last_abort_reason: fsm_AbortReason,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
PressureSensorPacket: {
|
|
208
|
+
port: 5002,
|
|
209
|
+
fragment: "sensor_id",
|
|
210
|
+
packed: null,
|
|
211
|
+
schema: PressureSensorPacket,
|
|
212
|
+
enums: {
|
|
213
|
+
sensor_id: sensors_pressure_Id,
|
|
214
|
+
pressure_batch: {},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
ServoStatusPacket: {
|
|
218
|
+
port: 5003,
|
|
219
|
+
fragment: "servo_id",
|
|
220
|
+
schema: ServoStatusPacket,
|
|
221
|
+
enums: {
|
|
222
|
+
servo_id: actuators_servo_Id,
|
|
223
|
+
status: {
|
|
224
|
+
power_state: actuators_servo_PowerState,
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
SolenoidStatusPacket: {
|
|
229
|
+
port: 5004,
|
|
230
|
+
fragment: "solenoid_id",
|
|
231
|
+
schema: SolenoidStatusPacket,
|
|
232
|
+
enums: {
|
|
233
|
+
solenoid_id: actuators_solenoid_Id,
|
|
234
|
+
status: {
|
|
235
|
+
power_state: actuators_solenoid_PowerState,
|
|
236
|
+
opening: actuators_solenoid_Opening,
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
},
|
|
240
|
+
LoadCellPacket: {
|
|
241
|
+
port: 5007,
|
|
242
|
+
fragment: "loadcell_id",
|
|
243
|
+
schema: LoadCellPacket,
|
|
244
|
+
enums: {
|
|
245
|
+
load_cell_id: sensors_load_cell_Id,
|
|
246
|
+
data: {},
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
export default spec;
|