gml_SharedMessageRingInt.h

Go to the documentation of this file.
00001 /**
00002  *  @file gml_SharedMessageRingInt.h --
00003  *
00004  *    Internals for shared message rings.
00005  *
00006  *  Copyright (c) 2004 CLIPS-IMAG
00007  *
00008  *  See the file "gml_LicenseTerms.txt" for information on usage and redistribution
00009  *  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  *
00011  *  Created on December 12, 2004 (JL).
00012  */
00013 #ifndef __GML_SHARED_MESSAGE_RING_INT__
00014 #define __GML_SHARED_MESSAGE_RING_INT__
00015 
00016 #include <gml/base/gml_Types.h>
00017 
00018 /// flag set if message is a padding message
00019 #define GML_MESSAGERING_MESSAGE_PADDING 0001
00020 
00021 /// flag set if message has been read
00022 #define GML_MESSAGERING_MESSAGE_READ    0002
00023 
00024 
00025 struct gml_TMessageRingMessage
00026 {
00027   UInt32             messageNumber;       // the index of the message in the stream
00028   UInt32             byteOffset;          // offset of the message payload
00029   UInt32             byteLength;          // length of the message payload
00030   UInt8              read;                // number of clients that have read the message
00031   UInt8              flags;               // message flags
00032   UInt8              __reserved[2];       // reserved for future use
00033 };
00034 
00035 
00036 struct gml_TMessageRingHeader
00037 {
00038   UInt32             mutex;               // key used to define the global mutex
00039   UInt32             bytes;               // number of bytes in the ring payload
00040   UInt32             free;                // number of unused bytes in the ring
00041   UInt32             head;                // offset of the first occupied byte
00042   UInt32             tail;                // offset of the first free byte
00043   UInt32             oldest;              // index of the oldest message
00044   UInt32             latest;              // index of the most recent message
00045   UInt32             count;               // number of sent messages
00046   UInt8              __reserved  [1004];  // reserved for future use
00047   gml_TMessageRingMessage
00048                      messages    [128];   // index of messages in the ring
00049   UInt8              clientData  [1024];  // reserved fo client usage
00050 };
00051 
00052 
00053 #endif /* __GML_SHARED_MESSAGE_RING_INT__ */
Generated on Tue Jun 12 14:03:27 2007 for gml by Doxygen 1.5.2.