Framework source verification (2026-10-27)
This page documents the provided ese774_frame source snapshot, not a claim of successful network or hardware testing. The ten inspected modules are preserved under source_reference/ese774_frame/ for traceability.
Verified dispatch contract
FastApiServer creates the device inside the FastAPI lifespan, then constructs the router and registers its routes. With api_spec=None, it selects router_cls if supplied, otherwise DeviceRouter. With a non-None api_spec, a router_cls is mandatory. The default Dobot configuration uses the automatic mode.
DeviceRouter provides POST /instance/{object_name}/__dispatch__, GET /instance/{object_name}/__meta__, GET /instance/{object_name}/__property__/{property_name}, and PUT /instance/{object_name}/__property__/{property_name}. Automatic mode also registers a per-method GET/POST route. The dispatch payload accepts only method, args, and kwargs; extra keys yield HTTP 422 and a missing method yields HTTP 400. In automatic mode, custom router overrides take precedence over public device members. Private members and names in dispatch_exclude are excluded from dynamic lookup.
The dispatch handler awaits coroutine functions and directly invokes synchronous functions. Thus a long-running synchronous device call may block the request handler; this source alone does not establish nonblocking execution or safe concurrent robot commands. Exceptions other than explicit HTTP exceptions are mapped to HTTP 500. On shutdown, disconnect() is invoked if callable. Do not equate HTTP request completion with completed robot motion.
DeviceProxy uses an explicit registry. It chooses the registered async/sync client, falling back to framework clients when the corresponding class is absent. async_mode=None uses the registration’s default_async_mode (default True); aliases are registered separately.
Source inventory
Module |
Classes |
Function definitions (including methods) |
|---|---|---|
|
FastApiServer |
3 |
|
_BytesJsonEncoder |
17 |
|
DeviceRouter |
21 |
|
— |
2 |
|
ApiSpec |
4 |
|
SyncDeviceClient |
22 |
|
— |
2 |
|
— |
15 |
|
DeviceProxyEntry |
8 |
|
AsyncDeviceClient |
19 |
Validation boundary
Python AST parsing and documentation-link checks can validate structure, not server startup, serialization round trips, network transport, motion completion, or safety behavior. The Python modules in source_reference/ are reference copies, not replacements for the installed package.