Click or drag to resize

LogicalNode class

Abstract base class for a node in the LogicalTaskTree.
Inheritance hierarchy
SystemObject
  NetEti.GlobalsGenericTreeLogicalNode
    LogicalTaskTreeLogicalNode
      LogicalTaskTreeNodeParent
      LogicalTaskTreeSingleNode
      LogicalTaskTreeUndefinedLogicalNodeClass

Namespace: LogicalTaskTree
Assembly: LogicalTaskTree (in LogicalTaskTree.dll) Version: 1.0.0+df0404e911d6c38eaed3bb1bb1acfc482d417643
Syntax
public abstract class LogicalNode : GenericTree<LogicalNode>,
	 
	IVishnuNode, INotifyPropertiesChanged

The LogicalNode Type exposes the following members.

Constructors
Properties
 NameDescription of the
Public PropertyBreakWithResult A subtree may already have a clear logical result, before all the children have finished their processing. If BreakWithResult=True, these are then cancelled if the no triggers are active on the branch in question.
Public PropertyCanTreeStart Indicates whether a (partial) tree can be started, i.e. that a node with children all its children can be started (recursively) or for an end node (checker) without children that can be started itself.
Public PropertyChildren List of the children of a node.
(Inherited from GenericTreeT)
Public PropertyDebugMode Additional test outputs can be made for True. Default: False.
Public PropertyId The unique identifier of the node.
Public PropertyIdInfo The unique identifier of the node (identical to the property Id).
Public PropertyIdPath Path to the node reduced to a chain of Ids separated by '/'.
Public PropertyInitNodes If True, all nodes in the tree are reset when this node is started. Can be used for loops in controlled jobs. Default: false.
Public PropertyIsActive If true, the subtree/node is in an active (started) state.
Public PropertyIsGlobal If true, this node is created as a reference node if anywhere in the tree (not only in the current job) the name of the node has already been found. If false, the system only searches for nodes with the same name in the current job. Default: false.
Public PropertyIsInSleepTime Returns true if a rest period defined by the user is currently in progress. for Vishnu actors (checkers) is running.
Public PropertyIsInSnapshot With True, this LogicalNode is located within a snapshot.
Public PropertyIsSnapshotDummy With True, this node is only used for display and does not allow any other functions.
Public PropertyLastExecutingTreeEvent The last triggering TreeEvent (for TreeEvent-triggered nodes) or zero.
Public PropertyLastLogical The last logical state of a node. For accessing the states of child nodes without re-initiate the determination of the statuses. Reduces the processor load.
Public PropertyLastLogicalState The last result state of a node. For accessing the states of child nodes without re-initiate the determination of the statuses. Reduces the processor load.
Public PropertyLastNotNullLogical Flag field for the last state of Logical that was not zero; is required so that workers are only started when the state of Logical has changed significantly and not every time, when the checker is working (Logical = zero).
Public PropertyLastResult Result for this node.
Public PropertyLastRun Time of the last start of the node.
Public PropertyLastState The last processing state of a node. For accessing the states of child nodes without re-initiate the determination of the statuses. Reduces the processor load.
Public PropertyLevel The hierarchy level of the node.
Public PropertyLevelInfo The hierarchy level of the node (identical to the property level).
Public PropertyLockName Optional name used for global locking. Is used if ThreadLocked is set.
Public PropertyLogger An optional logger that is activated for certain events is called or null.
Public PropertyLogical The logical state of a node; this is ultimately what the entire processing.
Public PropertyLogicalState The result state of the node: None, Start, Done, Fault, Timeout, UserAbort.
Public PropertyName "Human-friendly" representation of the node.
Public PropertyNameId Combination of name and Id of the node.
Public PropertyNameInfo "Human-friendly" representation of the node.
Public PropertyNextRun Time of the next start of the node (if known) or DateTime.MinValue.
Public PropertyNextRunInfo Info text about the next start of the node (if known) or null.
Public PropertyNodeType The node type: None, NodeConnector, ValueModifier, JobConnector, Constant, Checker, NodeList, JobList, Snapshot.
Public PropertyParentView The parent control in which this node is displayed.
Public PropertyPath The path to the node consisting of a chain of NameIds separated by '/': NameId is Name + "(" + Id + ")" for nodes with Name != null, only Id with name = null.
Public PropertyPathInfo The path to the node (identical to the Path property).
Public PropertyReferencedNodeId Id of an originally referenced node or null.
Public PropertyReferencedNodeName Name of an originally referenced node or null.
Public PropertyReferencedNodePath Path of an originally referenced node or null.
Public PropertySingleNodes Number of SingleNodes (ultimately checkers) at the end of a (sub)tree.
Public PropertySingleNodesFinished Percentage value for the proportion of terminated SingleNodes (ultimately checker) at the end of a (partial) tree.
Public PropertySleepTimeFrom The start of a possible rest period.
Public PropertySleepTimeTo The end of a possible rest period.
Public PropertyStartCollapsed With True, the job is displayed collapsed at startup if the UI supports this.
Public PropertyState The processing status of a node: None, Waiting, Working, Finished, Triggered, Ready (= Finished | Triggered), CanStart (= None|Ready), Busy (= Waiting | Working).
Public PropertyThreadLocked If True, each thread is locked via the class so that non-thread-safe checkers are serialized; Default: False;
Public PropertyTreeParams Additional parameters, some that apply to the entire tree validity and some node-specific parameters or zero.
Public PropertyTrigger An optional trigger that calls the job repeatedly or null (internally overrides BreakWithResult).
Public PropertyTriggeredRunDelay Delays the start of a node (and InitNodes). Can be used for loops in controlled jobs. Default: 0 (milliseconds).
Public PropertyTypeInfo The node type: None, NodeConnector, ValueModifier, Constant, Checker. NodeTypes
Public PropertyUserControlPath The path to the UserControl currently to be loaded dynamically.
Public PropertyWorkersState A collective status for all assigned workers.
Back to the top
Methods
 NameDescription of the
