This is Unofficial EPICS BASE Doxygen Site
epics Namespace Reference

TODO only here because of the Lockable. More...

Namespaces

 debug
 
 detail
 
 nt
 
 pvAccess
 Holds all PVA related.
 
 pvaClient
 
 pvCopy
 
 pvData
 pvData
 
 pvDatabase
 
 RefMonitor
 

Functions

template<void(*)() fn>
void iocshRegister (const char *name)
 
template<typename A , void(*)(A) fn>
void iocshRegister (const char *name, const char *arg1name)
 
template<typename A , typename B , void(*)(A, B) fn>
void iocshRegister (const char *name, const char *arg1name, const char *arg2name)
 
template<typename A , typename B , typename C , void(*)(A, B, C) fn>
void iocshRegister (const char *name, const char *arg1name, const char *arg2name, const char *arg3name)
 
template<typename V , V * addr>
void iocshVariable (const char *name)
 
void registerRefCounter (const char *name, const size_t *counter)
 
void unregisterRefCounter (const char *name, const size_t *counter)
 
size_t readRefCounter (const char *name)
 
std::ostream & operator<< (std::ostream &strm, const RefSnapshot &snap)
 

Detailed Description

TODO only here because of the Lockable.

epics

Copyright - See the COPYRIGHT that is included with this distribution. pvAccessCPP is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
msekoranja, mrk
Date
2018.07

Copyright - See the COPYRIGHT that is included with this distribution. pvAccessCPP is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
mrk
Date
2018.07

Copyright - See the COPYRIGHT that is included with this distribution. pvAccessCPP is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
mrk
Date
2018.03

Copyright - See the COPYRIGHT that is included with this distribution. pvAccessCPP is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
mrk
Date
2018.06
Author
mrk

Helper for exposing functions and variables in the IOC shell

Limitations:

  • supports functions with up to 4 arguments
  • argument and variable types must be: int, double, char*, or const char*
#include <pv/iocshelper.h>
void fn0() {}
void fn2(int a, const char *b) {}
int var;
void myRegistrar() {
epics::iocshRegister<&fn0>("fn0");
epics::iocshRegister<int, const char*, &fn2>("fn0", "a description", "b description");
epics::iocshVariable<int, &var>("var");
}
extern "C" {
epicsExportRegistrar(myRegistrar);
}

Copyright - See the COPYRIGHT that is included with this distribution. EPICS pvData is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
Marty Kraimer
Date
2014.02 This is an implementation of ChannelFind that is appropriate for all channel providers that can synchronously determine if the provider has the channel.

Copyright - See the COPYRIGHT that is included with this distribution. pvAccessCPP is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
mse

Copyright - See the COPYRIGHT that is included with this distribution. EPICS pvData is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
mrk
Date
2015.02
Author
Marty Kraimer
Date
2013.07
Author
mes

Copyright - See the COPYRIGHT that is included with this distribution. EPICS pvData is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
mrk
Date
2013.04.18

Copyright - See the COPYRIGHT that is included with this distribution. EPICS pvData is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
Marty Kraimer
Date
2013.04

Copyright - See the COPYRIGHT that is included with this distribution. EPICS pvData is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
mrk
Date
2019.06.01

Copyright - See the COPYRIGHT that is included with this distribution. EPICS pvData is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
mrk
Date
2019.06.07

Copyright - See the COPYRIGHT that is included with this distribution. EPICS pvData is distributed subject to a Software License Agreement found in file LICENSE that is included with this distribution.

Author
Marty Kraimer
Date
2017.03
Author
Marty Kraimer
Date
2013.04

Function Documentation

template<void(*)() fn>
void epics::iocshRegister ( const char *  name)

Definition at line 105 of file iocshelper.h.

106 {
107  static detail::iocshFuncInfo<0> info(name);
108  iocshRegister(&info.def, &detail::call0<fn>);
109 }
void iocshRegister(const char *name, const char *arg1name, const char *arg2name, const char *arg3name)
Definition: iocshelper.h:131
template<typename A , void(*)(A) fn>
void epics::iocshRegister ( const char *  name,
const char *  arg1name 
)

