Add controller_cli — interactive node controller REPL

Connects to a running video node by host:port. Supports:
  enum-devices, enum-controls, get-control, set-control,
  start-ingest, stop-ingest

Uses semaphore-based request/response synchronisation (same pattern as
query_cli). start-ingest maps directly to the new START_INGEST protocol
command with optional format/size/fps args; defaults to auto-select.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 02:22:57 +00:00
parent 6747c9e00d
commit a2f438bbbb
3 changed files with 433 additions and 3 deletions

View File

@@ -27,7 +27,8 @@ CLI_SRCS = \
v4l2_view_cli.c \
stream_send_cli.c \
stream_recv_cli.c \
reconciler_cli.c
reconciler_cli.c \
controller_cli.c
CLI_OBJS = $(CLI_SRCS:%.c=$(CLI_BUILD)/%.o)
@@ -46,7 +47,8 @@ all: \
$(CLI_BUILD)/v4l2_view_cli \
$(CLI_BUILD)/stream_send_cli \
$(CLI_BUILD)/stream_recv_cli \
$(CLI_BUILD)/reconciler_cli
$(CLI_BUILD)/reconciler_cli \
$(CLI_BUILD)/controller_cli
# Module objects delegate to their sub-makes.
$(COMMON_OBJ): ; $(MAKE) -C $(ROOT)/src/modules/common
@@ -105,6 +107,9 @@ $(CLI_BUILD)/stream_recv_cli: $(CLI_BUILD)/stream_recv_cli.o $(COMMON_OBJ) $(SER
$(CLI_BUILD)/reconciler_cli: $(CLI_BUILD)/reconciler_cli.o $(RECONCILER_OBJ)
$(CC) $(CFLAGS) -o $@ $^
$(CLI_BUILD)/controller_cli: $(CLI_BUILD)/controller_cli.o $(COMMON_OBJ) $(SERIAL_OBJ) $(TRANSPORT_OBJ) $(PROTOCOL_OBJ)
$(CC) $(CFLAGS) -o $@ $^ -lpthread
$(CLI_BUILD):
mkdir -p $@
@@ -124,6 +129,7 @@ clean:
$(CLI_BUILD)/v4l2_view_cli \
$(CLI_BUILD)/stream_send_cli \
$(CLI_BUILD)/stream_recv_cli \
$(CLI_BUILD)/reconciler_cli
$(CLI_BUILD)/reconciler_cli \
$(CLI_BUILD)/controller_cli
-include $(CLI_OBJS:%.o=%.d)