feat: Integrate auto-recording feature into USDA Vision Camera System
- Added instructions for implementing auto-recording functionality in the React app. - Updated TypeScript interfaces to include new fields for auto-recording status and configuration. - Created new API endpoints for enabling/disabling auto-recording and retrieving system status. - Enhanced UI components to display auto-recording status, controls, and error handling. - Developed a comprehensive Auto-Recording Feature Implementation Guide. - Implemented a test script for validating auto-recording functionality, including configuration checks and API connectivity. - Introduced AutoRecordingManager to manage automatic recording based on machine state changes with retry logic. - Established a retry mechanism for failed recording attempts and integrated status tracking for auto-recording.
This commit is contained in:
@@ -291,6 +291,48 @@ POST http://localhost:8000/cameras/camera2/stop-recording
|
||||
# "duration_seconds": 45.2
|
||||
# }
|
||||
|
||||
###############################################################################
|
||||
# AUTO-RECORDING CONTROL ENDPOINTS
|
||||
###############################################################################
|
||||
|
||||
### Enable auto-recording for a camera
|
||||
POST http://localhost:8000/cameras/camera1/auto-recording/enable
|
||||
POST http://localhost:8000/cameras/camera2/auto-recording/enable
|
||||
# No request body required
|
||||
# Response: AutoRecordingConfigResponse
|
||||
# {
|
||||
# "success": true,
|
||||
# "message": "Auto-recording enabled for camera1",
|
||||
# "camera_name": "camera1",
|
||||
# "enabled": true
|
||||
# }
|
||||
|
||||
###
|
||||
|
||||
### Disable auto-recording for a camera
|
||||
POST http://localhost:8000/cameras/camera1/auto-recording/disable
|
||||
POST http://localhost:8000/cameras/camera2/auto-recording/disable
|
||||
# No request body required
|
||||
# Response: AutoRecordingConfigResponse
|
||||
# {
|
||||
# "success": true,
|
||||
# "message": "Auto-recording disabled for camera1",
|
||||
# "camera_name": "camera1",
|
||||
# "enabled": false
|
||||
# }
|
||||
|
||||
###
|
||||
|
||||
### Get auto-recording manager status
|
||||
GET http://localhost:8000/auto-recording/status
|
||||
# Response: AutoRecordingStatusResponse
|
||||
# {
|
||||
# "running": true,
|
||||
# "auto_recording_enabled": true,
|
||||
# "retry_queue": {},
|
||||
# "enabled_cameras": ["camera1", "camera2"]
|
||||
# }
|
||||
|
||||
###############################################################################
|
||||
# CAMERA RECOVERY & DIAGNOSTICS ENDPOINTS
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user