亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? serialparameters.java

?? 利用JAVA采用網絡通訊的例子,支持weblogic及websphere
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
package collector.communication;

/* @(#)SerialParameters.java	1.5 98/07/17 SMI
 *
 * Copyright (c) 1998 Sun Microsystems, Inc. All Rights Reserved.
 *
 * Sun grants you ("Licensee") a non-exclusive, royalty free, license
 * to use, modify and redistribute this software in source and binary
 * code form, provided that i) this copyright notice and license appear
 * on all copies of the software; and ii) Licensee does not utilize the
 * software in a manner which is disparaging to Sun.
 *
 * This software is provided "AS IS," without a warranty of any kind.
 * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES,
 * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND
 * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY
 * LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE
 * SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS
 * BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
 * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES,
 * HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
 * OUT OF THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
 *
 * This software is not designed or intended for use in on-line control
 * of aircraft, air traffic, aircraft navigation or aircraft
 * communications; or in the design, construction, operation or
 * maintenance of any nuclear facility. Licensee represents and
 * warrants that it will not use or redistribute the Software for such
 * purposes.
 */

import javax.comm.*;

import collector.common.*;

/**
 * A class that stores parameters for serial ports.
 */
public class SerialParameters {
  private String portName;
  private int baudRate;
  private int flowControlIn;
  private int flowControlOut;
  private int databits;
  private int stopbits;
  private int parity;

  /**
       Default constructer. Sets parameters to no port, 9600 baud, no flow
       control, 8 data bits, 1 stop bit, no parity.
   */
  public SerialParameters() {
    this("",
         2400,
         SerialPort.FLOWCONTROL_NONE,
         SerialPort.FLOWCONTROL_NONE,
         SerialPort.DATABITS_8,
         SerialPort.STOPBITS_1,
         SerialPort.PARITY_NONE);
  }

  /**
       Paramaterized constructer.
       @param portName The name of the port.
       @param baudRate The baud rate.
       @param flowControlIn Type of flow control for receiving.
       @param flowControlOut Type of flow control for sending.
       @param databits The number of data bits.
       @param stopbits The number of stop bits.
       @param parity The type of parity.
   */
  public SerialParameters(String portName,
                          int baudRate,
                          int flowControlIn,
                          int flowControlOut,
                          int databits,
                          int stopbits,
                          int parity) {
    this.portName = portName;
    this.baudRate = baudRate;
    this.flowControlIn = flowControlIn;
    this.flowControlOut = flowControlOut;
    this.databits = databits;
    this.stopbits = stopbits;
    this.parity = parity;
  }

  /**
       Sets port name.
       @param portName New port name.
   */
  public void setPortName(String portName) {
    this.portName = portName;
  }

  /**
       Gets port name.
       @return Current port name.
   */
  public String getPortName() {
    return portName;
  }

  /**
       Sets baud rate.
       @param baudRate New baud rate.
   */
  public void setBaudRate(int baudRate) {
    this.baudRate = baudRate;
  }

  /**
       Sets baud rate.
       @param baudRate New baud rate.
   */
  public void setBaudRate(String baudRate) {
    this.baudRate = Integer.parseInt(baudRate);
  }

  /**
       Gets baud rate as an <code>int</code>.
       @return Current baud rate.
   */
  public int getBaudRate() {
    return baudRate;
  }

  /**
       Gets baud rate as a <code>String</code>.
       @return Current baud rate.
   */
  public String getBaudRateString() {
    return Integer.toString(baudRate);
  }

  /**
       Sets flow control for reading.
       @param flowControlIn New flow control for reading type.
   */
  public void setFlowControlIn(int flowControlIn) {
    this.flowControlIn = flowControlIn;
  }

  /**
       Sets flow control for reading.
       @param flowControlIn New flow control for reading type.
   */
  public void setFlowControlIn(String flowControlIn) {
    this.flowControlIn = stringToFlow(flowControlIn);
  }

  /**
       Gets flow control for reading as an <code>int</code>.
       @return Current flow control type.
   */
  public int getFlowControlIn() {
    return flowControlIn;
  }

  /**
       Gets flow control for reading as a <code>String</code>.
       @return Current flow control type.
   */
  public String getFlowControlInString() {
    return flowToString(flowControlIn);
  }

  /**
       Sets flow control for writing.
       @param flowControlIn New flow control for writing type.
   */
  public void setFlowControlOut(int flowControlOut) {
    this.flowControlOut = flowControlOut;
  }

  /**
       Sets flow control for writing.
       @param flowControlIn New flow control for writing type.
   */
  public void setFlowControlOut(String flowControlOut) {
    this.flowControlOut = stringToFlow(flowControlOut);
  }

  /**
       Gets flow control for writing as an <code>int</code>.
       @return Current flow control type.
   */
  public int getFlowControlOut() {
    return flowControlOut;
  }

  /**
       Gets flow control for writing as a <code>String</code>.
       @return Current flow control type.
   */
  public String getFlowControlOutString() {
    return flowToString(flowControlOut);
  }

