pva2pva 1.4.2
Loading...
Searching...
No Matches
DBEvent Struct Reference

Public Member Functions

 DBEvent (void *s)
void create (dbEventCtx ctx, dbChannel *ch, EVENTFUNC *fn, unsigned mask)
void destroy ()
bool operator! () const

Public Attributes

dbEventSubscription subscript
unsigned dbe_mask
void * self
unsigned index
dbChannel * chan

Detailed Description

Definition at line 223 of file pvif.h.

Constructor & Destructor Documentation

◆ DBEvent() [1/2]

DBEvent::DBEvent ( )
inline

Definition at line 230 of file pvif.h.

230:subscript(NULL), self(NULL), index(0) {}

◆ DBEvent() [2/2]

DBEvent::DBEvent ( void * s)
inline

Definition at line 231 of file pvif.h.

231:subscript(NULL), self(s), index(0) {}

◆ ~DBEvent()

DBEvent::~DBEvent ( )
inline

Definition at line 232 of file pvif.h.

232{destroy();}

Member Function Documentation

◆ create()

void DBEvent::create ( dbEventCtx ctx,
dbChannel * ch,
EVENTFUNC * fn,
unsigned mask )
inline

Definition at line 233 of file pvif.h.

234 {
235 subscript = db_add_event(ctx, ch, fn, this, mask);
236 if(!subscript)
237 throw std::runtime_error("Failed to subscribe to dbEvent");
238 chan = ch;
239 dbe_mask = mask;
240 }

◆ destroy()

void DBEvent::destroy ( )
inline

Definition at line 241 of file pvif.h.

241 {
242 if(subscript) db_cancel_event(subscript);
243 }

◆ operator!()

bool DBEvent::operator! ( ) const
inline

Definition at line 244 of file pvif.h.

244{ return !subscript; }

Member Data Documentation

◆ chan

dbChannel* DBEvent::chan

Definition at line 229 of file pvif.h.

◆ dbe_mask

unsigned DBEvent::dbe_mask

Definition at line 226 of file pvif.h.

◆ index

unsigned DBEvent::index

Definition at line 228 of file pvif.h.

◆ self

void* DBEvent::self

Definition at line 227 of file pvif.h.

◆ subscript

dbEventSubscription DBEvent::subscript

Definition at line 225 of file pvif.h.


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