Service: States
| This API is officially released and maintained. |
An RPC service to request a stream of states messages. If a pipeline is already running, it will be used to stream the data. If no pipeline is running, it will be started first and then the stream will start. NOTE: in this second case, the pipeline will also be automatically stopped once there are no more clients requesting any stream type from the module.
| Method | Request | Response |
|---|---|---|
StatesStreamResponseStream |
||
Stream
A method to get a stream of states messages from the pipeline
Get
PreviewStream
Streams the state a zone would have, for a zone which does not have to be stored.
The zone travels with the request, so it can be tried out - placed, sized, tuned - against what the device sees before it is created, and an edit of a stored zone can be tried before it is applied. Every frame of the running pipeline is evaluated by the zone’s own algorithm, as it would be once stored, and the configured zones are not affected.
Occupancy, security, object based security and traversal security zones are previewed in a security setup, occupancy and volume zones in a volume setup. A traffic lane answers UNIMPLEMENTED, a zone the running setup does not evaluate FAILED_PRECONDITION. Injected states are not previewed. An object which is already tracked when the stream starts is evaluated as if it had just appeared.
The coverage of a security, object based security or traversal security zone is measured even while it configures no minimum coverage, so that how much of the zone the sensor sees is known before its tampering alarm is switched on. On a swarm leader every device measures it on its own beams, and the leader decides over them as for a stored zone; zone_coverage then holds the beams of all of them.
Request
Request for the preview of a zone
| Field | Type | Default | Unit |
|---|---|---|---|
zone |
- |
- |
|
The zone to preview. It does not have to be a configured one. |
|||
Response Stream
A frame of the preview of a zone
| Field | Type | Default | Unit |
|---|---|---|---|
states |
- |
- |
|
The state of the previewed zone, keyed by its uuid, as the stream of the configured zones reports them. Holds no entry for a frame on which the zone is switched off by an occupancy zone it is linked to. |
|||
zone_coverage |
optional core_processing.data.Frame |
- |
- |
The beams which reach the zone, drawn where they enter it. A blocked beam is a hole in it. Empty when no beam of the sensor reaches the zone, which then reports no coverage. Absent where the coverage of the zone is not measured, see PreviewStream. |
|||