示例#1
0
  bool SetpointManager_Impl::addToNode(Node & node)
  {
    if( node.model() != this->model() )
    {
      return false;
    }

    std::vector<SetpointManager> _setpointManagers = node.setpointManagers();
    if( !_setpointManagers.empty() )
    {
      for(auto it = _setpointManagers.begin();
        it != _setpointManagers.end();
        ++it)
      {
        if( istringEqual(this->controlVariable(), it->controlVariable()) )
        {
          it->remove();
        }
      }
    }

    if( OptionalAirLoopHVAC airLoop = node.airLoopHVAC() )
    {
      if( airLoop->supplyComponent(node.handle()) )
      {
        return this->setSetpointNode(node);
      }
      if(OptionalAirLoopHVACOutdoorAirSystem oaSystem = airLoop->airLoopHVACOutdoorAirSystem())
      {
        return this->setSetpointNode(node);
      }
    }
    return false;
  }
 std::string SetpointManagerScheduled_Impl::scheduleDisplayName() const {
   return scheduleDisplayName(controlVariable());
 }