Instrument Neutral Distributed Interface INDI 2.2.5
Macros | Functions
Utils.hpp File Reference
#include "lilxml.h"
#include <string>
#include <vector>
#include <unordered_map>

Go to the source code of this file.

Macros

#define STRINGIFY_TOK(x)   #x
 
#define TO_STRING(x)   STRINGIFY_TOK(x)
 

Functions

void log (const std::string &log)
 
std::string fmt (const char *fmt,...) __attribute__((format(printf
 
std::string char * indi_tstamp (char *s)
 
void logStartup (int ac, char *av[])
 
void noSIGPIPE (void)
 
void logDMsg (XMLEle *root, const char *dev)
 
void Bye (void)
 
std::vector< XMLEle * > findBlobElements (XMLEle *root)
 
int readFdError (int fd)
 
void * attachSharedBuffer (int fd, size_t &size)
 
void dettachSharedBuffer (int fd, void *ptr, size_t size)
 
bool parseBlobSize (XMLEle *blobWithAttachedBuffer, ssize_t &size)
 
XMLEle * cloneXMLEleWithReplacementMap (XMLEle *root, const std::unordered_map< XMLEle *, XMLEle * > &replacement)
 

Macro Definition Documentation

◆ STRINGIFY_TOK

#define STRINGIFY_TOK (   x)    #x

Definition at line 45 of file Utils.hpp.

◆ TO_STRING

#define TO_STRING (   x)    STRINGIFY_TOK(x)

Definition at line 46 of file Utils.hpp.

Function Documentation

◆ attachSharedBuffer()

void * attachSharedBuffer ( int  fd,
size_t &  size 
)

Definition at line 211 of file Utils.cpp.

◆ Bye()

void Bye ( void  )

Definition at line 108 of file Utils.cpp.

◆ cloneXMLEleWithReplacementMap()

XMLEle * cloneXMLEleWithReplacementMap ( XMLEle *  root,
const std::unordered_map< XMLEle *, XMLEle * > &  replacement 
)

Definition at line 143 of file Utils.cpp.

◆ dettachSharedBuffer()

void dettachSharedBuffer ( int  fd,
void *  ptr,
size_t  size 
)

Definition at line 231 of file Utils.cpp.

◆ findBlobElements()

std::vector< XMLEle * > findBlobElements ( XMLEle *  root)

Definition at line 148 of file Utils.cpp.

◆ fmt()

std::string fmt ( const char *  fmt,
  ... 
)

◆ indi_tstamp()

std::string char * indi_tstamp ( char *  s)

Definition at line 62 of file Utils.cpp.

◆ log()

void log ( const std::string &  log)

Definition at line 161 of file Utils.cpp.

◆ logDMsg()

void logDMsg ( XMLEle *  root,
const char *  dev 
)

Definition at line 78 of file Utils.cpp.

◆ logStartup()

void logStartup ( int  ac,
char *  av[] 
)

Definition at line 33 of file Utils.cpp.

◆ noSIGPIPE()

void noSIGPIPE ( void  )

Definition at line 48 of file Utils.cpp.

◆ parseBlobSize()

bool parseBlobSize ( XMLEle *  blobWithAttachedBuffer,
ssize_t &  size 
)

Definition at line 114 of file Utils.cpp.

◆ readFdError()

int readFdError ( int  fd)

Definition at line 167 of file Utils.cpp.