The Assimilation Project  based on Assimilation version 1.1.7.1474836767
cma.assimeventobserver.FIFOEventObserver Class Reference
Inheritance diagram for cma.assimeventobserver.FIFOEventObserver:
Collaboration diagram for cma.assimeventobserver.FIFOEventObserver:

Public Member Functions

def __init__ (self, FIFOwritefd, constraints=None, maxerrcount=None)
 
def notifynewevent (self, event)
 
def ioerror (self, _unusedevent)
 
- Public Member Functions inherited from cma.assimeventobserver.AssimEventObserver
def __init__ (self, constraints)
 
def notifynewevent (self, event)
 
def is_interesting (self, event)
 

Data Fields

 FIFOwritefd
 
 constraints
 
 errcount
 
 maxerrcount
 
 pipebufsize
 
- Data Fields inherited from cma.assimeventobserver.AssimEventObserver
 constraints
 

Static Public Attributes

 NULstr = chr(0)
 

Additional Inherited Members

- Static Public Member Functions inherited from cma.assimeventobserver.AssimEventObserver
def getvalue (event, attr)
 

Detailed Description

Objects in this class send JSON messages to a FIFO when events they are interested in
are observed.  Each message encapsulates a single event, and is followed by a single
NUL (zero) byte.  If the len(JSON) is 100, then 101 bytes are written to the
FIFO, with the last being a single NUL byte (as noted in the previous sentence).

Definition at line 138 of file assimeventobserver.py.

Constructor & Destructor Documentation

def cma.assimeventobserver.FIFOEventObserver.__init__ (   self,
  FIFOwritefd,
  constraints = None,
  maxerrcount = None 
)
Initializer for FIFO EventObserver class.

Parameters:
-----------
FIFOwritefd: int
    a UNIX file descriptor pointing to the FIFO where event observers are listening...

Definition at line 147 of file assimeventobserver.py.

Member Function Documentation

def cma.assimeventobserver.FIFOEventObserver.ioerror (   self,
  _unusedevent 
)
This function gets called when we get an I/O error writing to the FIFO.
This is likely an EPIPE (broken pipe) error.

Definition at line 201 of file assimeventobserver.py.

References cma.assimeventobserver.FIFOEventObserver.errcount, and cma.assimeventobserver.FIFOEventObserver.maxerrcount.

Referenced by cma.assimeventobserver.FIFOEventObserver.notifynewevent().

Here is the caller graph for this function:

def cma.assimeventobserver.FIFOEventObserver.notifynewevent (   self,
  event 
)
We get called when a new AssimEvent has occured that we might want to observe.
When we get the call, we write a NUL-terminated JSON blob to our FIFO file descriptor

Definition at line 176 of file assimeventobserver.py.

References cma.assimeventobserver.FIFOEventObserver.errcount, cma.assimeventobserver.FIFOEventObserver.FIFOwritefd, cma.assimeventobserver.FIFOEventObserver.ioerror(), and cma.assimeventobserver.AssimEventObserver.is_interesting().

Here is the call graph for this function:

Field Documentation

cma.assimeventobserver.FIFOEventObserver.constraints

Definition at line 156 of file assimeventobserver.py.

cma.assimeventobserver.FIFOEventObserver.errcount
cma.assimeventobserver.FIFOEventObserver.maxerrcount
cma.assimeventobserver.FIFOEventObserver.NULstr = chr(0)
static

Definition at line 145 of file assimeventobserver.py.

cma.assimeventobserver.FIFOEventObserver.pipebufsize

Definition at line 167 of file assimeventobserver.py.


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