![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
Instance of a watchdog. More...
Inherits org.lflang.generator.TriggerInstance< Watchdog >.
Public Member Functions | |
| Watchdog | getDefinition () |
| Set< ReactionInstance > | getDependentReactions () |
| Return the reaction instances that are triggered or read by this trigger. | |
| Set< ReactionInstance > | getDependsOnReactions () |
| Return the reaction instances that may send data via this port or action. | |
| int | getDepth () |
| Get the depth of the reactor instance. | |
| String | getFullName () |
| Return the full name of this instance, which has the form "a.b.c", where "c" is the name of this instance, "b" is the name of its container, and "a" is the name of its container, stopping at the container in main. | |
| String | getFullNameWithJoiner (String joiner) |
| Return a string of the form "a.b.c", where "." is replaced by the specified joiner, "c" is the name of this instance, "b" is the name of its container, and "a" is the name of its container, stopping at the container in main. | |
| ModeInstance | getMode (boolean direct) |
| Returns the directly/indirectly enclosing mode. | |
| String | getName () |
| ReactorInstance | getParent () |
| Return the parent or null if this is a top-level reactor. | |
| ReactorInstance | getReactor () |
| TimeValue | getTimeout () |
| int | getWidth () |
| Return the width of this instance, which in this base class is 1. | |
| boolean | hasParent (ReactorInstance container) |
| Return true if this instance has the specified parent (possibly indirectly, anywhere up the hierarchy). | |
| boolean | isReset () |
| Return true if this trigger is "startup". | |
| boolean | isShutdown () |
| Return true if this trigger is "shutdown". | |
| boolean | isStartup () |
| Return true if this trigger is "startup". | |
| List< ReactorInstance > | parents () |
| Return a list of all the parents starting with the root(). | |
| ReactorInstance | root () |
| Return the root reactor, which is the top-level parent. | |
| void | setWidth (int width) |
| Set the width. | |
| String | toString () |
| String | uniqueID () |
| Return an identifier for this instance, which has the form "a_b_c" or "a_b_c_n", where "c" is the name of this instance, "b" is the name of its container, and "a" is the name of its container, stopping at the container in main. | |
| WatchdogInstance (Watchdog definition, ReactorInstance reactor) | |
| Create a new watchdog instance associated with the given reactor instance. | |
Public Attributes | |
| Set< TriggerInstance<? extends Variable > > | effects = new LinkedHashSet<>() |
| The ports or actions that this reaction may write to. | |
Static Public Attributes | |
| static int | identifierLengthLimit |
| A limit on the number of characters returned by uniqueID. | |
Protected Attributes | |
| int | depth |
| The depth in the hierarchy of this instance. | |
Static Package Functions | |
| static TriggerInstance< BuiltinTriggerVariable > | builtinTrigger (BuiltinTriggerRef trigger, ReactorInstance parent) |
| Construct a new instance for a special builtin trigger. | |
Package Attributes | |
| Set< ReactionInstance > | dependentReactions |
| Reaction instances that are triggered or read by this trigger. | |
| Set< ReactionInstance > | dependsOnReactions |
| Reaction instances that may send data via this port or action. | |
| ReactorInstance | parent |
| The reactor instance that creates this instance. | |
| HashMap< String, Integer > | uniqueIDCount |
| Map from a name of the form a_b_c to the number of unique IDs with that prefix that have been already assigned. | |
| int | width |
| The width of this instance. | |
Instance of a watchdog.
Upon creation the actual delay is converted into a proper time value. If a parameter is referenced, it is looked up in the given (grand)parent reactor instance.
| org.lflang.generator.WatchdogInstance.WatchdogInstance | ( | Watchdog | definition, |
| ReactorInstance | reactor ) |
Create a new watchdog instance associated with the given reactor instance.
|
staticpackageinherited |
Construct a new instance for a special builtin trigger.
| trigger | The actual trigger definition. |
| parent | The reactor instance that creates this instance. |
| Watchdog org.lflang.generator.WatchdogInstance.getDefinition | ( | ) |
|
inherited |
Return the reaction instances that are triggered or read by this trigger.
If this port is an output, then the reaction instances belong to the parent of the port's parent. If the port is an input, then the reaction instances belong to the port's parent.
|
inherited |
Return the reaction instances that may send data via this port or action.
If this is an input port, then the reaction instance belongs to parent of the port's parent. If it is an output port, the reaction instance belongs to the port's parent. If it is an action, then the reaction belongs to the same parent as that of this action.
|
inherited |
Get the depth of the reactor instance.
This is 0 for the main reactor, 1 for reactors immediately contained therein, etc.
|
inherited |
Return the full name of this instance, which has the form "a.b.c", where "c" is the name of this instance, "b" is the name of its container, and "a" is the name of its container, stopping at the container in main.
If any reactor in the hierarchy is in a bank of reactors then, it will appear as a[index]. Similarly, if c is a port in a multiport, it will appear as c[index].
|
inherited |
Return a string of the form "a.b.c", where "." is replaced by the specified joiner, "c" is the name of this instance, "b" is the name of its container, and "a" is the name of its container, stopping at the container in main.
|
inherited |
Returns the directly/indirectly enclosing mode.
| direct | flag whether to check only for direct enclosing mode or also consider modes of parent reactor instances. |
| String org.lflang.generator.WatchdogInstance.getName | ( | ) |
|
inherited |
Return the parent or null if this is a top-level reactor.
| ReactorInstance org.lflang.generator.WatchdogInstance.getReactor | ( | ) |
| TimeValue org.lflang.generator.WatchdogInstance.getTimeout | ( | ) |
|
inherited |
Return the width of this instance, which in this base class is 1.
Subclasses PortInstance and ReactorInstance change this to the multiport and bank widths respectively.
|
inherited |
Return true if this instance has the specified parent (possibly indirectly, anywhere up the hierarchy).
|
inherited |
Return true if this trigger is "startup".
/
|
inherited |
Return true if this trigger is "shutdown".
|
inherited |
Return true if this trigger is "startup".
/
|
inherited |
Return a list of all the parents starting with the root().
|
inherited |
Return the root reactor, which is the top-level parent.
|
inherited |
Set the width.
This method is here for testing only and should not be used for any other purpose.
| width | The new width. |
| String org.lflang.generator.WatchdogInstance.toString | ( | ) |
|
inherited |
Return an identifier for this instance, which has the form "a_b_c" or "a_b_c_n", where "c" is the name of this instance, "b" is the name of its container, and "a" is the name of its container, stopping at the container in main.
All names are converted to lower case. The suffix n is usually omitted, but it is possible to get name collisions using the above scheme, in which case _n will be an increasing integer until there is no collision. If the length of the root of the name as calculated above (the root is without the _n suffix) is longer than the static variable identifierLengthLimit, then the name will be truncated. The returned name will be the tail of the name calculated above with the prefix ''.
|
packageinherited |
Reaction instances that are triggered or read by this trigger.
If this port is an output, then the reaction instances belong to the parent of the port's parent. If the port is an input, then the reaction instances belong to the port's parent.
|
packageinherited |
Reaction instances that may send data via this port or action.
If this is an input port, then the reaction instance belongs to parent of the port's parent. If it is an output port, the reaction instance belongs to the port's parent. If it is an action, then the reaction belongs belongs to the same parent as this action.
|
protectedinherited |
The depth in the hierarchy of this instance.
This is 0 for main or federated, 1 for the reactors immediately contained, etc.
| Set<TriggerInstance<? extends Variable> > org.lflang.generator.WatchdogInstance.effects = new LinkedHashSet<>() |
The ports or actions that this reaction may write to.
|
staticinherited |
A limit on the number of characters returned by uniqueID.
|
packageinherited |
The reactor instance that creates this instance.
|
packageinherited |
Map from a name of the form a_b_c to the number of unique IDs with that prefix that have been already assigned.
If none have been assigned, then there is no entry in this map. This map should be non-null only for the main reactor (the top level).
|
packageinherited |
The width of this instance.
This is 1 for everything except a PortInstance representing a multiport and a ReactorInstance representing a bank.