예제 #1
0
 void reInsertElapseTimeCond() {
   super.reInsertElapseTimeCond();
   for (int i = 0; i < conditions.length; i++) {
     if (conditions[i] != null) {
       conditions[i].reInsertElapseTimeCond();
     }
   }
 }
예제 #2
0
 /**
  * This goes through the AndOr tree to remove the various criterion from the BehaviorStructure.
  */
 void resetTree() {
   super.resetTree();
   for (int i = 0; i < conditions.length; i++) {
     if (conditions[i] != null) {
       conditions[i].resetTree();
     }
   }
 }
예제 #3
0
  /** This gets called when this condition is added to the AndOr tree. */
  void buildTree(WakeupCondition parent, int id, BehaviorRetained b) {
    super.buildTree(parent, id, b);

    for (int i = 0; i < conditions.length; i++) {
      if (conditions[i] != null) {
        conditions[i].buildTree(this, i, b);
      }
    }
  }
예제 #4
0
  /** This sets the bit for the given child, then checks if the full condition is met */
  void setConditionMet(int id, Boolean checkSchedulingRegion) {
    conditionsMet[id] = true;

    for (int i = 0; i < this.conditionsMet.length; i++) {
      if (!conditionsMet[i]) {
        return;
      }
    }

    if (parent == null) {
      super.setConditionMet(this.id, checkSchedulingRegion);
    } else {
      parent.setConditionMet(this.id, checkSchedulingRegion);
    }
  }