The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
FsQueue class
Collaboration diagram for FsQueue class:

Functions

FSTATIC gboolean _fsqueue_enq (FsQueue *self, FrameSet *fs)
 Enqueue a FrameSet class onto an FsQueue class - exclusively for output queues - adds sequence number. More...
 
FSTATIC FrameSet_fsqueue_qhead (FsQueue *self)
 Return the FrameSet class from the head of the FsQueue class. More...
 
FSTATIC FrameSet_fsqueue_deq (FsQueue *self)
 Return the FrameSet class from the head of the queue - and remove it from the queue. More...
 
FSTATIC gboolean _fsqueue_inqsorted (FsQueue *self, FrameSet *fs)
 Enqueue a FrameSet class onto an FsQueue class - sorted by sequence number - NO dups allowed This function is used ONLY for received packets or it could be used for unsequenced output packets. More...
 
FSTATIC gint _fsqueue_ackthrough (FsQueue *self, SeqnoFrame *seq)
 Acknowledge and flush all framesets up through and including the given sequence number This is used exclusively for output queues - and is the result of the application on the other end sending us an ACK packet. More...
 
FSTATIC void _fsqueue_flush (FsQueue *self)
 Flush all framesets from the queue (if any). More...
 
FSTATIC void _fsqueue_flush1 (FsQueue *self)
 Flush only the first frameset from the queue (if any). More...
 
FSTATIC guint _fsqueue_qlen (FsQueue *self)
 Return the current length of this queue. More...
 
FSTATIC void _fsqueue_setmaxqlen (FsQueue *self, guint max)
 Set the maximum number of queue elements. More...
 
FSTATIC guint _fsqueue_getmaxqlen (FsQueue *self)
 Return the maximum number of queue elements. More...
 
FSTATIC gboolean _fsqueue_hasqspace1 (FsQueue *self)
 Does this queue have room for one more element? More...
 
FSTATIC gboolean _fsqueue_hasqspace (FsQueue *self, guint desired)
 Does this queue have room for 'desired' more elements? More...
 
WINEXPORT FsQueuefsqueue_new (guint objsize, NetAddr *dest, guint16 qid)
 Construct an FsQueue object - from a (far endpoint address, Queue Id) pair. More...
 
DEBUGDECLARATIONS FSTATIC void _fsqueue_finalize (AssimObj *aself)
 Finalize routine for our FsQueue class objects. More...
 
FSTATIC char * _fsqueue_toString (gconstpointer)
 
typedef struct _FsQueue FsQueue
 

Detailed Description

Typedef Documentation

typedef struct _FsQueue FsQueue

Definition at line 37 of file fsqueue.h.

Function Documentation

FSTATIC gint _fsqueue_ackthrough ( FsQueue self,
SeqnoFrame seq 
)

Acknowledge and flush all framesets up through and including the given sequence number This is used exclusively for output queues - and is the result of the application on the other end sending us an ACK packet.

Returns
number of packets ACKed by this incoming ACK packet.
Parameters
selfThe output FsQueue class object we're operating on
seqThe sequence number to ACK through

Definition at line 203 of file fsqueue.c.

References __FUNCTION__, DEBUGMSG3, DUMP, FMT_64BIT, _SeqnoFrame::getqid, _SeqnoFrame::getreqid, _FrameSet::getseqno, and _SeqnoFrame::getsessionid.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC FrameSet * _fsqueue_deq ( FsQueue self)

Return the FrameSet class from the head of the queue - and remove it from the queue.

Parameters
selfThe FsQueue class object we're operating on

Definition at line 107 of file fsqueue.c.

References CASTTOCLASS.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC gboolean _fsqueue_enq ( FsQueue self,
FrameSet fs 
)

Enqueue a FrameSet class onto an FsQueue class - exclusively for output queues - adds sequence number.

Parameters
selfus - the FsQueue we're operating on
fsThe FrameSet class to enqueue into our queue - must NOT have sequence#

Definition at line 56 of file fsqueue.c.

References __FUNCTION__, _AssimObj::_refcount, _FrameSet::_seqframe, _SeqnoFrame::_sessionid, _SeqnoFrame::baseclass, _FrameSet::baseclass, DEBUGMSG3, DUMP, DUMP3, FMT_64BIT, frameset_prepend_frame(), FRAMETYPE_REQID, REF, seqnoframe_new_init(), and UNREF2.

Referenced by fsqueue_new().

Here is the call graph for this function:

Here is the caller graph for this function:

FSTATIC void _fsqueue_finalize ( AssimObj aself)

Finalize routine for our FsQueue class objects.

Parameters
aselfThe FsQueue class object we're operating on

Definition at line 369 of file fsqueue.c.

