219 lines
6.5 KiB
HTML
219 lines
6.5 KiB
HTML
<h1>Release 5.0</h1>
|
|
|
|
<p>The main changes since release 4.0 are:</p>
|
|
|
|
<ul>
|
|
<li>Deprecated getXXXField() methods have been removed from PVStructure</li>
|
|
<li>Convert copy methods and equals operators (re)moved</li>
|
|
<li>Convert::copyUnion now always copies between subfields.</li>
|
|
<li>New method getSubFieldT, like getSubField except it throws an exception</li>
|
|
<li>findSubField method removed from PVStructure</li>
|
|
<li>New stream operators for Field and PVField are provided</li>
|
|
<li>New template versions of Structure::getField</li>
|
|
<li>Fixes for static initialisation order issues</li>
|
|
<li>CreateRequest prevents a possible SEGFAULT</li>
|
|
</ul>
|
|
|
|
<h2>Deprecated getXXXField methods have been removed from PVStructure</h2>
|
|
|
|
<p>The following methods have been removed from PVStructure</p>
|
|
|
|
<ul>
|
|
<li>getBooleanField</li>
|
|
<li>getByteField, getShortField, getIntField, getLongField</li>
|
|
<li>getUByteField, getUShortField, getUIntField, getULongField</li>
|
|
<li>getStringField</li>
|
|
<li>getStructureField, getUnionField</li>
|
|
<li>getScalarArrayField, getStructureArrayField, getUnionArrayField</li>
|
|
</ul>
|
|
|
|
<p>Use template getSubField instead, e.g. use</p>
|
|
|
|
<pre><code>getSubField< PVInt >(fieldName)
|
|
</code></pre>
|
|
|
|
<p>in place of</p>
|
|
|
|
<pre><code>getIntField(fieldName)
|
|
</code></pre>
|
|
|
|
<h2>Convert copy methods and equals operators</h2>
|
|
|
|
<p>Convert copy methods where moved and replaced with methods
|
|
on PVField classes, i.e.</p>
|
|
|
|
<pre><code>PVField::copy(const PVField& from)
|
|
</code></pre>
|
|
|
|
<p>Methods</p>
|
|
|
|
<pre><code>PVField::copyUnchecked(const PVField& from)
|
|
</code></pre>
|
|
|
|
<p>were added to allow unchecked copies, to gain performance
|
|
where checked are not needed (anymore).</p>
|
|
|
|
<p>In addition:
|
|
- isCompatibleXXX methods were removed in favour of Field::operator==.
|
|
- equals methods were remove in favour of PVField::operator==.
|
|
- operator== methods where moved to pvIntrospect.h and pvData.h</p>
|
|
|
|
<h2>Convert::copyUnion</h2>
|
|
|
|
<p>Before this method, depending on types for to and from,
|
|
sometimes did a shallow copy, i.e. just made to shared_ptr for to
|
|
share the same data as from.
|
|
Now it always copies between the subfield of to and from.</p>
|
|
|
|
<h2>New method getSubFieldT, like getSubField except it throws an exception</h2>
|
|
|
|
<p>PVStructure has a new template member</p>
|
|
|
|
<pre><code>getSubFieldT(std::string const &fieldName)
|
|
</code></pre>
|
|
|
|
<p>that is like <b>getSubField</b> except that it throws a runtime_error
|
|
instead of returning null.</p>
|
|
|
|
<h2>findSubField method removed from PVStructure</h2>
|
|
|
|
<p>This was mainly used in the implementation of getSubField. With a change to
|
|
the latter, findSubField was removed.</p>
|
|
|
|
<h2>New stream operators</h2>
|
|
|
|
<p>New steam operators are available for Field and PVField.
|
|
Before to print a Field (or any extension) or a PVField (or any extension)
|
|
it was necessary to have code like:</p>
|
|
|
|
<pre><code> void print(StructureConstPtr struc, PVStructurePtr pv)
|
|
{
|
|
if(struc) {
|
|
cout << *struc << endl;
|
|
} else {
|
|
cout << "nullptr\n"
|
|
}
|
|
if(pv) {
|
|
cout << *.struc << endl;
|
|
} else {
|
|
cout << "nullptr\n"
|
|
}
|
|
}
|
|
</code></pre>
|
|
|
|
<p>Now it can be done as follows:</p>
|
|
|
|
<pre><code> void print(StructureConstPtr struc, PVStructurePtr pv)
|
|
{
|
|
cout << struc << endl;
|
|
cout << pv << endl;
|
|
}
|
|
</code></pre>
|
|
|
|
<h2>New template version of Structure::getField</h2>
|
|
|
|
<p>A new template getField method has been added to Structure</p>
|
|
|
|
<p>template<typename FT >
|
|
std::tr1::shared_ptr< const FT > getField(std::string const &fieldName) const </p>
|
|
|
|
<p>Can be used, for example, as follows:</p>
|
|
|
|
<pre><code>StructurePtr tsStruc = struc->getField<Structure>("timeStamp");
|
|
</code></pre>
|
|
|
|
<h2>Fixes for static initialisation order issues</h2>
|
|
|
|
<p>Certain static builds (in particular Windows builds) of applications using
|
|
pvData had issues due to PVStructure::DEFAULT_ID being used before being initialised. This has been fixed.</p>
|
|
|
|
<h2>CreateRequest change</h2>
|
|
|
|
<p>createRequest could cause a SEGFAULT if passed a bad argument.
|
|
This has been changed so the it returns a null pvStructure
|
|
and provides an error.</p>
|
|
|
|
<h1>Release 4.0</h1>
|
|
|
|
<p>The main changes since release 3.0.2 are:</p>
|
|
|
|
<ul>
|
|
<li>array semantics now enforce Copy On Write.</li>
|
|
<li>String no longer defined.</li>
|
|
<li>timeStamp and valueAlarm name changes</li>
|
|
<li>toString replaced by stream I/O </li>
|
|
<li>union is new type.</li>
|
|
<li>copy is new.</li>
|
|
<li>monitorPlugin is new.</li>
|
|
</ul>
|
|
|
|
<h2>New Semantics for Arrays</h2>
|
|
|
|
<p>PVScalarArray, PVStructureArray, and PVUnionArray all enforce COW (Copy On Write) Semantics.
|
|
In order to limit memory usage the storage for raw data is managed via a new shared<em>vector facility.
|
|
This allows multiple instances of array data to use the shared raw data.
|
|
COW is implemented via shared</em>vectors of const data, i. e. data that can not be modified.</p>
|
|
|
|
<h2>String no longer defined</h2>
|
|
|
|
<p>This is replaced by std::string.</p>
|
|
|
|
<h2>timeStamp and valueAlarm name changes</h2>
|
|
|
|
<p>In timeStamp nanoSeconds is changed to nanoseconds.</p>
|
|
|
|
<p>In valueAlarm hysteresis is changed to hysteresis</p>
|
|
|
|
<h2>toString replaced by stream I/O</h2>
|
|
|
|
<p>pvData.h and pvIntrospect no longer defines toString
|
|
Instead they have stream support.
|
|
pvIntrospect uses method dump and pvData uses dumpValue.
|
|
For example:</p>
|
|
|
|
<pre><code> PVDoublePtr pvValue;
|
|
String buffer;
|
|
pvValue->toString(&buffer);
|
|
cout << buffer << endl;
|
|
buffer.clear();
|
|
pvValue->getField()->toString(&buffer);
|
|
cout << buffer << evdl;
|
|
</code></pre>
|
|
|
|
<p>is replaced by</p>
|
|
|
|
<pre><code> PVDoublePtr pvValue;
|
|
cout << *pvValue << endl
|
|
cout << *pvValue->getField() << endl;
|
|
</code></pre>
|
|
|
|
<h2>union is a new basic type.</h2>
|
|
|
|
<p>There are two new basic types: union_t and unionArray.</p>
|
|
|
|
<p>A union is like a structure that has a single subfield.
|
|
There are two flavors:</p>
|
|
|
|
<ul>
|
|
<li><b>variant union</b> The field can have any type.</li>
|
|
<li><b>union</b> The field can any of specified set of types.</li>
|
|
</ul>
|
|
|
|
<p>The field type can be dynamically changed.</p>
|
|
|
|
<h2>copy </h2>
|
|
|
|
<p>This consists of createRequest and pvCopy.
|
|
createRequest was moved from pvAccess to here.
|
|
pvCopy is moved from pvDatabaseCPP and now depends
|
|
only on pvData, i.e. it no longer has any knowledge of PVRecord.</p>
|
|
|
|
<h2>monitorPlugin</h2>
|
|
|
|
<p>This is for is for use by code that implements pvAccess monitors.
|
|
This is prototype and is subject to debate.</p>
|
|
|
|
<h1>Release 3.0.2</h1>
|
|
|
|
<p>This was the starting point for RELEASE_NOTES</p>
|