tsLogger
A C++17 data logger for timeseries and snapshot data
Loading...
Searching...
No Matches
tsLogger.h File Reference
#include <cstdio>
#include <string>
#include <iostream>
#include <vector>
#include <variant>
#include <algorithm>
#include <ctime>

Go to the source code of this file.

Classes

struct  tsDataPointer
 Data pointer structure used to track datapoints, with datapoint name and pointer to data. More...
 
class  tsLogger
 The core class of the library is the tsLogger class. Multiple simultaneous class objects are supported. More...
 

Macros

#define _TSLOGGER_H
 
#define defaultFilePath   "C:\\data"
 
#define defaultFileName   "tsDataLog"
 
#define defaultDataName   "datapoint"
 
#define fileNameLength   400
 
#define defLogBufferSize   1000
 
#define defHeaderBufSize   1000
 
#define defDataBufSize   100
 

Typedefs

typedef enum _tsLogFileType tsLogFileType
 The file-types supported by tsLogger. [BINARY support coming in the future].
 
using smartDataPtr = std::variant< int *, unsigned int *, long *, unsigned long *, long long *, unsigned long long *, float *, double *, char *, unsigned char *, bool * >
 This varriant datatype governs the supported data points that can be tracked.
 

Enumerations

enum  _tsLogFileType { _TSLOGGER_CSV = 0 , _TSLOGGER_BINARY = 1 }
 The file-types supported by tsLogger. [BINARY support coming in the future]. More...
 

Macro Definition Documentation

◆ _TSLOGGER_H

#define _TSLOGGER_H

Definition at line 3 of file tsLogger.h.

◆ defaultDataName

#define defaultDataName   "datapoint"

Definition at line 14 of file tsLogger.h.

◆ defaultFileName

#define defaultFileName   "tsDataLog"

Definition at line 13 of file tsLogger.h.

◆ defaultFilePath

#define defaultFilePath   "C:\\data"

Definition at line 12 of file tsLogger.h.

◆ defDataBufSize

#define defDataBufSize   100

Definition at line 18 of file tsLogger.h.

◆ defHeaderBufSize

#define defHeaderBufSize   1000

Definition at line 17 of file tsLogger.h.

◆ defLogBufferSize

#define defLogBufferSize   1000

Definition at line 16 of file tsLogger.h.

◆ fileNameLength

#define fileNameLength   400

Definition at line 15 of file tsLogger.h.

Typedef Documentation

◆ smartDataPtr

using smartDataPtr = std::variant <int*, unsigned int*, long*, unsigned long*, long long*, unsigned long long*, float*, double*, char*, unsigned char*, bool* >

This varriant datatype governs the supported data points that can be tracked.

Definition at line 32 of file tsLogger.h.

◆ tsLogFileType

The file-types supported by tsLogger. [BINARY support coming in the future].

Enumeration Type Documentation

◆ _tsLogFileType

The file-types supported by tsLogger. [BINARY support coming in the future].

Enumerator
_TSLOGGER_CSV 
_TSLOGGER_BINARY 

Definition at line 23 of file tsLogger.h.