001 /*
002 * ===========================================================================================
003 * = COPYRIGHT
004 *          PAX Computer Technology (Shenzhen) Co., Ltd. PROPRIETARY INFORMATION
005 *   This software is supplied under the terms of a license agreement or nondisclosure
006 *   agreement with PAX Computer Technology (Shenzhen) Co., Ltd. and may not be copied or
007 *   disclosed except in accordance with the terms in that agreement.
008 *     Copyright (C) 2017-2023 PAX Computer Technology (Shenzhen) Co., Ltd. All rights reserved.
009 * Description: // Detail description about the function of this module,
010 *             // interfaces with the other modules, and dependencies.
011 * Revision History:
012 * Date                         Author                        Action
013 * 2017/04/01                   PAX                     Create/Add/Modify/Delete
014 * ===========================================================================================
015 */
016 
017package com.pax.dal.entity;
018
019public class UartParam {
020
021    private EUartPort port;
022    private String attr;
023
024    /**
025     * <div class="zh"> 获取端口, {@link EUartPort} </div> <div class="en">Get uart port, {@link EUartPort} </div>
026     * 
027     * @return
028     */
029    public EUartPort getPort() {
030        return port;
031    }
032
033    /**
034     * <div class="zh"> 设置端口, {@link EUartPort} </div> <div class="en">Set uart port, {@link EUartPort} </div>
035     * 
036     */
037    public void setPort(EUartPort port) {
038        this.port = port;
039    }
040
041    /**
042     * <div class="zh"> 通信速度和格式 </div> <div class="en"> attribute </div>
043     * 
044     * @return
045     */
046    public String getAttr() {
047        return attr;
048    }
049
050    /**
051     * <div class="zh"> 设置通信速度和格式 。</div> <div class="en"> set Communication attribution </div>
052     * 
053     * @param attr
054     *            <div class="zh">
055     *            通信速度和格式。格式例如:“9600,8,N,1”表示波特率9600bps;数据位8;无奇偶校验;1位停止位。”,“将用于分割字符。不支持{"115200,7,o,1","115200,7,e,1"
056     *            ,"115200,7,e,2","115200,8,o,1","115200,8,e,1","115200,8,e,2"} </div> <div class="en"> Communication
057     *            speed<br/>
058     *            format For example: "9600,8,n,1" represents that the baud rate is 9600bps;<br/>
059     *            8 data bits; no parity; 1 stop bit."," will be used to separating characters. not
060     *            support{"115200,7,o,1","115200,7,e,1","115200,7,e,2","115200,8,o,1","115200,8,e,1","115200,8,e,2"}
061     *            </div>
062     */
063    public void setAttr(String attr) {
064        this.attr = attr;
065    }
066
067    public UartParam() {
068        this.port = EUartPort.COM1;
069        this.attr = "9600,8,n,1";
070    }
071
072}