package brn.sim;

/**
 * an concrete {@link AbstractDriver}.
 * 
 * @author kurth
 */
public class BasicDriver extends AbstractDriver {

//  /*
//   * (non-Javadoc)
//   * @see brn.sim.AbstractDriver#setupApplication(brn.sim.AbstractParams, int, jist.swans.Node)
//   */
//  protected void setupApplication(AbstractParams opts, int nodeId, Node node) throws BuilderException {
//    super.setupApplication(opts, nodeId, node);
//    BasicParams params = (BasicParams)opts;
//    
//    //    transport
//    if (null != params.transParams) {
//      Builder builder = builderProvider.getBuilder(params.transParams);
//      AbstractTrans trans = (AbstractTrans) builder.build(params.transParams, node);
//      builderProvider.addHookUp(builder, params.transParams, node, trans);
//      node.addTransport(trans);
//    }
//
//    // app
//    if (null != params.trafficParams) {
//      Builder builder = builderProvider.getBuilder(params.trafficParams);
//      Object ret = builder.build(params.trafficParams, node);
//      builderProvider.addHookUp(builder, params.trafficParams, node, ret);
//    }
//  }
//
//  protected void runFile(String fileName) {
//    try {
//    AbstractParams params = (AbstractParams) Util.readObject(fileName);
//      params.db = true;
//      params.dbRes = "jdbc:mysql://localhost:3306/simulation";
//      params.dbDef = "jdbc:mysql://localhost:3306/simulation";
//      run(params);
//    } catch (Throwable e) {
//      e.printStackTrace();
//      System.exit(1);
//    }
//  }

//  /*
//   * (non-Javadoc)
//   * @see brn.sim.AbstractDriver#runLocal()
//   */
//  protected void runLocal() {
//    try {
//      DsrParams params = DsrParams.defaultParams();
//      run(params);
//    } catch (Exception e) {
//      throw new RuntimeException(e);
//    }
//  }

  public static void main(String[] args) throws Throwable {
    BasicDriver test = new BasicDriver();
    test.run(args);
  }

}
