Skip to content

Commit

Permalink
Fix docs for browseChildren
Browse files Browse the repository at this point in the history
  • Loading branch information
kanapuli committed Feb 5, 2025
1 parent 34fec62 commit 0ad19c5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion opcua_plugin/browse.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,17 @@ func sendError(ctx context.Context, err error, errChan chan<- error, logger Logg
}
}

// Add this helper function after the worker function
// browseChildren browses the child nodes of the given node and queues them as tasks.
// It only browses for variables and objects through hierarchical references.
// The child tasks are queued with an incremented level and the current node's path and ID as parent.
// Parameters:
// - ctx: Context for cancellation
// - task: The current node task being processed
// - def: Node definition containing path and ID information
// - taskChan: Channel to queue child tasks
// - taskWg: WaitGroup to track task completion
//
// Returns an error if browsing children fails
func browseChildren(ctx context.Context, task NodeTask, def NodeDef, taskChan chan NodeTask, taskWg *TrackedWaitGroup) error {
children, err := task.node.Children(ctx, id.HierarchicalReferences,
ua.NodeClassVariable|ua.NodeClassObject)
Expand Down

0 comments on commit 0ad19c5

Please sign in to comment.