  /**
       Sets data bits.
       @param databits New data bits setting.
   */
  public void setDatabits(int databits) {
    this.databits = databits;
  }

  /**
       Sets data bits.
       @param databits New data bits setting.
   */
  public void setDatabits(String databits) {
    if (databits.equals("5")) {
      this.databits = SerialPort.DATABITS_5;
    }
    if (databits.equals("6")) {
      this.databits = SerialPort.DATABITS_6;
    }
    if (databits.equals("7")) {
      this.databits = SerialPort.DATABITS_7;
    }
    if (databits.equals("8")) {
      this.databits = SerialPort.DATABITS_8;
    }
  }

  /**
       Gets data bits as an <code>int</code>.
       @return Current data bits setting.
   */
  public int getDatabits() {
    return databits;
  }

  /**
       Gets data bits as a <code>String</code>.
       @return Current data bits setting.
   */
  public String getDatabitsString() {
    switch (databits) {
      case SerialPort.DATABITS_5:
        return "5";
      case SerialPort.DATABITS_6:
        return "6";
      case SerialPort.DATABITS_7:
        return "7";
      case SerialPort.DATABITS_8:
        return "8";
      default:
        return "8";
    }
  }

  /**
       Sets stop bits.
       @param stopbits New stop bits setting.
   */
  public void setStopbits(int stopbits) {
    this.stopbits = stopbits;
  }

  /**
       Sets stop bits.
       @param stopbits New stop bits setting.
   */
  public void setStopbits(String stopbits) {
    if (stopbits.equals("1")) {
      this.stopbits = SerialPort.STOPBITS_1;
    }
    if (stopbits.equals("1.5")) {
      this.stopbits = SerialPort.STOPBITS_1_5;
    }
    if (stopbits.equals("2")) {
      this.stopbits = SerialPort.STOPBITS_2;
    }
  }

  /**
       Gets stop bits setting as an <code>int</code>.
       @return Current stop bits setting.
   */
  public int getStopbits() {
    return stopbits;
  }

  /**
       Gets stop bits setting as a <code>String</code>.
       @return Current stop bits setting.
   */
  public String getStopbitsString() {
    switch (stopbits) {
      case SerialPort.STOPBITS_1:
        return "1";
      case SerialPort.STOPBITS_1_5:
        return "1.5";
      case SerialPort.STOPBITS_2:
        return "2";
      default:
        return "1";
    }
  }

  /**
       Sets parity setting.
       @param parity New parity setting.
   */
  public void setParity(int parity) {
    this.parity = parity;
  }

  /**
       Sets parity setting.
       @param parity New parity setting.
   */
  public void setParity(String parity) {
    if (parity.equals("None")) {
      this.parity = SerialPort.PARITY_NONE;
    }
    if (parity.equals("Even")) {
      this.parity = SerialPort.PARITY_EVEN;
    }
    if (parity.equals("Odd")) {
      this.parity = SerialPort.PARITY_ODD;
    }
  }

  /**
       Gets parity setting as an <code>int</code>.
       @return Current parity setting.
   */
  public int getParity() {
    return parity;
  }

