Deployment and persistence
Three services make CAMS run offline and keep its state:
SmartphoneDeploymentServiceis an in-memoryDeploymentServicethat deploys a protocol on this phone. Use a remote one (e.g. CAWS) to deploy from a server.PersistenceServicekeeps studies (tablestudies) and the user task queue (tabletask_queue) in SQLite, so they are restored after an app restart.FileStudyProtocolManagerreads and writes protocol JSON files, implementing theStudyProtocolManagerinterface.
Where in the repo
Section titled “Where in the repo”| File | What is in it |
|---|---|
infrastructure/services/deployment_service.dart |
SmartphoneDeploymentService |
infrastructure/services/persistence_service.dart |
PersistenceService |
infrastructure/services/file_protocol_manager.dart |
FileStudyProtocolManager: ~/carp/study/study-<id>.json |
infrastructure/services/device_info_service.dart |
DeviceInfoService: static hardware information |