Class ATokenAssign
Base class for functions that can be used to assign tokens in the downstream sequences of a transition
Inherited Members
Namespace: Xareus.Scenarios.TokenAssign
Assembly: Xareus.Scenarios.dll
Syntax
public abstract class ATokenAssign : AFunction
Constructors
ATokenAssign()
Base constructor for token assign
Declaration
protected ATokenAssign()
ATokenAssign(Transition, Dictionary<string, Parameter>, Dictionary<string, IContext>, List<string>, object, object, object, object)
Constructor for a token assign
Declaration
[Obsolete("Use AEffector(Transition, Dictionary<string, Parameter>, Dictionary<string, IContext>, List<string> , IContext, IContext, IContext, IContext) instead")]
protected ATokenAssign(Transition transition, Dictionary<string, Parameter> parameters, Dictionary<string, IContext> upstreamSequenceIdTokenMap, List<string> downstreamSequenceIdList, object externalContext, object scenarioContext, object sequenceContext, object eventContext)
Parameters
Type | Name | Description |
---|---|---|
Transition | transition | The transition holding the TokenAssign |
Dictionary<string, Parameter> | parameters | The parameters of the TokenAssign |
Dictionary<string, IContext> | upstreamSequenceIdTokenMap | The tokens of the upstream sequences |
List<string> | downstreamSequenceIdList | The Ids of the downstream sequences |
object | externalContext | The eternal context |
object | scenarioContext | The scenario context |
object | sequenceContext | The current token of the transition (merged by TokenMerge) |
object | eventContext | The event context, from the sensor that fired the transition |
ATokenAssign(Transition, Dictionary<string, Parameter>, Dictionary<string, IContext>, List<string>, IContext, IContext, IContext, IContext)
Constructor for a token assign
Declaration
protected ATokenAssign(Transition transition, Dictionary<string, Parameter> parameters, Dictionary<string, IContext> upstreamSequenceIdTokenMap, List<string> downstreamSequenceIdList, IContext externalContext, IContext scenarioContext, IContext sequenceContext, IContext eventContext)
Parameters
Type | Name | Description |
---|---|---|
Transition | transition | The transition holding the TokenAssign |
Dictionary<string, Parameter> | parameters | The parameters of the TokenAssign |
Dictionary<string, IContext> | upstreamSequenceIdTokenMap | The tokens of the upstream sequences |
List<string> | downstreamSequenceIdList | The Ids of the downstream sequences |
IContext | externalContext | The eternal context |
IContext | scenarioContext | The scenario context |
IContext | sequenceContext | The current token of the transition (merged by TokenMerge) |
IContext | eventContext | The event context, from the sensor that fired the transition |
Fields
downstreamSequenceIdList
List of the identifiers of the downstream sequences
Declaration
protected List<string> downstreamSequenceIdList
Field Value
Type | Description |
---|---|
List<string> |
eventContext
The context in which the event occurred
Declaration
protected IContext eventContext
Field Value
Type | Description |
---|---|
IContext |
externalContext
The external context
Declaration
protected IContext externalContext
Field Value
Type | Description |
---|---|
IContext |
scenarioContext
The scenario context
Declaration
protected IContext scenarioContext
Field Value
Type | Description |
---|---|
IContext |
sequenceContext
The context conveyed by the sequence
Declaration
protected IContext sequenceContext
Field Value
Type | Description |
---|---|
IContext |
upstreamSequenceIdTokenMap
Map of the identifiers of the upstream sequences and their token
Declaration
protected Dictionary<string, IContext> upstreamSequenceIdTokenMap
Field Value
Type | Description |
---|---|
Dictionary<string, IContext> |
Properties
Transition
The transition holding this Token Assign
Declaration
public Transition Transition { get; }
Property Value
Type | Description |
---|---|
Transition |
Methods
FillParameters()
Declaration
public virtual void FillParameters()
SetContexts(IContext, IContext)
Sets/Updates the contexts of the effector and update the parameters
Declaration
public void SetContexts(IContext sequenceContext, IContext eventContext)
Parameters
Type | Name | Description |
---|---|---|
IContext | sequenceContext | |
IContext | eventContext |
TokenAssign(Dictionary<string, IContext>)
Assigns tokens to the downstream sequences of a transition/event.
Declaration
public abstract void TokenAssign(Dictionary<string, IContext> downstreamSequenceIdTokenMap)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<string, IContext> | downstreamSequenceIdTokenMap | The dictionary containing the pairs of downstreamplace ids / token |