orblag - returns parameter indicating degree to which clients are behind
#include "orb.h"
double orblag(int orb, char *match, char *reject,
Laggards **laggards)
orblag uses orbclients(3) to inspect the current packet position (pktid)
for all reader clients which match the match/reject criteria.
In the absence of errors, it returns a value between 0.0 and 1.0, corresponding to:
-
0.0
no lag time (all readers are at the leading edge of the orb)
-
1.0
some reader is at the trailing edge of the orb, (or perhaps in the
dead zone between the leading edge and the trailing edge).
The match and reject criteria follow the common approach used in
orb connections with respect to packet srcnames, but the name to
be matched is just the name of the application (eg, orb2orb),
extracted from information the orbserver maintains about clients.
If the final argument is non-zero, it should be the address of a pointer
to Laggards struct, initialized to zero. In this event, the routine returns
some information about the range of valid pktids for the orbserver, and
a list of matching clients and the corresponding lag value.
typedef struct ClientLag {
double lag ;
int thread ;
int pktid ;
char who[ORBWHAT_SIZE] ;
char what[ORBWHAT_SIZE] ;
} ClientLag ;
typedef struct Laggards {
Tbl *list ;
int oldest ;
int newest ;
int maxpktid ;
int range ;
} Laggards ;
Return values less than zero indicate various errors:
-
-1
no readers meet the match/reject criteria.
-
-2
orbclients(3) failed.
-
-3
The match or reject regular expressions have an error ;
a more detailed message is left on the error log.
$(ORBLIBS)
MT-Safe
orbclients(3)
Sometimes remote clients show up in the orbclients list long after they
have disconnected.
Daniel Quinlan
Table of Contents
Antelope Release 4.7 Linux 2.4.19-4GB 2005-07-18
Boulder Real Time Technologies, Inc
For more information, contact support@brtt.com