mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-04 02:29:49 -06:00
Rename 'slave' to 'client' in the remaining code
This commit is contained in:
@@ -1319,7 +1319,7 @@ int main(int argc, char* argv[]) {
|
||||
#endif // __APPLE__
|
||||
|
||||
|
||||
// Do not print message if slaves are waiting for the master
|
||||
// Do not print message if clients are waiting for the master
|
||||
// Only timeout after 15 minutes
|
||||
Engine::instance().setSyncParameters(false, 15.f * 60.f);
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
|
||||
/**
|
||||
* Decodes the <code>SyncBuffer</code> into the added Syncables.
|
||||
* This method is only called on the SGCT slave nodes
|
||||
* This method is only called on the SGCT client nodes
|
||||
*/
|
||||
void decodeSyncables(std::vector<std::byte> data);
|
||||
|
||||
|
||||
@@ -172,7 +172,7 @@ private:
|
||||
|
||||
ghoul::opengl::OpenGLStateCache* _openglStateCache = nullptr;
|
||||
|
||||
properties::BoolProperty _showOverlayOnSlaves;
|
||||
properties::BoolProperty _showOverlayOnClients;
|
||||
properties::BoolProperty _showLog;
|
||||
properties::FloatProperty _verticalLogOffset;
|
||||
properties::BoolProperty _showVersionInfo;
|
||||
|
||||
@@ -115,10 +115,10 @@ private:
|
||||
|
||||
std::queue<QueueItem> _incomingScripts;
|
||||
|
||||
// Slave scripts are mutex protected since decode and rendering may
|
||||
// happen asynchronously.
|
||||
std::mutex _slaveScriptsMutex;
|
||||
std::queue<std::string> _slaveScriptQueue;
|
||||
// Client scripts are mutex protected since decode and rendering may happen
|
||||
// asynchronously
|
||||
std::mutex _clientScriptsMutex;
|
||||
std::queue<std::string> _clientScriptQueue;
|
||||
std::queue<QueueItem> _masterScriptQueue;
|
||||
|
||||
std::vector<std::string> _scriptsToSync;
|
||||
|
||||
@@ -48,7 +48,7 @@ std::vector<std::byte> SyncEngine::encodeSyncables() {
|
||||
return data;
|
||||
}
|
||||
|
||||
// Should be called on sgct slaves
|
||||
// Should be called on sgct clients
|
||||
void SyncEngine::decodeSyncables(std::vector<std::byte> data) {
|
||||
_syncBuffer.setData(std::move(data));
|
||||
for (Syncable* syncable : _syncables) {
|
||||
|
||||
@@ -94,11 +94,11 @@ namespace {
|
||||
constexpr const char* KeyFontMono = "Mono";
|
||||
constexpr const char* KeyFontLight = "Light";
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo ShowOverlaySlavesInfo = {
|
||||
"ShowOverlayOnSlaves",
|
||||
"Show Overlay Information on Slaves",
|
||||
constexpr openspace::properties::Property::PropertyInfo ShowOverlayClientsInfo = {
|
||||
"ShowOverlayOnClients",
|
||||
"Show Overlay Information on Clients",
|
||||
"If this value is enabled, the overlay information text is also automatically "
|
||||
"rendered on the slave nodes. This values is disabled by default."
|
||||
"rendered on client nodes. This values is disabled by default."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo ShowLogInfo = {
|
||||
@@ -280,7 +280,7 @@ namespace openspace {
|
||||
|
||||
RenderEngine::RenderEngine()
|
||||
: properties::PropertyOwner({ "RenderEngine" })
|
||||
, _showOverlayOnSlaves(ShowOverlaySlavesInfo, false)
|
||||
, _showOverlayOnClients(ShowOverlayClientsInfo, false)
|
||||
, _showLog(ShowLogInfo, true)
|
||||
, _verticalLogOffset(VerticalLogOffsetInfo, 0.f, 0.f, 1.f)
|
||||
, _showVersionInfo(ShowVersionInfo, true)
|
||||
@@ -321,7 +321,7 @@ RenderEngine::RenderEngine()
|
||||
, _enabledFontColor(EnabledFontColorInfo, glm::vec4(0.2f, 0.75f, 0.2f, 1.f))
|
||||
, _disabledFontColor(DisabledFontColorInfo, glm::vec4(0.55f, 0.2f, 0.2f, 1.f))
|
||||
{
|
||||
addProperty(_showOverlayOnSlaves);
|
||||
addProperty(_showOverlayOnClients);
|
||||
addProperty(_showLog);
|
||||
addProperty(_verticalLogOffset);
|
||||
addProperty(_showVersionInfo);
|
||||
@@ -804,7 +804,7 @@ void RenderEngine::renderOverlays(const ShutdownInformation& shutdownInfo) {
|
||||
ZoneScoped
|
||||
|
||||
const bool isMaster = global::windowDelegate->isMaster();
|
||||
if (isMaster || _showOverlayOnSlaves) {
|
||||
if (isMaster || _showOverlayOnClients) {
|
||||
renderScreenLog();
|
||||
renderVersionInformation();
|
||||
renderDashboard();
|
||||
|
||||
@@ -600,7 +600,7 @@ void ScriptEngine::preSync(bool isMaster) {
|
||||
return;
|
||||
}
|
||||
|
||||
std::lock_guard guard(_slaveScriptsMutex);
|
||||
std::lock_guard guard(_clientScriptsMutex);
|
||||
while (!_incomingScripts.empty()) {
|
||||
QueueItem item = std::move(_incomingScripts.front());
|
||||
_incomingScripts.pop();
|
||||
@@ -634,14 +634,14 @@ void ScriptEngine::encode(SyncBuffer* syncBuffer) {
|
||||
void ScriptEngine::decode(SyncBuffer* syncBuffer) {
|
||||
ZoneScoped
|
||||
|
||||
std::lock_guard guard(_slaveScriptsMutex);
|
||||
std::lock_guard guard(_clientScriptsMutex);
|
||||
size_t nScripts;
|
||||
syncBuffer->decode(nScripts);
|
||||
|
||||
for (size_t i = 0; i < nScripts; ++i) {
|
||||
std::string script;
|
||||
syncBuffer->decode(script);
|
||||
_slaveScriptQueue.push(std::move(script));
|
||||
_clientScriptQueue.push(std::move(script));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -663,11 +663,11 @@ void ScriptEngine::postSync(bool isMaster) {
|
||||
}
|
||||
}
|
||||
else {
|
||||
std::lock_guard guard(_slaveScriptsMutex);
|
||||
while (!_slaveScriptQueue.empty()) {
|
||||
std::lock_guard guard(_clientScriptsMutex);
|
||||
while (!_clientScriptQueue.empty()) {
|
||||
try {
|
||||
runScript(_slaveScriptQueue.front());
|
||||
_slaveScriptQueue.pop();
|
||||
runScript(_clientScriptQueue.front());
|
||||
_clientScriptQueue.pop();
|
||||
}
|
||||
catch (const ghoul::RuntimeError& e) {
|
||||
LERRORC(e.component, e.message);
|
||||
|
||||
Reference in New Issue
Block a user