Network Switch support

Co-Authored-By: Alexander Babikov <2708460+lemondrops@users.noreply.github.com>
Co-Authored-By: cold-brewed <47337035+cold-brewed@users.noreply.github.com>
This commit is contained in:
Jasmine Iwanek
2025-06-26 20:53:17 -04:00
parent be8dc5f488
commit 2dc28d39b1
20 changed files with 6846 additions and 5 deletions

View File

@@ -0,0 +1,38 @@
syntax = "proto3";
import "nanopb.proto";
enum MessageType {
MESSAGE_TYPE_UNSPECIFIED = 0;
MESSAGE_TYPE_DATA = 1;
MESSAGE_TYPE_JOIN = 2;
MESSAGE_TYPE_LEAVE = 3;
MESSAGE_TYPE_KEEPALIVE = 4;
MESSAGE_TYPE_FRAGMENT = 5;
MESSAGE_TYPE_ACK = 6;
MESSAGE_TYPE_CONNECT_REQUEST = 7;
MESSAGE_TYPE_CONNECT_REPLY = 8;
}
message Fragment {
uint32 id = 1;
uint32 sequence = 2;
uint32 total = 3;
}
message Ack {
uint32 id = 1;
uint32 history = 2;
}
message NetworkMessage {
MessageType message_type = 1;
uint32 client_id = 2;
bytes mac = 3 [(nanopb).type = FT_POINTER];
bytes frame = 4 [(nanopb).type = FT_POINTER];
uint32 flags = 5;
uint32 version = 6;
Ack ack = 7;
Fragment fragment = 8;
int64 timestamp = 9;
uint32 sequence = 10;
}