update doc
This commit is contained in:
@@ -27,32 +27,32 @@ CONTENTS
|
||||
<div class="toc">
|
||||
<ul>
|
||||
<li><a href="#L54">Introduction</a></li>
|
||||
<li><a href="#L151">PVData Meta Language</a>
|
||||
<li><a href="#L151">PVData Meta Language</a>
|
||||
<ul>
|
||||
<li><a href="#L157">Definition</a></li>
|
||||
<li><a href="#L352">Example</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L364">PV - User Description</a>
|
||||
<li><a href="#L364">PV - User Description</a>
|
||||
<ul>
|
||||
<li><a href="#L368">Overview</a></li>
|
||||
<li><a href="#L404">Process Variable Reflection</a>
|
||||
<li><a href="#L404">Process Variable Reflection</a>
|
||||
<ul>
|
||||
<li><a href="#L410">Type Description</a></li>
|
||||
<li><a href="#L530">Reflection Description</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L712">Standard Fields</a></li>
|
||||
<li><a href="#L796">PVField - Data Interfaces</a>
|
||||
<li><a href="#L796">PVField - Data Interfaces</a>
|
||||
<ul>
|
||||
<li><a href="#L800">PVField</a></li>
|
||||
<li><a href="#L912">PVAuxInfo</a></li>
|
||||
<li><a href="#L946">PVScalar and extensions</a>
|
||||
<li><a href="#L946">PVScalar and extensions</a>
|
||||
<ul>
|
||||
<li><a href="#L950">Primitive PVField types</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L956">PVArray and Extensions</a>
|
||||
<li><a href="#L956">PVArray and Extensions</a>
|
||||
<ul>
|
||||
<li><a href="#L995">PVArray Extensions</a></li>
|
||||
<li><a href="#L1039">Complete set of PVArray Extensions</a></li>
|
||||
@@ -67,11 +67,11 @@ CONTENTS
|
||||
<li><a href="#L1203">Convert</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L1273">Namespace, Typedefs, and Memory Management</a>
|
||||
<li><a href="#L1273">Namespace, Typedefs, and Memory Management</a>
|
||||
<ul>
|
||||
<li><a href="#L1277">Namespace</a></li>
|
||||
<li><a href="#L1283">typedefs</a></li>
|
||||
<li><a href="#L1382">Memory Managemment</a>
|
||||
<li><a href="#L1382">Memory Managemment</a>
|
||||
<ul>
|
||||
<li><a href="#L1384">NoDefaultMethods</a></li>
|
||||
</ul>
|
||||
@@ -81,18 +81,18 @@ CONTENTS
|
||||
<li><a href="#L1398">Other code in this project</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L1406">Examples</a>
|
||||
<li><a href="#L1406">Examples</a>
|
||||
<ul>
|
||||
<li><a href="#L1410">Accessing PVData</a></li>
|
||||
<li><a href="#L1429">Creating PVData</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L1449">Property</a>
|
||||
<li><a href="#L1449">Property</a>
|
||||
<ul>
|
||||
<li><a href="#L1453">Definition of Property</a></li>
|
||||
<li><a href="#L1465">Standard Properties</a></li>
|
||||
<li><a href="#L1546">Overview of Property Support</a></li>
|
||||
<li><a href="#L1566">timeStamp</a>
|
||||
<li><a href="#L1566">timeStamp</a>
|
||||
<ul>
|
||||
<li><a href="#L1590"><span
|
||||
style="font-family: courier;">timeStamp.h</span></a></li>
|
||||
@@ -100,7 +100,7 @@ CONTENTS
|
||||
style="font-family: courier;">pvTimeStamp.h</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L1736">alarm</a>
|
||||
<li><a href="#L1736">alarm</a>
|
||||
<ul>
|
||||
<li><a href="#L1763"><span
|
||||
style="font-family: courier;">alarm.h</span></a></li>
|
||||
@@ -108,7 +108,7 @@ CONTENTS
|
||||
style="font-family: courier;">pvAlarm.h</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L1852">control</a>
|
||||
<li><a href="#L1852">control</a>
|
||||
<ul>
|
||||
<li><a href="#L1874"><span
|
||||
style="font-family: courier;">control.h</span></a></li>
|
||||
@@ -116,7 +116,7 @@ CONTENTS
|
||||
style="font-family: courier;">pvControl.h</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L1948">display</a>
|
||||
<li><a href="#L1948">display</a>
|
||||
<ul>
|
||||
<li><a href="#L1970"><span
|
||||
style="font-family: courier;">display.h</span></a></li>
|
||||
@@ -127,11 +127,11 @@ CONTENTS
|
||||
<li><a href="#L2074">pvEnumerated</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L2150">PVData Abstract and Base Classes</a>
|
||||
<li><a href="#L2150">PVData Abstract and Base Classes</a>
|
||||
<ul>
|
||||
<li><a href="#L2154">Overview</a></li>
|
||||
<li><a href="#L2158">Factories</a></li>
|
||||
<li><a href="#L2168">Abstract Classes for PVField</a>
|
||||
<li><a href="#L2168">Abstract Classes for PVField</a>
|
||||
<ul>
|
||||
<li><a href="#L2170">AbstractPVField</a></li>
|
||||
<li><a href="#L2174">AbstractPVScalar</a></li>
|
||||
@@ -144,7 +144,7 @@ CONTENTS
|
||||
<li><a href="#L2211">Base Classes for PVArray</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L2236">Miscellanous Classes</a>
|
||||
<li><a href="#L2236">Miscellanous Classes</a>
|
||||
<ul>
|
||||
<li><a href="#L2240">Overview</a></li>
|
||||
<li><a href="#L2337">BitSet</a></li>
|
||||
@@ -154,7 +154,7 @@ CONTENTS
|
||||
<li><a href="#L2506">Executor</a></li>
|
||||
<li><a href="#L2537">Linked List</a></li>
|
||||
<li><a href="#L2651">Lock and Mutex</a></li>
|
||||
<li><a href="#L2667">Message Queue</a>
|
||||
<li><a href="#L2667">Message Queue</a>
|
||||
<ul>
|
||||
<li><a href="#L2669">Definitions</a></li>
|
||||
<li><a href="#L2673">MessageQueue</a></li>
|
||||
@@ -166,7 +166,7 @@ CONTENTS
|
||||
<li><a href="#L2807">Serialize</a></li>
|
||||
<li><a href="#L2847">Show Constructors and Destructors</a></li>
|
||||
<li><a href="#L2901">Status</a></li>
|
||||
<li><a href="#L2948">Thread</a>
|
||||
<li><a href="#L2948">Thread</a>
|
||||
<ul>
|
||||
<li><a href="#L2950">ThreadPriority</a></li>
|
||||
<li><a href="#L2954">Thread</a></li>
|
||||
@@ -177,7 +177,7 @@ CONTENTS
|
||||
<li><a href="#L3094">Queue</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#L3157">pvMisc</a>
|
||||
<li><a href="#L3157">pvMisc</a>
|
||||
<ul>
|
||||
<li><a href="#L3161">BitSetUtil</a></li>
|
||||
<li><a href="#L3191">MultiChoice</a></li>
|
||||
@@ -195,12 +195,12 @@ CONTENTS
|
||||
license</a> described at the end of this document.</p>
|
||||
|
||||
<p>PVData is one of a set of related projects: pvData, pvAccess, and javaIOC.
|
||||
It describes and implements the data that the other project use. Thus it is not
|
||||
useful by itself but understanding pvData is required in order to understand
|
||||
the other projects. The reader should also become familar with pvAccess and
|
||||
javaIOC, which are located via the same sourceforge site as this project.
|
||||
Project PVAccess provides network support for transporting pvData. Project
|
||||
javaIOC provides a memory resident "smart" database of pvData data.</p>
|
||||
It describes and implements the data that the other projects use. Thus it is
|
||||
not useful by itself but understanding pvData is required in order to
|
||||
understand the other projects. The reader should also become familar with
|
||||
pvAccess and javaIOC, which are located via the same sourceforge site as this
|
||||
project. Project PVAccess provides network support for transporting pvData.
|
||||
Project javaIOC provides a memory resident "smart" database of pvData data.</p>
|
||||
|
||||
<p>This document describes the C++ implementation of pvData, which was first
|
||||
implemented in Java. A C++ implementation of pvAccess is being developed in
|
||||
@@ -215,20 +215,21 @@ store, access, and transmit memory resident structured data.</p>
|
||||
description of pvData.</dd>
|
||||
<dt>implementation</dt>
|
||||
<dd>Directory factory provides a complete C++ definition for pvData. It
|
||||
also proivides abstract and base classes that support specialized
|
||||
also provides abstract and base classes that support specialized
|
||||
implementations of the data classes.</dd>
|
||||
<dt>efficient</dt>
|
||||
<dd>Small memory footprint, low cpu overhead, and concise code base.</dd>
|
||||
<dt>data storage</dt>
|
||||
<dd>pvData defines separate introspection and data interfaces. The
|
||||
introspection interfaces provide access to immutable objects, which
|
||||
allows introspection instances to be freely shared. The introspection
|
||||
interface for a process variable can be accessed without requiring access
|
||||
to the data.</dd>
|
||||
<dd>pvData provides introspection and data interfaces. The introspection
|
||||
interfaces provide access to immutable objects, which allows
|
||||
introspection instances to be freely shared. The introspection interface
|
||||
for a process variable can be accessed without requiring access to the
|
||||
data.</dd>
|
||||
<dt>data access</dt>
|
||||
<dd>Client code can access pvData via the introspection and data
|
||||
interfaces. For "well known" data, e.g. timeStamp, specialized interfaces
|
||||
can be provided without requiring any changes to the core software.</dd>
|
||||
can be implemented without requiring any changes to the core
|
||||
software.</dd>
|
||||
<dt>data transfer</dt>
|
||||
<dd>The separation of introspection and data interfaces allows for
|
||||
efficient network data transfer. At connection time introspection
|
||||
@@ -247,7 +248,7 @@ store, access, and transmit memory resident structured data.</p>
|
||||
array is a one dimensional array of structures where each element has the
|
||||
same introspection interface. Since a field can have type structure
|
||||
complex structures are supported. No other types are needed since
|
||||
structures can be defined that simulate complex types.</dd>
|
||||
structures can be defined that simulate types.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The javaIOC implements a Process Variable (PV) Database, which is a memory
|
||||
@@ -296,7 +297,7 @@ pvDataApp:</p>
|
||||
<p>This section describes a meta language for describing pvData. Currently
|
||||
there are no plans for a parser for the meta language. It is used for
|
||||
documentation. Also the toString introspection and data methods described below
|
||||
do present data in this format.</p>
|
||||
present data in this format.</p>
|
||||
|
||||
<h3 id="L157">Definition</h3>
|
||||
|
||||
@@ -360,11 +361,14 @@ line is a comment. </p>
|
||||
For <span style="font-family: courier;">structure fieldName</span> each
|
||||
<span style="font-family: courier;">fieldDef</span> must have a unique
|
||||
<span style="font-family: courier;">fieldName</span> within the <span
|
||||
style="font-family: courier;">structure</span> For <span
|
||||
style="font-family: courier;">structureName fieldName</span> the <span
|
||||
style="font-family: courier;">structureName</span> must be the <span
|
||||
style="font-family: courier;">fieldName</span> of a previously defined
|
||||
top level <span style="font-family: courier;">structure</span> </dd>
|
||||
style="font-family: courier;">structure</span>
|
||||
<p></p>
|
||||
<p>For <span style="font-family: courier;">structureName fieldName</span>
|
||||
the <span style="font-family: courier;">structureName</span> must be the
|
||||
<span style="font-family: courier;">fieldName</span> of a previously
|
||||
defined top level <span style="font-family: courier;">structure</span>
|
||||
</p>
|
||||
</dd>
|
||||
<dt>structureArray</dt>
|
||||
<dd>A structureArray field has the definition:
|
||||
<pre> structure[] fieldName
|
||||
@@ -374,7 +378,7 @@ line is a comment. </p>
|
||||
</pre>
|
||||
Thus a structure array is an array where each element is a structure but
|
||||
all elements have the same introspection interface. For introspection the
|
||||
structureDef appears once without and data valuies.</dd>
|
||||
structureDef appears once without any data valuies.</dd>
|
||||
</dl>
|
||||
|
||||
<p>Each field can optionally have data values assigned to it. The definition of
|
||||
@@ -386,16 +390,16 @@ valid for the type. </p>
|
||||
<span style="font-family: courier;">false</span> </dd>
|
||||
<dt style="font-family: courier;">byte,...long</dt>
|
||||
<dd>Any valid integer or hex value, e.g. <span
|
||||
style="font-family: courier;">3 0xff</span> are valid values</dd>
|
||||
style="font-family: courier;">3 and 0xff</span> are valid values</dd>
|
||||
<dt style="font-family: courier;">float,double</dt>
|
||||
<dd>Any valid integer or real e.g. <span style="font-family: courier;">3
|
||||
3.0 3e0</span> are valid values</dd>
|
||||
<dd>Any valid integer or real e.g. <span style="font-family: courier;">3,
|
||||
3.0, and 3e0</span> are valid values</dd>
|
||||
<dt style="font-family: courier;">string</dt>
|
||||
<dd>The value can be an alphanumeric value or any set of characters
|
||||
enclosed in <span style="font-family: courier;">""</span> Within quotes a
|
||||
quote is expressed as <span style="font-family: courier;">\"</span>
|
||||
Examples are <span style="font-family: courier;">aValue "a value" "a\"
|
||||
xxx"</span> are valid values. </dd>
|
||||
enclosed in <span style="font-family: courier;">""</span>. Within quotes,
|
||||
a quote is expressed as <span style="font-family: courier;">\"</span>
|
||||
Examples are <span style="font-family: courier;">aValue "a value" and
|
||||
"a\" xxx"</span> are valid values. </dd>
|
||||
</dl>
|
||||
|
||||
<p>For scalar arrays the syntax is:</p>
|
||||
@@ -450,7 +454,7 @@ structure[] structureArrayExample
|
||||
|
||||
<p>Directory pvDataApp/pv has header files that completely describe pvData. The
|
||||
implementation is provided in directory pvDataApp/factory. Test programs
|
||||
appears on pvDataApp/pvTest.</p>
|
||||
appears on testApp/pvTest.</p>
|
||||
|
||||
<p>A PVStructure is a field that contains an array of subfields. Each field has
|
||||
code for accessing the field. The interface for each field is PVField or an
|
||||
@@ -465,14 +469,14 @@ converting and copying data between fields.</p>
|
||||
<p>Directory pvDataApp/pv has the following header files:</p>
|
||||
<dl>
|
||||
<dt style="font-family: courier;">pvIntrospect.h</dt>
|
||||
<dd>A cpmplete description of the introspection interfaces.</dd>
|
||||
<dd>A complete description of the introspection interfaces.</dd>
|
||||
<dt style="font-family: courier;">pvData.h</dt>
|
||||
<dd>A complete description of the data interfaces.</dd>
|
||||
<dt style="font-family: courier;">convert.h</dt>
|
||||
<dd>The facility that converts between data fields.</dd>
|
||||
<dd>A facility that converts between data fields.</dd>
|
||||
<dt style="font-family: courier;">standardField.h</dt>
|
||||
<dd>Provides access to introspection interfaces for standard introspection
|
||||
structures like timeStamp, alarm, etc.</dd>
|
||||
<dd>Provides access to introspection interfaces for standard structures
|
||||
like timeStamp, alarm, etc.</dd>
|
||||
<dt style="font-family: courier;">standardPVField.h</dt>
|
||||
<dd>Cteates data interfaces for standard data structures like timeStamp,
|
||||
alarm, etc.</dd>
|
||||
@@ -480,14 +484,15 @@ converting and copying data between fields.</p>
|
||||
|
||||
<h3 style="text-align: center" id="L404">Process Variable Reflection</h3>
|
||||
|
||||
<p>This subsection describes pvIntrospect.h</p>
|
||||
<p>This subsection describes <span
|
||||
style="font-family: Courier New,Courier,monospace">pvIntrospect.h</span></p>
|
||||
|
||||
<p>Given a pvname, which consists of a record name and field name, it is
|
||||
possible to introspect the field without requiring access to data. The
|
||||
reflection and data interfaces are separate because the data may not be
|
||||
available. For example when a client connects to a PV, the client library can
|
||||
obtain the reflection information without obtaining any data. Only when a
|
||||
client issues an I/O request will data be available. This separation is
|
||||
available. For example when a pvAccess client connects to a PV, the client
|
||||
library can obtain the reflection information without obtaining any data. Only
|
||||
when a client issues an I/O request will data be available. This separation is
|
||||
especially important for arrays and structures so that a client can discover
|
||||
the type without requiring that a large data array or structure be transported
|
||||
over the network.</p>
|
||||
@@ -532,7 +537,7 @@ public:
|
||||
<dd>An array where every element has the same scalar type.</dd>
|
||||
<dt style="font-family: courier;">structure</dt>
|
||||
<dd>A structure where each field has a name and a type. Within a structure
|
||||
each field name must be unique but the type can be different.</dd>
|
||||
each field name must be unique but the types can be different.</dd>
|
||||
<dt style="font-family: courier;">structureArray</dt>
|
||||
<dd>An array where each element is a structure. Each element has the same
|
||||
structure introspection interface.</dd>
|
||||
@@ -593,7 +598,9 @@ following: </p>
|
||||
<dl>
|
||||
<dt>Has a name.</dt>
|
||||
<dt>Has a Type.</dt>
|
||||
<dt>Can be converted to a string.</dt>
|
||||
<dt>Can be converted to a string.<br />
|
||||
Can be shared. A reference count is kept. When it becomes 0 the
|
||||
instance is automatically deleted.</dt>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt style="font-family: courier;">Scalar</dt>
|
||||
@@ -602,8 +609,8 @@ following: </p>
|
||||
<dd>The element type is a scalarType</dd>
|
||||
<dt style="font-family: courier;">StructureArray</dt>
|
||||
<dd>The field holds an array of structures. Each element has the same
|
||||
Structure interspection interface. A client can only get/put entire
|
||||
PVStructure elements NOT subfields of array elements.</dd>
|
||||
Structure interspection interface. A pvAccess client can only get/put
|
||||
entire PVStructure elements NOT subfields of array elements.</dd>
|
||||
<dt style="font-family: courier;">Structure</dt>
|
||||
<dd>Has fields that can be any of the supported types.</dd>
|
||||
<dt style="font-family: courier;">FieldCreate</dt>
|
||||
@@ -623,6 +630,8 @@ public:
|
||||
void incReferenceCount() const;
|
||||
void decReferenceCount() const;
|
||||
void dumpReferenceCount(StringBuilder buf,int indentLevel) const;
|
||||
virtual bool operator==(const Field& field) const;
|
||||
virtual bool operator!=(const Field& field) const;
|
||||
protected:
|
||||
Field(String fieldName,Type type);
|
||||
virtual ~Field();
|
||||
@@ -728,27 +737,34 @@ descriptions:</p>
|
||||
<dd>Adds a report of the the current reference count for this field. If the
|
||||
field is a structure then dumpReferenceCount is called for each sub
|
||||
field.</dd>
|
||||
<dt style="font-family: courier;">operator==</dt>
|
||||
<dd>Returns (false,true) if the two objects (do not,do) have the same
|
||||
values. Thus means the same types and names.</dd>
|
||||
<dt style="font-family: courier;">operator!=</dt>
|
||||
<dd>Returns (false,true) if the two objects (do,do not) have the same
|
||||
values.</dd>
|
||||
</dl>
|
||||
|
||||
<p><span style="font-family: courier;">Scalar</span>has the methods:</p>
|
||||
<p><span style="font-family: courier;">Scalar</span> has the methods:</p>
|
||||
<dl>
|
||||
<dt style="font-family: courier;">getScalarType</dt>
|
||||
<dd>Get that scalar type.</dd>
|
||||
</dl>
|
||||
|
||||
<p><span style="font-family: courier;">ScalarArray</span>has the methods:</p>
|
||||
<p><span style="font-family: courier;">ScalarArray</span> has the methods:</p>
|
||||
<dl>
|
||||
<dt style="font-family: courier;">getElementType</dt>
|
||||
<dd>Get the element type.</dd>
|
||||
</dl>
|
||||
|
||||
<p><span style="font-family: courier;">StructureArray</span>has the methods:</p>
|
||||
<p><span style="font-family: courier;">StructureArray</span> has the
|
||||
methods:</p>
|
||||
<dl>
|
||||
<dt style="font-family: courier;">getStructure</dt>
|
||||
<dd>Get the introspection interface that each element shares,</dd>
|
||||
</dl>
|
||||
|
||||
<p><span style="font-family: courier;">Structure</span>has the methods:</p>
|
||||
<p><span style="font-family: courier;">Structure</span> has the methods:</p>
|
||||
<dl>
|
||||
<dt style="font-family: courier;">getNumberFields</dt>
|
||||
<dd>Get the number of immediate subfields.</dd>
|
||||
@@ -761,20 +777,29 @@ descriptions:</p>
|
||||
<dd>Get the array of introspection interfaces for the field,</dd>
|
||||
</dl>
|
||||
|
||||
<p><span style="font-family: courier;">FieldCreate</span>has the methods:</p>
|
||||
<p><span style="font-family: courier;">FieldCreate</span> has the methods:</p>
|
||||
<dl>
|
||||
<dt style="font-family: courier;">create</dt>
|
||||
<dd>Given a field name and an existing introspection interface create a new
|
||||
introspection object. The existing introspection interface can be any of
|
||||
the allowed types.</dd>
|
||||
the allowed types. If the argument field is shared, i.e. has been
|
||||
obtained from an existing oject, then field->incReferenceCount() must
|
||||
be called before this method.</dd>
|
||||
<dt style="font-family: courier;">createScalar</dt>
|
||||
<dd>Create a scalar introspection instance.</dd>
|
||||
<dt style="font-family: courier;">createScalarArray</dt>
|
||||
<dd>Create a scalar array introspection instance.</dd>
|
||||
<dt style="font-family: courier;">createStructure</dt>
|
||||
<dd>Create a structure introspection instance.</dd>
|
||||
<dd>Create a structure introspection instance. The FieldConstPtrArray
|
||||
fields MUST be allocated on the heap NOT on the stack. It will
|
||||
automatically be deleted when the structure instance is deleted. For any
|
||||
element of fields that is shared, i.e. has been obtained from an existing
|
||||
onject, then fields[index]->incReferenceCount() must be called before
|
||||
this method.</dd>
|
||||
<dt style="font-family: courier;">createStructureArray</dt>
|
||||
<dd>Create a structure array introspection instance.</dd>
|
||||
<dd>Create a structure array introspection instance. If the argument
|
||||
structure is shared, i.e. has been obtained from an existing object, then
|
||||
structure->incReferenceCount() must be called before this method.</dd>
|
||||
</dl>
|
||||
|
||||
<h3 style="text-align: center" id="L712">Standard Fields</h3>
|
||||
@@ -911,7 +936,7 @@ extern StandardField * getStandardField();</pre>
|
||||
<dt style="font-family: courier;">floatAlarm</dt>
|
||||
<dt style="font-family: courier;">doubleAlarm</dt>
|
||||
<dt style="font-family: courier;">enumeratedAlarm</dt>
|
||||
<dd>The above provide introspection interfaces fot standard properties. See
|
||||
<dd>The above provide introspection interfaces for standard properties. See
|
||||
the section on Properties for a description of how these are defined.</dd>
|
||||
</dl>
|
||||
|
||||
@@ -1014,8 +1039,11 @@ are:</p>
|
||||
<dt style="font-family: courier;">renameField</dt>
|
||||
<dd>Rename the field name.</dd>
|
||||
<dt style="font-family: courier;">postPut</dt>
|
||||
<dd>If this field is a field of a record pvRecordField.postPut() is called.
|
||||
If not a field of a record nothing happens.</dd>
|
||||
<dd>If a postHandler is registered it is called otherwise no action is
|
||||
taken.</dd>
|
||||
<dt style="font-family: courier;">setPostHandler</dt>
|
||||
<dd>Set the postHandler for the record. Only a single handler can be
|
||||
registered.</dd>
|
||||
<dt style="font-family: courier;">toString</dt>
|
||||
<dd>Converts the field data to a string. This is mostly for debugging
|
||||
purposes.</dd>
|
||||
@@ -1288,7 +1316,7 @@ but is important for immutable arrays. For example pvData and the javaIOC
|
||||
define many enumerated structures where an enumerated structure has two fields:
|
||||
index and choices. Choices is a PVStringArray that holds the enumerated
|
||||
choices. Index is a PVInt that is the index of the currently selected choice.
|
||||
For many enumerated structures the choices is immutable. Allowing the choices
|
||||
For many enumerated structures choices is immutable. Allowing the choices
|
||||
internal String[] to be shared between all the instances of an enumerated
|
||||
structure saves on storage. Another reason for allowing shared data is so that
|
||||
an application which processes an array can be separated into multiple modules
|
||||
@@ -1625,6 +1653,26 @@ private:
|
||||
|
||||
<p>The other methods are similar to the methods for other array types.</p>
|
||||
|
||||
<p>Important Note: Code that calls put must be aware of the fact that
|
||||
introsection interfaces are shared. When creating array elements the shared
|
||||
introspection interface must be used. The following shows an example:</p>
|
||||
<pre>void put(PVStructure* powerSupplyArrayStruct)
|
||||
{
|
||||
PVStructurePtrArray structureArray = new PVStructurePtr[3];
|
||||
StructureConstPtr structure =
|
||||
powerSupplyArray->getStructureArray()->getStructure();
|
||||
structure->incReferenceCount();
|
||||
structureArray[0] = pvDataCreate->createPVStructure(0,structure);
|
||||
structure->incReferenceCount();
|
||||
structureArray[1] = pvDataCreate->createPVStructure(0,structure);
|
||||
structure->incReferenceCount();
|
||||
structureArray[2] = pvDataCreate->createPVStructure(0,structure);
|
||||
powerSupplyArray->put(0,3,structureArray,0);
|
||||
}
|
||||
</pre>
|
||||
|
||||
<p>Note that incReferenceCount is called before each element is created.</p>
|
||||
|
||||
<h4 id="L1163">PVDataCreate</h4>
|
||||
|
||||
<p>PVDataCreate is an interface that provides methods that create PVField
|
||||
@@ -1882,8 +1930,7 @@ Management</h2>
|
||||
|
||||
<h3 style="text-align: center" id="L1277">Namespace</h3>
|
||||
|
||||
<p>All include and definition files in project pvDataCPP appear in namespace:
|
||||
</p>
|
||||
<p>All code in project pvDataCPP appears in namespace: </p>
|
||||
<pre>namespace epics { namespace pvData {
|
||||
// ...
|
||||
}}</pre>
|
||||
@@ -1926,7 +1973,7 @@ changes to pvInterspect.h without any changes to other code.</p>
|
||||
|
||||
<p>std::string is used to implement pvString. This works because std::string
|
||||
implements COW (Copy On Write) semantics. Thus once created a String can be
|
||||
treated like an immutable object, which is what pvData require.</p>
|
||||
treated like an immutable object, which is what pvData requires.</p>
|
||||
|
||||
<p>The remaining definitions are:</p>
|
||||
<dl>
|
||||
@@ -2006,7 +2053,7 @@ private:
|
||||
|
||||
<p>Introspection objects are meant to be shared. The constructors and
|
||||
destructors are all private or protected so that an introspection object can
|
||||
only be created via a call to one of the FieldCreate methods described below.
|
||||
only be created via a call to one of the FieldCreate methods described abofe.
|
||||
The introspection implementation, together with AbstractPVField keeps reference
|
||||
counts and automatically deletes objects when the reference count goes to 0.
|
||||
Code that uses introspection objects always accesses introspection objects via
|
||||
@@ -2096,7 +2143,7 @@ be extended. Thus they can only be created via "new" and must be destroyed via
|
||||
|
||||
<p>Create an alarm structure the easy way.</p>
|
||||
<pre> StandardPVField *standardPVField = getStandardPVField();
|
||||
PVStructure *pvAlarm = standardPVField->alarm(0);</pre>
|
||||
PVStructure *pvAlarm = standardPVField->alarm(parent);</pre>
|
||||
|
||||
<p>Create a PVStructure with field name example that has a double value field
|
||||
and a timeStamp and alarm. Do it the easy way.</p>
|
||||
@@ -2123,7 +2170,7 @@ structure hieraracy above a value field it is a property of the value field.
|
||||
</p>
|
||||
|
||||
<p>For example the following top level structure has a single value field. The
|
||||
value field has propertiess alarm, timeStamp, and display.</p>
|
||||
value field has properties alarm, timeStamp, and display.</p>
|
||||
<pre>structure counterOutput
|
||||
structure alarm
|
||||
structure timeStamp
|
||||
@@ -2371,7 +2418,7 @@ execute. This is done as follows:</p>
|
||||
TimeStamp endTime;
|
||||
...
|
||||
startTime.getCurrent();
|
||||
// code to measure time
|
||||
// code to be measured for elapsed time
|
||||
endTime.getCurrent();
|
||||
double time = TimeStamp::diff(endTime,startTime);</pre>
|
||||
|
||||
@@ -2781,7 +2828,7 @@ public:
|
||||
|
||||
<h3 style="text-align: center" id="L2154">Overview</h3>
|
||||
|
||||
<p>Drectory factory has code that implements everything described by the
|
||||
<p>Directory factory has code that implements everything described by the
|
||||
include files in directory pv</p>
|
||||
|
||||
<h3 style="text-align: center" id="L2158">Factories</h3>
|
||||
@@ -3284,7 +3331,7 @@ the current code block completes.</p>
|
||||
<p>Another example of Lock is initialization code that must initialize only
|
||||
once. This can be implemented as follows:</p>
|
||||
<pre> static void init(void) {
|
||||
static Mutex mutex = Mutex();
|
||||
static Mutex mutex;
|
||||
Lock xx(&mutex);
|
||||
if(alreadyInitialized) return;
|
||||
// initialization
|
||||
@@ -3542,25 +3589,34 @@ To see an example of how this is implemented look at misc/thread.cpp.</p>
|
||||
<p>The public methods of ConstructDestructCallback are:</p>
|
||||
<dl>
|
||||
<dt style="font-family: courier;">getConstructName</dt>
|
||||
<dd>x</dd>
|
||||
<dd>Get the name for the facility keeping track of constructor and
|
||||
destructor calls.</dd>
|
||||
<dt style="font-family: courier;">getTotalConstruct</dt>
|
||||
<dd>x</dd>
|
||||
<dd>Get the total number of objects created.</dd>
|
||||
<dt style="font-family: courier;">getTotalDestruct</dt>
|
||||
<dd>x</dd>
|
||||
<dd>Get the total number of objects destroyed.</dd>
|
||||
<dt style="font-family: courier;">getTotalReferenceCount</dt>
|
||||
<dd>x</dd>
|
||||
<dd>For reference counted objects get the total number of current
|
||||
references.</dd>
|
||||
</dl>
|
||||
|
||||
<p>The public methods of ShowConstructDestruct are:</p>
|
||||
<dl>
|
||||
<dt style="font-family: courier;">registerCallback</dt>
|
||||
<dd>x</dd>
|
||||
<dd>Called by code that implements keeping track of constructor and
|
||||
destructor calls. Any of the methods can be null.</dd>
|
||||
<dt style="font-family: courier;">getConstructDestructCallback</dt>
|
||||
<dd>x</dd>
|
||||
<dd>Given the name of a facility get it's ConstructDestructCallback. This
|
||||
returns null if no facility with that name is registered.</dd>
|
||||
<dt style="font-family: courier;">constuctDestructTotals</dt>
|
||||
<dd>x</dd>
|
||||
<dd>Generate a report showing the status of each registered facility.</dd>
|
||||
<dt style="font-family: courier;">showDeleteStaticExit</dt>
|
||||
<dd>x</dd>
|
||||
<dd>Generate a report showing the status of each registered facility. Then
|
||||
call the deleteFunc method of each facility. The delete method normally
|
||||
deletes and object created at initializatuon time. NOTE THAT THIS IS
|
||||
DANGEROUS. It is provided so the test code can be run under a facility,
|
||||
like valgrind, that looks for memory leaks. THIS MUST ONLY BE CALLED
|
||||
IMMEDIATELY BEFORE TERMINATION.</dd>
|
||||
</dl>
|
||||
|
||||
<h3 style="text-align: center" id="L2901">Status</h3>
|
||||
@@ -3568,7 +3624,6 @@ To see an example of how this is implemented look at misc/thread.cpp.</p>
|
||||
<p>Status provides a way to pass status back to client code. It is new and not
|
||||
currently used by pvData but may be in the future. It is used by code that uses
|
||||
pvData.</p>
|
||||
<pre>NOT IMPLEMENTED</pre>
|
||||
|
||||
<p>The Status methods are:</p>
|
||||
<dl>
|
||||
|
||||
Reference in New Issue
Block a user