mirror of
https://github.com/BotChain-Robots/flatbuffers.git
synced 2026-07-08 09:37:21 +02:00
Cleanup for release
This commit is contained in:
7
Messaging/AngleControlMessage.fbs
Normal file
7
Messaging/AngleControlMessage.fbs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Messaging;
|
||||
|
||||
table AngleControlMessage {
|
||||
angle: int16;
|
||||
}
|
||||
|
||||
root_type AngleControlMessage;
|
||||
35
Messaging/ConfigMessage.fbs
Normal file
35
Messaging/ConfigMessage.fbs
Normal file
@@ -0,0 +1,35 @@
|
||||
namespace Messaging;
|
||||
|
||||
enum EntryType : byte {
|
||||
NONE = 0,
|
||||
I32,
|
||||
U32,
|
||||
I64,
|
||||
U64,
|
||||
STRING,
|
||||
BLOB
|
||||
}
|
||||
|
||||
table I32Value { value: int32; }
|
||||
table U32Value { value: uint32; }
|
||||
table I64Value { value: int64; }
|
||||
table U64Value { value: uint64; }
|
||||
table StringValue { value: string; }
|
||||
table BlobValue { value: [ubyte]; }
|
||||
|
||||
union NvsValue {
|
||||
I32Value,
|
||||
U32Value,
|
||||
I64Value,
|
||||
U64Value,
|
||||
StringValue,
|
||||
BlobValue
|
||||
}
|
||||
|
||||
table ConfigMessage {
|
||||
key: string;
|
||||
type: EntryType;
|
||||
value: NvsValue;
|
||||
}
|
||||
|
||||
root_type ConfigMessage;
|
||||
19
Messaging/MPIMessage.fbs
Normal file
19
Messaging/MPIMessage.fbs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace Messaging;
|
||||
|
||||
enum MessageType : byte {
|
||||
BROADCAST = 0,
|
||||
PTP = 1,
|
||||
}
|
||||
|
||||
table MPIMessage {
|
||||
type: MessageType;
|
||||
sender: uint8;
|
||||
destination: uint8;
|
||||
sequence_number: uint16;
|
||||
is_durable: bool;
|
||||
length: uint16;
|
||||
tag: uint8;
|
||||
payload: [ubyte];
|
||||
}
|
||||
|
||||
root_type MPIMessage;
|
||||
9
Messaging/OTAPacket.fbs
Normal file
9
Messaging/OTAPacket.fbs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Messaging;
|
||||
|
||||
table OTAPacket {
|
||||
sequence_number: uint16;
|
||||
length: uint16;
|
||||
payload: [ubyte];
|
||||
}
|
||||
|
||||
root_type OTAPacket;
|
||||
9
Messaging/RPCCall/ReturnCall.fbs
Normal file
9
Messaging/RPCCall/ReturnCall.fbs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Messaging;
|
||||
|
||||
table ReturnCall {
|
||||
unique_id: uint8;
|
||||
length: uint16;
|
||||
return_value: [ubyte];
|
||||
}
|
||||
|
||||
root_type ReturnCall;
|
||||
10
Messaging/RPCCall/SendCall.fbs
Normal file
10
Messaging/RPCCall/SendCall.fbs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Messaging;
|
||||
|
||||
table SendCall {
|
||||
tag: uint8;
|
||||
unique_id: uint8;
|
||||
length: uint16;
|
||||
parameters: [ubyte];
|
||||
}
|
||||
|
||||
root_type SendCall;
|
||||
42
Messaging/SensorMessage.fbs
Normal file
42
Messaging/SensorMessage.fbs
Normal file
@@ -0,0 +1,42 @@
|
||||
namespace Messaging;
|
||||
|
||||
table TargetAngle {
|
||||
value: int16;
|
||||
}
|
||||
|
||||
table CurrentText {
|
||||
value: string;
|
||||
}
|
||||
|
||||
table CurrentAngle {
|
||||
value: int16;
|
||||
}
|
||||
|
||||
table Distance {
|
||||
value: float;
|
||||
}
|
||||
|
||||
table Temperature {
|
||||
value: float;
|
||||
}
|
||||
|
||||
table Position {
|
||||
heading: float;
|
||||
pitch: float;
|
||||
roll: float;
|
||||
}
|
||||
|
||||
union SensorValue {
|
||||
TargetAngle,
|
||||
CurrentAngle,
|
||||
CurrentText,
|
||||
Distance,
|
||||
Temperature,
|
||||
Position
|
||||
}
|
||||
|
||||
table SensorMessage {
|
||||
values: [SensorValue];
|
||||
}
|
||||
|
||||
root_type SensorMessage;
|
||||
7
Messaging/TextControlMessage.fbs
Normal file
7
Messaging/TextControlMessage.fbs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Messaging;
|
||||
|
||||
table TextControlMessage {
|
||||
message: string;
|
||||
}
|
||||
|
||||
root_type TextControlMessage;
|
||||
21
Messaging/TopologyMessage.fbs
Normal file
21
Messaging/TopologyMessage.fbs
Normal file
@@ -0,0 +1,21 @@
|
||||
include "../RobotModule.fbs";
|
||||
|
||||
namespace Messaging;
|
||||
|
||||
enum ConnectionType : byte {
|
||||
DIRECT = 0,
|
||||
HOP = 1,
|
||||
}
|
||||
|
||||
table TopologyMessage{
|
||||
module_id: uint8;
|
||||
module_type: ModuleType;
|
||||
num_channels: uint8;
|
||||
channel_to_module: [uint8]; // index is channel, value is connected board; 0 represents no connection
|
||||
channel_to_orientation: [Orientation]; // index is channel, value is orientation
|
||||
connection: ConnectionType;
|
||||
leader: uint8;
|
||||
firmware: string;
|
||||
}
|
||||
|
||||
root_type TopologyMessage;
|
||||
Reference in New Issue
Block a user