first proof reading corrections

This commit is contained in:
Jim Kowalkowski
1996-10-29 19:24:12 +00:00
parent 9427acb0a1
commit a0d4d84622
2 changed files with 173 additions and 142 deletions

View File

@@ -10,7 +10,7 @@ In addition you can identify the data with an integer application type value
which can be translated into a text string. A user can store data into and
retreived data from a GDD in any desired data type. A GDD can contain
a list of GDDs. This allows users to create and describe hierarchical
data structures dynamically. GDD organized in this fashion are known
data structures dynamically. GDDs organized in this fashion are known
as containers.
<P>
As mentioned above, a GDD can describe an n-dimension array. The user
@@ -24,9 +24,9 @@ what to do with referenced data.
<P>
To manage GDDs in a multi-tasking system or a system that
uses many layers of software, GDDs implement reference counting. With
reference counting, only one copy of GDD can be shared by many subsystems.
reference counting, only one instance of a GDD can be shared by many subsystems.
The GDD creator function can pass it to many other functions without
worrying about deleting it, when the last function using the GDD requests
worrying about deleting it, only when the last function using the GDD requests
that it be destroyed does it really go away.
<P>
As menitioned above, a GDD allows the user to describe the data in terms
@@ -40,7 +40,7 @@ string and optionally a prototype GDD. The prototype GDD can be a
container GDD. The table allows users to retreive GDDs of a specific
application type.
<P>
A GDD describe and manages a piece of data using the following information:
A GDD describes and manages a piece of data using the following information:
<P>
<UL>
<LI>Application Type (user assigned integer value)
@@ -60,8 +60,8 @@ C++ compiler.
<P><HR><H2>GDD Description</H2>
The gdd class is the main class in the GDD library. It controls almost
all actions perfomed on the data. The gdd class is further broken down
into three subclasses for performing operations are specific types of GDDs:
all actions performed on the data. The gdd class is further broken down
into three subclasses for performing operations on specific types of GDDs:
gddContainer, gddAtomic, and gddScalar. The gddContainer class aids in the
creation of container type GDDs. It adds functions such as "insert GDD",
"remove GDD", and "give me GDD x from the container" to the basic gdd class.
@@ -70,9 +70,9 @@ class makes it easy to create scalar GDDs.
<P>
All GDDs must be created dynamically, <B>a GDD cannot be created on the
stack</B> as a local variable. The gdd class forbids the user from deleting
the gdd. In order for referencing counting to work correctly the <B>user must
"unreference" the gdd instance instead of delete it</B>. The gdd class does
take over the memory management routines for itself and all it's subclass.
the gdd. In order for reference counting to work correctly the <B>user must
"unreference" the gdd instance instead of deleting it</B>. The gdd class does
take over the memory management routines for itself and all it's subclasses.
This means that you are not using the malloc()/free() memory management when
GDDs are created and destroyed. It is important to remember that since
reference counting is used, <B>a GDD passed into a function must be referenced
@@ -89,7 +89,7 @@ with it.
<P>
For a GDD to be useful after it is created, it must be given information
to describe the data to will hold. This data was summarized in the overview
section. To further understand and the meaning of all these items and use
section. To further understand the meaning of all these items and use
them correctly, each needs to be discussed.
<P><HR><H3>Primitive Types</H3>
@@ -176,7 +176,7 @@ this portion of the library will be dicussed in detail later in this document.
<P>
A typical way that application type codes are used is in defining structures.
A type code of 54 may be assigned the meaning "Temperature Reading". The
"Temperature Reading" structure may be a container with four GDD in it:
"Temperature Reading" structure may be a container with four GDDs in it:
a value, a high alarm limit, a low alarm limit, and units. Each
of these GDDs also have an application type code. A generic program can
actually be written to completely discover the contents of the
@@ -199,7 +199,7 @@ and time stamp. Transfering this type of data in one GDD in fairly easy.
If GDDs did not contain time stamps and status, then this actively changing
data would need to be transfered as a structure of three GDDs: one for
the value, one for the status, and one for the time stamp. In addition
to the three GDDs, a fourth that described the GDD container will need to
to the three GDDs, a fourth that describes the GDD container will need to
be transfered.
<P><HR><H3>Dimension and Bounds Information</H3>
@@ -207,13 +207,13 @@ A GDD that is a scalar is self contained. All information to describe
the data within the GDD is contained within the GDD. If the GDD describes
a structure (a container), or the GDD describes an array, then dimension
and array bounds information are needed. A GDD can describe an array
of array dimension. Each dimension is required to have a description
of any dimension. Each dimension is required to have a description
of it's size in terms of bounds.
<P>
Bounds, and consequencely a single dimension, in GDD are described by two
fields, a start and an element count. With this setup, and n-dimensional
space can be described. For example, a typical three dimension array
wouldbe described as a(5,4,6), which is a 5x4x6 cube. In a GDD this
would be described as A(5,4,6), which is a 5x4x6 cube. In a GDD this
cube would be described with dimension=3, bounds={(0,5)(0,4)(0,6)}. If
we want to describe a subset of this array, we would normally do so by
giving two endpoints of the sub-cube, such as (1,2,3)->(2,3,5). In GDD
@@ -250,7 +250,7 @@ character array and delete it.
The gddDestructor allows reference counting similar to the GDD class.
Typically a data array will be associated with one instance of the
gddDestructor class. If more then one GDD needs to reference the array,
the each GDD is registered with the same gddDestructor. Each time
then each GDD is registered with the same gddDestructor. Each time
the gddDestructor is registered, the reference count should be bumped
up. The gddDestructor "run" method will only be invoked when the
reference count drops to zero.
@@ -277,7 +277,7 @@ Several important issues related to where the actual data is stored
must be remembered when using GDDs:
<OL>
<LI>If a gdd is a scalar, then the gdd hold the data it describes, the
<LI>If a gdd is a scalar, then the gdd holds the data it describes, the
dimension is zero, and the bounds are empty.
<LI>If a gdd is an array, then the gdd refers to the data it describes,
refers to bounds that describe it's structure, has a dimension
@@ -358,7 +358,7 @@ must be remembered when using GDDs:
</PRE>
<P><HR><H2>Application Type Table Description</H2>
A facility within GDD library is designed to store application
A facility within the GDD library is designed to store application
type code to string mappings. The facility can also be used to store
and retrieve prototype GDDs by application type code. The application
type table is really a simple database containing records with the following
@@ -371,18 +371,19 @@ information:
</UL>
The type table has methods for registering or inserting records into the
database. Methods also exist to query the type name given a type code, and
to query the type code given the type name. Type codes are values are
assigned to a type name when there are registered; the user is given the
to query the type code given the type name. Type codes are values
assigned to a type name when the type name is registered; the user is given the
type code value when the registeration takes place. A type code sometimes has
a prototype GDD associated with it, especially if it is a container GDD.
Methods also exist to retrieve a GDD given an application type code that
matches the prototype for that type code. The application type table
Methods also exist to retrieve a new GDD given an application type code. The
new GDD structure will be a copy of the prototype GDD for that type code.
The application type table
is commonly used create GDDs. A given application type code usually
implies a certain structure to the data. The prototype mechanism allows
this imposed structure to be adhered to when the GDD is created. This is
particularly important when it comes to container type GDDs. The type
table basically copies the prototype when the user requests a GDD with a
particular type code. The application type table also packs GDD in
particular type code. The application type table also packs GDDs in
an efficient manage, which allows very high performance creation and
deletion of container GDDs and atomic GDDs.
<P>
@@ -393,22 +394,23 @@ can be very time consuming. For an array GDD, the bounds and a destructor
must be allocated in addition to the GDD itself and referenced into the
GDD. For a container GDD, the GDD elements are really stored as a linked
list. To access the third element of a container, the linked list must be
traversed. With aitStrings GDD the situation is worse yet. The GDD class
allow for a given GDD to be packed or flattened into a simple linear buffer.
traversed. With aitString GDDs the situation is worse yet. The GDD class
allow for a given GDD to be packed or flattened into a single linear buffer.
This mechanism includes packing GDD containers. In the array case,
the actual GDD is the first thing in the buffer, followed by any bounds
information, followed by the actual data array. The fields of the GDD
work exactly as before, except that they reference bounds and data that is
in the same buffer. In the case of containers, all the GDDs are stored as
an array of GDDs at the front of the buffer, followed by the bounds
information for each of the GDDs, followed by each of the GDDs data array if
information for each of the GDDs, followed by each of the GDD's data arrays if
present. There are many advantages of this configuration. Since all the
GDDs in a container are stored as an array instead of a linked list, the
user can directly index a particular GDD within the container. The
application type table performs with packing on a GDD that is registered
application type table performs this packing on a GDD that is registered
as a prototype for a particular type code. Since the GDD for a given
type code is now a fixed size, the type code table can manage the GDDs on
a free list. Each type code with a prototype GDD contains a free list
a free list. Each type code database entry with a prototype GDD contains
a free list
of GDDs for that type code. Creating a GDD using the type code table
involves retrieving a preallocated, packed GDD from a particular free list
and giving it to the user. This operation is very fast and efficient since