References __FUNCTION__, CASTTOCLASS, DUMP3, FREECLASSOBJ, and UNREF.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC void _fsqueue_flush ( FsQueue self)

Flush all framesets from the queue (if any).

Todo:
: This is basically a protocol reset - what effect should this have upon sequence numbers and generation numbers (if any)? This is used as part of connection shutdown.
Parameters
selfThe FsQueue class object we're operating on

Definition at line 250 of file fsqueue.c.

References __FUNCTION__, _AssimObj::_refcount, _FrameSet::baseclass, CASTTOCLASS, DEBUGMSG3, DUMP4, FMT_64BIT, _SeqnoFrame::getreqid, _FrameSet::getseqno, and UNREF.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC void _fsqueue_flush1 ( FsQueue self)

Flush only the first frameset from the queue (if any).

Could be used on either input or output queues.

Parameters
selfThe FsQueue class object we're operating on

Definition at line 281 of file fsqueue.c.

References CASTTOCLASS, and UNREF.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC guint _fsqueue_getmaxqlen ( FsQueue self)

Return the maximum number of queue elements.

Parameters
selfThe FsQueue class object we're operating on

Definition at line 307 of file fsqueue.c.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC gboolean _fsqueue_hasqspace ( FsQueue self,
guint  desired 
)

Does this queue have room for 'desired' more elements?

Parameters
selfThe FsQueue class object we're operating on
desiredThe number of queue elements we're hoping for

Definition at line 321 of file fsqueue.c.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC gboolean _fsqueue_hasqspace1 ( FsQueue self)

Does this queue have room for one more element?

Parameters
selfThe FsQueue class object we're operating on

Definition at line 314 of file fsqueue.c.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC gboolean _fsqueue_inqsorted ( FsQueue self,
FrameSet fs 
)

Enqueue a FrameSet class onto an FsQueue class - sorted by sequence number - NO dups allowed This function is used ONLY for received packets or it could be used for unsequenced output packets.

The method we follow: Validate sequence number, then insert the FrameSet class into the FsQueue class.

Parameters
selfThe FsQueue class object we're operating on
fsThe FrameSet class object to enqueue

Definition at line 117 of file fsqueue.c.

References __FUNCTION__, _AssimObj::_refcount, _SeqnoFrame::_reqid, _FrameSet::_seqframe, _SeqnoFrame::_sessionid, _FrameSet::baseclass, CASTTOCLASS, _SeqnoFrame::compare, DEBUGMSG3, DUMP3, FMT_64BIT, _FrameSet::getseqno, and REF.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC FrameSet * _fsqueue_qhead ( FsQueue self)

Return the FrameSet class from the head of the FsQueue class.

Parameters
selfThe FsQueue class object we're operating on

Definition at line 99 of file fsqueue.c.

References CASTTOCLASS.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC guint _fsqueue_qlen ( FsQueue self)

Return the current length of this queue.

Parameters
selfThe FsQueue class object we're operating on

Definition at line 292 of file fsqueue.c.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC void _fsqueue_setmaxqlen ( FsQueue self,
guint  max 
)

Set the maximum number of queue elements.

Parameters
selfThe FsQueue class object we're operating on
maxThe new maximum queue length

Definition at line 299 of file fsqueue.c.

Referenced by fsqueue_new().

Here is the caller graph for this function:

FSTATIC char * _fsqueue_toString ( gconstpointer  vself)

Definition at line 387 of file fsqueue.c.

References _FrameSet::baseclass, CASTTOCLASS, CASTTOCONSTCLASS, FMT_64BIT, and _AssimObj::toString.

Referenced by fsqueue_new().

Here is the caller graph for this function:

WINEXPORT FsQueue* fsqueue_new ( guint  objsize,
NetAddr dest,
guint16  qid 
)

Construct an FsQueue object - from a (far endpoint address, Queue Id) pair.

Parameters
objsizeSize of the FsQueue object we should create
destDestination address for this FsQueue
qidAssociated queue ID for this FsQueue

Definition at line 329 of file fsqueue.c.

References _fsqueue_ackthrough(), _fsqueue_deq(), _fsqueue_enq(), _fsqueue_finalize(), _fsqueue_flush(), _fsqueue_flush1(), _fsqueue_getmaxqlen(), _fsqueue_hasqspace(), _fsqueue_hasqspace1(), _fsqueue_inqsorted(), _fsqueue_qhead(), _fsqueue_qlen(), _fsqueue_setmaxqlen(), _fsqueue_toString(), assimobj_new(), BINDDEBUG, DEFAULT_FSQMAX, NEWSUBCLASS, and REF.

Referenced by _fsprotocol_addconn().

Here is the call graph for this function:

Here is the caller graph for this function: