@Override public boolean addSensorToRoute(String sensorName,int mode){
  if (_controlSensorList.size() >= MAX_CONTROL_SENSORS) {
    log.warn("Reached maximum number of control Sensors for Route: {}",getSystemName());
  }
  ControlSensor sensor=new ControlSensor(sensorName);
  log.debug("addSensorToRoute {} {}",getSystemName(),sensorName);
  if (!sensor.setState(mode)) {
    return false;
  }
  if (isControlSensorIncluded(sensor)) {
    log.debug("Not adding duplicate control sensor {} to route {}",sensorName,getSystemName());
  }
 else {
    _controlSensorList.add(sensor);
  }
  return true;
}

@ Override public boolean addSensorToRoute ( String sensorName , int mode ) { if ( _controlSensorList . size ( ) >= MAX_CONTROL_SENSORS ) { log . warn ( "Reached maximum number of control Sensors for Route: {}" , getSystemName ( ) ) ; } ControlSensor sensor = new ControlSensor ( sensorName ) ; log . debug ( "addSensorToRoute {} {}" , getSystemName ( ) , sensorName ) ; if ( ! sensor . setState ( mode ) ) { return false ; } if ( isControlSensorIncluded ( sensor ) ) { log . debug ( "Not adding duplicate control sensor {} to route {}" , sensorName , getSystemName ( ) ) ; } else { _controlSensorList . add ( sensor ) ; } return true ; }
method to add a sensor to the list of control sensors for this route .
