pva2pva 1.4.2
Loading...
Searching...
No Matches
TestPV Struct Reference
Collaboration diagram for TestPV:

Public Types

typedef weak_set< TestPVChannel > channels_t

Public Member Functions

 POINTER_DEFINITIONS (TestPV)
 TestPV (const std::string &name, const std::tr1::shared_ptr< TestProvider > &provider, const epics::pvData::StructureConstPtr &dtype)
void post (bool notify=true)
void post (const epics::pvData::BitSet &changed, bool notify=true)
void disconnect ()

Public Attributes

std::tr1::weak_ptr< TestPV > weakself
const std::string name
std::tr1::weak_ptr< TestProvider > const provider
epics::pvData::PVDataCreatePtr factory
const epics::pvData::StructureConstPtr dtype
epics::pvData::PVStructurePtr value
epicsMutex lock
channels_t channels

Friends

struct TestProvider

Detailed Description

Definition at line 249 of file utilities.h.

Member Typedef Documentation

◆ channels_t

typedef weak_set<TestPVChannel> TestPV::channels_t

Definition at line 274 of file utilities.h.

Constructor & Destructor Documentation

◆ TestPV()

TestPV::TestPV ( const std::string & name,
const std::tr1::shared_ptr< TestProvider > & provider,
const epics::pvData::StructureConstPtr & dtype )

Definition at line 394 of file utilities.cpp.

397 :name(name)
398 ,provider(provider)
399 ,factory(pvd::PVDataCreate::getPVDataCreate())
400 ,dtype(dtype)
401 ,value(factory->createPVStructure(dtype))
402{
403 epicsAtomicIncrSizeT(&countTestPV);
404}

◆ ~TestPV()

TestPV::~TestPV ( )

Definition at line 406 of file utilities.cpp.

407{
408 epicsAtomicDecrSizeT(&countTestPV);
409}

Member Function Documentation

◆ disconnect()

void TestPV::disconnect ( )

Definition at line 479 of file utilities.cpp.

480{
481 Guard G(lock);
482 channels_t::vector_type toupdate(channels.lock_vector());
483
484 FOREACH(channels_t::vector_type::const_iterator, it, end, toupdate) // channel
485 {
486 TestPVChannel *chan = it->get();
487
488 chan->state = TestPVChannel::DISCONNECTED;
489 {
490 pva::ChannelRequester::shared_pointer req(chan->requester.lock());
491 UnGuard U(G);
492 if(req)
493 req->channelStateChange(*it, TestPVChannel::DISCONNECTED);
494 }
495 }
496}

◆ post()

void TestPV::post ( bool notify = true)

Definition at line 411 of file utilities.cpp.

412{
413 pvd::BitSet changed;
414 changed.set(0); // all
415 post(changed, notify);
416}

◆ TestProvider

friend struct TestProvider
friend

Definition at line 276 of file utilities.h.

Member Data Documentation

◆ channels

channels_t TestPV::channels

Definition at line 275 of file utilities.h.

◆ dtype

const epics::pvData::StructureConstPtr TestPV::dtype

Definition at line 259 of file utilities.h.

◆ factory

epics::pvData::PVDataCreatePtr TestPV::factory

Definition at line 257 of file utilities.h.

◆ lock

epicsMutex TestPV::lock
mutable

Definition at line 272 of file utilities.h.

◆ name

const std::string TestPV::name

Definition at line 254 of file utilities.h.

◆ provider

std::tr1::weak_ptr<TestProvider> const TestPV::provider

Definition at line 255 of file utilities.h.

◆ value

epics::pvData::PVStructurePtr TestPV::value

Definition at line 260 of file utilities.h.

◆ weakself

std::tr1::weak_ptr<TestPV> TestPV::weakself

Definition at line 252 of file utilities.h.


The documentation for this struct was generated from the following files: