segment-result.proto 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. syntax = "proto2";
  2. import "profile.proto"; //enums PowerType, PlayerType and Sport
  3. message SegmentResult {
  4. optional uint64 id = 1;
  5. required uint64 player_id = 2;
  6. optional uint64 server_realm = 3;
  7. optional uint64 course_id = 4;
  8. optional int64 segment_id = 5;
  9. optional uint64 event_subgroup_id = 6;
  10. required string first_name = 7; //only first letter
  11. required string last_name = 8;
  12. optional uint64 world_time = 9;
  13. optional string finish_time_str = 10;
  14. required uint64 elapsed_ms = 11;
  15. optional PowerType power_source_model = 12; //(in ZNETWORK_RegisterPlayerSegmentResult from m_bikeEntity->m_hasPowerMeter)
  16. optional uint32 weight_in_grams = 13;
  17. optional uint32 f14 = 14; //:=0 in Leaderboards::SetPlayerSegmentResult
  18. optional uint32 avg_power = 15;
  19. optional bool is_male = 16;
  20. optional string time = 17; //ISO8601 (magicLeaderboardBirthday := const @ ZNETWORK_Initialize)
  21. optional PlayerType player_type = 18;
  22. optional uint32 avg_hr = 19; //(ZNETWORK_RaceResultEntrySaveRequest):=m_computer.m_accumHeartRate/m_computer.m_accumTime @ZNETWORK_RegisterLocalPlayersSegmentResult (or 0.0)
  23. optional Sport sport = 20;
  24. optional int64 activity_id = 21; //(may be -1)
  25. optional bool f22 = 22;
  26. optional string f23 = 23; //only first letter of first_name
  27. }
  28. message SegmentResults {
  29. required uint64 server_realm = 1;
  30. required int64 segment_id = 2;
  31. optional uint64 event_subgroup_id = 3;
  32. repeated SegmentResult segment_results = 4;
  33. }
  34. message SegmentRideStats {
  35. required int64 segment_id = 1;
  36. optional uint32 f2 = 2;
  37. optional uint32 number_of_results = 3;
  38. optional uint64 latest_time = 4;
  39. optional float latest_percentile = 5;
  40. optional uint64 best_time = 6;
  41. optional float best_percentile = 7;
  42. }