From 036186fc12486d5ace1a6c0d89a1deea2ea6ad89 Mon Sep 17 00:00:00 2001
From: Ralph Lange The main changes since release 4.0 are: The following methods have been removed from PVStructure Use template getSubField instead, e.g. use in place of Convert copy methods where moved and replaced with methods
on PVField classes, i.e. Methods where added to allow unchecked copies, to gain performance
+
+ were added to allow unchecked copies, to gain performance
where checked are not needed (anymore). 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 Before this method, depending on types for to and from,
-sometimes did a shallow cppy, i. e. just made to shared_ptr for to
+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. 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. PVStructure has a new template member that is like getSubField except that it throws a runtime_error
+instead of returning null. This was mainly used in the implementation of getSubField. With a change to
+the latter, findSubField was removed. 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: Now it can be done as follows: PVStructure has a new template member getAs(const char *name)
-that is like getSubField except that it throws a runtime_error
-instead of returning null. A new template getField method has been added to Structure template Can be used, for example, as follows: 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. 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. The main changes since release 3.0.2 are:Release 4.1 IN DEVELOPMENT
+Release 5.0
+
+
+
+Deprecated getXXXField methods have been removed from PVStructure
+
+
+
+
+
+
+getSubField< PVInt >(fieldName)
+
+
getIntField(fieldName)
+Convert copy methods and equals operators
+
+
PVField::copy(const PVField& from)
-PVField::copyUnchecked(const PVField& from)
Convert::copyUnion
+
CreateRequest change
-New method getSubFieldT, like getSubField except it throws an exception
+
+
+
+getSubFieldT(std::string const &fieldName)
+findSubField method removed from PVStructure
+
+New stream operators
+
void print(StructureConstPtr struct, PVStructurePtr pv)
+
+
+
void print(StructureConstPtr struc, PVStructurePtr pv)
{
- if(struct) {
- cout << *struct << endl;
+ if(struc) {
+ cout << *struc << endl;
} else {
cout << "nullptr\n"
}
if(pv) {
- cout << *.struct << endl;
+ cout << *.struc << endl;
} else {
cout << "nullptr\n"
}
}
void print(StructureConstPtr struct, PVStructurePtr pv)
+
+
- void print(StructureConstPtr struc, PVStructurePtr pv)
{
- cout << struct << endl;
+ cout << struc << endl;
cout << pv << endl;
}
New method getAs that is like getSubField except that it throws exception
-New template version of Structure::getField
+
+
+
+StructurePtr tsStruc = struc->getField<Structure>("timeStamp");
+Fixes for static initialisation order issues
+
+CreateRequest change
+
+Release 4.0
+
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. +In order to limit memory usage the storage for raw data is managed via a new sharedvector 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.
+COW is implemented via sharedvectors of const data, i. e. data that can not be modified. +This is replaced by std::string.
+In timeStamp nanoSeconds is changed to nanoseconds.
-In valueAlarm hystersis is changed to hysteresis
+ +In valueAlarm hysteresis is changed to hysteresis
+pvData.h and pvIntrospect no longer defines toString Instead they have stream support. pvIntrospect uses method dump and pvData uses dumpValue. For example:
+ PVDoublePtr pvValue;
String buffer;
pvValue->toString(&buffer);
@@ -93,27 +179,40 @@ For example:
pvValue->getField()->toString(&buffer);
cout << buffer << evdl;
+
is replaced by
+ PVDoublePtr pvValue;
cout << *pvValue << endl
cout << *pvValue->getField() << endl;
+
There are two new basic types: union_t and unionArray.
+A union is like a structure that has a single subfield. There are two flavors:
+The field type can be dynamically changed.
-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.
+only on pvData, i.e. it no longer has any knowledge of PVRecord. +This is for is for use by code that implements pvAccess monitors. This is prototype and is subject to debate.
+This was the starting point for RELEASE_NOTES
\ No newline at end of file + +This was the starting point for RELEASE_NOTES
diff --git a/documentation/RELEASE_NOTES.md b/documentation/RELEASE_NOTES.md index 2076f68..17784b7 100644 --- a/documentation/RELEASE_NOTES.md +++ b/documentation/RELEASE_NOTES.md @@ -1,13 +1,39 @@ -Release 4.1 IN DEVELOPMENT +Release 5.0 =========== The main changes since release 4.0 are: +* Deprecated getXXXField() methods have been removed from PVStructure * Convert copy methods and equals operators (re)moved * Convert::copyUnion now always copies between subfields. -* CreateRequest prevents a possible SEGFAULT. -* New stream operators for Field and PVField are provided. -* New method getSubFieldT that is like getSubField except that it throws exception +* New method getSubFieldT, like getSubField except it throws an exception +* findSubField method removed from PVStructure +* New stream operators for Field and PVField are provided +* New template versions of Structure::getField +* Fixes for static initialisation order issues +* CreateRequest prevents a possible SEGFAULT + + +Deprecated getXXXField methods have been removed from PVStructure +------------------------------------------------------------------- + +The following methods have been removed from PVStructure + +* getBooleanField +* getByteField, getShortField, getIntField, getLongField +* getUByteField, getUShortField, getUIntField, getULongField +* getStringField +* getStructureField, getUnionField +* getScalarArrayField, getStructureArrayField, getUnionArrayField + +Use template getSubField instead, e.g. use + + getSubField< PVInt >(fieldName) + +in place of + + getIntField(fieldName) + Convert copy methods and equals operators ----------------------------------------- @@ -21,7 +47,7 @@ Methods PVField::copyUnchecked(const PVField& from) -where added to allow unchecked copies, to gain performance +were added to allow unchecked copies, to gain performance where checked are not needed (anymore). In addition: @@ -29,20 +55,33 @@ In addition: - equals methods were remove in favour of PVField::operator==. - operator== methods where moved to pvIntrospect.h and pvData.h + Convert::copyUnion ----------------- Before this method, depending on types for to and from, -sometimes did a shallow cppy, i. e. just made to shared_ptr for to +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. -CreateRequest change + +New method getSubFieldT, like getSubField except it throws an exception -------------------- -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. +PVStructure has a new template member + + getSubFieldT(std::string const &fieldName) + +that is like getSubField except that it throws a runtime_error +instead of returning null. + + +findSubField method removed from PVStructure +-------------------------------------------- + +This was mainly used in the implementation of getSubField. With a change to +the latter, findSubField was removed. + New stream operators -------------------- @@ -51,15 +90,15 @@ 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: - void print(StructureConstPtr struct, PVStructurePtr pv) + void print(StructureConstPtr struc, PVStructurePtr pv) { - if(struct) { - cout << *struct << endl; + if(struc) { + cout << *struc << endl; } else { cout << "nullptr\n" } if(pv) { - cout << *.struct << endl; + cout << *.struc << endl; } else { cout << "nullptr\n" } @@ -67,18 +106,40 @@ it was necessary to have code like: Now it can be done as follows: - void print(StructureConstPtr struct, PVStructurePtr pv) + void print(StructureConstPtr struc, PVStructurePtr pv) { - cout << struct << endl; + cout << struc << endl; cout << pv << endl; } -New method getSubFieldT that is like getSubField except that it throws exception + +New template version of Structure::getField +-------------------------------------------- + +A new template getField method has been added to Structure + +templateBy default, all bits in the set initially have the value - * {@code false}. + * @c false. * *
Every bit set has a current size, which is the number of bits * of space currently in use by the bit set. Note that the size is @@ -43,8 +43,8 @@ namespace epics { namespace pvData { * implementation. The length of a bit set relates to logical length * of a bit set and is defined independently of implementation. * - *
A {@code BitSet} is not safe for multithreaded use without - * external synchronization. + *
A @c BitSet is not safe for multithreaded use without external + * synchronization. * * Based on Java implementation. */ @@ -53,14 +53,14 @@ namespace epics { namespace pvData { POINTER_DEFINITIONS(BitSet); static BitSetPtr create(uint32 nbits); /** - * Creates a new bit set. All bits are initially {@code false}. + * Creates a new bit set. All bits are initially @c false. */ BitSet(); /** * Creates a bit set whose initial size is large enough to explicitly - * represent bits with indices in the range {@code 0} through - * {@code nbits-1}. All bits are initially {@code false}. + * represent bits with indices in the range @c 0 through + * @c nbits-1. All bits are initially @c false. * * @param nbits the initial size of the bit set */ @@ -80,14 +80,14 @@ namespace epics { namespace pvData { void flip(uint32 bitIndex); /** - * Sets the bit at the specified index to {@code true}. + * Sets the bit at the specified index to @c true. * * @param bitIndex a bit index */ void set(uint32 bitIndex); /** - * Sets the bit specified by the index to {@code false}. + * Sets the bit specified by the index to @c false. * * @param bitIndex the index of the bit to be cleared */ @@ -103,9 +103,8 @@ namespace epics { namespace pvData { /** * Returns the value of the bit with the specified index. The value - * is {@code true} if the bit with the index {@code bitIndex} - * is currently set in this {@code BitSet}; otherwise, the result - * is {@code false}. + * is @c true if the bit with the index @c bitIndex is currently + * set in this @c BitSet; otherwise, the result is @c false. * * @param bitIndex the bit index * @return the value of the bit with the specified index @@ -113,16 +112,16 @@ namespace epics { namespace pvData { bool get(uint32 bitIndex) const; /** - * Sets all of the bits in this BitSet to {@code false}. + * Sets all of the bits in this BitSet to @c false. */ void clear(); /** - * Returns the index of the first bit that is set to {@code true} - * that occurs on or after the specified starting index. If no such - * bit exists then {@code -1} is returned. + * Returns the index of the first bit that is set to @c true that + * occurs on or after the specified starting index. If no such bit + * exists then @c -1 is returned. * - *
To iterate over the {@code true} bits in a {@code BitSet}, + *
To iterate over the @c true bits in a @c BitSet, * use the following loop: * *
{@code
@@ -131,13 +130,13 @@ namespace epics { namespace pvData {
* }}
*
* @param fromIndex the index to start checking from (inclusive)
- * @return the index of the next set bit, or {@code -1} if there
+ * @return the index of the next set bit, or @c -1 if there
* is no such bit
*/
int32 nextSetBit(uint32 fromIndex) const;
/**
- * Returns the index of the first bit that is set to {@code false}
+ * Returns the index of the first bit that is set to @c false
* that occurs on or after the specified starting index.
*
* @param fromIndex the index to start checking from (inclusive)
@@ -146,23 +145,23 @@ namespace epics { namespace pvData {
int32 nextClearBit(uint32 fromIndex) const;
/**
- * Returns true if this {@code BitSet} contains no bits that are set
- * to {@code true}.
+ * Returns true if this @c BitSet contains no bits that are set
+ * to @c true.
*
- * @return indicating whether this {@code BitSet} is empty
+ * @return indicating whether this @c BitSet is empty
*/
bool isEmpty() const;
/**
- * Returns the number of bits set to {@code true} in this {@code BitSet}.
+ * Returns the number of bits set to @c true in this @c BitSet.
*
- * @return the number of bits set to {@code true} in this {@code BitSet}
+ * @return the number of bits set to @c true in this @c BitSet
*/
uint32 cardinality() const;
/**
* Returns the number of bits of space actually in use by this
- * {@code BitSet} to represent bit values.
+ * @c BitSet to represent bit values.
* The maximum element in the set is the size - 1st element.
*
* @return the number of bits currently in this bit set
@@ -172,9 +171,9 @@ namespace epics { namespace pvData {
/**
* Performs a logical AND of this target bit set with the
* argument bit set. This bit set is modified so that each bit in it
- * has the value {@code true} if and only if it both initially
- * had the value {@code true} and the corresponding bit in the
- * bit set argument also had the value {@code true}.
+ * has the value @c true if and only if it both initially
+ * had the value @c true and the corresponding bit in the
+ * bit set argument also had the value @c true.
*
* @param set a bit set
*/
@@ -183,9 +182,9 @@ namespace epics { namespace pvData {
/**
* Performs a logical OR of this bit set with the bit set
* argument. This bit set is modified so that a bit in it has the
- * value {@code true} if and only if it either already had the
- * value {@code true} or the corresponding bit in the bit set
- * argument has the value {@code true}.
+ * value @c true if and only if it either already had the
+ * value @c true or the corresponding bit in the bit set
+ * argument has the value @c true.
*
* @param set a bit set
*/
@@ -194,13 +193,13 @@ namespace epics { namespace pvData {
/**
* Performs a logical XOR of this bit set with the bit set
* argument. This bit set is modified so that a bit in it has the
- * value {@code true} if and only if one of the following
+ * value @c true if and only if one of the following
* statements holds:
* A {@code BitSet} is not safe for multithreaded use without + *
A @c BitSet is not safe for multithreaded use without
* external synchronization.
*
* Based on Java implementation.
@@ -373,7 +373,7 @@ public:
template pv/printer.h is not used. There is a lot of public code that does not have doxygen tags. PVUnion, PVUnionArray, and PVStructureArray all have elements
-that are treated like a top level field. Currently if a subField of any of these is changed postMonitor is not called for the field itself. David asked if this could be changed so that it is called.
-Marty thinks this may not be a good idea. normativeTypes.html describes valueAlarm only for a value field that has type
-double.
-The implementation also supports all the numeric scalar types. A debate is on-going about what semantics should be. This project has the begining of the C++ implementation of pvData. The
-following is done: The project is structured as an epics base client application. Edit
-configure/RELEASE so that it references your EPICS base and then just
-type: At the top. Then execute the test in the bin directory. pvDataApp has the following sub directories: The pure virtual classes defined in pvData.h now work. But there are still
-some things that are not so nice. Amoung these are: HELP WILL BE GREATLY APPRECIATED. because I am still coming up to speed
-with c++ Not yet implemented. Lets get class structure correct first.TODO
-printer
-doxygen
-postMonitor: PVUnion, PVUnionArray, and PVStructureArray
-valueAlarm
-monitorPlugin
-EPICS pvData C++
-CONTENTS
-
-Overview
-2010.08.10
-
-Introduction
-
-
-
-
-
-
-Building
-
-
- make
-
-
-
-
-
-Questions about Classes
-
-
-
-
-
-
-
-Garbage Collection
-
-