#include "Tactility/service/ServiceManifest.h" #include "Tactility/service/ServiceRegistry.h" #include "Tactility/service/gps/GpsService.h" using tt::hal::gps::GpsDevice; namespace tt::service::gps { extern ServiceManifest manifest; static std::shared_ptr findGpsService() { auto service = findServiceById(manifest.id); assert(service != nullptr); return std::static_pointer_cast(service); } void addGpsDevice(const std::shared_ptr& device) { return findGpsService()->addGpsDevice(device); } void removeGpsDevice(const std::shared_ptr& device) { return findGpsService()->removeGpsDevice(device); } bool startReceiving() { return findGpsService()->startReceiving(); } void stopReceiving() { findGpsService()->stopReceiving(); } bool isReceiving() { return findGpsService()->isReceiving(); } } // namespace tt::service::gps