From 6c6a83bc5d7fe2cb39540fa66f6739aa6b8b28d2 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 12 Dec 2019 19:26:12 +0800 Subject: [PATCH] Categorize mirror service commands --- .../src/mirror_service/mirror_service.cpp | 34 +++++++++---------- .../src/mirror_service/ms_automaton.cpp | 4 +-- .../server/src/mirror_service/tick_proxy.cpp | 8 ++--- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/code/ryzom/server/src/mirror_service/mirror_service.cpp b/code/ryzom/server/src/mirror_service/mirror_service.cpp index d29ca4f3d..3f0154b31 100644 --- a/code/ryzom/server/src/mirror_service/mirror_service.cpp +++ b/code/ryzom/server/src/mirror_service/mirror_service.cpp @@ -3877,7 +3877,7 @@ NLNET_SERVICE_MAIN (CMirrorService, "MS", "mirror_service", 0, MirrorCallbackArr /* * displayMSTrackers command */ -NLMISC_COMMAND( displayMSTrackers, "Display the trackers for one of all dataset(s)", "[]" ) +NLMISC_CATEGORISED_COMMAND( ms, displayMSTrackers, "Display the trackers for one of all dataset(s)", "[]" ) { if ( args.size() > 0 ) { @@ -3902,7 +3902,7 @@ NLMISC_COMMAND( displayMSTrackers, "Display the trackers for one of all dataset( } -NLMISC_COMMAND( changeWeightOfProperty, "Change the weight of a property", " " ) +NLMISC_CATEGORISED_COMMAND( ms, changeWeightOfProperty, "Change the weight of a property", " " ) { if ( args.size() == 2 ) { @@ -3915,7 +3915,7 @@ NLMISC_COMMAND( changeWeightOfProperty, "Change the weight of a property", "NDataSets.begin(); ids!=MSInstance->NDataSets.end(); ++ids ) @@ -3924,14 +3924,14 @@ NLMISC_COMMAND( displayWeights, "Display the weights of the properties", "" ) } -NLMISC_COMMAND( displayRemoteMS, "Display the list of remote MS", "" ) +NLMISC_CATEGORISED_COMMAND( ms, displayRemoteMS, "Display the list of remote MS", "" ) { MSInstance->displayRemoteMSList( log ); return true; } -NLMISC_COMMAND( displayClientServices, "Display the list of client services", "" ) +NLMISC_CATEGORISED_COMMAND( ms, displayClientServices, "Display the list of client services", "" ) { MSInstance->displayClientServices( log ); return true; @@ -3939,7 +3939,7 @@ NLMISC_COMMAND( displayClientServices, "Display the list of client services", "" #ifdef COUNT_MIRROR_PROP_CHANGES -NLMISC_DYNVARIABLE( sint32, TotalNbChangesPerTickRowMgt, "Number of distinct changes per tick for non-local row management" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, sint32, TotalNbChangesPerTickRowMgt, "Number of distinct changes per tick for non-local row management" ) { // We can only read the value if ( get ) @@ -3952,7 +3952,7 @@ NLMISC_DYNVARIABLE( sint32, TotalNbChangesPerTickRowMgt, "Number of distinct cha } } -NLMISC_DYNVARIABLE( sint32, TotalNbChangesPerTickProps, "Number of distinct changes per tick for non-local prop changes" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, sint32, TotalNbChangesPerTickProps, "Number of distinct changes per tick for non-local prop changes" ) { // We can only read the value if ( get ) @@ -3967,7 +3967,7 @@ NLMISC_DYNVARIABLE( sint32, TotalNbChangesPerTickProps, "Number of distinct chan #endif -NLMISC_DYNVARIABLE( sint32, TotalNbChangesSentPerTickRowMgt, "Number of changes emitted to other MS for row management" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, sint32, TotalNbChangesSentPerTickRowMgt, "Number of changes emitted to other MS for row management" ) { // We can only read the value if ( get ) @@ -3976,7 +3976,7 @@ NLMISC_DYNVARIABLE( sint32, TotalNbChangesSentPerTickRowMgt, "Number of changes } } -NLMISC_DYNVARIABLE( sint32, TotalNbChangesSentPerTickProps, "Number of changes emitted to other MS for props" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, sint32, TotalNbChangesSentPerTickProps, "Number of changes emitted to other MS for props" ) { // We can only read the value if ( get ) @@ -3986,7 +3986,7 @@ NLMISC_DYNVARIABLE( sint32, TotalNbChangesSentPerTickProps, "Number of changes e } -NLMISC_DYNVARIABLE( sint32, TotalRemainingChangesProps, "Number of remaining prop changes not sent to other MS" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, sint32, TotalRemainingChangesProps, "Number of remaining prop changes not sent to other MS" ) { // We can only read the value if ( get ) @@ -3996,7 +3996,7 @@ NLMISC_DYNVARIABLE( sint32, TotalRemainingChangesProps, "Number of remaining pro } -NLMISC_COMMAND( verboseMessagesSent, "Turn on/off the display of msgs sent to other MSes", "1/0" ) +NLMISC_CATEGORISED_COMMAND( ms, verboseMessagesSent, "Turn on/off the display of msgs sent to other MSes", "1/0" ) { if ( args.size() < 1 ) return false; @@ -4006,7 +4006,7 @@ NLMISC_COMMAND( verboseMessagesSent, "Turn on/off the display of msgs sent to ot } -NLMISC_DYNVARIABLE( string, Status, "Mirrors online status" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, string, Status, "Mirrors online status" ) { if ( get ) { @@ -4023,27 +4023,27 @@ NLMISC_DYNVARIABLE( string, Status, "Mirrors online status" ) static string MainNbEntities = "?"; // This command must be here to prevent to compile the same one in mirror.cpp (which would crash) -NLMISC_VARIABLE( string, MainNbEntities, "Not available on MS" ); +NLMISC_CATEGORISED_VARIABLE( ms, string, MainNbEntities, "Not available on MS" ); -NLMISC_DYNVARIABLE( float, EmittedKBPerSec, "Output rate for mirror deltas & messages" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, float, EmittedKBPerSec, "Output rate for mirror deltas & messages" ) { if ( get ) *pointer = MSInstance->getEmittedKBytesPerSecond(); } -NLMISC_DYNVARIABLE( sint8, MainMTRTag, "Main MTR Tag" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, sint8, MainMTRTag, "Main MTR Tag" ) { if ( get ) *pointer = MSInstance->mainTag().rawTag(); } -NLMISC_DYNVARIABLE( bool, IsPureReceiver, "IsPureReceiver" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, bool, IsPureReceiver, "IsPureReceiver" ) { if ( get ) *pointer = MSInstance->isPureReceiver(); } -NLMISC_DYNVARIABLE( string, MirrorServiceVersion, "Version of MS" ) +NLMISC_CATEGORISED_DYNVARIABLE( ms, string, MirrorServiceVersion, "Version of MS" ) { if ( get ) *pointer = MirrorServiceVersion; diff --git a/code/ryzom/server/src/mirror_service/ms_automaton.cpp b/code/ryzom/server/src/mirror_service/ms_automaton.cpp index d3867561a..4c96ac8f1 100644 --- a/code/ryzom/server/src/mirror_service/ms_automaton.cpp +++ b/code/ryzom/server/src/mirror_service/ms_automaton.cpp @@ -528,13 +528,13 @@ void CMirrorService::serialToMessageFromLocalQueue( CMessage& msgout, const TMes } -NLMISC_COMMAND( displayAutomatonState, "Display the current state of the MS automaton", "" ) +NLMISC_CATEGORISED_COMMAND( ms_automaton, displayAutomatonState, "Display the current state of the MS automaton", "" ) { MSInstance->displayAutomatonState( &log ); return true; } -NLMISC_COMMAND( doNextTask, "Update automaton state", "" ) +NLMISC_CATEGORISED_COMMAND( ms_automaton, doNextTask, "Update automaton state", "" ) { MSInstance->doNextTask(); return true; diff --git a/code/ryzom/server/src/mirror_service/tick_proxy.cpp b/code/ryzom/server/src/mirror_service/tick_proxy.cpp index cf51f79c6..b6ee7a734 100644 --- a/code/ryzom/server/src/mirror_service/tick_proxy.cpp +++ b/code/ryzom/server/src/mirror_service/tick_proxy.cpp @@ -467,7 +467,7 @@ void CTickProxy::init( void (*updateFunc)(), } // init -NLMISC_DYNVARIABLE(string, WaitingForServices, "Services that haven't tocked yet") +NLMISC_CATEGORISED_DYNVARIABLE(tick_proxy, string, WaitingForServices, "Services that haven't tocked yet") { // we can only read the value if (get) @@ -478,14 +478,14 @@ NLMISC_DYNVARIABLE(string, WaitingForServices, "Services that haven't tocked yet } -NLMISC_DYNVARIABLE(NLMISC::TGameCycle, TickGameCycleProxy, "game cycle (in tick)") +NLMISC_CATEGORISED_DYNVARIABLE(tick_proxy, NLMISC::TGameCycle, TickGameCycleProxy, "game cycle (in tick)") { // we can only read the value if (get) *pointer = CTickProxy::getGameCycle (); } -NLMISC_DYNVARIABLE(NLMISC::TGameTime, TickGameTimeProxy, "game time (in second)") +NLMISC_CATEGORISED_DYNVARIABLE(tick_proxy, NLMISC::TGameTime, TickGameTimeProxy, "game time (in second)") { // we can only read the value if (get) @@ -493,7 +493,7 @@ NLMISC_DYNVARIABLE(NLMISC::TGameTime, TickGameTimeProxy, "game time (in second)" } -NLMISC_COMMAND(displayTickProxyRecentHistory,"Display the history of tick events","") +NLMISC_CATEGORISED_COMMAND(tick_proxy, displayTickProxyRecentHistory,"Display the history of tick events","") { RecentHistory.write( &log ); return true;