Definition at line 112 of file iocshelper.h.

113 {
114  static detail::iocshFuncInfo<1> info(name);
115  info.set<0,A>(arg1name);
116  iocshRegister(&info.def, &detail::call1<A, fn>);
117 }
void iocshRegister(const char *name, const char *arg1name, const char *arg2name, const char *arg3name)
Definition: iocshelper.h:131
template<typename A , typename B , void(*)(A, B) fn>
void epics::iocshRegister ( const char *  name,
const char *  arg1name,
const char *  arg2name 
)

Definition at line 120 of file iocshelper.h.

123 {
124  static detail::iocshFuncInfo<2> info(name);
125  info.set<0,A>(arg1name);
126  info.set<1,B>(arg2name);
127  iocshRegister(&info.def, &detail::call2<A, B, fn>);
128 }
void iocshRegister(const char *name, const char *arg1name, const char *arg2name, const char *arg3name)
Definition: iocshelper.h:131
template<typename A , typename B , typename C , void(*)(A, B, C) fn>
void epics::iocshRegister ( const char *  name,
const char *  arg1name,
const char *  arg2name,
const char *  arg3name 
)

Definition at line 131 of file iocshelper.h.

135 {
136  static detail::iocshFuncInfo<3> info(name);
137  info.set<0,A>(arg1name);
138  info.set<1,B>(arg2name);
139  info.set<2,C>(arg3name);
140  iocshRegister(&info.def, &detail::call3<A, B, C, fn>);
141 }
void iocshRegister(const char *name, const char *arg1name, const char *arg2name, const char *arg3name)
Definition: iocshelper.h:131
template<typename V , V * addr>
void epics::iocshVariable ( const char *  name)

Definition at line 144 of file iocshelper.h.

145 {
146  static iocshVarDef def[2];
147  def[0].name = name;
148  def[0].pval = (void*)addr;
149  def[0].type = (iocshArgType)detail::getarg<V>::argtype;
150  def[1].name = NULL;
152 }
iocshArgType
Definition: iocsh.h:30
#define NULL
Definition: catime.c:38
const char * name
Definition: iocsh.h:51
iocshArgType type
Definition: iocsh.h:52
void epicsStdCall iocshRegisterVariable(const iocshVarDef *piocshVarDef)
Definition: iocsh.cpp:167
int * def
Definition: flex.c:92
void * pval
Definition: iocsh.h:53
std::ostream& epics::operator<< ( std::ostream &  strm,
const RefSnapshot &  snap 
)

Definition at line 145 of file reftrack.cpp.

146 {
147  for(RefSnapshot::const_iterator it = snap.begin(), end = snap.end(); it!=end; ++it)
148  {
149  if(it->second.delta==0) continue;
150  strm<<it->first<<":\t"<<it->second.current<<" (delta "<<it->second.delta<<")\n";
151  }
152  return strm;
153 }
size_t epics::readRefCounter ( const char *  name)

Definition at line 75 of file reftrack.cpp.

76 {
77  refgbl_setup();
78  Guard G(refgbl->lock);
79  refgbl_t::counters_t::iterator it(refgbl->counters.find(name));
80  if(it==refgbl->counters.end())
81  return 0;
82  return atomic::get(*it->second);
83 }
Definition: caget.c:48
void epics::registerRefCounter ( const char *  name,
const size_t *  counter 
)

Definition at line 59 of file reftrack.cpp.

60 {
61  refgbl_setup();
62  Guard G(refgbl->lock);
63  refgbl->counters[name] = counter;
64 }
void epics::unregisterRefCounter ( const char *  name,
const size_t *  counter 
)

Definition at line 66 of file reftrack.cpp.

67 {
68  refgbl_setup();
69  Guard G(refgbl->lock);
70  refgbl_t::counters_t::iterator it(refgbl->counters.find(name));
71  if(it!=refgbl->counters.end() && it->second==counter)
72  refgbl->counters.erase(it);
73 }