The Assimilation Project  based on Assimilation version
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

- Data Fields inherited from cma.assimeventobserver.AssimEventObserver

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

Constructor & Destructor Documentation

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

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

Definition at line 147 of file

Member Function Documentation

def cma.assimeventobserver.FIFOEventObserver.ioerror (   self,
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

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,
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

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


Definition at line 156 of file

cma.assimeventobserver.FIFOEventObserver.NULstr = chr(0)

Definition at line 145 of file


Definition at line 167 of file

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