Skip to content

Commit

Permalink
Merge pull request #46 from UlfBj/master
Browse files Browse the repository at this point in the history
Fix for forgotten type-to-variant updates.
  • Loading branch information
UlfBj authored Oct 15, 2024
2 parents 260441b + 77a0bd4 commit 430bfba
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions client/client-1.0/Javascript/appclient_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ Get request:


Get request for historic data:
{"action":"get","path":"Vehicle.Acceleration.Longitudinal","filter":{"type":"history","parameter":"P2DT12H"},"requestId":"234"}
{"action":"get","path":"Vehicle.Acceleration.Longitudinal","filter":{"variant":"history","parameter":"P2DT12H"},"requestId":"234"}

Get request with search:
{"action":"get","path":"Vehicle/Cabin/Door","filter":{"type":"paths","parameter":"*.*.IsOpen"},"requestId":"235"}
{"action":"get","path":"Vehicle.ADAS.ABS","filter":{"type":"paths","parameter":"*"},"requestId":"236"}
{"action":"get","path":"Vehicle/ADAS","filter":{"type":"paths","parameter":["ABS/*","CruiseControl/Error"]},"requestId":"237"}
{"action":"get","path":"Vehicle/Cabin/Door","filter":{"variant":"paths","parameter":"*.*.IsOpen"},"requestId":"235"}
{"action":"get","path":"Vehicle.ADAS.ABS","filter":{"variant":"paths","parameter":"*"},"requestId":"236"}
{"action":"get","path":"Vehicle/ADAS","filter":{"variant":"paths","parameter":["ABS/*","CruiseControl/Error"]},"requestId":"237"}


Get request with AT token (XXX must be replaced with actual token):
{"action":"get","path":"Vehicle/ADAS/CruiseControl/Error","authorization":"XXX","requestId":"241"}
{"action":"get","path":"Vehicle.Body.BodyType","authorization":"XXX","requestId":"243"}
{"action":"get","path":"Vehicle.Body.Bodyvariant","authorization":"XXX","requestId":"243"}

Metadata request:
{"action":"get","path":"Vehicle/ADAS/ABS","filter":{"type":"metadata","parameter":""},"requestId":"244"}
{"action":"get","path":"Vehicle/ADAS/ABS","filter":{"variant":"metadata","parameter":""},"requestId":"244"}

Set request:
{"action":"set", "path":"Vehicle/Cabin/Door/Row1/PassengerSide/IsOpen", "value":"999", "requestId":"245"}

Subscribe request:
{"action":"subscribe","path":"Vehicle/Cabin/Door/Row1/PassengerSide/IsOpen","filter":{"type":"timebased","parameter":{"period":"3000"}},"requestId":"246"}
{"action":"subscribe","path":"Vehicle.Cabin.Door.Row1.PassengerSide.IsOpen","filter":{"type":"change","parameter":{"logic-op":"ne", "diff":"0"}},"requestId":"247"}
{"action":"subscribe","path":"Vehicle/Cabin/Door/Row1/PassengerSide/IsOpen","filter":{"type":"range","parameter":{"logic-op":"gt","boundary":"500"}},"requestId":"255"}
{"action":"subscribe","path":"Vehicle/Cabin/Door/Row1/PassengerSide/IsOpen","filter":{"type":"range","parameter":[{"logic-op":"gt","boundary":"500"},{"logic-op":"lt","boundary":"510"}]},"requestId":"265"}
{"action":"subscribe","path":"Vehicle.Powertrain.Transmission.Speed","filter":{"type":"curvelog","parameter":{"maxerr":"2","bufsize":"100"}},"requestId":"275"}
{"action":"subscribe","path":"Vehicle","filter":[{"type":"paths","parameter":["CurrentLocation.Latitude", "CurrentLocation.Longitude"]}, {"type":"curvelog","parameter":{"maxerr":"0.00001","bufsize":"100"}}],"requestId":"285"}
{"action":"subscribe","path":"Vehicle/Cabin/Door/Row1/PassengerSide/IsOpen","filter":{"variant":"timebased","parameter":{"period":"3000"}},"requestId":"246"}
{"action":"subscribe","path":"Vehicle.Cabin.Door.Row1.PassengerSide.IsOpen","filter":{"variant":"change","parameter":{"logic-op":"ne", "diff":"0"}},"requestId":"247"}
{"action":"subscribe","path":"Vehicle/Cabin/Door/Row1/PassengerSide/IsOpen","filter":{"variant":"range","parameter":{"logic-op":"gt","boundary":"500"}},"requestId":"255"}
{"action":"subscribe","path":"Vehicle/Cabin/Door/Row1/PassengerSide/IsOpen","filter":{"variant":"range","parameter":[{"logic-op":"gt","boundary":"500"},{"logic-op":"lt","boundary":"510"}]},"requestId":"265"}
{"action":"subscribe","path":"Vehicle.Powertrain.Transmission.Speed","filter":{"variant":"curvelog","parameter":{"maxerr":"2","bufsize":"100"}},"requestId":"275"}
{"action":"subscribe","path":"Vehicle","filter":[{"variant":"paths","parameter":["CurrentLocation.Latitude", "CurrentLocation.Longitude"]}, {"variant":"curvelog","parameter":{"maxerr":"0.00001","bufsize":"100"}}],"requestId":"285"}

