Device: WiVI: Add VIN support

This commit is contained in:
Emily Brooks
2025-10-08 15:49:03 -04:00
committed by Kyle Schwarz
parent ec350b522a
commit 99a2ca4f0d
5 changed files with 181 additions and 10 deletions
+7
View File
@@ -568,6 +568,12 @@ public:
NODISCARD("If the Lifetime is not held, the callback will be immediately removed")
Lifetime addLoggingCallback(ScriptStatusCallback cb) { return addScriptStatusCallback(ScriptStatus::Logging, std::move(cb)); }
typedef std::function<void(void)> VINAvailableCallback;
NODISCARD("If the Lifetime is not held, the callback will be immediately removed")
Lifetime addVINAvailableCallback(VINAvailableCallback cb);
std::optional<bool> isVINEnabled() const;
std::optional<std::string> getVIN() const;
virtual std::vector<std::shared_ptr<FlexRay::Controller>> getFlexRayControllers() const { return {}; }
void addExtension(std::shared_ptr<DeviceExtension>&& extension);
@@ -931,6 +937,7 @@ private:
std::atomic<bool> wiviSleepRequested{false};
std::vector<NewCaptureCallback> newCaptureCallbacks;
std::vector< std::pair<SleepRequestedCallback, bool /* notified */> > sleepRequestedCallbacks;
std::vector<std::pair<VINAvailableCallback, bool /* notified */>> vinAvailableCallbacks;
void wiviThreadBody();
void stopWiVIThreadIfNecessary(std::unique_lock<std::mutex> lk);