replicode
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Static Private Attributes | List of all members
mBrane::sdk::module::Node Class Referenceabstract

#include <module_node.h>

Inheritance diagram for mBrane::sdk::module::Node:
Inheritance graph
Collaboration diagram for mBrane::sdk::module::Node:
Collaboration graph

Public Types

enum  Network {
  PRIMARY = 0, SECONDARY = 1, BOTH = 2, LOCAL = 3,
  EITHER = 4
}
 
enum  TraceLevel { EXECUTION = 0, NETWORK = 1, APPLICATION = 2 }
 

Public Member Functions

uint8_t id () const
 
virtual const char * name ()=0
 
virtual void send (const _Module *sender, _Payload *p, Network network=PRIMARY)=0
 
virtual void send (const _Module *sender, _Payload *message, uint8_t nodeID, Network network=PRIMARY)=0
 
virtual uint64_t time () const =0
 
virtual void newSpace (const _Module *sender, Network network=PRIMARY)=0
 
virtual void newModule (const _Module *sender, uint16_t CID, Network network=PRIMARY, const char *hostName="local")=0
 
virtual void deleteSpace (uint16_t ID, Network network=PRIMARY)=0
 
virtual void deleteModule (uint16_t CID, uint16_t ID, Network network=PRIMARY)=0
 
virtual void activateModule (const _Module *sender, uint16_t module_cid, uint16_t module_id, uint16_t space_id, float activationLevel, Network network=PRIMARY)=0
 
virtual void activateSpace (const _Module *sender, uint16_t space_id, uint16_t target_sid, float activationLevel, Network network=PRIMARY)=0
 
virtual void setSpaceThreshold (const _Module *sender, uint16_t space_id, float threshold, Network network=PRIMARY)=0
 
virtual void subscribeMessage (const _Module *sender, uint16_t module_cid, uint16_t module_id, uint16_t space_id, uint16_t message_cid, Network network=PRIMARY)=0
 
virtual void unsubscribeMessage (const _Module *sender, uint16_t module_cid, uint16_t module_id, uint16_t space_id, uint16_t message_cid, Network network=PRIMARY)=0
 
virtual void subscribeStream (const _Module *sender, uint16_t module_cid, uint16_t module_id, uint16_t space_id, uint16_t stream_id, Network network=PRIMARY)=0
 
virtual void unsubscribeStream (const _Module *sender, uint16_t module_cid, uint16_t module_id, uint16_t space_id, uint16_t stream_id, Network network=PRIMARY)=0
 
virtual const char * getSpaceName (uint16_t hostID, uint16_t ID)=0
 
virtual const char * getModuleName (uint16_t CID)=0
 
virtual uint8_t getNodeID (const char *name)=0
 
virtual void markUnused (_Payload *p)=0
 
virtual void addConstantObject (_Payload *c, const std::string &name)=0
 
virtual _PayloadgetConstantObject (uint32_t OID)=0
 
virtual _PayloadgetConstantObject (const std::string &name)=0
 
virtual void addLookup (uint8_t sourceNID, uint32_t OID)=0
 
virtual bool hasLookup (uint8_t destinationNID, uint32_t OID)=0
 
virtual void addSharedObject (_Payload *p)=0
 
virtual _PayloadgetSharedObject (uint32_t OID)=0
 
virtual void consolidate (_Payload *p)=0
 

Static Public Member Functions

static NodeGet ()
 
static std::ostream & trace (TraceLevel l)
 

Static Public Attributes

static const uint8_t NoID = 0xFF
 

Protected Member Functions

 Node (uint8_t ID)
 
 ~Node ()
 

Protected Attributes

uint8_t _ID
 

Static Protected Attributes

static std::ostream * Streams [3]
 

Static Private Attributes

static NodeSingleton = NULL
 

Member Enumeration Documentation

Enumerator
PRIMARY 
SECONDARY 
BOTH 
LOCAL 
EITHER 
Enumerator
EXECUTION 
NETWORK 
APPLICATION 

Constructor & Destructor Documentation

mBrane::sdk::module::Node::Node ( uint8_t  ID)
protected
mBrane::sdk::module::Node::~Node ( )
protected

Member Function Documentation

