Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChildRelationships ¶
func CreateChildRelationships(actions []base.ActionStructure) ([]base.ActionStructure, error)
CreateChildRelationships establishes the relationship hierarchy between any actions that are dependent on others.
func StandardReconcile ¶
func StandardReconcile(device string, inCount int, actions []base.ActionStructure) ([]base.ActionStructure, int, error)
StandardReconcile determines the set of compatible actions, and then sorts them by device and priority.
Types ¶
type ActionReconciler ¶
type ActionReconciler interface { /* Reconcile takes a slice of ActionStructure objects, and returns a slice of slices representing a DAG representing execution order, e.g. each outer slice represents a level in the DAG It is the purpose of the reconcile function to allow control of the interplay of commands within a room (order of execution, mutually exclusive commands, etc.) The ActionStructure elements will be evaluated (executed) in the order returned from Reconcile. */ Reconcile([]base.ActionStructure, int) ([]base.ActionStructure, int, error) }
ActionReconciler is an interface that builds a reconciler for a room configuration. The purpose of a reconciler is to sort by device and priority.
type DefaultReconciler ¶
type DefaultReconciler struct{}
DefaultReconciler is the Default Reconciler Sorts by device, then by priority
func (*DefaultReconciler) Reconcile ¶
func (d *DefaultReconciler) Reconcile(actions []base.ActionStructure, inCount int) ([]base.ActionStructure, int, error)
Reconcile sorts through the list of actions to determine the execution order.
Click to show internal directories.
Click to hide internal directories.