• Nils Goroll's avatar
    change semantics of the vcl 'auto' state and centralize vcl mgt · 424c7b85
    Nils Goroll authored
    Conceptually, the auto state was a variant of the warm state which
    would automatically cool the vcl. Yet, cooling did not only transition
    the temperature, but also the state, so 'auto' only worked one way -
    except that vcl.use or moving a label (by labeling another vcl) would
    also set 'auto', so a manual warm/cold setting would get lost.
    
    Now the auto-state will remain no matter the actual temperature or
    labeling, so when a vcl needs to implicitly change temperature (due to
    being used or being labeled), an auto vcl will remain auto, and a
    cold/warm vcl will change state, but never become 'auto' implicitly.
    
    The vcl state/temperature test v00003.vtc, besides testing the new
    auto semantics, now also checks for the right vcl.list output and has
    been reduced by a duplicate check (warm event check has been
    integrated into an existing warm event).
    
    On other code changes:
    
    * mgt_vcl_setstate
    
      is now only concerned with the state, the temperature will be
      changed implicitly if so required. The state will either end up
      changed or restored, depending on success.
    
      owner of changes to the (struct vclprog).state member
    
    * mgt_vcl_settemp
    
      responsible for the right action to change the temperature. For auto,
      it will only change the temperature, for non-auto, also the state.
    
      owner of changes to the (struct vclprog).warm member
    
    * mgt_vcl_tellchild
    
      Inform the child about a change and/or temperature change
    
    * mgt_vcl_set_cooldown
    
      Update the cooldown (go_cold) appropriately, should be called after
      a change/temperature change.
    
    Fixes #2834
    Closes #2801
    424c7b85