Skip to content

Instantly share code, notes, and snippets.

@oberstet
Created September 28, 2020 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oberstet/efaba6eaaf4170b39550b25d6a28a5cd to your computer and use it in GitHub Desktop.
Save oberstet/efaba6eaaf4170b39550b25d6a28a5cd to your computer and use it in GitHub Desktop.

VSS-WAMP mapping variants

native mapping

Mapping convention - variant I ("native mapping")

  • VISS path: "Vehicle/Drivetrain/InternalCombustionEngine/RPM"
  • <VIN>: Vehicle ID

=>

  • WAMP prefix: "org.w3c.automotive.viss.vehicle.<VIN>.drivetrain.internal-combustion-engine.rpm"

Procedures:

  • <PREFIX>.get() -> rpm|int
  • <PREFIX>.get_history(from|string, to|string) -> [rpm|int] ...

Topics:

  • <PREFIX>.on_changed() -> rpm|int
  • <PREFIX>.on_limiter_triggered() -> timestamp|string ...

Given above, one can then:

  • WAMP regular-subscribe to: "org.w3c.automotive.viss.vehicle.<VIN>.drivetrain.internal-combustion-engine.rpm.on_changed"
  • WAMP prefix-subscribe to: "org.w3c.automotive.viss.vehicle.<VIN>.drivetrain."
  • WAMP wildcard-subscribe to: "org.w3c.automotive.viss.vehicle.*.drivetrain.internal-combustion-engine.rpm.on_changed"

If collective/structure signal retrieval is a goal, then one can provide eg

  • WAMP prefix: "org.w3c.automotive.viss.vehicle.<VIN>.drivetrain.internal-combustion-engine"

Procedures:

  • <PREFIX>.get() -> {"rpm": rpm|int, ...}
  • <PREFIX>.get_history(from|string, to|string) -> [{"rpm": rpm|int, ...}] ...

  • VISS path: "Vehicle/Drivetrain/Transmission/PerformanceMode"
  • <VIN>: Vehicle ID

=>

  • WAMP prefix: "org.w3c.automotive.viss.vehicle.<VIN>.transmission.performance-mode"

Procedures:

  • <PREFIX>.set(performance_mode|string) -> performance_mode|string ...

Topics:

  • <PREFIX>.on_changed() -> performance_mode|string ...

gen2-on-WAMP mapping

Mapping convention - variant II ("gen2-on-WAMP mapping")

"The transport protocols used to implement these methods MUST implement the Read and Update methods, and MAY implement the Subscribe, Unsubscribe, and Subscription methods."

  • <VIN>: Vehicle ID

=>

  • WAMP prefix: "org.w3c.automotive.viss.vehicle.<VIN>"

WAMP procedures (7.1.1 Read, 7.1.2 Update, 7.1.3 Subscribe, 7.1.4 Unsubscribe):

  • <PREFIX>.get(signal_path|string) -> current_value|type
  • <PREFIX>.update(signal_path|string, req_value|type) -> new_value|type
  • <PREFIX>.subscribe(signal_path|string, filter, ..) -> signal_subscription|int
  • <PREFIX>.unsubscribe(signal_subscription|int) -> - ...

WAMP topics (7.1.5 Subscription):

  • <PREFIX>.subscriptions.<signal_subscription|int>

summary

  • Vehicle Signal Specification (VSS) => np, can be mapped easily (and natively)
  • gen2 core (see below), gen2 transport: unneeded (for WAMP)
  • gen2 core:
    • Service Discovery => np, can use the WAMP meta API for that
    • Filtering => in this general way, only with (variant II) below. but ..
    • Access Control Model => no easy mapping - WAMP separates authentication and authorization, as well as decouples this from transport specific mechanisms. both are kinda convoluted in gen2 (core) IMO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment