MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Macros | Variables
defines.h File Reference
#include <stdio.h>
#include <unistd.h>
#include "config.h"

Go to the source code of this file.

Macros

#define DEBUG_MSG(lvl, msg, ...)   if (Util::Config::printDebugLevel >= lvl){fprintf(stderr, "%s||%d||" msg "\n", DBG_LVL_LIST[lvl], getpid(), ##__VA_ARGS__);}
 
#define DEFAULT_CONF_PAGE_SIZE   4 * 1024 * 1024
 The size used for server configuration pages. More...
 
#define DEFAULT_DATA_PAGE_SIZE   25 * 1024 * 1024
 The size used for stream data pages under Windows, where they cannot be size-detected. More...
 
#define DEFAULT_META_PAGE_SIZE   16 * 1024 * 1024
 The size used for stream header pages under Windows, where they cannot be size-detected. More...
 
#define DEVEL_MSG(msg, ...)   DEBUG_MSG(DLVL_DEVEL, msg, ##__VA_ARGS__)
 
#define DLVL_DEVEL   4
 
#define DLVL_DONTEVEN   10
 
#define DLVL_ERROR   2
 
#define DLVL_EXTREME   8
 
#define DLVL_FAIL   1
 
#define DLVL_HIGH   6
 
#define DLVL_INFO   4
 
#define DLVL_INSANE   9
 
#define DLVL_MEDIUM   5
 
#define DLVL_NONE   0
 
#define DLVL_VERYHIGH   7
 
#define DLVL_WARN   3
 
#define DONTEVEN_MSG(msg, ...)   DEBUG_MSG(DLVL_DONTEVEN, msg, ##__VA_ARGS__)
 
#define ERROR_MSG(msg, ...)   DEBUG_MSG(DLVL_ERROR, msg, ##__VA_ARGS__)
 
#define EXTREME_MSG(msg, ...)   DEBUG_MSG(DLVL_EXTREME, msg, ##__VA_ARGS__)
 
#define FAIL_MSG(msg, ...)   DEBUG_MSG(DLVL_FAIL, msg, ##__VA_ARGS__)
 
#define FLIP_DATA_PAGE_SIZE   8 * 1024 * 1024
 The position from where on stream data pages are switched over to the next page. More...
 
#define HIGH_MSG(msg, ...)   DEBUG_MSG(DLVL_HIGH, msg, ##__VA_ARGS__)
 
#define INFO_MSG(msg, ...)   DEBUG_MSG(DLVL_DEVEL, msg, ##__VA_ARGS__)
 
#define INSANE_MSG(msg, ...)   DEBUG_MSG(DLVL_INSANE, msg, ##__VA_ARGS__)
 
#define MEDIUM_MSG(msg, ...)   DEBUG_MSG(DLVL_MEDIUM, msg, ##__VA_ARGS__)
 
#define MIST_DEBUG   1
 
#define NAME_BUFFER_SIZE   200
 
#define SEM_LIVE   "MstLIVE%s"
 
#define SHM_STATISTICS   "MstSTAT"
 
#define SHM_STREAM_ENCRYPT   "MstCRYP%s"
 
#define SHM_STREAM_INDEX   "MstSTRM%s"
 
#define SHM_TRACK_DATA   "MstDATA%s@%lu_%lu"
 
#define SHM_TRACK_INDEX   "MstTRID%s@%lu"
 
#define SHM_TRACK_META   "MstTRAK%s@%lu"
 
#define SHM_TRIGGER   "MstTRIG%s"
 
#define SHM_USERS   "MstUSER%s"
 
#define SIMUL_TRACKS   10
 
#define VERYHIGH_MSG(msg, ...)   DEBUG_MSG(DLVL_VERYHIGH, msg, ##__VA_ARGS__)
 
#define WARN_MSG(msg, ...)   DEBUG_MSG(DLVL_WARN, msg, ##__VA_ARGS__)
 

Variables

static const char * DBG_LVL_LIST [] = {"NONE", "FAIL", "ERROR", "WARN", "INFO", "MEDIUM", "HIGH", "VERYHIGH", "EXTREME", "INSANE", "DONTEVEN"}
 

Macro Definition Documentation

#define DEBUG_MSG (   lvl,
  msg,
  ... 
)    if (Util::Config::printDebugLevel >= lvl){fprintf(stderr, "%s||%d||" msg "\n", DBG_LVL_LIST[lvl], getpid(), ##__VA_ARGS__);}
#define DEFAULT_CONF_PAGE_SIZE   4 * 1024 * 1024

The size used for server configuration pages.

#define DEFAULT_DATA_PAGE_SIZE   25 * 1024 * 1024

The size used for stream data pages under Windows, where they cannot be size-detected.

#define DEFAULT_META_PAGE_SIZE   16 * 1024 * 1024

The size used for stream header pages under Windows, where they cannot be size-detected.

#define DEVEL_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_DEVEL, msg, ##__VA_ARGS__)
#define DLVL_DEVEL   4
#define DLVL_DONTEVEN   10
#define DLVL_ERROR   2
#define DLVL_EXTREME   8
#define DLVL_FAIL   1
#define DLVL_HIGH   6
#define DLVL_INFO   4
#define DLVL_INSANE   9
#define DLVL_MEDIUM   5
#define DLVL_NONE   0
#define DLVL_VERYHIGH   7
#define DLVL_WARN   3
#define DONTEVEN_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_DONTEVEN, msg, ##__VA_ARGS__)
#define ERROR_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_ERROR, msg, ##__VA_ARGS__)
#define EXTREME_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_EXTREME, msg, ##__VA_ARGS__)
#define FAIL_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_FAIL, msg, ##__VA_ARGS__)
#define FLIP_DATA_PAGE_SIZE   8 * 1024 * 1024

The position from where on stream data pages are switched over to the next page.

#define HIGH_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_HIGH, msg, ##__VA_ARGS__)
#define INFO_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_DEVEL, msg, ##__VA_ARGS__)
#define INSANE_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_INSANE, msg, ##__VA_ARGS__)
#define MEDIUM_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_MEDIUM, msg, ##__VA_ARGS__)
#define MIST_DEBUG   1
#define NAME_BUFFER_SIZE   200
#define SEM_LIVE   "MstLIVE%s"
#define SHM_STATISTICS   "MstSTAT"
#define SHM_STREAM_ENCRYPT   "MstCRYP%s"
#define SHM_STREAM_INDEX   "MstSTRM%s"
#define SHM_TRACK_DATA   "MstDATA%s@%lu_%lu"
#define SHM_TRACK_INDEX   "MstTRID%s@%lu"
#define SHM_TRACK_META   "MstTRAK%s@%lu"
#define SHM_TRIGGER   "MstTRIG%s"
#define SHM_USERS   "MstUSER%s"
#define SIMUL_TRACKS   10
#define VERYHIGH_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_VERYHIGH, msg, ##__VA_ARGS__)
#define WARN_MSG (   msg,
  ... 
)    DEBUG_MSG(DLVL_WARN, msg, ##__VA_ARGS__)

Variable Documentation

const char* DBG_LVL_LIST[] = {"NONE", "FAIL", "ERROR", "WARN", "INFO", "MEDIUM", "HIGH", "VERYHIGH", "EXTREME", "INSANE", "DONTEVEN"}
static