Examples of EthernetParameters


Examples of br.org.scadabr.dnp34j.master.session.config.EthernetParameters

  public static void main(String[] args) {

    master = new ScadaBRInterface();

    try {
      master.initEthernet(new EthernetParameters("127.0.0.1", 20000), 1,
          2, 10);
    } catch (Exception e) {
      System.out.println("Falhou na Inicializa��o!");
      System.exit(0);
    }
View Full Code Here

Examples of br.org.scadabr.dnp34j.master.session.config.EthernetParameters

  private PhyLayer process(DNPConfig config) throws Exception {
    try {
      this.config = config;

      if (config.getCommType() == COMM.ETHERNET) {
        EthernetParameters parameters = (EthernetParameters) config
            .getCommConfig();
        setCommAddress(parameters.getHost());
        setPort(parameters.getPort());
        setPhyETHERNET(new PhyETHERNET(this));

        setInputStream(phyETHERNET.getInputStream());
        setOutputStream(phyETHERNET.getOutputStream());
      } else if (config.getCommType() == COMM.SERIAL) {
        SerialParameters parameters = (SerialParameters) config
            .getCommConfig();
        setCommAddress(parameters.getCommAddress());
        setBaudrate(parameters.getBaudrate());
        setDataBits(parameters.getDatabits());
        setStopBits(parameters.getStopbits());
        setParity(parameters.getParity());
        setPhySERIAL(new PhySERIAL(this));

        setInputStream(phySERIAL.getInputStream());
        setOutputStream(phySERIAL.getOutputStream());
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.