Public MethodStatic MemberAllowSnapshots Allows snapshots.
Public MethodBreak If necessary, log out of the trigger, Cancel the task via CancellationToken, set status.
Public MethodCanControlledTreeStart Specifies whether a (sub)tree can be started in a JobController, i.e. that the node and all its parents can be started (recursively).
Public MethodClimb2Top Shimmies up through the tree (up to the root) and calls up the action for each node.
(Inherited from GenericTreeT)
Protected MethodDoRun The actual, node type-specific processing; must be overwritten.
Public MethodEquals Compares the content of this LogicalNode according to logical aspects with the content of a transferred LogicalNode.
(Overwrites ObjectEquals(Object))
Protected MethodFindEventTriggers Searches for relevant triggers for an event.
Public MethodFindNodeById A derivative of LogicalNode can use this to create its own thread cause it to be cancelled.
Public MethodGetEnvironment Returns the ConcurrentDictionary Environment as simple Dictionary Results. Use the internal routine GetResultsFromResultList().
Public MethodGetHashCode Generates a hash code for this LogicalNode.
(Overwrites ObjectGetHashCode)
Public MethodGetlastEventSourceIfIsTreeEventTriggered Updates the values for TreeEvent-triggered nodes of the node before continuing to work with them. Is important in situations in which either the knot is the triggering TreeEvent has missed (at program start) or another TreeEvent was faster and led to a reaction, which leads to the current values of the node is required (JobSnapshotTrigger).
Public MethodGetResults Returns the ConcurrentDictionary ResultList as a simple Dictionary Results. Use the internal routine GetResultsFromResultList().
Public MethodGetTopRootJobList Returns the topmost Root-JobList valid for the node.
Public MethodInitFromNode Sets certain properties to the values of the transferred LogicalNode "source".
Protected MethodInitNode Resets the node to the start settings.
Public MethodInvalidate Deletes internal caches so that everything is re-evaluated.
Protected MethodStatic MemberLogWithDistinctTime Write a message with a short sleeptime before and after to ensure prompt processes can be visualised later in the log in chronological order.
Protected MethodMarkThreadAsInvalidIfActive Adds thread to the list of invalid threads, if the thread is still active.
Protected MethodOnLastNotNullLogicalChanged Triggers the NodeLastNotNullLogicalChanged event.
Protected MethodOnNodeBreaked Triggers the NodeBreaked event.
Protected MethodOnNodeProgressChanged Triggers the NodeProgressChanged event.
Public MethodOnNodeProgressFinished Triggers the NodeProgressFinished event.
Protected MethodOnNodeProgressStarted Triggers the NodeStarted event.
Protected MethodOnNodeWorkersStateChanged Triggers the NodeWorkersStateChanged event.
Public MethodStatic MemberPauseTree Stops processing in the tree.
Public MethodProcessTreeEvent Triggers further processing for the current TreeEvent (trigger, logger).
Public MethodStatic MemberProhibitSnapshots Prevents snapshots.
Protected MethodRaiseNodeLastNotNullLogicalChangedWithTreeEvent Triggers the TreeEvent "AnyLastNotNullLogicalHasChanged" and calls "OnNodeLastNotNullLogicalChanged".
Protected MethodRaiseNodeLogicalChanged Encapsulates the call of the non-inheritable NodeLogicalChanged event for for the derived classes NodeList and JobList. This routine ultimately forwards the event to the UI via NodeLogicalChanged.
Public MethodRefresh Ensures immediate re-evaluation of all cashed statuses.
Public MethodRegisterTriggeredNodes Registers all triggered nodes of a subtree with their triggers.
Public MethodReload Is called up when the subtree is to be reloaded.
Protected MethodResetAllTreeEventTriggeringNodes Resets all nodes in the subtree on which others depend via TreeEvent.
Protected MethodResetAllTreeNodes Resets all nodes in the entire tree.
Protected MethodResetPartTreeNodes Resets all nodes in the subtree from branch.
Public MethodStatic MemberResumeTree Allows a paused tree to continue running.
Public MethodRun Checks whether a node can be started and then starts the node, its trigger, or both (via StartNodeOrTrigger).
Public MethodSetTreeCollapsed Sets the StartCollapsed property for an entire (sub)tree.
Protected MethodSetWorkersState Sets a common (combined) NodeWorkerState 'WorkersState' for all NodeWorkers. Returns NodeWorkersState.
Protected MethodStatic MemberSleepIfNecessary Inserts System.Sleeps to relieve the system. Is more finely adjustable than fixed sleeps in nested inner loops.
Protected MethodThreadUpdateLastLogical Sets threadsafe LastLogical.
Protected MethodThreadUpdateLastLogicalState Sets threadsafe LastLogicalState.
Protected MethodThreadUpdateLastState Sets threadsafe LastState.
Public MethodToString Overridden ToString() method.
(Overwrites ObjectToString)
Public MethodTraverse(ActionInt32, T) Goes recursively through the tree and calls the action for each node.
(Inherited from GenericTreeT)
Public MethodTraverse(FuncInt32, T, Object, Object) Goes recursively through the tree and calls the action for each node.
(Inherited from GenericTreeT)
Protected MethodTraverse(Int32, ActionInt32, T) Recursive auxiliary routine for the public routine 'Traverse'.
(Inherited from GenericTreeT)
Protected MethodTraverse(Int32, FuncInt32, T, Object, Object, Object) Recursive auxiliary routine for the public routine 'Traverse'.
(Inherited from GenericTreeT)
Protected MethodUnMarkThreadAsInvalid Removes thread from the list of invalid threads.
Public MethodUnregisterTriggeredNode Sets the subtree to non-startable.
Public MethodUserBreak Is called up if the subtree has been deliberately stopped by the user.
Public MethodUserRun Starts the processing of this node after a start by the user. Gives the information that the start by the user in the TreeEvent to Run.
Back to the top
Events
 NameDescription of the