  /**
       Gets parity setting as a <code>String</code>.
       @return Current parity setting.
   */
  public String getParityString() {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产99精品视频| 一区二区三区在线免费观看| 免费看黄色91| 欧美一区二区福利视频| 久久99国内精品| 国产亚洲1区2区3区| 成人a区在线观看| 亚洲黄一区二区三区| 欧美日韩夫妻久久| 免费在线观看一区| 国产女人18水真多18精品一级做| 成人深夜视频在线观看| 亚洲欧美色一区| 日韩一二三区不卡| 国产91高潮流白浆在线麻豆| 亚洲人成在线播放网站岛国| 欧美剧在线免费观看网站| 精品伊人久久久久7777人| 欧美激情在线免费观看| 在线观看日韩高清av| 久久91精品国产91久久小草| 中文字幕精品一区二区三区精品| 91小视频免费看| 久久国产尿小便嘘嘘尿| 亚洲欧美综合另类在线卡通| 欧美日韩精品电影| 国产一区二区三区四区五区美女| 国产精品国产三级国产aⅴ入口| 精品视频在线免费观看| 国产一区 二区 三区一级| 亚洲欧美区自拍先锋| 欧美岛国在线观看| 色婷婷亚洲精品| 国产乱色国产精品免费视频| 亚洲精品福利视频网站| 2024国产精品| 欧美日韩另类一区| 菠萝蜜视频在线观看一区| 午夜成人免费电影| 1区2区3区精品视频| 精品国产伦一区二区三区观看体验| 99精品久久99久久久久| 久草在线在线精品观看| 一区二区三区四区高清精品免费观看| 精品国产乱码久久久久久图片 | 欧美美女激情18p| 国产成人在线视频播放| 午夜精品一区在线观看| **性色生活片久久毛片| 国产日产精品一区| 欧美成人一区二区| 欧美日本在线观看| 色综合久久精品| 99久久伊人久久99| 国产激情一区二区三区四区| 免费观看30秒视频久久| 亚洲自拍另类综合| 亚洲人快播电影网| 中文字幕一区免费在线观看| 国产亚洲精品bt天堂精选| 91精品国产高清一区二区三区| 欧美精品在线一区二区三区| 色噜噜狠狠成人中文综合 | 婷婷一区二区三区| 亚洲女女做受ⅹxx高潮| 国产精品成人免费| 国产欧美精品在线观看| 久久久精品影视| 精品99999| 久久综合九色综合97_久久久| 欧美一区二区三区免费视频| 精品视频一区二区不卡| 欧美日韩在线精品一区二区三区激情| 97精品超碰一区二区三区| 99国产精品一区| 97久久精品人人做人人爽50路| 成人午夜视频在线观看| 成人性生交大片免费看在线播放| 国产一区二区三区观看| 国产精品一区二区在线观看不卡| 另类中文字幕网| 国产精品一区二区果冻传媒| 国产乱子轮精品视频| 国产一级精品在线| 国产精品69毛片高清亚洲| 国产成人免费网站| 成人国产精品免费| 91免费观看在线| 欧美揉bbbbb揉bbbbb| 欧美肥胖老妇做爰| 精品卡一卡二卡三卡四在线| 精品国产免费人成在线观看| 欧美国产综合一区二区| 国产精品传媒视频| 一区二区三区精品在线| 亚洲成人免费视频| 精品一区二区三区久久久| 国产精品资源在线看| 99在线精品免费| 欧美午夜免费电影| 日韩精品一区二区三区视频| 久久久久久亚洲综合| 亚洲丝袜制服诱惑| 午夜在线电影亚洲一区| 久久精品国内一区二区三区| 国产精品一区2区| 91啪九色porn原创视频在线观看| 在线一区二区三区做爰视频网站| 69堂成人精品免费视频| 久久婷婷国产综合精品青草| 国产精品久久久久永久免费观看| 亚洲午夜久久久久久久久电影网| 日韩电影在线一区二区三区| 福利一区二区在线观看| 欧美日韩中字一区| 久久久久久久久伊人| 一二三四社区欧美黄| 久久精品免费观看| 91免费观看国产| 国产欧美日韩亚州综合| 亚洲国产日韩一级| 丰满白嫩尤物一区二区| 欧美系列日韩一区| 欧美国产丝袜视频| 五月婷婷综合在线| 成人动漫精品一区二区| 91精品一区二区三区在线观看| 亚洲国产精品精华液ab| 亚洲成年人影院| 99久久婷婷国产精品综合| 日韩一级成人av| 亚洲精品国产一区二区精华液 | 国产乱理伦片在线观看夜一区| 色综合久久66| 久久精品无码一区二区三区| 天天影视色香欲综合网老头| 成a人片亚洲日本久久| 精品国产一区二区亚洲人成毛片| 亚洲欧美一区二区三区国产精品| 国产一区二区三区精品视频| 在线观看日韩电影| 国产精品久久免费看| 国内精品免费**视频| 欧美精品日韩一本| 樱桃视频在线观看一区| 成人综合婷婷国产精品久久 | 成人网在线播放| 91麻豆精品国产91久久久久| 亚洲综合色成人| 色综合久久综合| 中文字幕在线视频一区| 国产乱码精品一区二区三区av | 欧美成人a视频| 肉色丝袜一区二区| 欧美色手机在线观看| 亚洲精品伦理在线| 日本丶国产丶欧美色综合| 国产精品久久久久四虎| 丁香五精品蜜臀久久久久99网站| 精品成人a区在线观看| 奇米888四色在线精品| 91麻豆精品国产91| 麻豆成人91精品二区三区| 4438x亚洲最大成人网| 亚洲第一久久影院| 欧美性猛片aaaaaaa做受| 一区二区在线电影| 欧美中文字幕一二三区视频| 亚洲电影中文字幕在线观看| 欧美在线你懂得| 亚洲成人1区2区| 日韩欧美一级片| 国模套图日韩精品一区二区| 久久日韩精品一区二区五区| 国模一区二区三区白浆| 国产日韩欧美高清| av毛片久久久久**hd| 亚洲精品乱码久久久久久日本蜜臀| 91福利视频在线| 三级精品在线观看| xnxx国产精品| www.亚洲免费av| 亚洲第一成人在线| 精品国内二区三区| 成人性视频网站| 国产最新精品免费| 国产日韩精品一区二区浪潮av| 不卡视频在线看| 亚洲影视在线观看| 欧美一区二区三区视频在线观看| 青娱乐精品在线视频| 久久久久成人黄色影片| av在线不卡电影| 亚洲国产成人va在线观看天堂| 日韩欧美国产综合一区| 岛国一区二区在线观看| 亚洲制服丝袜av| 欧美xxxx在线观看| 91美女片黄在线观看91美女| 亚洲成人1区2区|