org.jactr.modules.pm.visual.buffer.six
Class DefaultVisualLocationBuffer6

java.lang.Object
  extended by org.jactr.core.buffer.AbstractActivationBuffer
      extended by org.jactr.core.buffer.six.AbstractActivationBuffer6
          extended by org.jactr.core.buffer.six.AbstractRequestableBuffer6
              extended by org.jactr.core.buffer.delegate.DefaultDelegatedRequestableBuffer6
                  extended by org.jactr.modules.pm.common.buffer.AbstractPMActivationBuffer6
                      extended by org.jactr.modules.pm.visual.buffer.six.DefaultVisualLocationBuffer6
All Implemented Interfaces:
IDelegatedRequestableBuffer, IActivationBuffer, IRequestableBuffer, IStatusBuffer, ICompilableBuffer, ISlotContainer, IUniqueSlotContainer, IInitializable, IParameterized, IEventTrackingActivationBuffer, IPerceptualBuffer, IVisualLocationBuffer

public class DefaultVisualLocationBuffer6
extends AbstractPMActivationBuffer6
implements IVisualLocationBuffer

since visual-location and visual buffers share the same state information (stored in the visual buffer) so care must be taken to use the visual buffers state information and not visual location's

Author:
developer

Field Summary
static org.apache.commons.logging.Log LOGGER
          logger definition
 
Fields inherited from class org.jactr.core.buffer.AbstractActivationBuffer
ACTIVATION_PARAM, GOAL_VALUE_PARAM, STRICT_HARVESTING_PARAM
 
Fields inherited from interface org.jactr.modules.pm.buffer.IPerceptualBuffer
EXECUTION_SLOT, IS_BUFFER_STUFF_REQUEST, MODALITY_SLOT, PREPARATION_SLOT, PROCESSOR_SLOT
 
Fields inherited from interface org.jactr.core.buffer.six.IStatusBuffer
BUFFER_SLOT, STATE_SLOT
 
Constructor Summary
DefaultVisualLocationBuffer6(IVisualActivationBuffer visualBuffer, IVisualModule module)
           
 
Method Summary
 void cancelBufferStuff()
           
 void checkForBufferStuff()
          we stuff the buffer if this buffer is empty and free AND the visual buffer is free.
 IChunk getCurrentVisualLocation()
          returns the current visual location in the buffer or the last attended location
 boolean handlesEncoding()
          so that we don't try to encode the visual locations which are taken care of by the visual map..
 void initialize()
          must be called after the model has started so that we can ensure that the status slot values are properly initialized
 boolean isBufferStuffPending()
           
 
Methods inherited from class org.jactr.modules.pm.common.buffer.AbstractPMActivationBuffer6
clear, dispose, enqueueTimedEvent, getCompilableContext, isExecutionBusy, isExecutionFree, isModalityBusy, isModalityFree, isPreparationBusy, isPreparationFree, isProcessorBusy, isProcessorFree, setExecutionChunk, setModalityChunk, setPreparationChunk, setProcessorChunk, willAccept
 
Methods inherited from class org.jactr.core.buffer.delegate.DefaultDelegatedRequestableBuffer6
addRequestDelegate, getRequestDelegates, removeRequestDelegate
 
Methods inherited from class org.jactr.core.buffer.six.AbstractRequestableBuffer6
request
 
Methods inherited from class org.jactr.core.buffer.six.AbstractActivationBuffer6
addSlot, addSourceChunk, bind, getBusyChunk, getEmptyChunk, getErrorChunk, getFreeChunk, getFullChunk, getRequestedChunk, getSlot, getSlots, getSlots, getUnrequestedChunk, isBufferEmpty, isBufferFull, isBufferRequested, isBufferUnrequested, isStateBusy, isStateError, isStateFree, removeSlot, setBufferChunk, setStateChunk
 
Methods inherited from class org.jactr.core.buffer.AbstractActivationBuffer
addListener, contains, getActivation, getActivationSpreader, getG, getModel, getModule, getName, getParameter, getPossibleParameters, getSetableParameters, getSourceChunk, getSourceChunks, getSourceChunks, isStrictHarvestingEnabled, matched, removeListener, removeSourceChunk, setActivation, setActivationSpreader, setG, setParameter, setStrictHarvestingEnabled, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jactr.modules.pm.buffer.IPerceptualBuffer
isExecutionBusy, isExecutionFree, isModalityBusy, isModalityFree, isPreparationBusy, isPreparationFree, isProcessorBusy, isProcessorFree, setExecutionChunk, setModalityChunk, setPreparationChunk, setProcessorChunk
 
Methods inherited from interface org.jactr.core.buffer.six.IStatusBuffer
bind, isBufferEmpty, isBufferFull, isBufferRequested, isBufferUnrequested, isStateBusy, isStateError, isStateFree, setBufferChunk, setStateChunk
 
Methods inherited from interface org.jactr.core.slot.IUniqueSlotContainer
getSlot
 
Methods inherited from interface org.jactr.core.slot.ISlotContainer
addSlot, getSlots, getSlots, removeSlot
 
Methods inherited from interface org.jactr.core.buffer.delegate.IDelegatedRequestableBuffer
addRequestDelegate, getRequestDelegates, removeRequestDelegate
 
Methods inherited from interface org.jactr.modules.pm.buffer.IEventTrackingActivationBuffer
enqueueTimedEvent
 

Field Detail

LOGGER

public static final org.apache.commons.logging.Log LOGGER
logger definition

Constructor Detail

DefaultVisualLocationBuffer6

public DefaultVisualLocationBuffer6(IVisualActivationBuffer visualBuffer,
                                    IVisualModule module)
Method Detail

initialize

public void initialize()
Description copied from class: AbstractActivationBuffer6
must be called after the model has started so that we can ensure that the status slot values are properly initialized

Specified by:
initialize in interface IInitializable
Overrides:
initialize in class AbstractPMActivationBuffer6

getCurrentVisualLocation

public IChunk getCurrentVisualLocation()
returns the current visual location in the buffer or the last attended location

Specified by:
getCurrentVisualLocation in interface IVisualLocationBuffer
Returns:
See Also:
IVisualLocationBuffer.getCurrentVisualLocation()

checkForBufferStuff

public void checkForBufferStuff()
we stuff the buffer if this buffer is empty and free AND the visual buffer is free. If they are, we create a basic visual search request, set the state (ours, not the visual buffers) to unrequested, and pass the request on to the visual location chunk pattern processor

Specified by:
checkForBufferStuff in interface IVisualLocationBuffer
See Also:
IVisualLocationBuffer.checkForBufferStuff()

handlesEncoding

public boolean handlesEncoding()
so that we don't try to encode the visual locations which are taken care of by the visual map..

Specified by:
handlesEncoding in interface IActivationBuffer
Overrides:
handlesEncoding in class AbstractActivationBuffer
Returns:
See Also:
AbstractActivationBuffer.handlesEncoding()

isBufferStuffPending

public boolean isBufferStuffPending()
Specified by:
isBufferStuffPending in interface IVisualLocationBuffer

cancelBufferStuff

public void cancelBufferStuff()
Specified by:
cancelBufferStuff in interface IVisualLocationBuffer