public class Map extends TypedAtomicActor implements Decorator
MapConstrained
,
PGMReader
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
protected java.util.List<NamedObj> |
_decoratedObjects
Cached list of decorated objects.
|
protected long |
_decoratedObjectsVersion
Version for _decoratedObjects.
|
PortParameter |
map
The occupancy grid map.
|
Parameter |
origin
A 2-d array denoting the map origin in x and y directions
respectively.
|
Parameter |
resolution
Map resolution in meters/pixel.
|
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
Map(CompositeEntity container,
java.lang.String name)
Construct a StateSpaceModel with a name and a container.
|
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute attribute)
Update the state accordingly.
|
java.lang.Object |
clone(Workspace workspace)
Clone the actor into the specified workspace.
|
DecoratorAttributes |
createDecoratorAttributes(NamedObj target)
Create and return the decorated attributes for the target NamedObj.
|
java.util.List<NamedObj> |
decoratedObjects()
Return the decorated objects.
|
java.lang.String |
description()
Return a full description of the object.
|
void |
fire()
Do nothing.
|
int[][] |
getOccupancyGrid()
Return the occupancy grid.
|
double[] |
getOrigin()
Return the origin.
|
boolean |
isGlobalDecorator()
Return true if this decorator should decorate objects across
opaque hierarchy boundaries.
|
boolean |
withinValidMapArea(double xCoord,
double yCoord)
Check if queried (x,y) position is within the valid map area.
|
_containedTypeConstraints, _customTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, initialize, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, postfire, prefire, preinitialize, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getContainer, getDisplayName, getFullName, getName, getName, setName
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, initialize, preinitialize, removeInitializable, wrapup
getDerivedLevel, getDerivedList, propagateValue
public PortParameter map
public Parameter origin
public Parameter resolution
protected java.util.List<NamedObj> _decoratedObjects
protected long _decoratedObjectsVersion
public Map(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor.IllegalActionException
- If the container is incompatible
with this actor.NameDuplicationException
- If the name coincides with
an actor already in the container.public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.IllegalActionException
- If
stateVariableNamest cannot be evaluated or cannot be
converted to the output type, or if the superclass throws it.public java.lang.Object clone(Workspace workspace) throws java.lang.CloneNotSupportedException
clone
in class TypedAtomicActor
workspace
- The workspace for the new object.java.lang.CloneNotSupportedException
- If a derived class contains
an attribute that cannot be cloned.NamedObj.exportMoML(Writer, int, String)
,
NamedObj.setDeferringChangeRequests(boolean)
public void fire() throws IllegalActionException
AtomicActor
fire
in interface Executable
fire
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.public int[][] getOccupancyGrid()
public double[] getOrigin()
public boolean withinValidMapArea(double xCoord, double yCoord)
xCoord
- The x coordinateyCoord
- The y coordinatepublic java.lang.String description() throws IllegalActionException
NamedObj
description
in interface Nameable
description
in class NamedObj
IllegalActionException
- Not thrown in this base class,
but derived classes could throw an exception if there is a problem
accessing subcomponents of this object.NamedObj.exportMoML(Writer, int, String)
public DecoratorAttributes createDecoratorAttributes(NamedObj target) throws IllegalActionException
Decorator
DecoratorAttributes
. Implementations should populate that attribute
with parameters that have appropriate default values.
This method is called if NamedObj.getDecoratorAttribute(Decorator, String)
or NamedObj.getDecoratorAttributes(Decorator)
is called,
and the specified target object does not already have
decorated attributes for this decorator.
The implementer of this method is responsible for ensuring consistency
with the Decorator.decoratedObjects()
method. Specifically, any
object returned by Decorator.decoratedObjects()
, when passed as an argument
to this method, should not result in a null returned value. And conversely,
any object passed to this method that is not in the list returned by
decoratedObjects() should result in a null returned value.
createDecoratorAttributes
in interface Decorator
target
- The NamedObj that will be decorated.IllegalActionException
- If the target cannot be determined to
be decorated or not (e.g., a parameter cannot be evaluated).public java.util.List<NamedObj> decoratedObjects() throws IllegalActionException
decoratedObjects
in interface Decorator
IllegalActionException
- If some object cannot be determined to
be decorated or not (e.g., a parameter cannot be evaluated).public boolean isGlobalDecorator() throws IllegalActionException
Decorator
isGlobalDecorator
in interface Decorator
IllegalActionException
- If it cannot be determined whether
this is global or not (e.g., a parameter cannot be evaluated).