scouting: Add support for /requests/request/data_scouting
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I6a53ed395a187f04c889af506ce6ecacd0a75916
diff --git a/scouting/webserver/requests/debug/cli/main.go b/scouting/webserver/requests/debug/cli/main.go
index 44ae761..0782d82 100644
--- a/scouting/webserver/requests/debug/cli/main.go
+++ b/scouting/webserver/requests/debug/cli/main.go
@@ -74,6 +74,8 @@
"If specified, parse the file as a RequestAllMatches JSON request.")
requestMatchesForTeamPtr := flag.String("requestMatchesForTeam", "",
"If specified, parse the file as a RequestMatchesForTeam JSON request.")
+ requestDataScoutingPtr := flag.String("requestDataScouting", "",
+ "If specified, parse the file as a RequestDataScouting JSON request.")
flag.Parse()
// Handle the actual arguments.
@@ -110,4 +112,15 @@
}
log.Printf("%+v", *response)
}
+ if *requestDataScoutingPtr != "" {
+ log.Printf("Sending RequestDataScouting to %s", *addressPtr)
+ binaryRequest := parseJson(
+ "scouting/webserver/requests/messages/request_data_scouting.fbs",
+ *requestDataScoutingPtr)
+ response, err := debug.RequestDataScouting(*addressPtr, binaryRequest)
+ if err != nil {
+ log.Fatal("Failed RequestDataScouting: ", err)
+ }
+ log.Printf("%+v", *response)
+ }
}