fossekall-interface 0.1.15 → 0.1.17

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.
@@ -0,0 +1,8 @@
1
+ export declare const ecu: {
2
+ ip: string;
3
+ commandPort: number;
4
+ };
5
+ export declare const fc: {
6
+ ip: string;
7
+ commandPort: number;
8
+ };
@@ -0,0 +1,10 @@
1
+ // This file contains all manually entered
2
+ // constants for the different MCUs.
3
+ export const ecu = {
4
+ ip: "10.19.0.111",
5
+ commandPort: 25565,
6
+ };
7
+ export const fc = {
8
+ ip: "10.19.0.110",
9
+ commandPort: 25566,
10
+ };
@@ -1,3 +1,2 @@
1
1
  export * as commands from "./commands";
2
- export * as constants from "./constants";
3
2
  export * as telemetry from "./telemetry";
@@ -1,3 +1,2 @@
1
1
  export * as commands from "./commands";
2
- export * as constants from "./constants";
3
2
  export * as telemetry from "./telemetry";
@@ -1,3 +1,2 @@
1
1
  export * as commands from "./commands";
2
- export * as constants from "./constants";
3
2
  export * as telemetry from "./telemetry";
@@ -1,3 +1,2 @@
1
1
  export * as commands from "./commands";
2
- export * as constants from "./constants";
3
2
  export * as telemetry from "./telemetry";
@@ -0,0 +1,79 @@
1
+ import bin, { MaxValue, Schema, type IMeasurer, type ISerialInput, type ISerialOutput } from 'typed-binary';
2
+ declare class Float64Schema extends Schema<number> {
3
+ readonly maxSize = 8;
4
+ read(input: ISerialInput): number;
5
+ write(output: ISerialOutput, value: number): void;
6
+ measure(_: number | typeof MaxValue, measurer?: IMeasurer): IMeasurer;
7
+ }
8
+ export declare const AccelerationData: import("typed-binary").ObjectSchema<{
9
+ valid: import("typed-binary").BoolSchema;
10
+ acc_x: import("typed-binary").Float32Schema;
11
+ acc_y: import("typed-binary").Float32Schema;
12
+ acc_z: import("typed-binary").Float32Schema;
13
+ }>;
14
+ export type AccelerationData = bin.Parsed<typeof AccelerationData>;
15
+ export declare const GNSS_DATA: import("typed-binary").ObjectSchema<{
16
+ data_valid: import("typed-binary").BoolSchema;
17
+ lat: Float64Schema;
18
+ lon: Float64Schema;
19
+ hMSL: Float64Schema;
20
+ gSpeed: Float64Schema;
21
+ headMot: Float64Schema;
22
+ numSV: import("typed-binary").ByteSchema;
23
+ }>;
24
+ export type GNSS_DATA = bin.Parsed<typeof GNSS_DATA>;
25
+ export declare const SensorData: import("typed-binary").ObjectSchema<{
26
+ iim_acc_data: import("typed-binary").ObjectSchema<{
27
+ valid: import("typed-binary").BoolSchema;
28
+ acc_x: import("typed-binary").Float32Schema;
29
+ acc_y: import("typed-binary").Float32Schema;
30
+ acc_z: import("typed-binary").Float32Schema;
31
+ }>;
32
+ gnss_data: import("typed-binary").ObjectSchema<{
33
+ data_valid: import("typed-binary").BoolSchema;
34
+ lat: Float64Schema;
35
+ lon: Float64Schema;
36
+ hMSL: Float64Schema;
37
+ gSpeed: Float64Schema;
38
+ headMot: Float64Schema;
39
+ numSV: import("typed-binary").ByteSchema;
40
+ }>;
41
+ }>;
42
+ export type SensorData = bin.Parsed<typeof SensorData>;
43
+ export declare const spec: {
44
+ AccelerationData: {
45
+ schema: import("typed-binary").ObjectSchema<{
46
+ valid: import("typed-binary").BoolSchema;
47
+ acc_x: import("typed-binary").Float32Schema;
48
+ acc_y: import("typed-binary").Float32Schema;
49
+ acc_z: import("typed-binary").Float32Schema;
50
+ }>;
51
+ enums: {};
52
+ };
53
+ SensorData: {
54
+ port: number;
55
+ schema: import("typed-binary").ObjectSchema<{
56
+ iim_acc_data: import("typed-binary").ObjectSchema<{
57
+ valid: import("typed-binary").BoolSchema;
58
+ acc_x: import("typed-binary").Float32Schema;
59
+ acc_y: import("typed-binary").Float32Schema;
60
+ acc_z: import("typed-binary").Float32Schema;
61
+ }>;
62
+ gnss_data: import("typed-binary").ObjectSchema<{
63
+ data_valid: import("typed-binary").BoolSchema;
64
+ lat: Float64Schema;
65
+ lon: Float64Schema;
66
+ hMSL: Float64Schema;
67
+ gSpeed: Float64Schema;
68
+ headMot: Float64Schema;
69
+ numSV: import("typed-binary").ByteSchema;
70
+ }>;
71
+ }>;
72
+ enums: {
73
+ iim_acc_data: {};
74
+ gnss_data: {};
75
+ };
76
+ };
77
+ };
78
+ export default spec;
79
+ export type Spec = typeof spec;
@@ -1,5 +1,5 @@
1
- import { Measurer, Schema } from 'typed-binary';
2
- // This file was generated by FRICC on 2026-03-19 11:27:31. Do not edit manually!
1
+ import bin, { Measurer, Schema } from 'typed-binary';
2
+ // This file was generated by FRICC on 2026-03-19 14:23:40. 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;
@@ -60,5 +60,37 @@ class Float64Schema extends Schema {
60
60
  const u64 = new UInt64Schema();
61
61
  const i64 = new Int64Schema();
62
62
  const f64 = new Float64Schema();
63
- export const spec = {};
63
+ export const AccelerationData = bin.object({
64
+ valid: bin.bool, // bool
65
+ acc_x: bin.f32, // float
66
+ acc_y: bin.f32, // float
67
+ acc_z: bin.f32, // float
68
+ });
69
+ export const GNSS_DATA = bin.object({
70
+ data_valid: bin.bool, // bool
71
+ lat: f64, // double
72
+ lon: f64, // double
73
+ hMSL: f64, // double
74
+ gSpeed: f64, // double
75
+ headMot: f64, // double
76
+ numSV: bin.u8, // unsigned char
77
+ });
78
+ export const SensorData = bin.object({
79
+ iim_acc_data: AccelerationData, // AccelerationData
80
+ gnss_data: GNSS_DATA, // GNSS_DATA
81
+ });
82
+ export const spec = {
83
+ AccelerationData: {
84
+ schema: AccelerationData,
85
+ enums: {},
86
+ },
87
+ SensorData: {
88
+ port: 3001,
89
+ schema: SensorData,
90
+ enums: {
91
+ iim_acc_data: {},
92
+ gnss_data: {},
93
+ },
94
+ },
95
+ };
64
96
  export default spec;
@@ -0,0 +1,2 @@
1
+ export * as ecu from "./ecu";
2
+ export * as fc from "./fc";
@@ -0,0 +1,2 @@
1
+ export * as ecu from "./ecu";
2
+ export * as fc from "./fc";
package/dist/index.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- import * as ecu from './ecu';
2
- import * as fc from './fc';
3
- export declare const mcu: {
4
- ecu: typeof ecu;
5
- fc: typeof fc;
6
- };
1
+ export * as mcu from './generated';
2
+ export * as constants from './constants';
7
3
  export * as types from './types';
package/dist/index.js CHANGED
@@ -1,7 +1,3 @@
1
- import * as ecu from './ecu';
2
- import * as fc from './fc';
3
- export const mcu = {
4
- ecu,
5
- fc,
6
- };
1
+ export * as mcu from './generated';
2
+ export * as constants from './constants';
7
3
  export * as types from './types';
package/dist/types.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  import { AnyObjectSchema } from 'typed-binary';
2
- import * as ecu from './ecu';
2
+ import * as mcu from './generated';
3
3
  type EnumTree = {
4
4
  [key: string]: number | EnumTree;
5
5
  };
6
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
7
  [K in keyof T]: Widen<T[K]>;
8
8
  };
