fossekall-interface 0.1.8 → 0.1.9
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/ecu/commands.d.ts +249 -0
- package/dist/ecu/commands.js +202 -0
- package/dist/ecu/index.d.ts +2 -1
- package/dist/ecu/index.js +2 -1
- package/dist/ecu/telemetry.d.ts +17 -16
- package/dist/ecu/telemetry.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +14 -0
- package/dist/types.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import bin from 'typed-binary';
|
|
2
|
+
export declare const Event: {
|
|
3
|
+
readonly Boot: 0;
|
|
4
|
+
readonly NextState: 1;
|
|
5
|
+
readonly PreviousState: 2;
|
|
6
|
+
readonly Timeout: 3;
|
|
7
|
+
readonly CalibrateRequest: 4;
|
|
8
|
+
readonly Abort: 5;
|
|
9
|
+
readonly None: 6;
|
|
10
|
+
readonly Count: 7;
|
|
11
|
+
};
|
|
12
|
+
export type Event = (typeof Event)[keyof typeof Event];
|
|
13
|
+
export declare const StateId: {
|
|
14
|
+
readonly Safe: 0;
|
|
15
|
+
readonly FuelFill: 1;
|
|
16
|
+
readonly PostFuelFill: 2;
|
|
17
|
+
readonly N2Fill: 3;
|
|
18
|
+
readonly PostN2Fill: 4;
|
|
19
|
+
readonly OxFill: 5;
|
|
20
|
+
readonly PostOxFill: 6;
|
|
21
|
+
readonly Pressurized: 7;
|
|
22
|
+
readonly Armed: 8;
|
|
23
|
+
readonly Burn: 9;
|
|
24
|
+
readonly Shutdown: 10;
|
|
25
|
+
readonly PostBurn: 11;
|
|
26
|
+
readonly Depressurize: 12;
|
|
27
|
+
readonly Calibrate: 13;
|
|
28
|
+
};
|
|
29
|
+
export type StateId = (typeof StateId)[keyof typeof StateId];
|
|
30
|
+
export declare const node_servo_Id: {
|
|
31
|
+
readonly kMainFuel: 0;
|
|
32
|
+
readonly kMainOx: 1;
|
|
33
|
+
readonly kOxFill: 2;
|
|
34
|
+
readonly kOxPrechill: 3;
|
|
35
|
+
readonly kOxSupply: 4;
|
|
36
|
+
readonly kCount: 5;
|
|
37
|
+
};
|
|
38
|
+
export type node_servo_Id = (typeof node_servo_Id)[keyof typeof node_servo_Id];
|
|
39
|
+
export declare const ServoCommands_OpenClose: {
|
|
40
|
+
readonly Open: 0;
|
|
41
|
+
readonly Close: 1;
|
|
42
|
+
};
|
|
43
|
+
export type ServoCommands_OpenClose = (typeof ServoCommands_OpenClose)[keyof typeof ServoCommands_OpenClose];
|
|
44
|
+
export declare const actuators_servo_PositionMode: {
|
|
45
|
+
readonly kAbsolute: 0;
|
|
46
|
+
readonly kRelative: 1;
|
|
47
|
+
};
|
|
48
|
+
export type actuators_servo_PositionMode = (typeof actuators_servo_PositionMode)[keyof typeof actuators_servo_PositionMode];
|
|
49
|
+
export declare const actuators_servo_StartPolicy: {
|
|
50
|
+
readonly kPreempt: 0;
|
|
51
|
+
readonly kNoInterrupt: 1;
|
|
52
|
+
};
|
|
53
|
+
export type actuators_servo_StartPolicy = (typeof actuators_servo_StartPolicy)[keyof typeof actuators_servo_StartPolicy];
|
|
54
|
+
export declare const node_regulator_Id: {
|
|
55
|
+
readonly kOxPrechill: 0;
|
|
56
|
+
readonly kCount: 1;
|
|
57
|
+
};
|
|
58
|
+
export type node_regulator_Id = (typeof node_regulator_Id)[keyof typeof node_regulator_Id];
|
|
59
|
+
export declare const RegulatorCommands_RegulatorValue: {
|
|
60
|
+
readonly Disable: 0;
|
|
61
|
+
readonly Enable: 1;
|
|
62
|
+
};
|
|
63
|
+
export type RegulatorCommands_RegulatorValue = (typeof RegulatorCommands_RegulatorValue)[keyof typeof RegulatorCommands_RegulatorValue];
|
|
64
|
+
export declare const FsmCommands_RaiseEventPayload: import("typed-binary").ObjectSchema<{
|
|
65
|
+
event: import("typed-binary").ByteSchema;
|
|
66
|
+
current_state: import("typed-binary").ByteSchema;
|
|
67
|
+
}>;
|
|
68
|
+
export type FsmCommands_RaiseEventPayload = bin.Parsed<typeof FsmCommands_RaiseEventPayload>;
|
|
69
|
+
export declare const ServoCommands_OpenCloseServoPayload: import("typed-binary").ObjectSchema<{
|
|
70
|
+
servo_id: import("typed-binary").ByteSchema;
|
|
71
|
+
open_close: import("typed-binary").ByteSchema;
|
|
72
|
+
duration_ms: import("typed-binary").Uint16Schema;
|
|
73
|
+
delay_ms: import("typed-binary").Uint16Schema;
|
|
74
|
+
position_mode: import("typed-binary").ByteSchema;
|
|
75
|
+
start_policy: import("typed-binary").ByteSchema;
|
|
76
|
+
}>;
|
|
77
|
+
export type ServoCommands_OpenCloseServoPayload = bin.Parsed<typeof ServoCommands_OpenCloseServoPayload>;
|
|
78
|
+
export declare const ServoCommands_SetServoPayload: import("typed-binary").ObjectSchema<{
|
|
79
|
+
servo_id: import("typed-binary").ByteSchema;
|
|
80
|
+
angle_deg: import("typed-binary").Float32Schema;
|
|
81
|
+
duration_ms: import("typed-binary").Uint16Schema;
|
|
82
|
+
delay_ms: import("typed-binary").Uint16Schema;
|
|
83
|
+
position_mode: import("typed-binary").ByteSchema;
|
|
84
|
+
start_policy: import("typed-binary").ByteSchema;
|
|
85
|
+
}>;
|
|
86
|
+
export type ServoCommands_SetServoPayload = bin.Parsed<typeof ServoCommands_SetServoPayload>;
|
|
87
|
+
export declare const RegulatorCommands_SetEnabledPayload: import("typed-binary").ObjectSchema<{
|
|
88
|
+
regulator_id: import("typed-binary").ByteSchema;
|
|
89
|
+
value: import("typed-binary").ByteSchema;
|
|
90
|
+
}>;
|
|
91
|
+
export type RegulatorCommands_SetEnabledPayload = bin.Parsed<typeof RegulatorCommands_SetEnabledPayload>;
|
|
92
|
+
export declare const RegulatorCommands_SetSetpointPayload: import("typed-binary").ObjectSchema<{
|
|
93
|
+
regulator_id: import("typed-binary").ByteSchema;
|
|
94
|
+
setpoint: import("typed-binary").Float32Schema;
|
|
95
|
+
}>;
|
|
96
|
+
export type RegulatorCommands_SetSetpointPayload = bin.Parsed<typeof RegulatorCommands_SetSetpointPayload>;
|
|
97
|
+
export declare const RegulatorCommands_SetGainsPayload: import("typed-binary").ObjectSchema<{
|
|
98
|
+
regulator_id: import("typed-binary").ByteSchema;
|
|
99
|
+
kp: import("typed-binary").Float32Schema;
|
|
100
|
+
ki: import("typed-binary").Float32Schema;
|
|
101
|
+
kd: import("typed-binary").Float32Schema;
|
|
102
|
+
}>;
|
|
103
|
+
export type RegulatorCommands_SetGainsPayload = bin.Parsed<typeof RegulatorCommands_SetGainsPayload>;
|
|
104
|
+
export declare const spec: {
|
|
105
|
+
FsmCommands_RaiseEventPayload: {
|
|
106
|
+
id: number;
|
|
107
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
108
|
+
event: import("typed-binary").ByteSchema;
|
|
109
|
+
current_state: import("typed-binary").ByteSchema;
|
|
110
|
+
}>;
|
|
111
|
+
enums: {
|
|
112
|
+
event: {
|
|
113
|
+
readonly Boot: 0;
|
|
114
|
+
readonly NextState: 1;
|
|
115
|
+
readonly PreviousState: 2;
|
|
116
|
+
readonly Timeout: 3;
|
|
117
|
+
readonly CalibrateRequest: 4;
|
|
118
|
+
readonly Abort: 5;
|
|
119
|
+
readonly None: 6;
|
|
120
|
+
readonly Count: 7;
|
|
121
|
+
};
|
|
122
|
+
current_state: {
|
|
123
|
+
readonly Safe: 0;
|
|
124
|
+
readonly FuelFill: 1;
|
|
125
|
+
readonly PostFuelFill: 2;
|
|
126
|
+
readonly N2Fill: 3;
|
|
127
|
+
readonly PostN2Fill: 4;
|
|
128
|
+
readonly OxFill: 5;
|
|
129
|
+
readonly PostOxFill: 6;
|
|
130
|
+
readonly Pressurized: 7;
|
|
131
|
+
readonly Armed: 8;
|
|
132
|
+
readonly Burn: 9;
|
|
133
|
+
readonly Shutdown: 10;
|
|
134
|
+
readonly PostBurn: 11;
|
|
135
|
+
readonly Depressurize: 12;
|
|
136
|
+
readonly Calibrate: 13;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
ServoCommands_OpenCloseServoPayload: {
|
|
141
|
+
id: number;
|
|
142
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
143
|
+
servo_id: import("typed-binary").ByteSchema;
|
|
144
|
+
open_close: import("typed-binary").ByteSchema;
|
|
145
|
+
duration_ms: import("typed-binary").Uint16Schema;
|
|
146
|
+
delay_ms: import("typed-binary").Uint16Schema;
|
|
147
|
+
position_mode: import("typed-binary").ByteSchema;
|
|
148
|
+
start_policy: import("typed-binary").ByteSchema;
|
|
149
|
+
}>;
|
|
150
|
+
enums: {
|
|
151
|
+
servo_id: {
|
|
152
|
+
readonly kMainFuel: 0;
|
|
153
|
+
readonly kMainOx: 1;
|
|
154
|
+
readonly kOxFill: 2;
|
|
155
|
+
readonly kOxPrechill: 3;
|
|
156
|
+
readonly kOxSupply: 4;
|
|
157
|
+
readonly kCount: 5;
|
|
158
|
+
};
|
|
159
|
+
open_close: {
|
|
160
|
+
readonly Open: 0;
|
|
161
|
+
readonly Close: 1;
|
|
162
|
+
};
|
|
163
|
+
position_mode: {
|
|
164
|
+
readonly kAbsolute: 0;
|
|
165
|
+
readonly kRelative: 1;
|
|
166
|
+
};
|
|
167
|
+
start_policy: {
|
|
168
|
+
readonly kPreempt: 0;
|
|
169
|
+
readonly kNoInterrupt: 1;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
ServoCommands_SetServoPayload: {
|
|
174
|
+
id: number;
|
|
175
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
176
|
+
servo_id: import("typed-binary").ByteSchema;
|
|
177
|
+
angle_deg: import("typed-binary").Float32Schema;
|
|
178
|
+
duration_ms: import("typed-binary").Uint16Schema;
|
|
179
|
+
delay_ms: import("typed-binary").Uint16Schema;
|
|
180
|
+
position_mode: import("typed-binary").ByteSchema;
|
|
181
|
+
start_policy: import("typed-binary").ByteSchema;
|
|
182
|
+
}>;
|
|
183
|
+
enums: {
|
|
184
|
+
servo_id: {
|
|
185
|
+
readonly kMainFuel: 0;
|
|
186
|
+
readonly kMainOx: 1;
|
|
187
|
+
readonly kOxFill: 2;
|
|
188
|
+
readonly kOxPrechill: 3;
|
|
189
|
+
readonly kOxSupply: 4;
|
|
190
|
+
readonly kCount: 5;
|
|
191
|
+
};
|
|
192
|
+
position_mode: {
|
|
193
|
+
readonly kAbsolute: 0;
|
|
194
|
+
readonly kRelative: 1;
|
|
195
|
+
};
|
|
196
|
+
start_policy: {
|
|
197
|
+
readonly kPreempt: 0;
|
|
198
|
+
readonly kNoInterrupt: 1;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
RegulatorCommands_SetEnabledPayload: {
|
|
203
|
+
id: number;
|
|
204
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
205
|
+
regulator_id: import("typed-binary").ByteSchema;
|
|
206
|
+
value: import("typed-binary").ByteSchema;
|
|
207
|
+
}>;
|
|
208
|
+
enums: {
|
|
209
|
+
regulator_id: {
|
|
210
|
+
readonly kOxPrechill: 0;
|
|
211
|
+
readonly kCount: 1;
|
|
212
|
+
};
|
|
213
|
+
value: {
|
|
214
|
+
readonly Disable: 0;
|
|
215
|
+
readonly Enable: 1;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
RegulatorCommands_SetSetpointPayload: {
|
|
220
|
+
id: number;
|
|
221
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
222
|
+
regulator_id: import("typed-binary").ByteSchema;
|
|
223
|
+
setpoint: import("typed-binary").Float32Schema;
|
|
224
|
+
}>;
|
|
225
|
+
enums: {
|
|
226
|
+
regulator_id: {
|
|
227
|
+
readonly kOxPrechill: 0;
|
|
228
|
+
readonly kCount: 1;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
RegulatorCommands_SetGainsPayload: {
|
|
233
|
+
id: number;
|
|
234
|
+
schema: import("typed-binary").ObjectSchema<{
|
|
235
|
+
regulator_id: import("typed-binary").ByteSchema;
|
|
236
|
+
kp: import("typed-binary").Float32Schema;
|
|
237
|
+
ki: import("typed-binary").Float32Schema;
|
|
238
|
+
kd: import("typed-binary").Float32Schema;
|
|
239
|
+
}>;
|
|
240
|
+
enums: {
|
|
241
|
+
regulator_id: {
|
|
242
|
+
readonly kOxPrechill: 0;
|
|
243
|
+
readonly kCount: 1;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
export default spec;
|
|
249
|
+
export type Spec = typeof spec;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import bin, { Measurer, Schema } from 'typed-binary';
|
|
2
|
+
// This file was generated by FRICC on 2026-03-19 10:51:03. 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 Event = {
|
|
64
|
+
Boot: 0,
|
|
65
|
+
NextState: 1,
|
|
66
|
+
PreviousState: 2,
|
|
67
|
+
Timeout: 3,
|
|
68
|
+
CalibrateRequest: 4,
|
|
69
|
+
Abort: 5,
|
|
70
|
+
None: 6,
|
|
71
|
+
Count: 7,
|
|
72
|
+
};
|
|
73
|
+
export const StateId = {
|
|
74
|
+
Safe: 0,
|
|
75
|
+
FuelFill: 1,
|
|
76
|
+
PostFuelFill: 2,
|
|
77
|
+
N2Fill: 3,
|
|
78
|
+
PostN2Fill: 4,
|
|
79
|
+
OxFill: 5,
|
|
80
|
+
PostOxFill: 6,
|
|
81
|
+
Pressurized: 7,
|
|
82
|
+
Armed: 8,
|
|
83
|
+
Burn: 9,
|
|
84
|
+
Shutdown: 10,
|
|
85
|
+
PostBurn: 11,
|
|
86
|
+
Depressurize: 12,
|
|
87
|
+
Calibrate: 13,
|
|
88
|
+
};
|
|
89
|
+
export const node_servo_Id = {
|
|
90
|
+
kMainFuel: 0,
|
|
91
|
+
kMainOx: 1,
|
|
92
|
+
kOxFill: 2,
|
|
93
|
+
kOxPrechill: 3,
|
|
94
|
+
kOxSupply: 4,
|
|
95
|
+
kCount: 5,
|
|
96
|
+
};
|
|
97
|
+
export const ServoCommands_OpenClose = {
|
|
98
|
+
Open: 0,
|
|
99
|
+
Close: 1,
|
|
100
|
+
};
|
|
101
|
+
export const actuators_servo_PositionMode = {
|
|
102
|
+
kAbsolute: 0,
|
|
103
|
+
kRelative: 1,
|
|
104
|
+
};
|
|
105
|
+
export const actuators_servo_StartPolicy = {
|
|
106
|
+
kPreempt: 0,
|
|
107
|
+
kNoInterrupt: 1,
|
|
108
|
+
};
|
|
109
|
+
export const node_regulator_Id = {
|
|
110
|
+
kOxPrechill: 0,
|
|
111
|
+
kCount: 1,
|
|
112
|
+
};
|
|
113
|
+
export const RegulatorCommands_RegulatorValue = {
|
|
114
|
+
Disable: 0,
|
|
115
|
+
Enable: 1,
|
|
116
|
+
};
|
|
117
|
+
export const FsmCommands_RaiseEventPayload = bin.object({
|
|
118
|
+
event: bin.u8, // Event
|
|
119
|
+
current_state: bin.u8, // StateId
|
|
120
|
+
});
|
|
121
|
+
export const ServoCommands_OpenCloseServoPayload = bin.object({
|
|
122
|
+
servo_id: bin.u8, // node::servo::Id
|
|
123
|
+
open_close: bin.u8, // ServoCommands::OpenClose
|
|
124
|
+
duration_ms: bin.u16, // unsigned short
|
|
125
|
+
delay_ms: bin.u16, // unsigned short
|
|
126
|
+
position_mode: bin.u8, // actuators::servo::PositionMode
|
|
127
|
+
start_policy: bin.u8, // actuators::servo::StartPolicy
|
|
128
|
+
});
|
|
129
|
+
export const ServoCommands_SetServoPayload = bin.object({
|
|
130
|
+
servo_id: bin.u8, // node::servo::Id
|
|
131
|
+
angle_deg: bin.f32, // float
|
|
132
|
+
duration_ms: bin.u16, // unsigned short
|
|
133
|
+
delay_ms: bin.u16, // unsigned short
|
|
134
|
+
position_mode: bin.u8, // actuators::servo::PositionMode
|
|
135
|
+
start_policy: bin.u8, // actuators::servo::StartPolicy
|
|
136
|
+
});
|
|
137
|
+
export const RegulatorCommands_SetEnabledPayload = bin.object({
|
|
138
|
+
regulator_id: bin.u8, // node::regulator::Id
|
|
139
|
+
value: bin.u8, // RegulatorCommands::RegulatorValue
|
|
140
|
+
});
|
|
141
|
+
export const RegulatorCommands_SetSetpointPayload = bin.object({
|
|
142
|
+
regulator_id: bin.u8, // node::regulator::Id
|
|
143
|
+
setpoint: bin.f32, // float
|
|
144
|
+
});
|
|
145
|
+
export const RegulatorCommands_SetGainsPayload = bin.object({
|
|
146
|
+
regulator_id: bin.u8, // node::regulator::Id
|
|
147
|
+
kp: bin.f32, // float
|
|
148
|
+
ki: bin.f32, // float
|
|
149
|
+
kd: bin.f32, // float
|
|
150
|
+
});
|
|
151
|
+
export const spec = {
|
|
152
|
+
FsmCommands_RaiseEventPayload: {
|
|
153
|
+
id: 32,
|
|
154
|
+
schema: FsmCommands_RaiseEventPayload,
|
|
155
|
+
enums: {
|
|
156
|
+
event: Event,
|
|
157
|
+
current_state: StateId,
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
ServoCommands_OpenCloseServoPayload: {
|
|
161
|
+
id: 48,
|
|
162
|
+
schema: ServoCommands_OpenCloseServoPayload,
|
|
163
|
+
enums: {
|
|
164
|
+
servo_id: node_servo_Id,
|
|
165
|
+
open_close: ServoCommands_OpenClose,
|
|
166
|
+
position_mode: actuators_servo_PositionMode,
|
|
167
|
+
start_policy: actuators_servo_StartPolicy,
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
ServoCommands_SetServoPayload: {
|
|
171
|
+
id: 49,
|
|
172
|
+
schema: ServoCommands_SetServoPayload,
|
|
173
|
+
enums: {
|
|
174
|
+
servo_id: node_servo_Id,
|
|
175
|
+
position_mode: actuators_servo_PositionMode,
|
|
176
|
+
start_policy: actuators_servo_StartPolicy,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
RegulatorCommands_SetEnabledPayload: {
|
|
180
|
+
id: 112,
|
|
181
|
+
schema: RegulatorCommands_SetEnabledPayload,
|
|
182
|
+
enums: {
|
|
183
|
+
regulator_id: node_regulator_Id,
|
|
184
|
+
value: RegulatorCommands_RegulatorValue,
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
RegulatorCommands_SetSetpointPayload: {
|
|
188
|
+
id: 113,
|
|
189
|
+
schema: RegulatorCommands_SetSetpointPayload,
|
|
190
|
+
enums: {
|
|
191
|
+
regulator_id: node_regulator_Id,
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
RegulatorCommands_SetGainsPayload: {
|
|
195
|
+
id: 114,
|
|
196
|
+
schema: RegulatorCommands_SetGainsPayload,
|
|
197
|
+
enums: {
|
|
198
|
+
regulator_id: node_regulator_Id,
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
};
|
|
202
|
+
export default spec;
|
package/dist/ecu/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * as commands from "./commands";
|
|
2
|
+
export * as telemetry from "./telemetry";
|
package/dist/ecu/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * as commands from "./commands";
|
|
2
|
+
export * as telemetry from "./telemetry";
|
package/dist/ecu/telemetry.d.ts
CHANGED
|
@@ -61,9 +61,9 @@ export declare const actuators_solenoid_SolenoidStatus: import("typed-binary").O
|
|
|
61
61
|
}>;
|
|
62
62
|
export type actuators_solenoid_SolenoidStatus = bin.Parsed<typeof actuators_solenoid_SolenoidStatus>;
|
|
63
63
|
export declare const spec: {
|
|
64
|
-
actuators_servo_ServoStatus: {
|
|
65
|
-
port:
|
|
66
|
-
schema: import("typed-binary").ObjectSchema<{
|
|
64
|
+
readonly actuators_servo_ServoStatus: {
|
|
65
|
+
readonly port: 5003;
|
|
66
|
+
readonly schema: import("typed-binary").ObjectSchema<{
|
|
67
67
|
commanded_angle_deg: import("typed-binary").Float32Schema;
|
|
68
68
|
target_angle_deg: import("typed-binary").Float32Schema;
|
|
69
69
|
measured_angle_deg: import("typed-binary").Float32Schema;
|
|
@@ -71,13 +71,13 @@ export declare const spec: {
|
|
|
71
71
|
mode: import("typed-binary").ByteSchema;
|
|
72
72
|
power_state: import("typed-binary").ByteSchema;
|
|
73
73
|
}>;
|
|
74
|
-
enums: {
|
|
75
|
-
mode: {
|
|
74
|
+
readonly enums: {
|
|
75
|
+
readonly mode: {
|
|
76
76
|
readonly kUnknown: 0;
|
|
77
77
|
readonly kPosition: 1;
|
|
78
78
|
readonly kCalibrate: 2;
|
|
79
79
|
};
|
|
80
|
-
power_state: {
|
|
80
|
+
readonly power_state: {
|
|
81
81
|
readonly kUnknown: 0;
|
|
82
82
|
readonly kOff: 1;
|
|
83
83
|
readonly kBooting: 2;
|
|
@@ -85,9 +85,9 @@ export declare const spec: {
|
|
|
85
85
|
};
|
|
86
86
|
};
|
|
87
87
|
};
|
|
88
|
-
BldcTelemetry: {
|
|
89
|
-
port:
|
|
90
|
-
schema: import("typed-binary").ObjectSchema<{
|
|
88
|
+
readonly BldcTelemetry: {
|
|
89
|
+
readonly port: 5000;
|
|
90
|
+
readonly schema: import("typed-binary").ObjectSchema<{
|
|
91
91
|
valve_position: import("typed-binary").Float32Schema;
|
|
92
92
|
motor_position: import("typed-binary").Float32Schema;
|
|
93
93
|
timestamp: UInt64Schema;
|
|
@@ -102,21 +102,21 @@ export declare const spec: {
|
|
|
102
102
|
position_raw: import("typed-binary").Float32Schema;
|
|
103
103
|
calibrated: import("typed-binary").ByteSchema;
|
|
104
104
|
}>;
|
|
105
|
-
enums: {};
|
|
105
|
+
readonly enums: {};
|
|
106
106
|
};
|
|
107
|
-
actuators_solenoid_SolenoidStatus: {
|
|
108
|
-
port:
|
|
109
|
-
schema: import("typed-binary").ObjectSchema<{
|
|
107
|
+
readonly actuators_solenoid_SolenoidStatus: {
|
|
108
|
+
readonly port: 5004;
|
|
109
|
+
readonly schema: import("typed-binary").ObjectSchema<{
|
|
110
110
|
power_state: import("typed-binary").ByteSchema;
|
|
111
111
|
opening: import("typed-binary").ByteSchema;
|
|
112
112
|
}>;
|
|
113
|
-
enums: {
|
|
114
|
-
power_state: {
|
|
113
|
+
readonly enums: {
|
|
114
|
+
readonly power_state: {
|
|
115
115
|
readonly kUnknown: 0;
|
|
116
116
|
readonly kOff: 1;
|
|
117
117
|
readonly kOn: 2;
|
|
118
118
|
};
|
|
119
|
-
opening: {
|
|
119
|
+
readonly opening: {
|
|
120
120
|
readonly kUnknown: 0;
|
|
121
121
|
readonly kClosed: 1;
|
|
122
122
|
readonly kOpen: 2;
|
|
@@ -125,3 +125,4 @@ export declare const spec: {
|
|
|
125
125
|
};
|
|
126
126
|
};
|
|
127
127
|
export default spec;
|
|
128
|
+
export type Spec = typeof spec;
|
package/dist/ecu/telemetry.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import bin, { Measurer, Schema } from 'typed-binary';
|
|
2
|
-
// This file was generated by FRICC on 2026-03-19
|
|
2
|
+
// This file was generated by FRICC on 2026-03-19 10:00:44. Do not edit manually!
|
|
3
3
|
// The current version of typed-binary does not support 64-bit primitives.
|
|
4
4
|
// So for we'll implement our own schemas. :)
|
|
5
5
|
const __littleEndian = true;
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * as
|
|
1
|
+
export * as types from "./types";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * as
|
|
1
|
+
export * as types from "./types";
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AnyObjectSchema } from 'typed-binary';
|
|
2
|
+
import * as ecu from './ecu';
|
|
3
|
+
type EnumTree = {
|
|
4
|
+
[key: string]: number | EnumTree;
|
|
5
|
+
};
|
|
6
|
+
type Widen<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T extends AnyObjectSchema ? AnyObjectSchema : T extends EnumTree ? EnumTree : {
|
|
7
|
+
[K in keyof T]: Widen<T[K]>;
|
|
8
|
+
};
|
|
9
|
+
type MergeAll<T extends Record<string, object>> = {
|
|
10
|
+
[K in keyof T[keyof T]]: T[keyof T][K & keyof T[keyof T]];
|
|
11
|
+
};
|
|
12
|
+
export type TelemetrySpec = MergeAll<Widen<ecu.telemetry.Spec>>;
|
|
13
|
+
export type CommandSpec = MergeAll<Widen<ecu.commands.Spec>>;
|
|
14
|
+
export {};
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|