119 lines
4.8 KiB
HTML
119 lines
4.8 KiB
HTML
<h1>Release 4.1 IN DEVELOPMENT</h1>
|
|
<p>The main changes since release 4.0 are:</p>
|
|
<ul>
|
|
<li>Convert copy methods and equals operators (re)moved</li>
|
|
<li>Convert::copyUnion now always copies between subfields.</li>
|
|
<li>CreateRequest prevents a possible SEGFAULT.</li>
|
|
<li>New stream operators for Field and PVField are provided.</li>
|
|
<li>New method getAs that is like getSubField except that it throws exception</li>
|
|
</ul>
|
|
<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>where 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 cppy, 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>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 provies an error.</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 struct, PVStructurePtr pv)
|
|
{
|
|
if(struct) {
|
|
cout << *struct << endl;
|
|
} else {
|
|
cout << "nullptr\n"
|
|
}
|
|
if(pv) {
|
|
cout << *.struct << endl;
|
|
} else {
|
|
cout << "nullptr\n"
|
|
}
|
|
}
|
|
</code></pre>
|
|
<p>Now it can be done as follows:</p>
|
|
<pre><code> void print(StructureConstPtr struct, PVStructurePtr pv)
|
|
{
|
|
cout << struct << endl;
|
|
cout << pv << endl;
|
|
}
|
|
</code></pre>
|
|
<h2>New method getAs that is like getSubField except that it throws exception</h2>
|
|
<p><b>PVStructure</b> has a new template member <b>getAs(const char *name)</b>
|
|
that is like <b>getSubField</b> except that it throws a runtime_error
|
|
instead of returning null.</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_vector facility.
|
|
This allows multiple instances of array data to use the shared raw data.
|
|
COW is implemented via shared_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 hystersis 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>varient 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> |