public class PthalesReceiver extends SDFReceiver
Red (cxh) |
Red (cxh) |
Modifier and Type | Field and Description |
---|---|
protected Token[] |
_buffer
Buffer memory.
|
(package private) int |
_currentCtrlPositionOut |
(package private) java.lang.String[] |
_dimensions
Dimensions
|
(package private) boolean |
_dynamic |
(package private) java.util.List<Token> |
_header |
(package private) int |
_headerSize |
(package private) java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
_jumpAddr |
(package private) int |
_nbTokens |
(package private) int |
_originIn |
(package private) int |
_originOut |
(package private) java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> |
_patternIn |
(package private) java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> |
_patternOut |
(package private) int |
_patternSizeIn |
(package private) int |
_patternSizeOut |
(package private) int |
_positionIn |
(package private) int |
_positionOut |
(package private) int[] |
_repetitionsIn |
(package private) int[] |
_repetitionsOut |
protected java.util.LinkedHashMap<java.lang.String,java.lang.Integer> |
_sizes
array size by dimension.
|
(package private) java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> |
_tilingIn |
(package private) java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> |
_tilingOut |
_waitingTokens, INFINITE_CAPACITY
Constructor and Description |
---|
PthalesReceiver() |
Modifier and Type | Method and Description |
---|---|
void |
checkArray(java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> baseSpec,
java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> patternSpec,
java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> tilingSpec,
java.util.List<java.lang.String> dimensions)
Check whether the array is correct or not.
|
void |
clear()
Do nothing.
|
java.util.List<Token> |
elementList()
Return a list with tokens that are currently in the receiver
available for get() or getArray().
|
void |
fillParameters(Actor actor,
IOPort port)
Update parameters of this receiver according to the actor and port.
|
Token |
get()
Get a token from this receiver.
|
Token[] |
getArray(int numberOfTokens)
Get an array of tokens from this receiver.
|
boolean |
hasRoom()
Return true if the buffer can contain one more token.
|
boolean |
hasRoom(int numberOfTokens)
Return true if the buffer can contain n more token.
|
boolean |
hasToken()
Return if the buffer contains 1 more token to be read.
|
boolean |
hasToken(int numberOfTokens)
Return if the buffer contains n more token to be read.
|
boolean |
isDynamic()
Return true if the receiver is dynamic.
|
boolean |
isKnown()
Return true.
|
void |
put(Token token)
Put the specified token into the next appropriate array position,
given the FIXME.
|
void |
putArray(Token[] tokenArray,
int numberOfTokens)
Put a portion of the specified token array into this receiver.
|
void |
putArrayToAll(Token[] tokens,
int numberOfTokens,
Receiver[] receivers)
Put a sequence of tokens to all receivers in the specified array.
|
void |
putToAll(Token token,
Receiver[] receivers)
Put a single token to all receivers in the specified array.
|
void |
reset()
Reset this receiver to its initial state, which is typically
either empty (same as calling clear()) or unknown.
|
void |
setDynamic(boolean dynamic)
Set whether this receiver is dynamic.
|
void |
setExternalBuffer(Actor actor,
IOPort port,
Token[] buffer)
Specify a buffer to use for storing the array.
|
void |
setInputArray(IOPort port,
Actor actor)
Specifies the input array that will read the buffer allocated
as output.
|
void |
setOutputArray(IOPort port,
Actor actor)
Specifies the output array that will be read by the receiver.
|
void |
setReadParameters(java.lang.Integer[] repetitions)
Set repetitions of the actor containing the port that contains
the receiver.
|
get, getCapacity, getHistoryCapacity, historyElements, historySize, setCapacity, setHistoryCapacity, size
getContainer, getCurrentTime, getModelTime, setContainer, toString
int _positionIn
int _positionOut
int _currentCtrlPositionOut
int _headerSize
boolean _dynamic
java.util.List<Token> _header
int _originIn
int _patternSizeIn
int[] _repetitionsIn
java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> _patternIn
java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> _tilingIn
int _originOut
int _patternSizeOut
int[] _repetitionsOut
java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> _patternOut
java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> _tilingOut
java.util.LinkedHashMap<java.lang.String,java.lang.Integer> _jumpAddr
int _nbTokens
protected Token[] _buffer
protected java.util.LinkedHashMap<java.lang.String,java.lang.Integer> _sizes
java.lang.String[] _dimensions
public void checkArray(java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> baseSpec, java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> patternSpec, java.util.LinkedHashMap<java.lang.String,java.lang.Integer[]> tilingSpec, java.util.List<java.lang.String> dimensions) throws IllegalActionException
baseSpec
- The origin.patternSpec
- Fitting of the array.tilingSpec
- Paving of the array.dimensions
- Dimensions contained in the array.IllegalActionException
- FIXME: If what?public void clear()
clear
in interface Receiver
clear
in class SDFReceiver
public java.util.List<Token> elementList()
elementList
in interface Receiver
elementList
in class SDFReceiver
public void fillParameters(Actor actor, IOPort port)
actor
- The actor.port
- The port.public Token get() throws NoTokenException
get
in interface Receiver
get
in class SDFReceiver
NoTokenException
- If there is no token.public Token[] getArray(int numberOfTokens) throws NoTokenException
getArray
in interface Receiver
getArray
in class SDFReceiver
numberOfTokens
- The number of tokens to get in the
returned array.NoTokenException
- If there are not numberOfTokens
tokens.public boolean hasRoom()
hasRoom
in interface Receiver
hasRoom
in class SDFReceiver
public boolean hasRoom(int numberOfTokens)
hasRoom
in interface Receiver
hasRoom
in class SDFReceiver
numberOfTokens
- the number of needed places to put tokenspublic boolean hasToken()
hasToken
in interface Receiver
hasToken
in class SDFReceiver
public boolean hasToken(int numberOfTokens)
hasToken
in interface Receiver
hasToken
in class SDFReceiver
numberOfTokens
- the number of needed tokenspublic boolean isDynamic()
setDynamic(boolean)
public boolean isKnown()
isKnown
in interface Receiver
isKnown
in class AbstractReceiver
public void put(Token token)
put
in interface Receiver
put
in class SDFReceiver
token
- The token to put into the receiver.NoRoomException
- If there is no room in the receiver.public void putArray(Token[] tokenArray, int numberOfTokens) throws NoRoomException, IllegalActionException
putArray
in interface Receiver
putArray
in class AbstractReceiver
tokenArray
- The array containing tokens to put into this
receiver.numberOfTokens
- The number of elements of the token
array to put into this receiver.NoRoomException
- If the token array cannot be put.IllegalActionException
- If the token is not acceptable
to one of the ports (e.g., wrong type).public void putArrayToAll(Token[] tokens, int numberOfTokens, Receiver[] receivers) throws NoRoomException, IllegalActionException
putArrayToAll
in interface Receiver
putArrayToAll
in class AbstractReceiver
tokens
- The sequence of token to put.numberOfTokens
- The number of tokens to put (the array might
be longer).receivers
- The receivers.NoRoomException
- If there is no room for the token.IllegalActionException
- If the token is not acceptable
to one of the ports (e.g., wrong type).public void putToAll(Token token, Receiver[] receivers) throws NoRoomException, IllegalActionException
putToAll
in interface Receiver
putToAll
in class AbstractReceiver
token
- The token to put, or null to put no token.receivers
- The receivers.NoRoomException
- If there is no room for the token.IllegalActionException
- If the token is not acceptable
to one of the ports (e.g., wrong type).public void reset() throws IllegalActionException
reset
in interface Receiver
reset
in class AbstractReceiver
IllegalActionException
- If reset() is not supported by
the domain.public void setDynamic(boolean dynamic)
dynamic
- True if this receiver is dynamic.isDynamic()
public void setExternalBuffer(Actor actor, IOPort port, Token[] buffer)
actor
- The composite actor containing the PthalesDirector.port
- The external port.buffer
- The external buffer.public void setInputArray(IOPort port, Actor actor) throws IllegalActionException
port
- the associated portactor
- the associated actorIllegalActionException
public void setOutputArray(IOPort port, Actor actor) throws IllegalActionException
port
- the associated portactor
- the associated actorIllegalActionException
public void setReadParameters(java.lang.Integer[] repetitions)
repetitions
- An array of Integer repetitions.