BeNav5RNC API
Android

configureAlerts

Command

Configure traffic signs and vehicle alerts

Send this JSON-RPC message in the BND_MESSAGE extra of an Intent with the action ACTION_RNC_BROADCAST, to BeNav's activity or receiver: see Sending commands.

Decides which hazards BeNav warns the driver about, and how far ahead. Two families: vehicle profile alerts, which fire when the road ahead cannot take this vehicle's height, length, width, weight, axle weight or dangerous-goods class; and traffic sign alerts for road features such as stop signs, sharp curves, level crossings, steep gradients or school zones.

Each alert can be turned on or off individually, given its own warning distance, and made silent or audible, so an operator can set a warning policy centrally instead of leaving it to each driver's settings screen.

Worth knowing

  • Vehicle profile alerts are evaluated against a profile the client application nominates, so the warnings match the vehicle actually being driven.
  • Unknown alert types are ignored rather than rejected, so a client application can send its full set without knowing which BeNav release it is talking to.
  • These are warnings to the driver. Keeping the vehicle off unsuitable roads in the first place is the vehicle profile's job.
Example: a policy that matches the load

A tanker operator wants generous warning of height and weight restrictions (800 m rather than the default) with sound on, because stopping takes distance. It leaves school-zone alerts on but silent, to avoid a cab full of chimes in town.

The same command is re-sent whenever the vehicle changes configuration, so the warnings follow the load.

Command#

json
{
  "jsonrpc": "2.0",
  "method": "configureAlerts",
  "id": "test_alerts",
  "params": {
    "vehicleProfileAlerts": {
      "enabled": true,
      "sound": false,
      "vehicleProfileId": "2",
      "alerts": [
        { "type": "height", "enabled": true, "sound": true, "distance": 400 },
        { "type": "weight", "enabled": true, "sound": false, "distance": 300 }
      ]
    },
    "trafficSignsAlerts": {
      "enabled": true,
      "sound": true,
      "alerts": [
        { "type": "stop", "enabled": true, "sound": true, "distance": 200 }
      ]
    }
  }
}

Specific parameters

  • vehicleProfileAlerts
    • enabled Globally enable/disable vehicle profile alerts.
    • sound Globally enable/disable the alert sound.
    • vehicleProfileId Id of the vehicle profile to use for the alerts. An RNC vehicle id (as used by the other vehicle RNC commands) resolves; an in-app profile id also resolves where one is known. The selection is persisted exactly like a pick in the app's alerts settings: the alerts screen shows the profile's name, and it survives an app restart. If the profile is not found the command fails with error 27 profile.not.found.error and nothing is applied. Omit to keep the current selection unchanged.
      To address a profile you created yourself, create it first with editVehicleProfile.
    • alerts Per-restriction settings. Each entry: type (string), enabled, sound, distance (metres, app UI uses 100-1000 in steps of 100, default 400). Unknown types are ignored.
      Accepted restriction type values: height, length, width, weight, weightAxle, hazmat (includes ADR tunnel category), trafficDirection (vehicle type not allowed on segment).
  • trafficSignsAlerts
    • enabled Globally enable/disable vehicle profile alerts.
    • sound Globally enable/disable the alert sound.
    • alerts Accepted sign type values: stop, sharpCurves, windingRoad, railwayCrossing, roadNarrows, steepHillUp, steepHillDown, lateralWind, riskOfGrounding, stNoOvertaking, endNoOvertaking, stNoOvertakingTrucks, endNoOvertakingTrucks, animalCrossing, icyConditions, slipperyRoads, fallingRocks, schoolZone.

Response#

Generic responses