diff --git a/src/ca/bhe.cpp b/src/ca/bhe.cpp index f53aa72f9..b460e0891 100644 --- a/src/ca/bhe.cpp +++ b/src/ca/bhe.cpp @@ -10,6 +10,10 @@ * Author: Jeff Hill */ + +#include +#include + #define epicsAssertAuthor "Jeff Hill johill@lanl.gov" #define epicsExportSharedSymbols @@ -29,6 +33,33 @@ void bhe::operator delete ( void *pCadaver, size_t size ) bhe::pFreeList->release ( pCadaver, size ); } +/* + * set average to -1.0 so that when the next beacon + * occurs we can distinguish between: + * o new server + * o existing server's beacon we are seeing + * for the first time shortly after program + * start up + * + * if creating this in response to a search reply + * and not in response to a beacon then + * we set the beacon time stamp to + * zero (so we can correctly compute the period + * between the 1st and 2nd beacons) + */ +bhe::bhe ( const epicsTime & initialTimeStamp, const inetAddrID & addr ) : + inetAddrID ( addr ), timeStamp ( initialTimeStamp ), averagePeriod ( - DBL_MAX ), + lastBeaconNumber ( UINT_MAX ) +{ +# ifdef DEBUG + { + char name[64]; + addr.name ( name, sizeof ( name ) ); + ::printf ( "created beacon entry for %s\n", name ); + } +# endif +} + bhe::~bhe () { } diff --git a/src/ca/bhe.h b/src/ca/bhe.h index d8d81c8f6..291bccf6a 100644 --- a/src/ca/bhe.h +++ b/src/ca/bhe.h @@ -14,10 +14,6 @@ #ifndef bheh #define bheh - -#include -#include - #ifdef epicsExportSharedSymbols # define bhehEpicsExportSharedSymbols # undef epicsExportSharedSymbols @@ -25,7 +21,6 @@ #include "shareLib.h" -#include "tsSLList.h" #include "tsDLList.h" #include "tsFreeList.h" #include "epicsSingleton.h" @@ -35,10 +30,10 @@ # define epicsExportSharedSymbols #endif -#include "shareLib.h" - #include "inetAddrID.h" +#include "shareLib.h" + class tcpiiu; class bhe : public tsSLNode < bhe >, public inetAddrID { @@ -67,33 +62,6 @@ private: bhe & operator = ( const bhe & ); }; -/* - * set average to -1.0 so that when the next beacon - * occurs we can distinguish between: - * o new server - * o existing server's beacon we are seeing - * for the first time shortly after program - * start up - * - * if creating this in response to a search reply - * and not in response to a beacon then - * we set the beacon time stamp to - * zero (so we can correctly compute the period - * between the 1st and 2nd beacons) - */ -inline bhe::bhe ( const epicsTime & initialTimeStamp, const inetAddrID & addr ) : - inetAddrID ( addr ), timeStamp ( initialTimeStamp ), averagePeriod ( - DBL_MAX ), - lastBeaconNumber ( UINT_MAX ) -{ -# ifdef DEBUG - { - char name[64]; - addr.name ( name, sizeof ( name ) ); - ::printf ( "created beacon entry for %s\n", name ); - } -# endif -} - #endif // ifdef bheh