Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ftk Namespace Reference


Typedefs

typedef unsigned long HANDLE
typedef const char * ATTRIBUTE_INDEX
typedef const char * PARAMETER_INDEX

Variables

const HANDLE UNDEFINED_HANDLE = 0UL - 5UL
const unsigned int BUFFER_SIZE = 1024
const unsigned char UPDATES = 0x01
const unsigned char MESSAGES = 0x02
const unsigned char REQUESTS = 0x04
const unsigned char RELEASES = 0x08
const unsigned char ACQUISITIONS = 0x0A


Typedef Documentation

typedef unsigned long ftk::HANDLE
 

ftk handle typedef. We redefine here the "general" RTI handle to ftk::HANDLE for easier usage. In fact the RTI used several type of handles but looking at RTItypes.hh, you could note that at least AttributeHandle, ParameterHandle, ObjectClassHandle, InteractionClassHandle, ObjectHandle * and DimensionHandle are of type RTI::Handle.

Warning:
In RTI-1.3NGv4, RTI::handle is defined as ULong in RTItypes.hh and ULong is defined as unsigned long int baseTypes.hh for every non __alpha architecture. We then use this type here rather than including the RTI.hh (#include <RTI.hh> + typedef RTI::Handle HANDLE; will be probably cleaner, but introduce an dependency in the ftk.h...)

typedef const char* ftk::ATTRIBUTE_INDEX
 

Define the type of the index of an attribute.

typedef const char* ftk::PARAMETER_INDEX
 

Define the type of the index of a parameter.


Variable Documentation

const HANDLE ftk::UNDEFINED_HANDLE = 0UL - 5UL
 

Number for a handle which has not yet been defined. It is critical for a federate to know if any handle on an ObjectClass, InteractionClass, Attribute, Parameters, etc. is known or not (at startup, a federate does not know about any handle and has to ask the RTI to provide them). It is really tedious to have a bool associated with each handle to define its state. And as the RTI::handle is an unsigned number, negative number (like -1) could not be used to define an unknown state. Finally, the RTI could possibly assign handle with the number 0 (zero). So the choosen solution is to define and arbitrary choosen number for undefined handle. As the RTI seem to assign handles in a regular increasing number, it looks very unlikely that it will reach very high numbers. We then simply choose the bigger prime number which could be expressed with 32 bits (unsigned long)! 2^32 - 5 = 4294967291 is prime!

const unsigned int ftk::BUFFER_SIZE = 1024
 

Size of the default buffer. This buffer size is typically used to store temporarily data coming from the RTI (attribute or parameter value): it is pretty small for now and should be extended if the data type we transfer in a simulation require more space (like a complete text, or large array).

Bug:
This is not really a bug, because FTK will generate warnings if messages parameters (hlainteractionmessage.cpp) or attribute updates (ftkfederateambassador.cpp) are bigger than the buffer size. However, this is a serious limitation which has not justification!

const unsigned char ftk::UPDATES = 0x01
 

const unsigned char ftk::MESSAGES = 0x02
 

const unsigned char ftk::REQUESTS = 0x04
 

const unsigned char ftk::RELEASES = 0x08
 

const unsigned char ftk::ACQUISITIONS = 0x0A
 


Generated on Thu Apr 7 18:21:17 2005 for MST API by  doxygen 1.4.1