This is Unofficial EPICS BASE Doxygen Site
reftrack.cpp File Reference
#include <iostream>
#include <sstream>
#include <stdexcept>
#include <memory>
#include <stdlib.h>
#include <string.h>
#include <epicsString.h>
#include <epicsGuard.h>
#include <epicsMutex.h>
#include <epicsEvent.h>
#include <epicsThread.h>
#include <epicsTime.h>
#include <pv/pvdVersion.h>
#include <pv/sharedPtr.h>
#include "pv/reftrack.h"
+ Include dependency graph for reftrack.cpp:

Go to the source code of this file.

Classes

struct  epics::RefMonitor::Impl
 

Namespaces

 epics
 TODO only here because of the Lockable.
 

Macros

#define epicsExportSharedSymbols
 

Functions

void epics::registerRefCounter (const char *name, const size_t *counter)
 
void epics::unregisterRefCounter (const char *name, const size_t *counter)
 
size_t epics::readRefCounter (const char *name)
 
std::ostream & epics::operator<< (std::ostream &strm, const RefSnapshot &snap)
 
char * epicsRefSnapshotCurrent ()
 

Macro Definition Documentation

#define epicsExportSharedSymbols

Definition at line 21 of file reftrack.cpp.

Function Documentation

char* epicsRefSnapshotCurrent ( )

Fetch and print current snapshot

Returns
NULL or a char* which must be free()'d

Definition at line 267 of file reftrack.cpp.

268 {
269  try {
270  epics::RefSnapshot snap;
271  snap.update();
272  std::ostringstream strm;
273  strm<<snap;
274  const char *str = strm.str().c_str();
275  char *ret = (char*)malloc(strlen(str)+1);
276  if(ret)
277  strcpy(ret, str);
278  return ret;
279  }catch(std::exception& e){
280  return epicsStrDup(e.what());
281  }
282 }
#define str(v)
char * epicsStrDup(const char *s)
Definition: epicsString.c:233