45 unsigned repeaterPort );
47 SOCKET sock,
unsigned repeaterPort,
unsigned attemptNumber );
56 private epicsThreadRunable {
60 const char * pName,
unsigned stackSize,
unsigned priority );
64 void show (
unsigned level )
const;
73 static const double minRoundTripEstimate = 32e-3;
74 static const double maxRoundTripEstimate = 30;
75 static const double maxSearchPeriodDefault = 5.0 * 60.0;
76 static const double maxSearchPeriodLowerLimit = 60.0;
77 static const double beaconAnomalySearchPeriod = 5.0;
86 class epicsTimerQueueActive &,
94 void installNewChannel (
96 void installDisconnectedChannel (
98 void beaconAnomalyNotify (
102 void show (
unsigned level )
const;
108 class SearchDestUDP :
121 class SearchRespCallback :
124 SearchRespCallback (
udpiiu & );
126 const caHdr &,
const void * pPayload,
133 class M_repeaterTimerNotify :
136 M_repeaterTimerNotify (
udpiiu & iiu ) :
138 ~M_repeaterTimerNotify ();
140 void repeaterRegistrationMessage (
141 unsigned attemptNumber );
144 const char * pformat, ... );
151 M_repeaterTimerNotify m_repeaterTimerNotify;
155 const double maxPeriod;
161 const unsigned nTimers;
163 typedef std::auto_ptr <searchTimer> value_type;
165 SearchArray(
size_t n) : arr(
new value_type[n]) {}
166 ~SearchArray() {
delete[] arr; }
167 value_type& operator[](
size_t i)
const {
return arr[
i]; }
169 SearchArray(
const SearchArray&);
170 SearchArray& operator=(
const SearchArray&);
172 unsigned nBytesInXmitBuf;
173 unsigned beaconAnomalyTimerIndex;
181 bool lastReceivedSeqNoIsValid;
188 const epicsTime ¤Time );
191 const caHdr & hdr,
const void * pExt,
199 static const pProtoStubUDP udpJumpTableCAC[];
204 const osiSockAddr &,
const epicsTime & );
205 bool badUDPRespAction (
207 const osiSockAddr &netAddr,
const epicsTime & );
208 bool searchRespAction (
210 const osiSockAddr &net_addr,
const epicsTime & );
211 bool exceptionRespAction (
213 const osiSockAddr &net_addr,
const epicsTime & );
216 const osiSockAddr &net_addr,
const epicsTime & );
217 bool notHereRespAction (
219 const osiSockAddr &net_addr,
const epicsTime & );
220 bool repeaterAckAction (
222 const osiSockAddr &net_addr,
const epicsTime & );
225 unsigned getHostName (
227 unsigned bufLength )
const throw ();
228 const char * pHostName (
234 unsigned requestMessageBytesPending (
241 const void *pValue );
242 void writeNotifyRequest (
246 const void *pValue );
247 void readNotifyRequest (
251 void clearChannelRequest (
254 void subscriptionRequest (
257 void subscriptionUpdateRequest (
260 void subscriptionCancelRequest (
265 void requestRecvProcessPostponedFlush (
267 osiSockAddr getNetworkAddress (
271 void uninstallChanDueToSuccessfulSearchResponse (
274 double receiveWatchdogDelay (
278 const char * pName,
unsigned nameLength );
283 bool pushVersionMsg ();
286 void noSearchRespNotify (
294 void govExpireNotify (
303 friend class udpiiu::SearchDestUDP;
304 friend class udpiiu::SearchRespCallback;
305 friend class udpiiu::M_repeaterTimerNotify;
308 #endif // ifndef INC_udpiiu_H LIBCA_API void ca_repeater(void)
int(* pProtoStubUDP)(caHdrLargeArray *mp, void *pPayload, struct client *client)
LIBCA_API int epicsStdCall ca_v42_ok(chid chan)
pvd::StructureConstPtr type
udpRecvThread(class udpiiu &iiuIn, cacContextNotify &, epicsMutex &, const char *pName, unsigned stackSize, unsigned priority)
unsigned short ca_uint16_t
void show(unsigned level) const
LIBCA_API void caRepeaterThread(void *pDummy)
void cacRecvThreadUDP(void *pParam)
unsigned long arrayElementCount
EPICS time-stamps (epicsTimeStamp), epicsTime C++ class and C functions for handling wall-clock times...
C++ and C descriptions for a thread.
bool exitWait(double delay)
LIBCA_API void epicsStdCall caRepeaterRegistrationMessage(SOCKET sock, unsigned repeaterPort, unsigned attemptNumber)
LIBCA_API void epicsStdCall caStartRepeaterIfNotInstalled(unsigned repeaterPort)