@LogMessageDoc(level="ERROR",message="Tried to write to switch {switch} but got {error}",explanation="An I/O error occured while trying to write a " + "static flow to a switch",recommendation=LogMessageDoc.CHECK_SWITCH) private void writeOFMessagesToSwitch(long dpid,List<OFMessage> messages){
  IOFSwitch ofswitch=floodlightProvider.getSwitch(dpid);
  if (ofswitch != null) {
    try {
      if (log.isDebugEnabled()) {
        log.debug("Sending {} new entries to {}",messages.size(),dpid);
      }
      ofswitch.write(messages,null);
      ofswitch.flush();
    }
 catch (    IOException e) {
      log.error("Tried to write to switch {} but got {}",dpid,e.getMessage());
    }
  }
}

@ LogMessageDoc ( level = "ERROR" , message = "Tried to write to switch {switch} but got {error}" , explanation = "An I/O error occured while trying to write a " + "static flow to a switch" , recommendation = LogMessageDoc . CHECK_SWITCH ) private void writeOFMessagesToSwitch ( long dpid , List < OFMessage > messages ) { IOFSwitch ofswitch = floodlightProvider . getSwitch ( dpid ) ; if ( ofswitch != null ) { try { if ( log . isDebugEnabled ( ) ) { log . debug ( "Sending {} new entries to {}" , messages . size ( ) , dpid ) ; } ofswitch . write ( messages , null ) ; ofswitch . flush ( ) ; } catch ( IOException e ) { log . error ( "Tried to write to switch {} but got {}" , dpid , e . getMessage ( ) ) ; } } }
writes a list of ofmessages to a switch