virtual void mBrane::sdk::module::Node::activateModule ( const _Module sender,
uint16_t  module_cid,
uint16_t  module_id,
uint16_t  space_id,
float  activationLevel,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::activateSpace ( const _Module sender,
uint16_t  space_id,
uint16_t  target_sid,
float  activationLevel,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::addConstantObject ( _Payload c,
const std::string &  name 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::addLookup ( uint8_t  sourceNID,
uint32_t  OID 
)
pure virtual

Implemented in mBrane::Node.

Here is the caller graph for this function:

virtual void mBrane::sdk::module::Node::addSharedObject ( _Payload p)
pure virtual

Implemented in mBrane::Node.

Here is the caller graph for this function:

virtual void mBrane::sdk::module::Node::consolidate ( _Payload p)
pure virtual

Implemented in mBrane::Node.

Here is the caller graph for this function:

virtual void mBrane::sdk::module::Node::deleteModule ( uint16_t  CID,
uint16_t  ID,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::deleteSpace ( uint16_t  ID,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

Node * mBrane::sdk::module::Node::Get ( )
static

Here is the caller graph for this function:

virtual _Payload* mBrane::sdk::module::Node::getConstantObject ( uint32_t  OID)
pure virtual

Implemented in mBrane::Node.

Here is the caller graph for this function:

virtual _Payload* mBrane::sdk::module::Node::getConstantObject ( const std::string &  name)
pure virtual

Implemented in mBrane::Node.

virtual const char* mBrane::sdk::module::Node::getModuleName ( uint16_t  CID)
pure virtual

Implemented in mBrane::Node.

virtual uint8_t mBrane::sdk::module::Node::getNodeID ( const char *  name)
pure virtual

Implemented in mBrane::Networking.

virtual _Payload* mBrane::sdk::module::Node::getSharedObject ( uint32_t  OID)
pure virtual

Implemented in mBrane::Node.

Here is the caller graph for this function:

virtual const char* mBrane::sdk::module::Node::getSpaceName ( uint16_t  hostID,
uint16_t  ID 
)
pure virtual

Implemented in mBrane::Node.

virtual bool mBrane::sdk::module::Node::hasLookup ( uint8_t  destinationNID,
uint32_t  OID 
)
pure virtual

Implemented in mBrane::Node.

Here is the caller graph for this function:

uint8_t mBrane::sdk::module::Node::id ( ) const

Here is the caller graph for this function:

virtual void mBrane::sdk::module::Node::markUnused ( _Payload p)
pure virtual

Implemented in mBrane::Node.

Here is the caller graph for this function:

virtual const char* mBrane::sdk::module::Node::name ( )
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::newModule ( const _Module sender,
uint16_t  CID,
Network  network = PRIMARY,
const char *  hostName = "local" 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::newSpace ( const _Module sender,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::send ( const _Module sender,
_Payload p,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::send ( const _Module sender,
_Payload message,
uint8_t  nodeID,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::setSpaceThreshold ( const _Module sender,
uint16_t  space_id,
float  threshold,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::subscribeMessage ( const _Module sender,
uint16_t  module_cid,
uint16_t  module_id,
uint16_t  space_id,
uint16_t  message_cid,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::subscribeStream ( const _Module sender,
uint16_t  module_cid,
uint16_t  module_id,
uint16_t  space_id,
uint16_t  stream_id,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual uint64_t mBrane::sdk::module::Node::time ( ) const
pure virtual

Implemented in mBrane::Node.

Here is the caller graph for this function:

std::ostream & mBrane::sdk::module::Node::trace ( TraceLevel  l)
static

Here is the caller graph for this function:

virtual void mBrane::sdk::module::Node::unsubscribeMessage ( const _Module sender,
uint16_t  module_cid,
uint16_t  module_id,
uint16_t  space_id,
uint16_t  message_cid,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

virtual void mBrane::sdk::module::Node::unsubscribeStream ( const _Module sender,
uint16_t  module_cid,
uint16_t  module_id,
uint16_t  space_id,
uint16_t  stream_id,
Network  network = PRIMARY 
)
pure virtual

Implemented in mBrane::Node.

Member Data Documentation

uint8_t mBrane::sdk::module::Node::_ID
protected
const uint8_t mBrane::sdk::module::Node::NoID = 0xFF
static
Node * mBrane::sdk::module::Node::Singleton = NULL
staticprivate
std::ostream * mBrane::sdk::module::Node::Streams
staticprotected

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