diff --git a/configure/RELEASE b/configure/RELEASE index a30496c..37d8c6d 100644 --- a/configure/RELEASE +++ b/configure/RELEASE @@ -22,7 +22,7 @@ TEMPLATE_TOP=$(EPICS_BASE)/templates/makeBaseApp/top #SNCSEQ=$(EPICS_BASE)/../modules/soft/seq # EPICS_BASE usually appears last so other apps can override stuff: -EPICS_BASE=/opt/epics/base +EPICS_BASE=/home/install/epics/base #Capfast users may need the following definitions #CAPFAST_TEMPLATES= diff --git a/documentation/pvDataCpp.html b/documentation/pvDataCpp.html index 32829fc..06f8e72 100644 --- a/documentation/pvDataCpp.html +++ b/documentation/pvDataCpp.html @@ -10,7 +10,7 @@
TODO
Define the following top level structure:
structure timeStamp
@@ -447,10 +439,10 @@ structure[] structureArrayExample
double y 10.0
Directory pvDataApp/pv has header files that completely describe pvData. The implementation is provided in directory pvDataApp/factory. Test programs @@ -468,6 +460,8 @@ converting and copying data between fields.
Directory pvDataApp/pv has the following header files:
This provides C/C++ definitions for the pvData primitive types: boolean, +byte, short, int, long, float, double, and string. Because pvData is network +data, the C++ implementation must implement the proper semantics for the +primitive types.
+ +pvType.h provides the proper semantics. It has the definitions:
+typedef bool boolean; +typedef int8_t byte; +typedef int8_t int8; +typedef int16_t int16; +typedef int32_t int32; +typedef int64_t int64; +typedef uint32_t uint32; +typedef uint64_t uint64; +// float and double are types +typedef std::string String; + +typedef bool * BooleanArray; +typedef int8 * ByteArray; +typedef int16 * ShortArray; +typedef int32 * IntArray; +typedef int64 * LongArray; +typedef float * FloatArray; +typedef double * DoubleArray; +typedef String* StringArray; + +// convenience definition for toString methods +typedef std::string * StringBuilder;+ +
where
+This subsection describes pvIntrospect.h
@@ -497,7 +549,7 @@ 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. -Types are defined as:
enum Type {
@@ -588,7 +640,7 @@ style="font-family: courier;">ScalarType
This section describes the reflection interfaces which provide the following:
@@ -817,7 +869,7 @@ methods: structure->incReferenceCount() must be called before this method. -The file standardField.h has a class description for creating or sharing Field objects for standard fields. For each type of standard object two methods @@ -955,12 +1007,12 @@ extern StandardField * getStandardField(); the section on Properties for a description of how these are defined. -
This section defines the Java Interfaces for accessing the data within a PV record.
-PVField is the base interface for accessing data. A data structure consists of a top level PVStructure. Every field of every structure of every top level @@ -1046,11 +1098,9 @@ are:
AuxInfo (Auxillary Information) is information about a field that is application specific. It will not be available outside the application that @@ -1106,7 +1156,7 @@ private:
class PVScalar : public PVField {
public:
virtual ~PVScalar();
@@ -1115,7 +1165,7 @@ protected:
PVScalar(PVStructure *parent,ScalarConstPtr scalar);
};
-The interfaces for primitive data types are:
class PVBoolean : public PVScalar {
@@ -1204,7 +1254,7 @@ protected:
private:
};
-PVArray is the base interface for all the other PV Array interfaces. It extends PVField and provides the @@ -1250,7 +1300,7 @@ private:
The interface for each array type has get and put methods which have the same arguments except for the data type. For example PVDoubleArray is:
@@ -1337,7 +1387,7 @@ that directly access the internal data array of a PVArray. This can be required for minimizing CPU overhead. In this case it is the applications responsibility to coordinate access to the array. -class PVScalarArray : public PVArray {
public:
virtual ~PVScalarArray();
@@ -1514,7 +1564,7 @@ protected:
private:
};
-The interface for a structure is:
class PVStructure : public PVField,public BitSetSerializable {
@@ -1627,7 +1677,7 @@ private:
The interface for an array of structures is:
class StructureArrayData {
@@ -1685,7 +1735,7 @@ introspection interface must be used. The following shows an example:
Note that incReferenceCount is called before each element is created.
-PVDataCreate
+PVDataCreate
PVDataCreate is an interface that provides methods that create PVField
interfaces. A factory is provided that creates PVDataCreate.
@@ -1767,7 +1817,7 @@ extern PVDataCreate * getPVDataCreate();
before calling this method.
-A class StandardPVField has methods for creating standard data fields. Like class StandardField it has two forms of the methods which create a field, one @@ -1822,7 +1872,7 @@ public: PVStructure * powerSupply(PVStructure *parent); }; -
NOTE about copying immutable array fields. If an entire immutable array field is copied to another array that has the same elementType, both offsets @@ -1936,65 +1986,21 @@ for code that implements toString It generates a newline and inserts blanks at the beginning of the newline.
All code in project pvDataCPP appears in namespace:
namespace epics { namespace pvData {
// ...
}}
-Directory misc has an include file pvTypes.h:
-typedef signed char int8; -typedef short int16; -typedef int int32; -typedef long long int64; -typedef unsigned int uint32; -typedef unsigned long long uint64; - -typedef std::string String; -typedef std::string * StringBuilder; -typedef String* StringArray;- -
The integer typedefs provide the definitions for various sizes of integer -values. The relationship between these definitions and the ScalarType -description is:
-It is hoped that all modern C++ compilers will properly handle the integer -typedefs but if not than there is a good chance that it can be supported by -changes to pvInterspect.h without any changes to other code.
- -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 requires.
- -The remaining definitions are:
-As described above pvType.h provides C++ typdefs for the pvData primitive +types.
File pvInterspect.h, which is described in the next section has the typedefs:
@@ -2043,9 +2049,9 @@ typedef String * StringArray;Any class that does not want the compiler to generate default methods can privately extend the following class which is defined in file @@ -2061,7 +2067,7 @@ private: NoDefaultMethods & operator=(const NoDefaultMethods &); }; -
Introspection objects are meant to be shared. The constructors and destructors are all private or protected so that an introspection object can @@ -2081,7 +2087,7 @@ field is a structure then it is a recursive call. When the reference count for a field becomes 0 the field is deleted. Note than user code should never call decReferenceCount since the destructor for PVField calls it.
-All PVData data objects must publically extend AbstractPVField, which does not allow default methods but does have a virtual destructor. It is expected @@ -2094,7 +2100,7 @@ record is deleted. After deletion all pointers to data in the record are invalid. Similarly pvAccess creates and destroys PVData objects and notifies clients before destroying PVData data objects.
-The classes in property, i.e. alarm, timeStamp, display, and control are all meant to be free copied and shared. They can be created on the stack. In most @@ -2105,10 +2111,10 @@ be extended. Thus they can only be created via "new" and must be destroyed via "delete".
Assume that code wants to print two fields from a PVStructure:
Example of creating a scalar field.
PVDataCreate *pvDataCreate = getPVDataCreate();
@@ -2166,10 +2172,10 @@ and a timeStamp and alarm. Do it the easy way.
String("timeStamp,alarm"))
Only fields named "value" have properties. A record can have multiple value fields, which can appear in the top level structure of a record or in a @@ -2209,7 +2215,7 @@ structure powerSupplySimple powerSupplyValueStructure power powerSupplyValueStructure current -
The following field names have special meaning, i.e. support properties for general purpose clients.
@@ -2277,7 +2283,7 @@ examples are: that support the PVData data model. For example a powerSupport record can have fields power, voltage, current that each support the PVData data model. -Except for enumerated, each property has two files: a property.h and a pvProperty.h . For example: timeStamp.h @@ -2306,7 +2312,7 @@ stack. For example the following is permitted:
... } -A timeStamp is represented by the following structure
structure timeStamp @@ -2332,7 +2338,7 @@ that can be attached to a time stamp pvData structure. It provides get and set methods to get/set a TimeStamp as defined by timeStamp.h -timeStamp.h
+timeStamp.h
This provides
extern int32 milliSecPerSec; @@ -2434,7 +2440,7 @@ execute. This is done as follows: endTime.getCurrent(); double time = TimeStamp::diff(endTime,startTime);-pvTimeStamp.h
+pvTimeStamp.h
class PVTimeStamp { public: PVTimeStamp(); @@ -2473,7 +2479,7 @@ public: thrown if not attached to a pvData structure.
An alarm structure is defined as follows:
structure alarm @@ -2495,7 +2501,7 @@ style="font-family: courier;">pvAlarm.h is a class that can be attached to a time stamp pvData structure. It provides get and set methods to get/set a Alarm as defined by alarm.h -alarm.h
+alarm.h
enum AlarmSeverity { noAlarm,minorAlarm,majorAlarm,invalidAlarm }; @@ -2541,7 +2547,7 @@ public:
class PVAlarm {
public:
PVAlarm() : pvSeverity(0),pvMessage(0) {}
@@ -2581,7 +2587,7 @@ public:
if not attached to a pvData structure.
-control
+control
Control information is represented by the following structure
structure control
@@ -2599,7 +2605,7 @@ attached to a time stamp pvData structure. It provides get and set methods to
get/set a Control as defined by control.h
-control.h
+control.h
class Control {
public:
Control();
@@ -2624,7 +2630,7 @@ public:
class PVControl {
public:
PVControl();
@@ -2664,7 +2670,7 @@ public:
thrown if not attached to a pvData structure.
-display
+display
Display information is represented by the following structure
structure display
@@ -2685,7 +2691,7 @@ class that can be attached to a display pvData structure. It provides get and
set methods to get/set a Diaplay as defined by diaplay.h
-display.h
+display.h
class Display {
public:
Display();
@@ -2728,7 +2734,7 @@ public:
class PVDisplay {
public:
PVDisplay()
@@ -2768,7 +2774,7 @@ public:
thrown if not attached to a pvData structure.
-pvEnumerated
+pvEnumerated
An enumerated structure is a structure that has fields:
structure
@@ -2835,15 +2841,15 @@ public:
-PVData Abstract and Base Classes
+PVData Abstract and Base Classes
-Overview
+Overview
Directory factory has code that implements everything described by the
include files in directory pv
-Factories
+Factories
FieldCreateFactory automatically creates a single instance of FieldCreate
and provides a method to get the interface.
@@ -2856,34 +2862,34 @@ and provides a method to get the interface.
Convert automatically creates a single instance of Convert and provides a
method to get the interface.
-Abstract Classes for PVField
+Abstract Classes for PVField
-AbstractPVField
+AbstractPVField
This is an abstract base class for implementing PVField interfaces. It MUST
be the base class for any class that extends PVField.
-AbstractPVScalar
+AbstractPVScalar
This is an abstract base class for implementing scalar data fields. It MUST
be the base class for any class that implements a scalar data field.
-AbstractPVArray
+AbstractPVArray
This is an abstract base class for implementing array data fields. It MUST
be the base class for any class implements array data fields.
-AbstractPVScalarArray
+AbstractPVScalarArray
This is an abstract base class for implementing scalar array data fields. It
MUST be the base class for any class implements scalar array data fields.
-BasePVStructure
+BasePVStructure
BasePVStructure is a base class for any code that implements PVStructure.
Any code that implements PVStructure MUST extend this class.
-Base Classes For PVScalar
+Base Classes For PVScalar
For each scalar type there is a base class that implements it. The complete
list is:
@@ -2898,7 +2904,7 @@ list is:
For each scalar array type there is a base class that implements it. The complete list is:
@@ -2915,10 +2921,10 @@ complete list is:This package provides utility code:
Note that directory testApp/misc has test code for all the classes in misc. The test code also can be used as examples.
-This is adapted from the java.util.BitSet. bitSet.h is:
class BitSet /*: public Serializable*/ {
@@ -3063,7 +3066,7 @@ private:
A ByteBuffer is used to serialize and deserialize primitive data. File byteBuffer.h is:
@@ -3103,7 +3106,7 @@ private:x
-This class provides coordinates activity between threads. One thread can wait for the event and the other signals the event.
@@ -3135,7 +3138,7 @@ private:File epicsException.h describes:
class BaseException : public std::exception {
@@ -3153,7 +3156,7 @@ private:
x
-Executor
+Executor
An Executor is a thread that can execute commands. The user can request that
a single command be executed.
@@ -3192,7 +3195,7 @@ execute.
nothing is done.
-Linked List
+Linked List
LinkedList implements a double linked list that requires a user to allocate
the nodes. It is more efficent that std::list. linkedList.h is a template that
@@ -3296,7 +3299,7 @@ public:
lock.h is:
class Mutex {
@@ -3349,9 +3352,9 @@ once. This can be implemented as follows:
// initialization
}
-class MessageNode {
public:
String getMessage() const;
@@ -3372,7 +3375,7 @@ public:
int getClearOverrun();
};
-This is for use by code that wants to handle messages without blocking higher priority threads.
@@ -3413,7 +3416,7 @@ higher priority threads.Look at miscTest/testMessageQueue.cpp for an example.
-If a class privately extends this class then the compiler can not create any of the following: default constructor, default copy constructror, or default @@ -3432,35 +3435,7 @@ assignment contructor.
NoDefaultMethods & operator=(const NoDefaultMethods &); }; -This provides typedefs for integers and String.
-typedef signed char int8; -typedef short int16; -typedef int int32; -typedef long long int64; -typedef unsigned int uint32; -typedef unsigned long long uint64; - -typedef std::string String; -typedef std::string * StringBuilder; -typedef String* StringArray;- -
where
-A PVField extends Requester. Requester is present so that when database errors are found there is someplace to send a message.
@@ -3490,7 +3465,7 @@ public:This is a helper class for serialization, which is required for sending and receiving pvData over the nerwork.
@@ -3561,7 +3536,7 @@ properly implemented.x
-This is a facility that allows a class to report how many objects of that @@ -3631,7 +3606,7 @@ To see an example of how this is implemented look at misc/thread.cpp.
IMMEDIATELY BEFORE TERMINATION. -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 @@ -3661,9 +3636,9 @@ pvData.
status optimization. -enum ThreadPriority {
lowestPriority,
lowerPriority,
@@ -3680,7 +3655,7 @@ public:
static int getEpicsPriority(ThreadPriority threadPriority);
};
-class Runnable {
public:
virtual void run() = 0;
@@ -3727,7 +3702,7 @@ exception is thrown if run remains active when delete is called.
TimeFunction is a facility that measures the average number of seconds a function call requires. When timeCall is called, it calls function in a loop. @@ -3769,7 +3744,7 @@ long a function takes. It has the single method:
one second to call it ntimes. -This provides a general purpose timer. It allows a user callback to be called after a delay or periodically.
@@ -3844,7 +3819,7 @@ be used to schedule multiple callbacks. It has the methods:This provides a queue which has an immutable capacity. When the queue is full the user code is expected to keep using the current element until a new @@ -3926,10 +3901,10 @@ public: }
The following is also provided:
class BitSetUtil : private NoDefaultMethods {
@@ -3958,7 +3933,7 @@ currently has only one method:
entire structures if the structure offset bit is set.
-MultiChoice
+MultiChoice
MultiChoice defines an array of strings and a bit set that selects an
arbitrary set of the choices. This will be implemented if the java version is
@@ -3966,7 +3941,7 @@ accepted.
NOT DONE
-License Agreement
+License Agreement
Copyright (c) 2008 Martin R. Kraimer
Copyright (c) 2007 Control System Laboratory,
diff --git a/pvDataApp/Makefile b/pvDataApp/Makefile
index 9fc2015..3fe29cc 100644
--- a/pvDataApp/Makefile
+++ b/pvDataApp/Makefile
@@ -5,7 +5,6 @@ PVDATA = $(TOP)/pvDataApp/
SRC_DIRS += $(PVDATA)/misc
-INC += pvType.h
INC += noDefaultMethods.h
INC += linkedListVoid.h
INC += linkedList.h
@@ -46,6 +45,7 @@ LIBSRCS += StatusCreateFactory.cpp
SRC_DIRS += $(PVDATA)/pv
+INC += pvType.h
INC += pvIntrospect.h
INC += pvData.h
INC += convert.h
diff --git a/pvDataApp/misc/pvType.h b/pvDataApp/misc/pvType.h
deleted file mode 100644
index 5389366..0000000
--- a/pvDataApp/misc/pvType.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* pvType.h */
-/**
- * Copyright - See the COPYRIGHT that is included with this distribution.
- * EPICS pvDataCPP is distributed subject to a Software License Agreement found
- * in file LICENSE that is included with this distribution.
- */
-#include
-#ifndef PVTYPE_H
-#define PVTYPE_H
-
-namespace epics { namespace pvData {
-
-typedef signed char int8;
-typedef short int16;
-typedef int int32;
-typedef long long int64;
-typedef unsigned int uint32;
-typedef unsigned long long uint64;
-
-typedef std::string String;
-typedef std::string * StringBuilder;
-typedef String* StringArray;
-
-}}
-#endif /* PVTYPE_H */
-
-
-
diff --git a/pvDataApp/pv/pvData.h b/pvDataApp/pv/pvData.h
index 44ba6a7..ea61d25 100644
--- a/pvDataApp/pv/pvData.h
+++ b/pvDataApp/pv/pvData.h
@@ -9,6 +9,7 @@
#include