Bug #45

NH - "WhenAllInstalled" not robust enough

Added by Thierry Rakotoarivelo over 3 years ago. Updated almost 3 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:Thierry Rakotoarivelo % Done:

100%

Category:OMF Software
Target version:OMF 5.1

Description

Component: NH
Problem:

Currently, the loop checking for "WhenAllInstalled" never stops when the experiment has a group of nodes which is NOT associated to any application. Thus "WhenAllInstalled" block is never triggered. This should be fixed to allow:

defGroup('myGroup', [1,1]) { }

WhenAllInstalled {
do stuff...
}

History

Updated by Saeed Attar over 3 years ago

  • Project changed from OMF for TinyOS to OMF
  • Category deleted (Documentation)
  • Target version deleted (2.4.0)

Updated by Thierry Rakotoarivelo almost 3 years ago

  • Category set to OMF Software
  • Status changed from New to Closed
  • Target version set to OMF 5.1
  • % Done changed from 0 to 100

Fixed.

The fix is to change the definition of the test, to check that all existing applications' state are in INSTALLED.OK.

This required an extension to 'whenAll' to allow it to perform 2 different types of tests.

The fix has been commited to the Trunk and Release-1.3 branch. The OEDL API for whenAll, whenAllUp, and whenAllInstalled have also been updated accordingly.

For reference, here is the new behaviour of 'whenAll'

  1. whenAll(nodesSelector, nodeTest, interval = 5, triggerValue = nil, &block) #
  2. This method has 2 behaviours:
  3. * if 'triggerValue' is nil, then 'nodeTest' should contain an XPath to
  4. match in the XML state tree of the nodes. The test for a given node
  5. will then return 'true' when a match is found for that node. #
  6. * if 'triggerValue' is set, then 'nodeTest' should contain an XPath to
  7. match in the XML state tree of the nodes. The test for a given node
  8. will then return 'true' if no match is found OR if a match is found
  9. and its value is equal to 'triggerValue'. Thus the test will return
  10. 'false' if a match is found but its value is different from
  11. 'triggerValue'.

Also available in: Atom PDF