-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebsoocket_request_sample.json
More file actions
142 lines (122 loc) · 4.04 KB
/
websoocket_request_sample.json
File metadata and controls
142 lines (122 loc) · 4.04 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
//search
{
"action": "get",
"path": "Vehicle",
"filter": {"op-type":"paths", "op-value":"IsMoving"},
"requestId": "5688"
}
{
"action": "get",
"path": "Vehicle",
"filter": {"op-type":"paths", "op-value":["Cabin/Door/*/*/IsOpen", "IsMoving"]},
"requestId": "5688"
}
// unsub
{
"action": "unsubscribe",
"subscriptionId": "76ab3308-d9b5-4bc5-ade8-2c114ab478e6",
"requestId": "6578"
}
//sub
{
"action": "subscribe",
"path": "Vehicle/Cabin/Door/*/*/IsOpen",
"filter": {"op-type":"capture", "op-value":"time-based", "op-extra":{"period":"6"}},
"requestId": "6578"
}
{
"action": "subscribe",
"path": "Vehicle/Powertrain/FuelSystem/Level",
"filter": {"op-type":"capture", "op-value":"time-based", "op-extra":{"period":"6"}},
"requestId": "6578"
}
//sub single path
{
"action": "subscribe",
"path": "Vehicle/IsMoving",
"filter": {"op-type":"capture", "op-value":"time-based", "op-extra":{"period":"6"}},
"requestId": "6578"
}
//sub single path number
{
"action": "subscribe",
"path": "Vehicle/Powertrain/FuelSystem/Level",
"filter": {"op-type":"capture", "op-value":"time-based", "op-extra":{"period":"6"}},
"requestId": "6578"
}
//sub range single path number
// ["eq", "ne", "gt", "gte", "lt", "lte"],
{
"action": "subscribe",
"path": "Vehicle/Powertrain/FuelSystem/Level",
"filter": {"op-type":"capture", "op-value":"range", "op-extra":{"logic-op":"gt", "boundary": "0.1"}},
"requestId": "6578"
}
//sub change
// ["eq", "ne", "gt", "gte", "lt", "lte"],
{
"action": "subscribe",
"path": "Vehicle/Powertrain/FuelSystem/Level",
"filter": {"op-type":"capture", "op-value":"change", "op-extra":{"logic-op":"gt", "diff": "0.3"}},
"requestId": "6578"
}
//sub change wrong path case 1: no such thing
{
"action": "subscribe",
"path": "Vehicle/Powertrain/FuelSystem/Level/1",
"filter": {"op-type":"capture", "op-value":"change", "op-extra":{"logic-op":"lt", "diff": "0.3"}},
"requestId": "6578"
}
//sub change wrong path case 2: cannot compare
{
"action": "subscribe",
"path": "Vehicle/IsMoving",
"filter": {"op-type":"capture", "op-value":"change", "op-extra":{"logic-op":"lt", "diff": "0.3"}},
"requestId": "6578"
}
//sub change wrong path case 3: cannot compare
{
"action": "subscribe",
"path": "Vehicle/Cabin/Infotainment/HMI/DayNightMode",
"filter": {"op-type":"capture", "op-value":"change", "op-extra":{"logic-op":"lt", "diff": "0.3"}},
"requestId": "6578"
}
//sub change wrong path case 4: diff not number
{
"action": "subscribe",
"path": "Vehicle/Powertrain/FuelSystem/Level",
"filter": {"op-type":"capture", "op-value":"change", "op-extra":{"logic-op":"lt", "diff": "0ddd"}},
"requestId": "6578"
}
//sub curve-logging:
{
"action": "subscribe",
"path": "Vehicle/Speed",
"filter": {"op-type":"capture", "op-value":"curve-logging", "op-extra":{"max-err":"0.1", "buf-size":"20"}},
"requestId": "6578"
}
{
"action": "subscribe",
"path": "Vehicle/OBD/FuelLevel",
"filter": {"op-type":"capture", "op-value":"curve-logging", "op-extra":{"max-err":"0.1", "buf-size":"20"}},
"requestId": "6578",
"authorization": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjI5NDQ4MjY1LCJqdGkiOiIxODg4YTg2MzZjYjA0NGM0ODI0YWNjYzJlOGJiMTFhMCIsInVzZXJfaWQiOjJ9.r9WMkRKevH6SnsT2eDpjjE6yHnBHUo21HhI40E1XKVE"
}
{
"action": "subscribe",
"path": "Vehicle/OBD/FuelLevel",
"filter": {"op-type":"capture", "op-value":"range", "op-extra":[{"logic-op":"gt", "boundary":"10"}, {"logic-op":"lt", "boundary":"81"}]},
"requestId": "6578"
}
{
"action": "subscribe",
"path": "Vehicle/OBD/FuelLevel",
"filter": {"op-type":"capture", "op-value":"range", "op-extra":{"logic-op":"gte", "boundary":"0.8"}},
"requestId": "6578"
}
{
"action": "subscribe",
"path": "Vehicle/OBD/FuelLevel",
"filter": {"op-type":"capture", "op-value":"range", "op-extra":[{"logic-op":"gt", "boundary": "0.1"}, {"logic-op":"lte", "boundary": "0.4"}]},
"requestId": "6578"
}