Documentation
¶
Overview ¶
Package alarms follows a camera's own detection state: it holds a Baichuan session subscribed to alarm events (message 31, then 33 pushes) and reports each change -- motion starting or stopping, an object type appearing or going away. It only listens; nothing on the camera changes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Watch ¶
func Watch(ctx context.Context, camera string, dial func(context.Context) (*baichuan.Conn, error), fn func(Change))
Watch follows one camera until ctx ends, reconnecting with backoff, and calls fn for every change. A lost connection ends whatever was on, so a listener is never left believing motion continues.