9
- type MergeAll<T extends Record<string, object>> = {
9
+ type MergeAll<T extends object> = {
10
10
  [K in keyof T[keyof T]]: T[keyof T][K & keyof T[keyof T]];
11
11
  };
12
- export type TelemetrySpec = MergeAll<Widen<ecu.telemetry.Spec>>;
13
- export type CommandSpec = MergeAll<Widen<ecu.commands.Spec>>;
12
+ export type TelemetrySpec = MergeAll<Widen<mcu.ecu.telemetry.Spec>>;
13
+ export type CommandSpec = MergeAll<Widen<mcu.ecu.commands.Spec>>;
14
14
  export {};
package/dist/types.js CHANGED
@@ -1 +1,2 @@
1
+ // This file contains generic types for telemetry and command specs.
1
2
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fossekall-interface",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "API contracts between client and server (rocket and GUI)",
5
5
  "license": "ISC",
6
6
  "author": "Propulse",
@@ -1,2 +0,0 @@
1
- export declare const ip = "10.19.0.111";
2
- export declare const commandPort = 25565;
@@ -1,2 +0,0 @@
1
- export const ip = "10.19.0.111";
2
- export const commandPort = 25565;
@@ -1 +0,0 @@
1
- export declare const ip = "10.19.0.110";
@@ -1 +0,0 @@
1
- export const ip = "10.19.0.110";
@@ -1,3 +0,0 @@
1
- export declare const spec: {};
2
- export default spec;
3
- export type Spec = typeof spec;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes