Teonet library  0.4.7
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
teonet.hpp File Reference
#include <cstring>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include "ev_mgr.h"
#include "modules/log_reader.h"
#include "modules/subscribe.h"
#include "modules/teodb_com.h"

Go to the source code of this file.

Data Structures

struct  teo::teoL0Client
 Teonet App parameters. More...
 
struct  teo::unique_raw_ptr::destroy< T >
 
class  teo::Teonet
 Teonet class. More...
 
class  teo::Teonet::CQue
 Teonet CQue callback function. More...
 
class  teo::Teonet::TeoDB
 
struct  teo::Teonet::TeoDB::teoDbCQueData
 
class  teo::Teonet::LogReader
 
struct  teo::Teonet::LogReader::PUserData
 
struct  teo::HostInfo
 Teonet host info processing class. More...
 
class  teo::StringArray
 Teonet string array class. More...
 
class  teo::StringArray::iterator
 

Namespaces

 teo
 
 teo::unique_raw_ptr
 The unique_raw_ptr::make make unique_ptr from allocated raw pointer, and free this pointer pointer when the unique_ptr does not used more.
 

Macros

#define teo_printf(module, type, format,...)
 
#define teo_puts(module, type, format)
 
#define THIS_UTILS_H
 
#define msg_to_string(msg)
 
#define showMessage(mtype, msg)   teo_printf("", mtype, "%s", msg_to_string(msg).c_str())
 
#define showMessageLn(mtype, msg)   teo_printf("", mtype, "%s\n", msg_to_string(msg).c_str())
 
#define watch(x)   std::cout << (#x) << " = " << (x) << std::endl
 

Typedefs

typedef ksnetEvMgrEvents teo::teoEvents
 
typedef ksnCorePacketData teo::teoPacket
 Teonet Events. More...
 
typedef ksnetEvMgrAppParam teo::teoAppParam
 Teonet Packet. More...
 
typedef struct teo::teoL0Client teo::teoL0Client
 Teonet App parameters. More...
 

Functions

template<typename T >
std::unique_ptr< T[], destroy
< T * > > 
teo::unique_raw_ptr::make (T *raw_data)
 

Macro Definition Documentation

#define msg_to_string (   msg)
Value:
({ \
std::ostringstream foo; \
foo << msg; \
foo.str(); \
})
#define showMessage (   mtype,
  msg 
)    teo_printf("", mtype, "%s", msg_to_string(msg).c_str())
#define showMessageLn (   mtype,
  msg 
)    teo_printf("", mtype, "%s\n", msg_to_string(msg).c_str())
#define teo_printf (   module,
  type,
  format,
  ... 
)
Value:
ksnet_printf(&((getKe())->teo_cfg), type, \
type != DISPLAY_M ? _ksn_printf_format_(format) \
type != DISPLAY_M ? _ksn_printf_type_(type) : "", \
type != DISPLAY_M ? (module[0] == '\0' ? (getKe())->teo_cfg.app_name : module) : "", \
type != DISPLAY_M ? __func__ : "", type != DISPLAY_M ? __FILE__ : "", \
type != DISPLAY_M ? __LINE__ : 0, __VA_ARGS__)
#7 Regular messages (display only)
Definition: src/utils/utils.h:40
#define _ksn_printf_format_(format)
Definition: src/utils/utils.h:52
#define _ksn_printf_type_(type)
Definition: src/utils/utils.h:44
#define _ksn_printf_format_display_m(format)
Definition: src/utils/utils.h:53
int ksnet_printf(teonet_cfg *teo_cfg, int type, const char *format,...)
KSNet printf.
Definition: utils.c:59

Referenced by teo::Teonet::TeoDB::send().

#define teo_puts (   module,
  type,
  format 
)
Value:
ksnet_printf(&((getKe())->teo_cfg), type, \
type != DISPLAY_M ? _ksn_printf_format_(format) "\n" \
: _ksn_printf_format_display_m(format) "\n", \
type != DISPLAY_M ? _ksn_printf_type_(type) : "", \
type != DISPLAY_M ? (module[0] == '\0' ? (getKe())->teo_cfg.app_name : module) : "", \
type != DISPLAY_M ? __func__ : "", type != DISPLAY_M ? __FILE__ : "", \
type != DISPLAY_M ? __LINE__ : 0)
#7 Regular messages (display only)
Definition: src/utils/utils.h:40
#define _ksn_printf_format_(format)
Definition: src/utils/utils.h:52
#define _ksn_printf_type_(type)
Definition: src/utils/utils.h:44
#define _ksn_printf_format_display_m(format)
Definition: src/utils/utils.h:53
int ksnet_printf(teonet_cfg *teo_cfg, int type, const char *format,...)
KSNet printf.
Definition: utils.c:59
#define THIS_UTILS_H
#define watch (   x)    std::cout << (#x) << " = " << (x) << std::endl