Revert --histitems argument
This commit is contained in:
parent
32e56ff0c6
commit
eca8eff4c9
8 changed files with 22 additions and 53 deletions
|
@ -92,12 +92,8 @@ LED bar: lbr
|
||||||
// file name for logging file
|
// file name for logging file
|
||||||
#define DEFAULT_LOG_FILE_NAME "Jamulussrvlog.txt"
|
#define DEFAULT_LOG_FILE_NAME "Jamulussrvlog.txt"
|
||||||
|
|
||||||
/* History Definitions ****************************************************************/
|
// Default oldest item to draw in history graph (days ago)
|
||||||
// default number of history items to store
|
#define DEFAULT_DAYS_HISTORY 60
|
||||||
#define NUM_ITEMS_HISTORY 6400
|
|
||||||
// default oldest item to draw
|
|
||||||
#define MAX_DAYS_HISTORY 60
|
|
||||||
/* *** */
|
|
||||||
|
|
||||||
// default server address
|
// default server address
|
||||||
#define DEFAULT_SERVER_ADDRESS "jamulus.fischvolk.de"
|
#define DEFAULT_SERVER_ADDRESS "jamulus.fischvolk.de"
|
||||||
|
|
|
@ -27,11 +27,10 @@
|
||||||
|
|
||||||
|
|
||||||
/* Abstract class *************************************************************/
|
/* Abstract class *************************************************************/
|
||||||
AHistoryGraph::AHistoryGraph( const int iNumItemsHistory,
|
AHistoryGraph::AHistoryGraph( const int iMaxDaysHistory ) :
|
||||||
const int iMaxDaysHistory ) :
|
|
||||||
sFileName ( "" ),
|
sFileName ( "" ),
|
||||||
bDoHistory ( false ),
|
bDoHistory ( false ),
|
||||||
vHistoryDataFifo ( iNumItemsHistory ),
|
vHistoryDataFifo ( NUM_ITEMS_HISTORY ),
|
||||||
iNumTicksX ( 0 ), // number of days in history
|
iNumTicksX ( 0 ), // number of days in history
|
||||||
iHistMaxDays ( iMaxDaysHistory ),
|
iHistMaxDays ( iMaxDaysHistory ),
|
||||||
|
|
||||||
|
@ -300,9 +299,8 @@ void AHistoryGraph::AddMarker ( const SHistoryData& curHistoryData )
|
||||||
|
|
||||||
|
|
||||||
/* JPEG History Graph implementation ******************************************/
|
/* JPEG History Graph implementation ******************************************/
|
||||||
CJpegHistoryGraph::CJpegHistoryGraph( const int iNumItemsHistory,
|
CJpegHistoryGraph::CJpegHistoryGraph( const int iMaxDaysHistory ) :
|
||||||
const int iMaxDaysHistory ) :
|
AHistoryGraph ( iMaxDaysHistory ),
|
||||||
AHistoryGraph ( iNumItemsHistory, iMaxDaysHistory ),
|
|
||||||
PlotPixmap ( 1, 1, QImage::Format_RGB32 ),
|
PlotPixmap ( 1, 1, QImage::Format_RGB32 ),
|
||||||
iAxisFontWeight ( -1 )
|
iAxisFontWeight ( -1 )
|
||||||
{
|
{
|
||||||
|
@ -406,9 +404,8 @@ void CJpegHistoryGraph::point ( const unsigned int x, const unsigned int y, cons
|
||||||
|
|
||||||
|
|
||||||
/* SVG History Graph implementation *******************************************/
|
/* SVG History Graph implementation *******************************************/
|
||||||
CSvgHistoryGraph::CSvgHistoryGraph( const int iNumItemsHistory,
|
CSvgHistoryGraph::CSvgHistoryGraph( const int iMaxDaysHistory ) :
|
||||||
const int iMaxDaysHistory ) :
|
AHistoryGraph ( iMaxDaysHistory ),
|
||||||
AHistoryGraph ( iNumItemsHistory, iMaxDaysHistory ),
|
|
||||||
svgImage ( "" ),
|
svgImage ( "" ),
|
||||||
svgStreamWriter ( &svgImage )
|
svgStreamWriter ( &svgImage )
|
||||||
{
|
{
|
||||||
|
|
|
@ -42,6 +42,11 @@
|
||||||
#include <QXmlStreamAttributes>
|
#include <QXmlStreamAttributes>
|
||||||
|
|
||||||
|
|
||||||
|
/* Definitions ****************************************************************/
|
||||||
|
// number of history items to store
|
||||||
|
#define NUM_ITEMS_HISTORY 20000
|
||||||
|
|
||||||
|
|
||||||
/* Interface ******************************************************************/
|
/* Interface ******************************************************************/
|
||||||
class AHistoryGraph
|
class AHistoryGraph
|
||||||
{
|
{
|
||||||
|
@ -53,8 +58,7 @@ public:
|
||||||
HIT_SERVER_STOP
|
HIT_SERVER_STOP
|
||||||
};
|
};
|
||||||
|
|
||||||
AHistoryGraph( const int iNumItemsHistory,
|
AHistoryGraph( const int iMaxDaysHistory );
|
||||||
const int iMaxDaysHistory );
|
|
||||||
~AHistoryGraph() { }
|
~AHistoryGraph() { }
|
||||||
|
|
||||||
void Start ( const QString& sNewFileName );
|
void Start ( const QString& sNewFileName );
|
||||||
|
@ -135,8 +139,7 @@ class CJpegHistoryGraph : public QObject, virtual public AHistoryGraph
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CJpegHistoryGraph( const int iNumItemsHistory,
|
CJpegHistoryGraph( const int iMaxDaysHistory );
|
||||||
const int iMaxDaysHistory );
|
|
||||||
virtual void Update ( );
|
virtual void Update ( );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -160,8 +163,7 @@ class CSvgHistoryGraph : public QObject, virtual public AHistoryGraph
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CSvgHistoryGraph( const int iNumItemsHistory,
|
CSvgHistoryGraph( const int iMaxDaysHistory );
|
||||||
const int iMaxDaysHistory );
|
|
||||||
virtual void Update();
|
virtual void Update();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
24
src/main.cpp
24
src/main.cpp
|
@ -53,8 +53,7 @@ int main ( int argc, char** argv )
|
||||||
bool bCentServPingServerInList = false;
|
bool bCentServPingServerInList = false;
|
||||||
bool bNoAutoJackConnect = false;
|
bool bNoAutoJackConnect = false;
|
||||||
int iNumServerChannels = DEFAULT_USED_NUM_CHANNELS;
|
int iNumServerChannels = DEFAULT_USED_NUM_CHANNELS;
|
||||||
int iNumItemsHistory = NUM_ITEMS_HISTORY;
|
int iMaxDaysHistory = DEFAULT_DAYS_HISTORY;
|
||||||
int iMaxDaysHistory = MAX_DAYS_HISTORY;
|
|
||||||
int iCtrlMIDIChannel = INVALID_MIDI_CH;
|
int iCtrlMIDIChannel = INVALID_MIDI_CH;
|
||||||
quint16 iPortNumber = LLCON_DEFAULT_PORT_NUMBER;
|
quint16 iPortNumber = LLCON_DEFAULT_PORT_NUMBER;
|
||||||
ELicenceType eLicenceType = LT_NO_LICENCE;
|
ELicenceType eLicenceType = LT_NO_LICENCE;
|
||||||
|
@ -131,25 +130,6 @@ int main ( int argc, char** argv )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Maximum items in history display ------------------------------------
|
|
||||||
if ( GetNumericArgument ( tsConsole,
|
|
||||||
argc,
|
|
||||||
argv,
|
|
||||||
i,
|
|
||||||
"-I",
|
|
||||||
"--histitems",
|
|
||||||
1,
|
|
||||||
65535,
|
|
||||||
rDbleArgument ) )
|
|
||||||
{
|
|
||||||
iNumItemsHistory = static_cast<int> ( rDbleArgument );
|
|
||||||
|
|
||||||
tsConsole << "- maximum items in history display: "
|
|
||||||
<< iNumItemsHistory << endl;
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Maximum days in history display ------------------------------------
|
// Maximum days in history display ------------------------------------
|
||||||
if ( GetNumericArgument ( tsConsole,
|
if ( GetNumericArgument ( tsConsole,
|
||||||
|
@ -537,7 +517,6 @@ int main ( int argc, char** argv )
|
||||||
// Server:
|
// Server:
|
||||||
// actual server object
|
// actual server object
|
||||||
CServer Server ( iNumServerChannels,
|
CServer Server ( iNumServerChannels,
|
||||||
iNumItemsHistory,
|
|
||||||
iMaxDaysHistory,
|
iMaxDaysHistory,
|
||||||
strLoggingFileName,
|
strLoggingFileName,
|
||||||
iPortNumber,
|
iPortNumber,
|
||||||
|
@ -653,7 +632,6 @@ QString UsageArguments ( char **argv )
|
||||||
" -w, --welcomemessage welcome message on connect (server only)\n"
|
" -w, --welcomemessage welcome message on connect (server only)\n"
|
||||||
" -y, --history enable connection history and set file\n"
|
" -y, --history enable connection history and set file\n"
|
||||||
" name (server only)\n"
|
" name (server only)\n"
|
||||||
" -I, --histitems number of history items to display (server only)\n"
|
|
||||||
" -D, --histdays number of days of history to display (server only)\n"
|
" -D, --histdays number of days of history to display (server only)\n"
|
||||||
" -z, --startminimized start minimizied (server only)\n"
|
" -z, --startminimized start minimizied (server only)\n"
|
||||||
" --ctrlmidich MIDI controller channel to listen (client only)"
|
" --ctrlmidich MIDI controller channel to listen (client only)"
|
||||||
|
|
|
@ -198,7 +198,6 @@ void CHighPrecisionTimer::run()
|
||||||
|
|
||||||
// CServer implementation ******************************************************
|
// CServer implementation ******************************************************
|
||||||
CServer::CServer ( const int iNewMaxNumChan,
|
CServer::CServer ( const int iNewMaxNumChan,
|
||||||
const int iNumItemsHistory,
|
|
||||||
const int iMaxDaysHistory,
|
const int iMaxDaysHistory,
|
||||||
const QString& strLoggingFileName,
|
const QString& strLoggingFileName,
|
||||||
const quint16 iPortNumber,
|
const quint16 iPortNumber,
|
||||||
|
@ -214,7 +213,7 @@ CServer::CServer ( const int iNewMaxNumChan,
|
||||||
const ELicenceType eNLicenceType ) :
|
const ELicenceType eNLicenceType ) :
|
||||||
iMaxNumChannels ( iNewMaxNumChan ),
|
iMaxNumChannels ( iNewMaxNumChan ),
|
||||||
Socket ( this, iPortNumber ),
|
Socket ( this, iPortNumber ),
|
||||||
Logging ( iNumItemsHistory, iMaxDaysHistory ),
|
Logging ( iMaxDaysHistory ),
|
||||||
JamRecorder ( strRecordingDirName ),
|
JamRecorder ( strRecordingDirName ),
|
||||||
bEnableRecording ( !strRecordingDirName.isEmpty() ),
|
bEnableRecording ( !strRecordingDirName.isEmpty() ),
|
||||||
bWriteStatusHTMLFile ( false ),
|
bWriteStatusHTMLFile ( false ),
|
||||||
|
|
|
@ -119,7 +119,6 @@ class CServer : public QObject
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CServer ( const int iNewMaxNumChan,
|
CServer ( const int iNewMaxNumChan,
|
||||||
const int iNumItemsHistory,
|
|
||||||
const int iMaxDaysHistory,
|
const int iMaxDaysHistory,
|
||||||
const QString& strLoggingFileName,
|
const QString& strLoggingFileName,
|
||||||
const quint16 iPortNumber,
|
const quint16 iPortNumber,
|
||||||
|
|
|
@ -25,10 +25,9 @@
|
||||||
#include "serverlogging.h"
|
#include "serverlogging.h"
|
||||||
|
|
||||||
// Server logging --------------------------------------------------------------
|
// Server logging --------------------------------------------------------------
|
||||||
CServerLogging::CServerLogging( const int iNumItemsHistory,
|
CServerLogging::CServerLogging( const int iMaxDaysHistory ) :
|
||||||
const int iMaxDaysHistory ) :
|
JpegHistoryGraph ( iMaxDaysHistory ),
|
||||||
JpegHistoryGraph ( iNumItemsHistory, iMaxDaysHistory ),
|
SvgHistoryGraph ( iMaxDaysHistory ),
|
||||||
SvgHistoryGraph ( iNumItemsHistory, iMaxDaysHistory ),
|
|
||||||
bDoLogging ( false ),
|
bDoLogging ( false ),
|
||||||
File ( DEFAULT_LOG_FILE_NAME )
|
File ( DEFAULT_LOG_FILE_NAME )
|
||||||
{
|
{
|
||||||
|
|
|
@ -38,8 +38,7 @@
|
||||||
class CServerLogging
|
class CServerLogging
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CServerLogging( const int iNumItemsHistory,
|
CServerLogging( const int iMaxDaysHistory );
|
||||||
const int iMaxDaysHistory );
|
|
||||||
|
|
||||||
virtual ~CServerLogging();
|
virtual ~CServerLogging();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue