This is Unofficial EPICS BASE Doxygen Site
SearchDestTCP Class Reference

#include "virtualCircuit.h"

+ Inheritance diagram for SearchDestTCP:
+ Collaboration diagram for SearchDestTCP:

Public Member Functions

 SearchDestTCP (cac &, const osiSockAddr &)
 
void searchRequest (epicsGuard< epicsMutex > &guard, const char *pbuf, size_t len)
 
void show (epicsGuard< epicsMutex > &guard, unsigned level) const
 
void setCircuit (tcpiiu *)
 
void disable ()
 
void enable ()
 
- Public Member Functions inherited from SearchDest
virtual ~SearchDest ()
 
- Public Member Functions inherited from tsDLNode< SearchDest >
 tsDLNode ()
 
 tsDLNode (const tsDLNode< SearchDest > &)
 
const tsDLNode< SearchDest > & operator= (const tsDLNode< SearchDest > &)
 

Detailed Description

Definition at line 95 of file virtualCircuit.h.

Constructor & Destructor Documentation

SearchDestTCP::SearchDestTCP ( cac cacIn,
const osiSockAddr addrIn 
)

Definition at line 2135 of file tcpiiu.cpp.

2136  :
2137  _ptcpiiu ( NULL ),
2138  _cac ( cacIn ),
2139  _addr ( addrIn ),
2140  _active ( false )
2141 {
2142 }
#define NULL
Definition: catime.c:38

Member Function Documentation

void SearchDestTCP::disable ( )

Definition at line 2144 of file tcpiiu.cpp.

2145 {
2146  _active = false;
2147  _ptcpiiu = NULL;
2148 }
#define NULL
Definition: catime.c:38
void SearchDestTCP::enable ( )

Definition at line 2150 of file tcpiiu.cpp.

2151 {
2152  _active = true;
2153 }
void SearchDestTCP::searchRequest ( epicsGuard< epicsMutex > &  guard,
const char *  pbuf,
size_t  len 
)
virtual

Implements SearchDest.

Definition at line 2155 of file tcpiiu.cpp.

2158 {
2159  // restart circuit if it was shut down
2160  if ( ! _ptcpiiu ) {
2161  tcpiiu * piiu = NULL;
2162  bool newIIU = _cac.findOrCreateVirtCircuit (
2163  guard, _addr, cacChannel::priorityDefault,
2164  piiu, CA_UKN_MINOR_VERSION, this );
2165  if ( newIIU ) {
2166  piiu->start ( guard );
2167  }
2168  _ptcpiiu = piiu;
2169  }
2170 
2171  // does this server support TCP-based name resolution?
2172  if ( CA_V412 ( _ptcpiiu->minorProtocolVersion ) ) {
2173  guard.assertIdenticalMutex ( _ptcpiiu->mutex );
2174  assert ( CA_MESSAGE_ALIGN ( len ) == len );
2175  comQueSendMsgMinder minder ( _ptcpiiu->sendQue, guard );
2176  _ptcpiiu->sendQue.pushString ( pBuf, len );
2177  minder.commit ();
2178  _ptcpiiu->flushRequest ( guard );
2179  }
2180 }
#define assert(exp)
Declare that a condition should be true.
Definition: epicsAssert.h:70
unsigned minorProtocolVersion
void pushString(const char *pVal, unsigned nChar)
Definition: comQueSend.h:203
void flushRequest(epicsGuard< epicsMutex > &)
Definition: tcpiiu.cpp:2038
#define CA_UKN_MINOR_VERSION
Definition: caProto.h:29
void assertIdenticalMutex(const T &) const
Definition: epicsGuard.h:80
#define NULL
Definition: catime.c:38
void start(epicsGuard< epicsMutex > &)
Definition: tcpiiu.cpp:819
comQueSend sendQue
#define CA_MESSAGE_ALIGN(A)
Definition: caProto.h:154
epicsMutex & mutex
bool findOrCreateVirtCircuit(epicsGuard< epicsMutex > &, const osiSockAddr &, unsigned, tcpiiu *&, unsigned, SearchDestTCP *pSearchDest=NULL)
Definition: cac.cpp:535
#define CA_V412(MINOR)
Definition: caProto.h:43
static const priLev priorityDefault
Definition: cacIO.h:168
void SearchDestTCP::setCircuit ( tcpiiu piiu)
inline

Definition at line 416 of file virtualCircuit.h.

417 {
418  _ptcpiiu = piiu;
419 }
void SearchDestTCP::show ( epicsGuard< epicsMutex > &  guard,
unsigned  level 
) const
virtual

Implements SearchDest.

Definition at line 2182 of file tcpiiu.cpp.

2184 {
2185  :: printf ( "tcpiiu :: SearchDestTCP\n" );
2186 }
#define printf
Definition: epicsStdio.h:41

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