How broadbandforum/obuspa works
OB-USP-Agent is a C reference implementation of the USP Agent: a Controller manages the Agent’s exposed Service Element data model, and the Agent processes USP messages and returns responses. The map highlights the data-model and persistence layer, request execution, message/record handling, and supported transport families, plus the public integration API. The README establishes the product workflow and SOURCE INDEX references establish module relationships; where those sources do not show a specific runtime call, the relationship is omitted or marked unverified.
Main entry points: msg_handler.c Message handling · main.c Agent startup · data_model.c Data model · mtp_exec.c Transport execution
Components 25
Agent runtime
- Agent startup
src/core/main.c - Agent API
src/include/usp_api.h - Controller config
src/core/device_controller.c - Device interfaces
src/core/device.h - Core utilities
src/core/os_utils.h - Text conversion
src/core/text_utils.h - Date-time support
src/core/iso8601.c - List support
src/core/dllist.h - Common definitions
src/core/common_defs.h
Service data model
- Data model
src/core/data_model.c - Parameter database
src/core/database.c - Request execution
src/core/dm_exec.c
USP messaging
- Message handling
src/core/msg_handler.c - USP records
src/core/usp_record.h - E2E sessions
src/core/e2e_context.c - USP message schema
src/protobuf-c/usp-msg.pb-c.h - USP record schema
src/protobuf-c/usp-record.pb-c.h
Message transports
- Transport execution
src/core/mtp_exec.c - CoAP transport
src/core/coap_client.c - STOMP transport
src/core/stomp.c - MQTT transport
src/core/mqtt.c - WebSocket client
src/core/wsclient.c - WebSocket server
src/core/wsserver.c - Unix socket transport
src/core/uds.c
Other components
- USP Controller
Connections 16
- USP Controller → Message handling: sends requests
- Message handling → USP Controller: returns responses
- Agent startup → Request execution: starts execution
src/core/main.c - Agent startup → Data model: initializes
src/core/main.c - Agent startup → Parameter database: initializes
src/core/main.c - Message handling → Request execution: dispatches requests
src/core/msg_handler.c - Message handling → USP records: uses records
src/core/msg_handler.c - Message handling → E2E sessions: uses sessions
src/core/msg_handler.c - Message handling → Data model: uses data model
src/core/msg_handler.c - USP records → Transport execution: uses transports
src/core/usp_record.h - E2E sessions → USP record schema: uses schema
- Transport execution → USP message schema: uses messages
- WebSocket client → Message handling: uses message handler
src/core/wsclient.c - Agent startup → Transport execution: starts transport loop
src/core/main.c - Controller config → Data model: configures controllers
src/core/device_controller.c - Agent API → Data model: exposes data model API
src/include/usp_api.h