Function findNode

findNode -- find a node by name

LinkedList!(va_toolbox.linked_list.LinkListHeadExtras,va_toolbox.linked_list.LinkListNodeExtras)* findNode (
  LinkedList!(va_toolbox.linked_list.LinkListHeadExtras,va_toolbox.linked_list.LinkListNodeExtras)* list,
  string name
);

Traverse a system list until a node with the given name is found. To find multiple occurrences of a string, this function may be called with a node starting point.

No arbitration is done for access to the list! If multiple tasks access the same list, an arbitration mechanism such as Semaphores must be used.

Parameters

NameDescription
list a pointer to the target list header
name a pointer to a name string terminated with null

Returns

A pointer to the node with the same name, else null to indicate that the string was not found.

Example

ListNode* myNode; ... if ( myNode = myList.findNode("FooBar" )) { ... }

Notes

This function does not arbitrate for access to the list. The calling task must be the owner of the involved list.

Bugs

none

See

initListHead(), addNode(), remNode(), addNodeHead(), remNodeHead(), addNodeTail(), remNodeTail(), addNodeSorted(), findNode()