Added last will and testement

master
noah metz 2024-01-18 17:38:27 -07:00
parent fb92058ec7
commit 52d7cfe2f7
3 changed files with 2 additions and 61 deletions

1
Cargo.lock generated

@ -784,6 +784,7 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
name = "vex_mqtt_rust" name = "vex_mqtt_rust"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bytes",
"prost", "prost",
"prost-build", "prost-build",
"prost-types", "prost-types",

@ -10,6 +10,7 @@ protoc = "2.28.0"
prost-build = "0.12.3" prost-build = "0.12.3"
[dependencies] [dependencies]
bytes = "1.5.0"
prost = "0.12.3" prost = "0.12.3"
prost-types = "0.12.3" prost-types = "0.12.3"
rumqttc = "0.23.0" rumqttc = "0.23.0"

@ -7,67 +7,6 @@ use prost::Message;
use std::io::Cursor; use std::io::Cursor;
use serde::{Serialize, Deserialize}; use serde::{Serialize, Deserialize};
// TODO:
// 1) Represent state of division/fieldset/field/match(maybe save/load)
// 2) Create functions to update the states and publish to MQTT based on incoming 'notifications'
// 2) Create functions to update the state that map to NOTICE_IDs and take in the notice struct
// Notifications parsed last year:
// - NOTICE_REALTIME_SCORE_CHANGED
// - NOTICE_FIELD_TIMER_STARTED
// - NOTICE_FIELD_TIMER_STOPPED
// - NOTICE_FIELD_RESET_TIMER
// - NOTICE_FIELD_MATCH_ASSIGNED
// - NOTICE_ACTIVE_FIELD_CHANGED
// - NOTICE_RANKINGS_UPDATED
// - NOTICE_EVENT_STATUS_UPDATED
// - NOTICE_ELIM_ALLIANCE_UPDATED
// - NOTICE_ELIM_UNAVAIL_TEAMS_UPDATED
// - NOTICE_MATCH_LIST_UPDATED
//
// Notice protobuf:
// message Notice {
// optional tm.NoticeId id = 1;
// optional tm.MatchTuple affectedMatch = 2;
// optional tm.ElimAlliance elimAlliance = 3;
// optional tm.SideChallengeScore sideChallengeScore = 4;
// optional tm.EventConfig eventConfig = 5;
// optional tm.FieldHwState fieldState = 6;
// optional tm.FieldTime fieldTime = 7;
// optional tm.Field field = 8;
// optional tm.MatchTimeSchedList matchTimeSchedList = 9;
// optional tm.MatchTimeSchedList matchTimeSched = 10;
// optional tm.FieldSetList fieldSetList = 11;
// optional tm.PitDisplayList pitDisplayList = 12;
// optional tm.DisplayState displayState = 13;
// optional tm.AssignedObjectType.AssignedObjectEnum assignedType = 15;
// optional tm.PublishOptions publishOptions = 16;
// optional tm.Division division = 17;
// optional tm.MatchScore matchScore = 18;
// optional tm.Rankings rankings = 19;
// optional tm.MatchRound affectedRound = 20;
// optional tm.Award award = 21;
// optional tm.FieldSet fieldSet = 22;
// optional tm.TeamInfo teamInfo = 23;
// optional double obsolete_serverTime = 24;
// optional tm.TeamInspection teamInspection = 25;
// optional int32 obsolete_serverTimeZoneInSecs = 27;
// optional tm.ElimQueueList elimQueueList = 28;
// optional tm.TextMessageNotice textMessage = 29;
// optional string originatingClient = 30;
// optional bool isLocal = 31;
// optional tm.DisplaySlide displaySlide = 32;
// optional tm.AssignedMatchList assignedMatchList = 33;
// optional tm.MobileDeviceMatchLockList mobileMatchLocks = 34;
// optional tm.ElimWinsToAdvanceList elimWinsToAdvanceList = 35;
// optional string temporaryCode = 36;
// optional tm.MatchScoreList matchScoreLog = 37;
// optional tm.PublishStatus publishStatus = 38;
// optional tm.MatchInfo matchInfo = 39;
// optional tm.AwardList awardList = 40;
// optional string eventName = 41;
// optional tm.FieldControlStatus fieldControlStatus = 42;
// }
//
// MQTT Topics: // MQTT Topics:
// - division/{division_id} // - division/{division_id}
// - division/{division_id}/ranking // - division/{division_id}/ranking