Add D455 sensor host and shared Node/Core preparation surface
This commit is contained in:
@@ -83,3 +83,27 @@ def fleet_revoke(vehicle_id: str, fleet: Annotated[FleetRegistry, Depends(local_
|
||||
return fleet.revoke(vehicle_id)
|
||||
except PairingError as error:
|
||||
raise HTTPException(404, str(error)) from None
|
||||
|
||||
|
||||
@router.post("/{vehicle_id}/devices/operations")
|
||||
def sensor_command(
|
||||
vehicle_id: str, body: dict, fleet: Annotated[FleetRegistry, Depends(local_operator)]
|
||||
):
|
||||
from k1link.fleet.sensors import submit
|
||||
|
||||
try:
|
||||
return submit(fleet, vehicle_id, body)
|
||||
except (PairingError, ValueError) as error:
|
||||
raise HTTPException(409, str(error)) from None
|
||||
|
||||
|
||||
@router.get("/{vehicle_id}/devices/operations/{operation_id}")
|
||||
def sensor_operation(
|
||||
vehicle_id: str, operation_id: str, fleet: Annotated[FleetRegistry, Depends(local_operator)]
|
||||
):
|
||||
from k1link.fleet.sensors import operation
|
||||
|
||||
try:
|
||||
return operation(fleet, vehicle_id, operation_id)
|
||||
except PairingError as error:
|
||||
raise HTTPException(404, str(error)) from None
|
||||
|
||||
Reference in New Issue
Block a user