pass 1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "RuntimeJson.h"
|
||||
#include "RuntimeCoordinator.h"
|
||||
#include "ShaderTypes.h"
|
||||
|
||||
#include <atomic>
|
||||
@@ -16,12 +17,10 @@ class OpenGLComposite;
|
||||
class OscServer;
|
||||
class RuntimeStore;
|
||||
|
||||
struct RuntimePollEvents
|
||||
struct RuntimeCoordinatorServiceResult
|
||||
{
|
||||
bool registryChanged = false;
|
||||
bool reloadRequested = false;
|
||||
RuntimeCoordinatorResult result;
|
||||
bool failed = false;
|
||||
std::string error;
|
||||
};
|
||||
|
||||
class ControlServices
|
||||
@@ -45,7 +44,7 @@ public:
|
||||
~ControlServices();
|
||||
|
||||
bool Start(OpenGLComposite& composite, RuntimeStore& runtimeStore, std::string& error);
|
||||
void BeginPolling(RuntimeStore& runtimeStore);
|
||||
void BeginPolling(RuntimeCoordinator& runtimeCoordinator);
|
||||
void Stop();
|
||||
void BroadcastState();
|
||||
void RequestBroadcastState();
|
||||
@@ -54,7 +53,7 @@ public:
|
||||
bool QueueOscCommit(const std::string& routeKey, const std::string& layerKey, const std::string& parameterKey, const JsonValue& value, uint64_t generation, std::string& error);
|
||||
void ClearOscState();
|
||||
void ConsumeCompletedOscCommits(std::vector<CompletedOscCommit>& completedCommits);
|
||||
RuntimePollEvents ConsumePollEvents();
|
||||
void ConsumeRuntimeCoordinatorResults(std::vector<RuntimeCoordinatorServiceResult>& results);
|
||||
|
||||
private:
|
||||
struct PendingOscUpdate
|
||||
@@ -73,19 +72,17 @@ private:
|
||||
uint64_t generation = 0;
|
||||
};
|
||||
|
||||
void StartPolling(RuntimeStore& runtimeStore);
|
||||
void StartPolling(RuntimeCoordinator& runtimeCoordinator);
|
||||
void StopPolling();
|
||||
void PollLoop(RuntimeStore& runtimeStore);
|
||||
void PollLoop(RuntimeCoordinator& runtimeCoordinator);
|
||||
void QueueRuntimeCoordinatorResult(const RuntimeCoordinatorResult& result, bool failed = false);
|
||||
|
||||
std::unique_ptr<ControlServer> mControlServer;
|
||||
std::unique_ptr<OscServer> mOscServer;
|
||||
std::thread mPollThread;
|
||||
std::atomic<bool> mPollRunning;
|
||||
std::atomic<bool> mRegistryChanged;
|
||||
std::atomic<bool> mReloadRequested;
|
||||
std::atomic<bool> mPollFailed;
|
||||
std::mutex mPollErrorMutex;
|
||||
std::string mPollError;
|
||||
std::mutex mRuntimeCoordinatorResultMutex;
|
||||
std::vector<RuntimeCoordinatorServiceResult> mRuntimeCoordinatorResults;
|
||||
std::mutex mPendingOscMutex;
|
||||
std::map<std::string, PendingOscUpdate> mPendingOscUpdates;
|
||||
std::mutex mPendingOscCommitMutex;
|
||||
|
||||
Reference in New Issue
Block a user