Instrument Neutral Distributed Interface INDI 2.2.5
Utils.cpp File Reference
#include "Utils.hpp"
#include "Constants.hpp"
#include "CommandLineArgs.hpp"
#include <cstring>
#include <csignal>
#include <cstdarg>
#include <ctime>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/mman.h>

Go to the source code of this file.

Functions

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

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,
... )

Definition at line 241 of file Utils.cpp.

◆ indi_tstamp()

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.

◆ xmlReplacementMapFind()

int xmlReplacementMapFind ( void * self,
XMLEle * source,
XMLEle ** replace )

Definition at line 131 of file Utils.cpp.