Unsubscribe request:
{"action":"unsubscribe","subscriptionId":"1","requestId":"240"}
Expand All @@ -54,12 +54,12 @@ URL: Vehicle.Acceleration.Longitudinal

Get request with search:
HTTP GET
URL: Vehicle/Cabin?filter={"type":"paths", "parameter":["Door/*/*/IsOpen", "Convertible/Status"]}
URL: Vehicle.ADAS?filter={"type":"paths", "parameter":["ABS.*", "CruiseControl.Error"]}
URL: Vehicle/Cabin?filter={"variant":"paths", "parameter":["Door/*/*/IsOpen", "Convertible/Status"]}
URL: Vehicle.ADAS?filter={"variant":"paths", "parameter":["ABS.*", "CruiseControl.Error"]}

Get request for historic data:
HTTP GET
URL: Vehicle.Acceleration.Longitudinal?filter={"type":"history", "parameter":"P2DT12H"}
URL: Vehicle.Acceleration.Longitudinal?filter={"variant":"history", "parameter":"P2DT12H"}

Set request:
HTTP POST
Expand All @@ -68,7 +68,7 @@ Payload: 0.123

Service discovery request:
HTTP GET
URL: Vehicle/ADAS/ABS?filter={"type":"metadata", "parameter":""}
URL: Vehicle/ADAS/ABS?filter={"variant":"metadata", "parameter":""}

// ********* Access control testing *************
// requires that a binary VSS file has been generated with "validate" tags added into vspec file(s) for the requested signals.
Expand All @@ -87,7 +87,7 @@ atserver

//VISSv2 server request for fuel-status use case:
wsclient_uncompressed.html:
{"action":"get","path":"Vehicle.Powertrain.FuelSystem","filter":{"type":"paths","parameter":["AbsoluteLevel","Range"]},"authorization":"at","requestId":"235"}
{"action":"get","path":"Vehicle.Powertrain.FuelSystem","filter":{"variant":"paths","parameter":["AbsoluteLevel","Range"]},"authorization":"at","requestId":"235"}
// where "at" is the Access Token from ATS request

http_client.html:
Expand Down
2 changes: 1 addition & 1 deletion utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func unpackFilterLevel2(index int, filterExpression map[string]interface{}, fLis
switch vv := v.(type) {
case string:
Info.Println(k, "is string", vv)
if k == "type" {
if k == "variant" {
(*fList)[index].Type = vv
} else if k == "parameter" {
(*fList)[index].Parameter = vv
Expand Down

0 comments on commit 430bfba

Please sign in to comment.