View File

@@ -1,7 +1,8 @@
<TITLE>GDD Reference Manual</TITLE>
<P><h1>GDD Reference Manual</h1>
<a href="gddref.html#gddAtomic">gddAtomic</a><br>
<a href="gddref.html#gdd">gdd</a><br>
<a href="gddref2.html#gddAtomic">gddAtomic</a><br>
<a href="gddref2.html#gddScalar">gddScalar</a><br>
<a href="gddref2.html#gddContainer">gddContainer</a><br>
<a href="gddref2.html#gddApplicationTypeTable">gddApplicationTypeTable</a><br>
@@ -180,10 +181,11 @@ the library automatically generates one instance of this class large enough
to hold 512 type codes. This automatically generated instance registers
all the standard EPICS control system type codes, see User's Guide.
<b><i>gddStatus registerApplicationType(const char* const name,
aitUint32& app);</i></b><br>
<b><i>gddStatus registerApplicationTypeWithProto(const char* const name,
gdd* protoDD, aitUint32& app);</i></b><br>
<P><B><I>
gddStatus registerApplicationType(const char* const name, aitUint32& app);<br>
gddStatus registerApplicationTypeWithProto(const char* const name,
gdd* protoDD, aitUint32& app);<br>
</I></B>
Register an application type <i>name</i>. The type table will return the
application type code in <i>app</i> that the system has assigned to the name.
The latter function allow a prototype GDD to be registered aloong with
@@ -199,12 +201,14 @@ with the application type name. See User's Guide for more details.
</DL>
</DL>
<i><b>aitUint32 getApplicationType(const char* const name) const;</b></i><br>
<i><b>char* getName(aitUint32 app) const;</b></i><br>
<P><I><B>
aitUint32 getApplicationType(const char* const name) const;<BR>
char* getName(aitUint32 app) const;<BR>
</B></I>
Convert a character string type name to it's integer value. Convert an
integer value to it's character string name.
<i><b>gddStatus mapAppToIndex(aitUint32 container_app,
<P><i><b>gddStatus mapAppToIndex(aitUint32 container_app,
aitUint32 app_to_map, aitUint32& index);</b></i><br>
Special function for converting type codes to container GDD array indexes.
The GDD must be a flattened GDD managed by the application type table for
@@ -221,7 +225,7 @@ See User's Guide for details.
</DL>
</DL>
<i><b>gddStatus smartCopy(gdd* dest, gdd* src);</b></i><br>
<P><i><b>gddStatus smartCopy(gdd* dest, gdd* src);</b></i><br>
Given any GDD dest and any GDD src, copy all the data from src to dest
where application type codes match. The src and dest can be any type of
GDD: scalar, array, or container. The src dset do not need to be the
@@ -238,29 +242,31 @@ be in the same order.
</DL>
</DL>
<i><b>gdd* getDD(aitUint32 app);</b></i><br>
<P><i><b>gdd* getDD(aitUint32 app);</b></i><br>
Allocate a GDD for the <i>app</i> and return it. If app has a prototype
registered with it, then the returned gdd will be managed and match the
prototype.
<i><b>gddStatus freeDD(gdd* dd);</b></i><br>
<P><i><b>gddStatus freeDD(gdd* dd);</b></i><br>
Free any gdd. The method basically just calls unreference on dd. If the
GDD is managed, then it puts it onto a free list for it's application type
code.
<i><b>aitUint32 maxAttributes(void) const;</b></i><br>
<i><b>aitUint32 totalregistered(void) const;</b></i><br>
<P><I><B>
aitUint32 maxAttributes(void) const;<br>
aitUint32 totalregistered(void) const;<br>
</I></B>
Return the total number of names registered in this application type table.
Return the total number of names that can be registered in this application
type table.
<i><b>void describe(FILE* fd);</b></i><br>
<P><i><b>void describe(FILE* fd);</b></i><br>
Print out "#define" statements for each of the names registered in this
table. Also print out container index labels in the form of #defines. See
User's Guide for details. The file gddApps.h is generated using this
function.
<i><b>static gddApplicationTypeTable& AppTable(void);</b></i><br>
<P><i><b>static gddApplicationTypeTable& AppTable(void);</b></i><br>
Return the automatically generated application type table for use in a
program.
@@ -270,24 +276,30 @@ destructors to gdd by deriving classes from gddDestructor.
<p>#include "gdd.h"<p>
<i><b>gddDestructor(void);</b></i><br>
<i><b>gddDestructor(void* user_arg);</b></i><br>
<i><b>
gddDestructor(void);<br>
gddDestructor(void* user_arg);<BR>
</b></i>
Create a gddDestructor, optionally placing an arbitrary pointer in the
destructor which can be referenced when the destructor is actual run.
<i><b>gddStatus destroy(void* thing_to_remove);</b></i><br>
<i><b>virtual void run(void* thing_to_remove);</b></i><br>
<P><i><b>
gddStatus destroy(void* thing_to_remove);<br>
virtual void run(void* thing_to_remove);<BR>
</b></i>
The <i>destroy</i> method in invoked by anyone withing to request the destructor
to be run. <i>Destroy</i> invokes the user-written function <i>run</i> when
it's reference count goes to zero. <i>Run</i> should not be invoked
directly by the user. The argument to <i>destroy</i> is the buffer that
needs to be freed by by the destructor. The gdd class invokes <i>destroy</i>
when unreference is called and the gdd's reference count goes to zero. The
default behavior of <i>run<i> is to cast the buffer thing_to_remove to a
default behavior of <i>run</i> is to cast the buffer thing_to_remove to a
character array and delete it.
<i><b>void reference(void);</b></i><br>
<i><b>int refCount(void) const;</b></i><br>
<P><i><b>
void reference(void);<br>
int refCount(void) const;<BR>
</b></i>
Calling <i>refCount</i> will return the current value in the destructor
reference count. <i>Reference</i> will bump up the reference count of this
destructor.
@@ -299,15 +311,20 @@ A simple class to describe the boundaries of a dimension.
<i><b>void setSize(aitIndex c);</b></i><br>
Sets the number of elements for this bounds.
<i><b>void set(aitIndex first, aitIndex cnt);</b></i><br>
<i><b>void get(aitIndex& first, aitIndex& cnt);</b></i><br>
<P><i><b>
void set(aitIndex first, aitIndex cnt);<br>
void get(aitIndex& first, aitIndex& cnt);<BR>
</b></i>
Set and get the first element in this bounds and the number of elements.
<i><b>aitIndex size(void) const;</b></i><br>
<P><i><b>aitIndex size(void) const;</b></i><br>
Return the number of element in this bounds.
<i><b>aitIndex first(void) const;</b></i><br>
<P><i><b>aitIndex first(void) const;</b></i><br>
Return the first element in this bounds.
<hr><h2><a name="gddBoundsxD">gddBounds1D gddBounds2D gddBounds3D</a><br>
<hr><h2><a name="gddBoundsxD">gddBounds1D gddBounds2D gddBounds3D</a><br></h2>
Specialized classes for describing with one, two, and three dimension data.
Since three of less dimension are the most common, bounds array classes for
each type exist and are managed on free lists. All of these classes
@@ -318,7 +335,7 @@ to the array of gddBounds.
<p>#include "gdd.h"<p>
<hr><h2><a name="gddSemaphore">gddSemaphore</a><br>
<hr><h2><a name="gddSemaphore">gddSemaphore</a><br></h2>
Simple wrapper around the underlying OS semphore functions. Implimentation
is OS dependant and is not really relevant in single threaded application.
This is a binary semaphore meant to be used for locking sections of code
@@ -326,30 +343,33 @@ or perhaps in a simple producer/consumer program.
<p>#include "gddUtils.h"<p>
<i><b>gddSemaphore(void)</b></i><br>
<i><b>gddSemaphore(gddSemType init)</b></i><br>
<i><b>
gddSemaphore(void)<br>
gddSemaphore(gddSemType init)<BR>
</b></i>
Create a simple binary gddSemaphore which defaults to full. Create a
gddSemaphore which
is set initially to state <i>init</i>. <i>Init</i> is either gddSemEmpty or
gddSemFull.
gddSemaphore which is set initially to state <i>init</i>. <i>Init</i>
is either gddSemEmpty or gddSemFull.
<i><b>void give(void)</b></i><br>
<i><b>void take(void)</b></i><br>
<P><i><b>
void give(void)<br>
void take(void)<BR>
</b></i>
Operations for manipulating the semaphore. <i>Take</i> will block if the
semaphore is empty, waiting until it is full. <i>Give</i> sets the
semaphore back to full state.
<i><b>int take(aitUint32 usec)</b></i><br>
<P><i><b>int take(aitUint32 usec)</b></i><br>
Attempt to perform the semaphore take operation. Only block for <i>usec</i>
microseconds. Returns true if time-out occurred and semaphore is not
really taken.
<hr><h2><a name="gddIntLock">gddIntLock</a><br>
<hr><h2><a name="gddIntLock">gddIntLock</a><br></h2>
A simple wrapper around OS interrupt locking services.
<p>#include "gddUtils.h"<p>
<hr><h2><a name="aitConvert">aitConvert</a><br>
<hr><h2><a name="aitConvert">aitConvert</a><br></h2>
A set of convenience functions for quickly converting arrays of data from one
aitType to another. The header file for these functions also contains a
set of standard functions for converting each of the ait types from/to
@@ -357,25 +377,27 @@ network byte order.
<p>#include "aitConvert.h"<p>
<i><b>void aitConvert(aitEnum desttype, void* dest,
<P><i><b>void aitConvert(aitEnum desttype, void* dest,
aitEnum srctype, const void* src, aitIndex count)</b></i><br>
Take <i>count</i> number of elements from <i>src</i> of type <i>srctype</i>,
copy then to <i>dest</i> and at the same time convert them to type
<i>desttype</i>.
<i><b>void aitConvertToNet(aitEnum desttype, void* dest,
aitEnum srctype, const void* src, aitIndex count)</b></i><br>
<i><b>void aitConvertFromNet(aitEnum desttype, void* dest,
aitEnum srctype, const void* src, aitIndex count)</b></i><br>
<P><i><b>
void aitConvertToNet(aitEnum desttype, void* dest,
aitEnum srctype, const void* src, aitIndex count)<br>
void aitConvertFromNet(aitEnum desttype, void* dest,
aitEnum srctype, const void* src, aitIndex count)<BR>
</b></i>
Same as <i>aitConvert</i> but change the byte order or data format to/from
network format. If the local host data format is network data format,
then these function are exactly the same as aitConvert.
<i><b>aitLocalNetworkDataFormatSame</b></i><br>
<P><i><b>aitLocalNetworkDataFormatSame</b></i><br>
This is a #define which is true if local host byte order is the same
as network byte order, otherwise it is false.
<hr><h2><a name="aitTimeStamp">aitTimeStamp</a><br>
<hr><h2><a name="aitTimeStamp">aitTimeStamp</a><br></h2>
A class for storing and manipulating standard time stamps. This time
is similar to POSIX time stamps, it maintains time in seconds/nanoseconds
past a standard epoch. POSIX defines a time stamp as a long for seconds
@@ -383,113 +405,119 @@ and a type time_t for nanoseconds. Time_t is OS dependant and so is a
long. aitTimeStamp forces seconds and nanoseconds to be unsigned 32 bit
integers so the storage size is fixed and known.
<p>#include "aitHelpers.h"
Automatically included if aitTypes.h is included.<p>
<p>#include "aitHelpers.h"<P>
Automatically included if aitTypes.h is included.
<i><b>operator double()</b></i><br>
<i><b>operator float()</b></i><br>
<P><i><b>
operator double()<br>
operator float()<BR>
</b></i>
Convert (cast) the seconds/nanoseconds to a double or float seconds with
decimal fraction of a second past epoch.
<i><b>static aitTimeStamp getCurrent();</b></i><br>
<P><i><b>static aitTimeStamp getCurrent();</b></i><br>
Retrieve the current time in aitTimeStamp format.
<i><b>void get(unsigned long &tv_secOut,unsigned long &tv_nsecOut);</b></i><br>
<P><i><b>void get(unsigned long &tv_secOut,unsigned long &tv_nsecOut);</b></i><br>
Retreive the various parts of the time stamp as separate quantities.
<i><b>aitTimeStamp()</b></i><br>
<P><i><b>aitTimeStamp()</b></i><br>
<i><b>aitTimeStamp(const aitTimeStamp &t)</b></i><br>
<i><b>aitTimeStamp(const unsigned long sec, const unsigned long nsec)</b></i><br>
Create an aitTimeStamp that is initially zero or set to various values.
<i><b>const unsigned NSecPerSec = 1000000000u;</i></b><br>
<i><b>const unsigned NSecPerUSec = 1000u;</i></b><br>
<i><b>const unsigned SecPerMin = 60u;</i></b><br>
<P><i><b>
const unsigned NSecPerSec = 1000000000u;<br>
const unsigned NSecPerUSec = 1000u;<br>
const unsigned SecPerMin = 60u;<BR>
</i></b>
Various constants for working with time.
<i><b>
<P><i><b>
aitTimeStamp operator+ (const aitTimeStamp &lhs, const aitTimeStamp &rhs);<br>
aitTimeStamp operator- (const aitTimeStamp &lhs, const aitTimeStamp &rhs);<br>
int operator>= (const aitTimeStamp &lhs, const aitTimeStamp &rhs);<br>
</b></i>
They are global functions for adding and subtracting and comparing time stamps.
<hr><h2><a name="aitString">aitString</a><br>
<hr><h2><a name="aitString">aitString</a><br></h2>
Standard class for holding and managing a variable length string. Strings
is GDD have two attributes associated with them: length and state. Length
is simply the total length of the string and state either constant or
allocated.
<p>#include "aitHelpers.h"
Automatically included if aitTypes.h is included.<p>
<p>#include "aitHelpers.h"<P>
Automatically included if aitTypes.h is included.
<i><b>aitString(void);</b></i><br>
<P><i><b>aitString(void);</b></i><br>
Construct an aitString that is empty.
<i><b>
aitString(char* str);
aitString(aitString* str);
aitString(aitString& str);
</b></i><br>
<P><i><b>
aitString(char* str);<BR>
aitString(aitString* str);<BR>
aitString(aitString& str);<BR>
</b></i>
Construct an aitString which contains a <b>copy</b> of <i>str</i>. The
state of this aitString will be "allocated".
<i><b>
aitString(const char* str);
aitString(const aitString* str);
aitString(const aitString& str);
</b></i><br>
<P><i><b>
aitString(const char* str);<BR>
aitString(const aitString* str);<BR>
aitString(const aitString& str);<BR>
</b></i>
Construct an aitString which contains a <b>reference</b> to <i>str</i>. The
state of this aitString will be "constant".
<i><b>void clear(void);</b></i><br>
<P><i><b>void clear(void);</b></i><br>
Clear out this aitString, freeing up any storage that may be allocated.
<i><b>void dump(void) const;</b></i><br>
<i><b>void dump(const char* id) const;</b></i><br>
<P><i><b>
void dump(void) const;<br>
void dump(const char* id) const;<BR>
</b></i>
Print the contents of this aitString to stdout in a readable format. Good
tool for debugging or understanding the aitString class.
<i><b>
operator const char*(void) const;
operator char*(void) const;
</b></i><br>
<P><i><b>
operator const char*(void) const;<BR>
operator char*(void) const;<BR>
</b></i>
Pull out a reference to the string that this aitString is holding. These
are casting operators from aitString to char*.
<i><b>int isConstant(void) const;</b></i><br>
<P><i><b>int isConstant(void) const;</b></i><br>
Returns true is this aitString hold a constant string.
<i><b>
aitUint32 length(void) const;
const char* string(void) const;
</b></i><br>
<P><i><b>
aitUint32 length(void) const;<BR>
const char* string(void) const;<BR>
</b></i>
Return the length of the string in this aitString. Return a reference to
the string in this aitString.
<i><b>
<P><i><b>
aitString& operator=(......);<br>
int copy(......);<br>
</b></i><br>
</b></i>
Create a copy of the variable string arguments in this aitString. This
aitString attributes will match that of the arguments. The assignment
operators just invoke copy(......).
<i><b>void replaceData(......);</b></i><br>
<P><i><b>void replaceData(......);</b></i><br>
Replace the data in this aitString with the string in the argument. This
function will only copy this aitStrings length number of bytes into it's
string from the argument string.
<i><b>void installString(......);</b></i><br>
<P><i><b>void installString(......);</b></i><br>
Invoke replaceData if this aitString is "constant". Invoke copy if this
aitString is not "constant".
<i><b>
<P><i><b>
static aitUint32 totalLength(aitString* array,aitIndex arraySize);<br>
static aitUint32 stringsLength(aitString* array,aitIndex arraySize);<br>
static aitIndex compact(aitString* array, aitIndex arraySize,
void* buf, aitIndex bufSize);
</b></i><br>
void* buf, aitIndex bufSize);<BR>
</b></i>
totalLength() returns the total number of bytes that an array of aitStrings
requires. This length include the size of all the strings in the aitStrings.
<i>Array</i> is the aitString array, <i>arraySize</i> is the number of
@@ -503,7 +531,7 @@ the front of <i>buf</i>. The aitStrings in buf reference strings that are
further into the buffer <i>buf</i>. <i>Compact</i> returns the total
number of bytes used in <i>buf</i>.
<hr><h2><a name="aitTypes_h">aitTypes/aitEnums</a><br>
<hr><h2><a name="aitTypes_h">aitTypes/aitEnums</a><br></h2>
Standard GDD data types and enumerations for them. This header file contains
many macros for dicovering information about aitTypes. See the header.
@@ -528,81 +556,82 @@ many macros for dicovering information about aitTypes. See the header.
aitString Class for manipulating and storing strings
</pre>
<i><b>
aitTotal
aitConvertTotal
aitValid(x)
aitConvertValid(x)
</b></i><br>
<P><i><b>
aitTotal<BR>
aitConvertTotal<BR>
aitValid(x)<BR>
aitConvertValid(x)<BR>
</b></i>
Value of the first two are the number of valid types. All the ait types
cannot be automatically converted using aitConvert. AitValid(x) returns
true if x has a valid ait type enumeration associated with it.
AitConvertValid(x) returns true if enumerated value x can be converted using
aitConvert.
<i><b>aitEnum</i></b><br>
<P><i><b>aitEnum</i></b><br>
This is an enumerated data type, there is one name per ait types. See
header file for the definition.
<i><b>aitType</i></b><br>
<P><i><b>aitType</i></b><br>
Data union of all the ait types.
<i><b>
aitSize[aitTotal]
aitName[aitTotal]
aitStringType[aitTotal]
</b></i><br>
<P><i><b>
aitSize[aitTotal]<BR>
aitName[aitTotal]<BR>
aitStringType[aitTotal]<BR>
</b></i>
Arrays used for discovering information about ait types using the enumerated
ait type name as the index into the array. aitSize returns the size in
bytes of the ait type. aitName returns a character string name of the
ait type. aitStringType returns a string which can be used in sscanf to
read or convert a string into the actual ait type.
<a name="gddErrorCodes_h">gddStatus - Error Codes</a><br>
<hr><h2><a name="gddErrorCodes_h">gddStatus - Error Codes</a><br></h2>
Error codes returned by various GDD library functions and methods. See header
file.
<P>#include "gddErrorsCodes.h"<P>
<i><b>char* gddErrorMessages[]</b></i><br>
Return an error message string name for an error code.
<hr><h2><a name="gddNewDel_h">new/delete Free List Management</a><br>
<hr><h2><a name="gddNewDel_h">new/delete Free List Management</a><br></h2>
<P>#include "gddNewDel.h"<P>
A set of generic member function macros that can be added to any class
to allow the class to be managed on a free list using the new/delete
operators. See the header file for details on how to use this
facility. Most GDD library classes use this facility.
<hr><h2><a name="gddApps_h">Application Type Code Index Labels</a><br>
<hr><h2><a name="gddApps_h">Application Type Code Index Labels</a><br></h2>
<P>#include "gddApps.h"<P>
This file is generated from the standard application type table. It
contains all the #define statements for preregistered containers and
application type codes.
<hr>
<h2><a name="dbMapper_h">DBR To ait Conversion Functions</a><br>
<h2><a name="dbMapper_h">gddMapDbr</a><br>
<h2><a name="dbMapper_h">gddAitToDbr</a><br>
<h2><a name="dbMapper_h">gddDbrToAit</a><br>
<hr><h2>
<a name="dbMapper_h">DBR To ait Conversion Functions</a><br>
<a name="dbMapper_h">gddMapDbr</a><br>
<a name="dbMapper_h">gddAitToDbr</a><br>
<a name="dbMapper_h">gddDbrToAit</a><br>
</h2>
<P>#include "dbMapper.h"<P>
Large set of utility functions for converting between EPICS DBR data types
and GDD containers.
<i><b>void gddMakeMapDBR(gddApplicationTypeTable& table);</b></i><br>
<P><i><b>void gddMakeMapDBR(gddApplicationTypeTable& table);</b></i><br>
The DBR mapping facility is not initialized automatically. It must be
initialized using this function before any of the functions are called.
It should be passed the standard default
application type table as an argument.
<i><b>chtype gddAitToDbr[]</b></i><br>
<P><i><b>chtype gddAitToDbr[]</b></i><br>
Given an ait type code, return the equivalent EPICS DBR type code.
<i><b>gddDbrToAitTable gddDbrToAit[]</b></i><br>
<P><i><b>gddDbrToAitTable gddDbrToAit[]</b></i><br>
Given a DBR type code, return a structure that describe the ait/GDD type code
informtion for that DBR type code. The information in gddDbrToAitTable is
the GDD application type code and GDD application type name for a given DBR
type. This information is not extremely useful for simple applications.
<i><b>gddDbrMapFuncTable gddMapDbr[]</b></i><br>
<P><i><b>gddDbrMapFuncTable gddMapDbr[]</b></i><br>
Array of conversion functions that convert between DBR structures and GDD
types. The index of this array is always the DBR type code, not the
GDD application type code. Each element of the array contains to functions: