58 lines
1.4 KiB
Plaintext
58 lines
1.4 KiB
Plaintext
#ifndef MAINPAGE_H
|
|
#define MAINPAGE_H
|
|
/**
|
|
@mainpage pvDataCPP documentation
|
|
|
|
- [Download](https://sourceforge.net/projects/epics-pvdata/files/)
|
|
- @htmlonly <a href="modules.html">API components</a> @endhtmlonly
|
|
- @ref release_notes
|
|
|
|
The epics::pvData namespace.
|
|
See pv/pvData.h header.
|
|
|
|
@code
|
|
#include <pv/pvData.h>
|
|
#include <pv/createRequest.h>
|
|
@endcode
|
|
|
|
- Type description epics::pvData::Field and sub-classes
|
|
- Value container epics::pvData::PVField and sub-classes
|
|
- POD array handling epics::pvData::shared_vector
|
|
- pvRequest parsing epics::pvData::createRequest()
|
|
|
|
Define a structure type and create a container with default values.
|
|
|
|
@code
|
|
namespace pvd = epics::pvData;
|
|
pvd::StructureConstPtr stype(pvd::FieldBuilder::begin()
|
|
->add("fld1", pvd::pvInt)
|
|
->addNestedStructure("sub")
|
|
->add("fld2", pvd::pvString)
|
|
->endNested()
|
|
->createStructure());
|
|
|
|
pvd::PVStructuretPtr value(stype->build());
|
|
|
|
value->getSubFieldT<pvd::PVInt>("fld1")->put(4); // store integer 4. would throw if not pvInt
|
|
value->getSubFieldT<pvd::PVScalar>("sub.fld2")->putFrom(4.2); // convert and store string "4.2"
|
|
@endcode
|
|
|
|
is equivalent to the following pseudo-code.
|
|
|
|
@code
|
|
struct stype {
|
|
pvd::int32 fld1;
|
|
struct {
|
|
std::string fld2;
|
|
} sub;
|
|
};
|
|
stype value;
|
|
value.fld1 = 4;
|
|
value.fld2 = pvd::castUnsafe<std::string>(4.2);
|
|
@endcode
|
|
|
|
*/
|
|
|
|
#endif /* MAINPAGE_H */
|
|
|