wangzhibo
4 天以前 ae6f40460dcd56af6c5f60ba52c883854c3bac55
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
syntax = "proto2";
 
package garmin_vivomovehr;
 
option java_package = "nodomain.freeyourgadget.gadgetbridge.proto.garmin";
 
message CoreService {
    optional SyncRequest sync_request = 1;
    optional SyncResponse sync_response = 2;
    optional GetLocationRequest get_location_request = 3;
    optional GetLocationResponse get_location_response = 4;
    optional LocationUpdatedSetEnabledRequest location_updated_set_enabled_request = 5;
    optional LocationUpdatedSetEnabledResponse location_updated_set_enabled_response = 6;
    optional LocationUpdatedNotification location_updated_notification = 7;
 
    message SyncRequest {
    }
 
    message SyncResponse {
        optional ResponseStatus status = 1;
 
        enum ResponseStatus {
            UNKNOWN_RESPONSE_STATUS = 0;
            OK = 1;
        }
    }
 
    message GetLocationRequest {
        optional RequestType request_type = 1;
 
        enum RequestType {
            STANDARD = 0;
            EMERGENCY = 1;
        }
    }
 
    message GetLocationResponse {
        optional Status status = 1;
        optional LocationData location_data = 2;
 
        enum Status {
            OK = 1;
            NO_VALID_LOCATION = 2;
            LOCATION_SERVICES_UNAVAILABLE = 3;
            LOCATION_SERVICES_DISABLED = 4;
            TRY_AGAIN_LATER = 5;
        }
    }
 
    enum DataType {
        SIGNIFICANT_LOCATION = 0;
        GENERAL_LOCATION = 1;
        REALTIME_TRACKING = 2;
        INREACH_TRACKING = 3;
        TRACKING_EVENT = 4;
    }
 
    message LocationUpdatedSetEnabledRequest {
        optional bool enabled = 1;
        repeated Request requests = 2;
    }
 
    message Request {
        optional DataType requested = 1;
        optional float min_update_threshold = 2;
        optional float distance_threshold = 3;
    }
 
    message LocationUpdatedSetEnabledResponse {
        optional Status status = 1;
        repeated Requested requests = 2;
 
        enum Status {
            OK = 1;
            UNAVAILABLE = 2;
            UNKNOWN3 = 3;
            UNKNOWN4 = 4;
        }
 
        message Requested {
                optional DataType requested = 1;
                optional RequestedStatus status = 2;
 
                enum RequestedStatus {
                    OK = 1;
                    KO = 2;
                }
 
        }
    }
 
    message LocationUpdatedNotification {
        repeated LocationData location_data = 1;
    }
 
    message LocationData {
        required LatLon position=1;
        required float altitude=2;
        required uint32 timestamp=3;
        required float h_accuracy=4;
        required float v_accuracy=5;
        required DataType position_type=6;
        required float bearing=9;
        required float speed=10;
    }
 
    message LatLon {
        required sint32 lat = 1;
        required sint32 lon = 2;
    }
 
}