# query_cli An integration smoke test that combines discovery and protocol. Waits for a video node to appear on the local network, then sends an ENUM_DEVICES query and prints the results. Optionally enumerates controls on a specific device. --- ## Build From the repository root: ```sh make cli ``` The binary is placed in `build/cli/`. --- ## Usage ```sh ./query_cli [--timeout ms] [--controls device_index] ``` | Option | Default | Description | |---|---|---| | `--timeout ms` | `5000` | How long to wait for a node to appear (milliseconds) | | `--controls idx` | — | After enumeration, also query controls for this device index | Example — query the first node found within 5 s: ```sh ./query_cli ``` Example output: ``` discovered: camera:0 192.168.1.42:8000 querying devices... media /dev/media0 driver=unicam model=unicam bus=platform:fe801000.csi (1 video node) [0] video /dev/video0 entity=unicam-image type=0x00010001 caps=[video-capture] [capture] [1] standalone /dev/video1 card=USB Camera ``` Example with controls: ```sh ./query_cli --controls 1 ``` ``` ctrl id=0x00980900 Brightness int min=0 max=255 step=1 default=128 current=127 ctrl id=0x00980901 Contrast int min=0 max=255 step=1 default=128 current=128 ... ``` --- ## Relationship to the Video Routing System `query_cli` is an end-to-end integration test: it exercises discovery, transport, and protocol in one shot. It is the simplest way to verify that a node is reachable and responding correctly to control requests before using `controller_cli` for full interaction. See also: [`discovery_cli.md`](discovery_cli.md), [`controller_cli.md`](controller_cli.md).