Public EventStatic MemberAllNodesStateChanged Is called up when the processing status of a node has changed.
Public EventExceptionCleared Is called when an exception is cleared.
Public EventExceptionRaised Is called if an exception has occurred.
Public EventNodeLastNotNullLogicalChanged Called when the logical result of a node has changed and is not equal to zero.
Public EventNodeLogicalChanged Is called when the logical result of a node has changed.
Public EventNodeProgressChanged Is called up when the processing progress of a node has changed.
Public EventNodeProgressFinished Is called when the processing of a node has been completed (regardless of the result).
Public EventNodeProgressStarted Is called up when a node has been started.
Public EventNodeResultChanged Is called up when the result of a node has changed. Serves to optimise the calculation of the logical state of the superordinate restart the node.
Public EventNodeStateChanged Is called up when the processing status of a node has changed.
Public EventNodeWorkersStateChanged Called when the overall status of the node assigned to the assigned worker has changed.
Public EventPropertiesChanged This event from IVishnuNode.INotifyPropertiesChanged can be subscribed to by LogicalNodeViewmodel. This receives a string list with property names via the transferred PropertiesChangedEventArgs and can in turn inform the UI via INotifyProperyChanged.
Back to the top
Fields
 NameDescription of the
Protected Field_lastRun Time of the last start of the node (internal field).
Protected Field_nextRunInfo Info text about the next start of the node (if known) or null (internal field).
Protected Field_parentViewLocker Used to block thread-safe access to ParentView.
Protected FieldAppSettings Application settings.
Protected FieldCancellationToken The CancellationTokenSource can be used to set this token to cancellation, which in this node leads to the call of the cancelNotification routine.
Protected FieldExceptionLocker Used to temporarily block exceptions.
Protected FieldIsRunRequired True: the node should be started.
Public FieldStatic MemberIsSnapshotProhibited Returns true if no snapshots are currently permitted.
Protected FieldIsTaskActiveOrScheduled True: the node is currently active or controlled by a timer.
Public FieldStatic MemberIsTreeFlushing Returns true if processing in the tree is currently to be stopped but logical changes that have already been created can still be distributed.
Public FieldStatic MemberIsTreePaused Returns true if processing in the tree has just been stopped.
Public FieldLastExceptions Exception that occurred during the last run or null;
Protected FieldLastLogicalLocker Used to temporarily block LastLogical.
Protected FieldLastLogicalStateLocker Used to temporarily lock LastLogicalState.
Protected FieldLastStateLocker Used to temporarily block LastState.
Public FieldMother The owner of the node.
(Inherited from GenericTreeT)
Protected FieldResultLocker Used to temporarily block results.
Public FieldRootJobList Next higher JobList for this node or the node itself, if it is a JobList.
Protected FieldSubLastNotNullLogicalLocker Used to temporarily block LastLogical.
Public FieldTreeRootJobList Top JobList.
Back to the top
Remarks
File: LogicalNode.cs Author: Erik Nagel 01.12.2012 Erik Nagel: created 06.08.2016 Erik Nagel: IVishnuNode implemented.
See also