Detector settings
Use this method for interacting with the settings of Detectors.
Requesting data
If you want to obtain information about the basic settings of the DT, the external client must initiate a request as follows:
url_smartroad/api/integration/sensors?login=user_login&password=user_password
Additional parameters can be entered sensor_id
And project_id
, where sensor_id
–unique detector identifiers (one or more), and project_id
–the ID of the project whose detectors you want to get settings for.
Description of additional (optional) request address parameters
Parameter | Parameter type | Description |
---|---|---|
sensor_id | string | Unique detector identifiers (one or more). |
project_id | string | ID of the project for whose detectors you want to get settings. |
Receiving data
When a correct request is received, the System generates a response message in JSON
format.
Example of a response message:
[
{
"sensor_id": "dcd11dc8-dfdf-dedc-8de8-1deadb646a0b",
"name": "Test_sensor",
"ip": "127.0.0.1",
"place_name": "Test",
"picket_name": "15+453",
"gps_latitude": 55.72767,
"gps_longitude": 37.45782,
"gps_latitude_x": 56.10927,
"gps_longitude_x": 37.95879,
"serial_number": "test01",
"lanes_count": 2,
"lanes": [
{
"lane_index": 0,
"lane_width": 3.5,
"lane_direction_sensor": -1,
"lane_direction_zkm": 0,
"zones": [
{
"zone_index": 0,
"zone_width": 3.5,
"zone_direction_sensor": -1,
"zone_classes": 15,
"zone_segments_count": 2,
"zone_segments": [
{
"x": 80,
"and": 4,
"index": 0
},
{
"x": 84,
"and": 4,
"index": 1
}
]
}
]
},
{
"lane_index": 1,
"lane_width": 3.5,
"lane_direction_sensor": -1,
"lane_direction_zkm": 0,
"zones": [
{
"zone_index": 1,
"zone_width": 3.5,
"zone_direction_sensor": -1,
"zone_classes": 15,
"zone_segments_count": 2,
"zone_segments": [
{
"x": 80,
"and": 4,
"index": 0
},
{
"x": 84,
"and": 4,
"index": 1
}
]
}
]
}
]
}
]
Description of JSON
message parameters regarding events
Parameter | Data type | Description |
---|---|---|
name | string | Detector name on the System |
ip | string | Detector IP address |
place | string | Site name (detector location) |
gps_latitude | string | Geographic coordinate of the detector (latitude) |
gps_longitude | string | Geographic coordinate of the detector (longitude) |
gps_latitude_x | string | X-point coordinates (latitude) |
gps_longitude_x | string | X-point coordinates (longitude) |
lanes_count | int | Number of lanes |
lanes | group | Stripes |
lane_index | int | Lane number |
lane_width | int | Bandwidth |
zone | group | Zone |
zone_index | int | Zone number |
length | int | Zone length |
width | int | Zone width |
direction | int | Zone direction |
zone_offset | int | Distance from detector |