This is Unofficial EPICS BASE Doxygen Site
disconnectGovernorTimer Class Reference

#include "disconnectGovernorTimer.h"

+ Inheritance diagram for disconnectGovernorTimer:
+ Collaboration diagram for disconnectGovernorTimer:

Public Member Functions

 disconnectGovernorTimer (class disconnectGovernorNotify &, epicsTimerQueue &, epicsMutex &)
 
virtual ~disconnectGovernorTimer ()
 
void start ()
 
void shutdown (epicsGuard< epicsMutex > &cbGuard, epicsGuard< epicsMutex > &guard)
 
void installChan (epicsGuard< epicsMutex > &, nciu &)
 
void uninstallChan (epicsGuard< epicsMutex > &, nciu &)
 
void show (unsigned level) const
 

Detailed Description

Definition at line 43 of file disconnectGovernorTimer.h.

Constructor & Destructor Documentation

disconnectGovernorTimer::disconnectGovernorTimer ( class disconnectGovernorNotify iiuIn,
epicsTimerQueue &  queueIn,
epicsMutex &  mutexIn 
)

Definition at line 28 of file disconnectGovernorTimer.cpp.

31  :
32  mutex ( mutexIn ), timer ( queueIn.createTimer () ),
33  iiu ( iiuIn )
34 {
35 }
disconnectGovernorTimer::~disconnectGovernorTimer ( )
virtual

Definition at line 37 of file disconnectGovernorTimer.cpp.

38 {
39  this->timer.destroy ();
40 }
void destroy()
Definition: timer.cpp:47

Member Function Documentation

void disconnectGovernorTimer::installChan ( epicsGuard< epicsMutex > &  guard,
nciu chan 
)

Definition at line 91 of file disconnectGovernorTimer.cpp.

93 {
94  guard.assertIdenticalMutex ( this->mutex );
95  this->chanList.add ( chan );
96  chan.channelNode::listMember = channelNode::cs_disconnGov;
97 }
void add(T &item)
Definition: tsDLList.h:313
void assertIdenticalMutex(const T &) const
Definition: epicsGuard.h:80
void disconnectGovernorTimer::show ( unsigned  level) const

Definition at line 77 of file disconnectGovernorTimer.cpp.

78 {
79  epicsGuard < epicsMutex > guard ( this->mutex );
80  ::printf ( "disconnect governor timer: with %u channels pending\n",
81  this->chanList.count () );
82  if ( level > 0u ) {
83  tsDLIterConst < nciu > pChan = this->chanList.firstIter ();
84  while ( pChan.valid () ) {
85  pChan->show ( level - 1u );
86  pChan++;
87  }
88  }
89 }
tsDLIterConst< T > firstIter() const
Definition: tsDLList.h:459
#define printf
Definition: epicsStdio.h:41
unsigned count() const
Definition: tsDLList.h:181
bool valid() const
Definition: tsDLList.h:506
void show(unsigned level) const
Definition: nciu.cpp:472
void disconnectGovernorTimer::shutdown ( epicsGuard< epicsMutex > &  cbGuard,
epicsGuard< epicsMutex > &  guard 
)

Definition at line 47 of file disconnectGovernorTimer.cpp.

50 {
51  {
52  epicsGuardRelease < epicsMutex > unguard ( guard );
53  {
54  epicsGuardRelease < epicsMutex > cbUnguard ( cbGuard );
55  this->timer.cancel ();
56  }
57  }
58  while ( nciu * pChan = this->chanList.get () ) {
59  pChan->channelNode::listMember =
60  channelNode::cs_none;
61  pChan->serviceShutdownNotify ( cbGuard, guard );
62  }
63 }
T * get()
Definition: tsDLList.h:261
void cancel()
Definition: timer.cpp:135
Definition: nciu.h:127
void disconnectGovernorTimer::start ( )

Definition at line 42 of file disconnectGovernorTimer.cpp.

43 {
44  this->timer.start ( *this, disconnectGovernorPeriod );
45 }
void start(class epicsTimerNotify &, const epicsTime &)
Definition: timer.cpp:59
void disconnectGovernorTimer::uninstallChan ( epicsGuard< epicsMutex > &  guard,
nciu chan 
)

Definition at line 99 of file disconnectGovernorTimer.cpp.

101 {
102  guard.assertIdenticalMutex ( this->mutex );
103  this->chanList.remove ( chan );
104  chan.channelNode::listMember = channelNode::cs_none;
105 }
void assertIdenticalMutex(const T &) const
Definition: epicsGuard.h:80
void remove(T &item)
Definition: tsDLList.h:219

The documentation for this class was generated from the following files: