public class MicaCompositeActor extends PtinyOSCompositeActor
This actor is always a type opaque composite actor. The outside types of the input ports (the sensor ports) are of type DoubleToken, and the inside types are of type unsigned short (uint16_t) in C. The C code ( tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII/adc_model.c) masks the unsigned short for 10-bit usage (10 least significant bits), to reflect the bit-width of the ADC registers on the actual Mica hardware. The outside types of the output ports (the LED ports) are of type BooleanToken, and the inside types are of type short in C.
Detailed port information can be found in tinyos-1.x/tos/platform/pc/sensorboard.h.
Also see tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII/ptII.c and tinyos-1.x/contrib/ptII/ptinyos/tos/platform/ptII/adc_model.c
CompositeEntity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
PortParameter |
accelerometerX
Persistent accelerometer (x-axis) input data.
|
PortParameter |
accelerometerY
Persistent accelerometer (y-axis) input data.
|
TypedIOPort |
ledGreen
Green LED output port.
|
TypedIOPort |
ledRed
Red LED output port.
|
TypedIOPort |
ledYellow
Yellow LED output port.
|
PortParameter |
magnetometerX
Persistent magnetometer (x-axis) input data.
|
PortParameter |
magnetometerY
Persistent magnetometer (y-axis) input data.
|
PortParameter |
microphone
Persistent microphone input data.
|
PortParameter |
photo
Persistent photosensor input data.
|
PortParameter |
temperature
Persistent temperature input data.
|
packetIn, packetOut
rotatePorts
_actorFiringListeners, _causalityInterface, _derivedPiggybacks, _initializables, _notifyingActorFiring, _piggybacks, _publishedPorts, _publisherRelations, _stopRequested, _subscribedPorts
_levelCrossingLinks
_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 |
---|
MicaCompositeActor()
Construct an actor in the default workspace with an empty string
as its name.
|
MicaCompositeActor(CompositeEntity container,
java.lang.String name)
Construct an actor in the specified container with the specified
name.
|
MicaCompositeActor(Workspace workspace)
Construct an actor in the specified workspace with an empty
string as a name.
|
fire
_addPort, isBackwardTypeInferenceEnabled, newPort, typeConstraints
_actorFiring, _actorFiring, _addEntity, _addRelation, _finishedAddEntity, _setDirector, _transferPortParameterInputs, addActorFiringListener, addInitializable, addPiggyback, clone, connectionsChanged, createReceivers, createSchedule, getCausalityInterface, getDirector, getExecutiveDirector, getManager, getPublishedPort, getPublishedPortChannel, getPublishedPorts, getSubscribedPortChannel, inferringWidths, inferWidths, initialize, inputPortList, isFireFunctional, isOpaque, isPublishedPort, isStrict, iterate, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, linkToPublishedPort, needsWidthInference, newInsideReceiver, newReceiver, newRelation, notifyConnectivityChange, outputPortList, postfire, prefire, preinitialize, recordFiring, registerPublisherPort, registerPublisherPort, removeActorFiringListener, removeInitializable, removePiggyback, requestChange, setContainer, setDirector, setManager, stop, stopFire, terminate, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unlinkToPublishedPort, unregisterPublisherPort, unregisterPublisherPort, wrapup
_adjustDeferrals, _containedDecorators, _deepOpaqueEntityList, _description, _exportMoMLContents, _removeEntity, _removeRelation, _validateSettables, allAtomicEntityList, allowLevelCrossingConnect, classDefinitionList, connect, connect, containedObjectsIterator, deepCompositeEntityList, deepEntityList, deepGetEntities, deepNamedObjList, deepOpaqueEntityList, deepRelationSet, entityList, entityList, exportLinks, exportMoML, getAttribute, getEntities, getEntity, getPort, getRelation, getRelations, isAtomic, lazyAllAtomicEntityList, lazyAllCompositeEntityList, lazyAllCompositeTransparentAndOpaqueEntityList, lazyClassDefinitionList, lazyDeepEntityList, lazyEntityList, lazyRelationList, numberOfEntities, numberOfRelations, numEntities, numRelations, relationList, removeAllEntities, removeAllRelations, setClassDefinition, statistics, uniqueName
_checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_removePort, connectedPortList, connectedPorts, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts
_setParent, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeChanged, attributeDeleted, attributeList, attributeList, attributeTypeChanged, clone, decorators, deepContains, depthInHierarchy, description, 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, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
addInitializable, initialize, preinitialize, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public PortParameter photo
public PortParameter temperature
public PortParameter microphone
public PortParameter accelerometerX
public PortParameter accelerometerY
public PortParameter magnetometerX
public PortParameter magnetometerY
public TypedIOPort ledRed
public TypedIOPort ledGreen
public TypedIOPort ledYellow
public MicaCompositeActor()
public MicaCompositeActor(Workspace workspace)
workspace
- The workspace that will list the entity.public MicaCompositeActor(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor within the container.IllegalActionException
- If the actor cannot be contained
by the proposed container.NameDuplicationException
- If the name coincides with
an actor already in the container.