org.micropsi.nodenet
Class ActorNode

java.lang.Object
  extended byorg.micropsi.nodenet.NetEntity
      extended byorg.micropsi.nodenet.Node
          extended byorg.micropsi.nodenet.ActorNode
All Implemented Interfaces:
GateTypesIF, NetIntegrityIF

public class ActorNode
extends Node

Node that writes its activation to an ActorDataTarget.

See Also:
ActorDataTargetIF

Field Summary
protected  java.lang.String dataTarget
           
protected  SensActRegistry sensorReg
           
 
Fields inherited from class org.micropsi.nodenet.Node
genericLinks, genSlot
 
Fields inherited from class org.micropsi.nodenet.NetEntity
entityManager, gates, slots
 
Fields inherited from interface org.micropsi.nodenet.GateTypesIF
GT_ASSOCIATION, GT_CAT, GT_DISSOCIATION, GT_EXP, GT_GEN, GT_POR, GT_REF, GT_RET, GT_SUB, GT_SUR, GT_SYM
 
Fields inherited from interface org.micropsi.nodenet.NetIntegrityIF
BAD_KEY, BAD_LINK, BAD_OUTPUT_FUNCTION, BAD_SLOT, DUPLICATE_KEY, UNKNOWN_ENTITY, UNKNOWN_MODULE
 
Constructor Summary
protected ActorNode(java.lang.String nodeID, NetEntityManager manager, SensActRegistry sensorReg)
          Constructor.
 
Method Summary
protected  void calculateGates()
          Extended to write to the data target and set the GEN gate with the success of the execution
 void connectActor(java.lang.String dataTarget)
          Connects the ActorNode to the given dataTarget.
 void disconnectActor()
          Disconnects the ActorNode from it's current dataTarget.
 java.lang.String getDataType()
          Returns the dataTarget the ActorNode is connected to.
 boolean isConnected()
          Checks if the ActorNode is connected.
protected  void use()
          Some nodes perform low-level java operations when activated.
 
Methods inherited from class org.micropsi.nodenet.Node
getEntityType, getGenActivation, getType, propagateActivation
 
Methods inherited from class org.micropsi.nodenet.NetEntity
addGate, addSlot, changeParameter, checkIntegrity, confirmNewActivation, createLinkTo, createLinkTo, deleteGate, deleteLink, deleteSlot, destroy, getEntityName, getFirstLinkAt, getGate, getGates, getID, getLastLinkAt, getLink, getNumberOfGates, getNumberOfSlots, getParentID, getSlot, getSlots, hasName, isActive, reportIntegrityStatus, setEntityName, setParentID, toString, unlinkCompletely, updateDecayState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sensorReg

protected SensActRegistry sensorReg

dataTarget

protected java.lang.String dataTarget
Constructor Detail

ActorNode

protected ActorNode(java.lang.String nodeID,
                    NetEntityManager manager,
                    SensActRegistry sensorReg)
Constructor.

Parameters:
nodeID - the ID of this node
manager - the entity manager
sensorReg - the sensor/actor registry to be used
Method Detail

connectActor

public void connectActor(java.lang.String dataTarget)
Connects the ActorNode to the given dataTarget. There is no check if the corresponding dataTarget exists. If there is no such dataTarget, the ActorNode will be connected anyway, but of course nothing is written nowhere as long as the dataTarget is not there.

Parameters:
dataTarget - the dataTarget to connect to.

disconnectActor

public void disconnectActor()
Disconnects the ActorNode from it's current dataTarget.


isConnected

public boolean isConnected()
Checks if the ActorNode is connected.

Returns:
boolean truf if the ActorNode is connected.

calculateGates

protected void calculateGates()
                       throws NetIntegrityException
Extended to write to the data target and set the GEN gate with the success of the execution

Overrides:
calculateGates in class Node
Throws:
NetIntegrityException
See Also:
NetEntity.calculateGates()

use

protected void use()
            throws NetIntegrityException
Description copied from class: Node
Some nodes perform low-level java operations when activated. (Dissociators, activators and the like.) This method is not meant to get java functionality into the net - use NativeModules for this purpose!

Specified by:
use in class Node
Throws:
NetIntegrityException - if something is wrong with the net
See Also:
Node.use()

getDataType

public java.lang.String getDataType()
Returns the dataTarget the ActorNode is connected to.

Returns:
String the dataType.

(c) by Micropsi Project: http://www.cognitive-agents.org

.