Add esp_now_messages.proto with EspNowMessage types, encode/decode helpers, and Makefile targets to regenerate firmware and UART schemas together. Co-authored-by: Cursor <cursoragent@cursor.com>
33 lines
553 B
Protocol Buffer
33 lines
553 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package alox;
|
|
|
|
enum EspNowMessageType {
|
|
ESPNOW_UNKNOWN = 0;
|
|
ESPNOW_DISCOVER = 1;
|
|
ESPNOW_SLAVE_INFO = 2;
|
|
ESPNOW_HEARTBEAT = 3;
|
|
}
|
|
|
|
message EspNowDiscover {
|
|
uint32 network = 1;
|
|
}
|
|
|
|
message EspNowSlavePresence {
|
|
uint32 network = 1;
|
|
bytes mac = 2;
|
|
uint32 version = 3;
|
|
uint32 slave_id = 4;
|
|
bool available = 5;
|
|
bool used = 6;
|
|
}
|
|
|
|
message EspNowMessage {
|
|
EspNowMessageType type = 1;
|
|
oneof payload {
|
|
EspNowDiscover discover = 2;
|
|
EspNowSlavePresence slave_info = 3;
|
|
EspNowSlavePresence heartbeat = 4;
|
|
}
|
|
}
|