DLS  1.6
globals.h File Reference

Global data structures and functions. More...

Go to the source code of this file.

Classes

struct  LibDLS::RealChannel
 Describes a signal of the data source. More...
 
struct  LibDLS::IndexRecord
 Index record for a data file index as part of a chunk. More...
 
struct  LibDLS::GlobalIndexRecord
 Index record for all data file of a chunk. More...
 
struct  LibDLS::MessageIndexRecord
 Message index. More...
 
struct  LibDLS::ChannelIndexRecord
 Channel index record, containing all chunk times. More...
 

Macros

#define DLS_PID_FILE   "dlsd.pid"
 Name of the PID file in the data directory.
 
#define ENV_DLS_DIR   "DLS_DIR"
 Name of the environment variable containing the DLS data directory.
 
#define ENV_DLS_USER   "DLS_USER"
 Name of the environment variable containing the DLS user.
 
#define DLS_PUBLIC
 Macro for public method definitions (empty on non-win32).
 

Typedefs

typedef void(* LibDLS::LoggingCallback) (const char *, void *)
 Logging callback type. More...
 

Enumerations

enum  LibDLS::ChannelType {
  TUNKNOWN, TCHAR, TUCHAR, TSHORT,
  TUSHORT, TINT, TUINT, TLINT,
  TULINT, TFLT, TDBL
}
 Basic DLS channel datatype. More...
 
enum  LibDLS::MetaType { LibDLS::MetaGen = 0, LibDLS::MetaMean = 1, LibDLS::MetaMin = 2, LibDLS::MetaMax = 4 }
 Meta type for recorded data. More...
 
enum  {
  FORMAT_INVALID = -1, FORMAT_ZLIB, FORMAT_MDCT, FORMAT_QUANT,
  FORMAT_COUNT
}
 Compression formats. More...
 
enum  { MSR_PORT = 2345 }
 Protocol definitions. More...
 

Functions

DLS_PUBLIC ChannelType LibDLS::str_to_channel_type (const std::string &)
 Convert a string to a channel type enum.
 
DLS_PUBLIC const char * LibDLS::channel_type_to_str (ChannelType)
 Convert a channel type enum to a string.
 
DLS_PUBLIC std::string LibDLS::meta_type_str (MetaType)
 Get string from MetaType.
 
DLS_PUBLIC bool LibDLS::operator< (const RealChannel &a, const RealChannel &b)
 Less operator for sorting RealChannel lists.
 
DLS_PUBLIC void LibDLS::set_logging_callback (LoggingCallback, void *)
 Set global logging callback. More...
 
DLS_PUBLIC void LibDLS::log (const std::string &)
 Global log method, that is used by the library.
 
DLS_PUBLIC std::string LibDLS::convert_to_bin (const void *, unsigned int, int)
 Convert data to binary.
 

Variables

const char * LibDLS::format_strings [FORMAT_COUNT]
 String from format enum.
 

Detailed Description

Global data structures and functions.

Definition in file globals.h.

Typedef Documentation

◆ LoggingCallback

typedef void(* LibDLS::LoggingCallback) (const char *, void *)

Logging callback type.

Function pointer type to use with set_logging_callback(). The second parameter will be the private pointer given in set_logging_callback().

Definition at line 213 of file globals.h.

Enumeration Type Documentation

◆ ChannelType

Basic DLS channel datatype.

When adding data types, the following places have to be modified:

  • The two conversion functions in lib/globals.cpp
  • In daemon/Logger::_create_gen_saver()
  • In fltkguis/ViewChannel::fetch_chunks()

Definition at line 73 of file globals.h.

◆ MetaType

Meta type for recorded data.

When extending, please keep in mind to also change the switch statements in _meta_value() and _ending().

Enumerator
MetaGen 

Generic data as received from data source.

MetaMean 

Arithmetic mean values (deprecated).

MetaMin 

Minimum values.

MetaMax 

Maximum values.

Definition at line 103 of file globals.h.

◆ anonymous enum

anonymous enum

Compression formats.

Adding new compression types:

  • globals.cpp (string array)
  • CompressionT.h (new class)

Definition at line 141 of file globals.h.

◆ anonymous enum

anonymous enum

Protocol definitions.

Definition at line 201 of file globals.h.

Function Documentation

◆ set_logging_callback()

DLS_PUBLIC void LibDLS::set_logging_callback ( LoggingCallback  ,
void *   
)

Set global logging callback.

If no logging callback is set, all library log messages got to STDERR.