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

Public Member Functions

def __init__ (self, domain, designation, roles=None)
 
def addrole (self, roles)
 
def delrole (self, roles)
 
def logjson (self, origaddr, jsontext)
 
def __iter__ (self)
 
def keys (self)
 
def __contains__ (self, key)
 
def __len__ (self)
 
def jsonval (self, jsontype)
 
def get (self, key, alternative=None)
 
def __getitem__ (self, key)
 
def deepget (self, key, alternative=None)
 
def __setitem__ (self, name, value)
 
def __delitem__ (self, name)
 
def json_eq (self, key, newvalue)
 
def send_frames (self, _framesettype, _frames)
 
def request_discovery (self, args)
 

Static Public Member Functions

def __meta_keyattrs__ ()
 
def add_json_processor (clstoadd)
 

Data Fields

 designation
 
 monitors_activated
 
 roles
 

Static Public Attributes

string HASH_PREFIX = 'JSON__hash__'
 
string JSONattrnames
 
string JSONsingleattr
 

Detailed Description

Definition at line 35 of file systemnode.py.

Constructor & Destructor Documentation

def cma.systemnode.SystemNode.__init__ (   self,
  domain,
  designation,
  roles = None 
)

Definition at line 48 of file systemnode.py.

Member Function Documentation

def cma.systemnode.SystemNode.__contains__ (   self,
  key 
)

Definition at line 106 of file systemnode.py.

References cma.systemnode.SystemNode.HASH_PREFIX.

def cma.systemnode.SystemNode.__getitem__ (   self,
  key 
)

Definition at line 134 of file systemnode.py.

References cma.systemnode.SystemNode.jsonval().

Here is the call graph for this function:

def cma.systemnode.SystemNode.__iter__ (   self)

Definition at line 96 of file systemnode.py.

References cma.systemnode.SystemNode.JSONattrnames.

def cma.systemnode.SystemNode.__len__ (   self)
def cma.systemnode.SystemNode.__meta_keyattrs__ ( )
static

Definition at line 59 of file systemnode.py.

def cma.systemnode.SystemNode.__setitem__ (   self,
  name,
  value 
)

Definition at line 150 of file systemnode.py.

References cma.systemnode.SystemNode.HASH_PREFIX, and cma.systemnode.SystemNode.json_eq().

Here is the call graph for this function:

def cma.systemnode.SystemNode.add_json_processor (   clstoadd)
static

Definition at line 270 of file systemnode.py.

def cma.systemnode.SystemNode.addrole (   self,
  roles 
)

Definition at line 63 of file systemnode.py.

References cma.graphnodes.add_an_array_item(), cma.systemnode.SystemNode.roles, and cma.graphnodes.ProcessNode.roles.

Referenced by cma.droneinfo.Drone.__init__().

Here is the call graph for this function:

Here is the caller graph for this function:

def cma.systemnode.SystemNode.deepget (   self,
  key,
  alternative = None 
)
Return value if object contains the given *structured* key - 'alternative' if not.

Definition at line 141 of file systemnode.py.

References cma.systemnode.SystemNode.jsonval().

Referenced by cma.systemnode.SystemNode.get().

Here is the call graph for this function:

Here is the caller graph for this function:

def cma.systemnode.SystemNode.delrole (   self,
  roles 
)

Definition at line 70 of file systemnode.py.

References cma.graphnodes.delete_an_array_item(), cma.systemnode.SystemNode.roles, and cma.graphnodes.ProcessNode.roles.

Here is the call graph for this function:

def cma.systemnode.SystemNode.get (   self,
  key,
  alternative = None 
)
Return JSON object if the given key exists - 'alternative' if not.

Definition at line 129 of file systemnode.py.

References cma.systemnode.SystemNode.deepget(), cma.graphnodes.JSONMapNode.deepget(), and cma.AssimCclasses.pyConfigContext.deepget().

Referenced by cma.systemnode.SystemNode.__delitem__().

Here is the call graph for this function:

Here is the caller graph for this function:

def cma.systemnode.SystemNode.json_eq (   self,
  key,
  newvalue 
)
Return True if this new value is equal to the current value for
the given key (JSON attribute name).

We do this by comparing hash values. This keeps us from having to
fetch potentially very large strings (read VERY SLOW) if we can
compare hash values instead.

Our hash values are representable in fewer than 60 bytes to maximize Neo4j performance.

Definition at line 194 of file systemnode.py.

References cma.systemnode.SystemNode.HASH_PREFIX.

Referenced by cma.systemnode.SystemNode.__setitem__(), and cma.systemnode.SystemNode.logjson().

Here is the caller graph for this function:

def cma.systemnode.SystemNode.jsonval (   self,
  jsontype 
)

Definition at line 114 of file systemnode.py.

References cma.systemnode.SystemNode.HASH_PREFIX, and cma.systemnode.SystemNode.JSONsingleattr.

Referenced by cma.systemnode.SystemNode.__getitem__(), and cma.systemnode.SystemNode.deepget().

Here is the caller graph for this function:

def cma.systemnode.SystemNode.keys (   self)

Definition at line 102 of file systemnode.py.

Referenced by cma.systemnode.SystemNode.__len__().

Here is the caller graph for this function:

def cma.systemnode.SystemNode.logjson (   self,
  origaddr,
  jsontext 
)
def cma.systemnode.SystemNode.request_discovery (   self,
  args 
)
Send our System a request to perform discovery
We send a           DISCNAME frame with the instance name
then an optional    DISCINTERVAL frame with the repeat interval
then a              DISCJSON frame with the JSON data for the discovery operation.

Our argument is a vector of pyConfigContext objects with values for
    'instance'  Name of this discovery instance
    'interval'  How often to repeat this discovery action
    'timeout'   How long to wait before considering this discovery failed...

Definition at line 217 of file systemnode.py.

References cma.systemnode.SystemNode.designation, obsolete_cma.DroneInfo.designation, cma.systemnode.SystemNode.send_frames(), and cma.droneinfo.Drone.send_frames().

Here is the call graph for this function:

def cma.systemnode.SystemNode.send_frames (   self,
  _framesettype,
  _frames 
)

Definition at line 212 of file systemnode.py.

Referenced by cma.systemnode.SystemNode.request_discovery().

Here is the caller graph for this function:

Field Documentation

string cma.systemnode.SystemNode.JSONattrnames
static
Initial value:
1 = '''START d=node({droneid})
2  MATCH (d)-[r:jsonattr]->()
3  return r.jsonname as key'''

Definition at line 38 of file systemnode.py.

Referenced by cma.systemnode.SystemNode.__iter__().

string cma.systemnode.SystemNode.JSONsingleattr
static
Initial value:
1 = '''START d=node({droneid})
2  MATCH (d)-[r:jsonattr]->(json)
3  WHERE r.jsonname={jsonname}
4  return json'''

Definition at line 41 of file systemnode.py.

Referenced by cma.systemnode.SystemNode.jsonval().

cma.systemnode.SystemNode.monitors_activated

Definition at line 51 of file systemnode.py.

cma.systemnode.SystemNode.roles

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