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
019/**
020 * <div class="zh"> 电话线通信参数 </div> <div class="en"> Modem param </div>
021 * 
022 * @author Steven.W
023 * 
024 */
025public class ModemParam {
026
027    private String telNo1;
028    private String telNo2;
029    private String telNo3;
030    private String extNum;
031    private int delayTime;
032    private int level;
033    private int dp;
034    private int chdt;
035    private int dt1;
036    private int dt2;
037    private int ht;
038    private int wt;
039    private int ssetup;
040    private int redialTimes;
041    private int timeout;
042    private int asyncMode;
043    private boolean isDialBlocking;
044
045    /**
046     * <div class="zh"> 获取电话号码1 </div> <div class="en"> get telephone NO.1 </div>
047     * 
048     * @return
049     */
050    public String getTelNo1() {
051        return telNo1;
052    }
053
054    /**
055     * <div class="zh"> 设置电话号码1 </div> <div class="en"> set telephone NO.1 </div>
056     * 
057     * @param telNo1
058     */
059    public void setTelNo1(String telNo1) {
060        this.telNo1 = telNo1;
061    }
062
063    /**
064     * <div class="zh"> 获取电话号码2 </div> <div class="en"> get telephone NO.2 </div>
065     * 
066     * @return
067     */
068    public String getTelNo2() {
069        return telNo2;
070    }
071
072    /**
073     * <div class="zh"> 设置电话号码2 </div> <div class="en"> set telephone NO.2 </div>
074     * 
075     * @param telNo2
076     */
077    public void setTelNo2(String telNo2) {
078        this.telNo2 = telNo2;
079    }
080
081    /**
082     * <div class="zh"> 获取电话号码3 </div> <div class="en"> get telephone NO.3 </div>
083     * 
084     * @return
085     */
086    public String getTelNo3() {
087        return telNo3;
088    }
089
090    /**
091     * <div class="zh"> 设置电话号码3 </div> <div class="en"> set telephone NO.3 </div>
092     * 
093     * @param telNo3
094     */
095    public void setTelNo3(String telNo3) {
096        this.telNo3 = telNo3;
097    }
098
099    /**
100     * <div class="zh"> 获取外线号码 </div> <div class="en"> get EXT number </div>
101     * 
102     * @return
103     */
104    public String getExtNum() {
105        return extNum;
106    }
107
108    /**
109     * <div class="zh"> 设置外线号码 </div> <div class="en"> set EXT number </div>
110     * 
111     * @param extNum
112     */
113    public void setExtNum(String extNum) {
114        this.extNum = extNum;
115    }
116
117    /**
118     * <div class="zh"> 获取外线等待 时间 </div> <div class="en"> get delay time </div>
119     * 
120     * @return
121     */
122    public int getDelayTime() {
123        return delayTime;
124    }
125
126    /**
127     * <div class="zh"> 设置外线等待时间, ","个数 </div> <div class="en"> set delay time </div>
128     * 
129     * @param delayTime
130     */
131    public void setDelayTime(int delayTime) {
132        this.delayTime = delayTime;
133    }
134
135    /**
136     * <div class="zh"> 获取拨号电平 </div> <div class="en"> get dial level </div>
137     * 
138     * @return
139     */
140    public int getLevel() {
141        return level;
142    }
143
144    /**
145     * <div class="zh"> 设置拨号电平 </div> <div class="en"> set dial level </div>
146     * 
147     * @param level
148     */
149    public void setLevel(int level) {
150        this.level = level;
151    }
152
153    /**
154     * <div class="zh"> 获取音频/脉冲拨号, 参考{@link #setDp(int)} </div> <div class="en"> get tone/pulse dialing </div>
155     * 
156     * @return
157     */
158    public int getDp() {
159        return dp;
160    }
161
162    /**
163     * <div class="zh"> 设置音频/脉冲拨号 </div> <div class="en"> set tone/pulse dialing </div>
164     * 
165     * @param dp
166     *            <div class="zh">
167     *            <ul>
168     *            <li>0x00 -- 双音多频拨号</li>
169     *            <li>0x01 -- 脉冲拨号方式1(脉冲速率10/s;断续比1.6:1;号间间隔>=500ms)</li>
170     *            <li>0x02 -- 脉冲拨号方式2(脉冲速率10/s;断续比2:1;号间间隔>=600ms)</li>
171     *            <li>其他 -- 保留</li>
172     *            </ul>
173     *            </div> <div class="en">
174     *            <ul>
175     *            <li>0x00 -- DTMF(Dual Tone Multi Frequency) dialing</li>
176     *            <li>0x01 -- Pulse dialing 1(Pulse rate 10/s. Intermittent proportion 1.6:1;Signal interval>=500ms)</li>
177     *            <li>0x02 -- Pulse dialing 2(Pulse rate 10/s; Intermittent proportion 2:1; Signal interval >=600ms)</li>
178     *            <li>others -- Reserved</li>
179     *            </ul>
180     *            </div>
181     */
182    public void setDp(int dp) {
183        this.dp = dp;
184    }
185
186    /**
187     * <div class="zh"> 是否检测拨号音, 参考{@link #setChdt(int)} </div> <div class="en"> Check dialing tone,
188     * {@link #setChdt(int)} </div>
189     * 
190     * @return
191     */
192    public int getChdt() {
193        return chdt;
194    }
195
196    /**
197     * <div class="zh"> 设置是否检测拨号音 </div> <div class="en"> Check dialing tone </div>
198     * 
199     * @param chdt
200     *            <div class="zh">
201     *            <ul>
202     *            <li>D<SUB>0</SUB>
203     *            <ul>
204     *            <li>0 -- 检测拨号音</li>
205     *            <li>1 -- 不检测拨号音</li>
206     *            </ul>
207     *            </li>
208     *            <li>D<SUB>1</SUB>
209     *            <ul>
210     *            <li>0 -- 主叫拨号</li>
211     *            <li>1 -- 被叫/来铃应答</li>
212     *            </ul>
213     *            </li>
214     *            <li>D<SUB>2</SUB>
215     *            <ul>
216     *            <li>0 -- 检测并线电话占用(主叫拨号、非发号转人工接听方式时)</li>
217     *            <li>1 -- 不检测并线电话占用(主叫拨号、非发号转人工接听方式时)</li>
218     *            </ul>
219     *            </li>
220     *            <li>D<SUB>5</SUB>
221     *            <ul>
222     *            <li>0 -- 被叫应用时采用AT状态报告接口</li>
223     *            <li>1 -- 被叫应用时采用PAX远程下载状态报告接口</li>
224     *            </ul>
225     *            </li>
226     *            <li>D<SUB>6</SUB>
227     *            <ul>
228     *            <li>0 -- 维持SSETUP之低三位表示的超时时长</li>
229     *            <li>1 -- 将SSETUP之低三位表示的超时时长加倍</li>
230     *            </ul>
231     *            </li>
232     *            <li>D<SUB>7</SUB>
233     *            <ul>
234     *            <li>0 -- 异步2400bps连接采用标准ITU V.22bis连接;异步1200采用非标准的快速连接</li>
235     *            <li>1 -- 异步2400bps连接采用非标准的FastConnect快速连接方式(全机型)</li>
236     *            </ul>
237     *            </li>
238     *            <li>其他位 -- 保留</li>
239     *            </ul>
240     *            </div> <div class="en">
241     *            <ul>
242     *            <li>D<SUB>0</SUB>
243     *            <ul>
244     *            <li>0 -- Dial tone detection</li>
245     *            <li>1 -- Does not detect dial tone</li>
246     *            </ul>
247     *            </li>
248     *            <li>D<SUB>1</SUB>
249     *            <ul>
250     *            <li>0 -- Caller dialing</li>
251     *            <li>1 -- Called/answer the call</li>
252     *            </ul>
253     *            </li>
254     *            <li>D<SUB>2</SUB>
255     *            <ul>
256     *            <li>0 -- Detect the paralleled telephone occupation (Caller dialing、No assign number switch to
257     *            artificial answer mode)</li>
258     *            <li>1 -- Not detect the paralleled telephone occupation (Caller dialing、No assign number switch to
259     *            artificial answer mode)</li>
260     *            </ul>
261     *            </li>
262     *            <li>D<SUB>5</SUB>
263     *            <ul>
264     *            <li>0 -- Report interfaces with AT status during called application</li>
265     *            <li>1 -- Report interfaces with PAX remote download status during called application</li>
266     *            </ul>
267     *            </li>
268     *            <li>D<SUB>6</SUB>
269     *            <ul>
270     *            <li>0 -- Keep the timeout duration which expressed by the lower three bit of SSETUP</li>
271     *            <li>1 -- Double the timeout duration which expressed by the lower three bit of SSETUP</li>
272     *            </ul>
273     *            </li>
274     *            <li>D<SUB>7</SUB>
275     *            <ul>
276     *            <li>0 -- 2400bps connection using standard ITU V.22bis connection; 1200bps connection using
277     *            non-standard FastConnect method. For synchronous 9600bps connection, it will down to 2400/1200
278     *            non-standard FastConnection in the case of automatic speed down.</li>
279     *            <li>1 -- 2400bps connection is using non-standard FastConnect method (All the models); 1200bps
280     *            connection using standard ITU V.22bis connection. For synchronous 9600bps connection, it will down to
281     *            2400/1200 non-standard FastConnection in the case of automatic speed down.</li>
282     *            </ul>
283     *            </li>
284     *            <li>others -- Reserved.</li>
285     *            </ul>
286     *            </div>
287     * 
288     */
289    public void setChdt(int chdt) {
290        this.chdt = chdt;
291    }
292
293    /**
294     * <div class="zh"> 获取摘机后等候拨号音的最长时间(单位:100ms,最小和默认值为20,合法区间:20-255)当拨号音被检测到在此期间,退出等待。 </div> <div class="en"> The
295     * longest time to wait for dial tone when off hook (Unit: 100ms, Minimum and default value is 20, valid range
296     * 20~255). Exit waiting when the dial tone has been detected during this time </div>
297     * 
298     * @return
299     */
300    public int getDt1() {
301        return dt1;
302    }
303
304    /**
305     * <div class="zh"> 设置摘机后等候拨号音的最长时间(单位:100ms)最小值和缺省值为20,有效范围20~255<br/>
306     * 在此期间,只要检测到拨号音,就退出等候 </div> <div class="en"> The longest time to wait for dial tone when off hook (Unit: 100ms,
307     * Minimum and default value is 20, valid range 20~255). Exit waiting when the dial tone has been detected during
308     * this time </div>
309     * 
310     * @param dt1
311     */
312    public void setDt1(int dt1) {
313        this.dt1 = dt1;
314    }
315
316    /**
317     * <div class="zh"> 获取拨外线时“,”等待时间(单位:100ms) </div> <div class="en"> ","wait time when dial outside line (Unit:
318     * 100ms). This value will be set up according to the actual application environment, It is better to keep interface
319     * of manually setting in the application. (range 0~255) </div>
320     * 
321     * @return
322     */
323    public int getDt2() {
324        return dt2;
325    }
326
327    /**
328     * <div class="zh"> 拨外线时“,”等待时间(单位:100ms)此值要根据实际应用环境的情况设定,在应用程序中最好要留出手工设置的接口。 [范围0~255] </div> <div class="en">
329     * ","wait time when dial outside line (Unit: 100ms). This value will be set up according to the actual application
330     * environment, It is better to keep interface of manually setting in the application. (range 0~255) </div>
331     * 
332     * @param dt2
333     */
334    public void setDt2(int dt2) {
335        this.dt2 = dt2;
336    }
337
338    /**
339     * <div class="zh"> 获取双音拨号单一号码保持时间(单位:1ms,有效范围50~255) </div> <div class="en"> The keep time of two-tone dialing a
340     * single number (Unit:1ms,valid range 50~255) </div>
341     * 
342     * @return
343     */
344    public int getHt() {
345        return ht;
346    }
347
348    /**
349     * <div class="zh"> 双音拨号单一号码保持时间(单位:1ms,有效范围50~255) </div> <div class="en"> The keep time of two-tone dialing a
350     * single number (Unit:1ms,valid range 50~255) </div>
351     * 
352     * @param ht
353     */
354    public void setHt(int ht) {
355        this.ht = ht;
356    }
357
358    /**
359     * <div class="zh"> 获取双音拨号两个号码之间的间隔时间(单位:10ms,有效范围5~25) </div> <div class="en"> The interval time between two-tone
360     * dial-up two numbers (Unit:10ms, valid range 5~25) </div>
361     * 
362     * @return
363     */
364    public int getWt() {
365        return wt;
366    }
367
368    /**
369     * <div class="zh"> 双音拨号两个号码之间的间隔时间(单位:10ms,有效范围5~25) </div> <div class="en"> The interval time between two-tone
370     * dial-up two numbers (Unit:10ms, valid range 5~25) </div>
371     * 
372     * @param wt
373     */
374    public void setWt(int wt) {
375        this.wt = wt;
376    }
377
378    /**
379     * <div class="zh"> 获取通讯字节设置,参考{@link #setSsetup(int)} </div> <div class="en"> Communication bytes settings
380     * {@link #setSsetup(int)} </div>
381     * 
382     * @return
383     */
384    public int getSsetup() {
385        return ssetup;
386    }
387
388    /**
389     * <div class="zh"> 通讯字节的设置 </div> <div class="en"> Communication bytes settings </div>
390     * 
391     * @param ssetup
392     *            <div class="zh">
393     *            <ul>
394     *            <li>D<SUB>7</SUB>: 异步同步选择
395     *            <ul>
396     *            <li>0 -- 同步</li>
397     *            <li>1 -- 异步</li>
398     *            </ul>
399     *            </li>
400     *            <li>D<SUB>6</SUB>D<SUB>5</SUB>: 设置波特率
401     *            <ul>
402     *            <li>00 -- 1200</li>
403     *            <li>01 -- 2400</li>
404     *            <li>10 -- 9600</li>
405     *            <li>11 -- 14400</li>
406     *            </ul>
407     *            </li>
408     *            <li>D<SUB>4</SUB>D<SUB>3</SUB>: 线路制式(应答音检测方式)
409     *            <ul>
410     *            <li>10 -- BELL(仅适用于1200BPS)</li>
411     *            <li>11 -- CCITT</li>
412     *            <li>0X -- CCITT</li>
413     *            </ul>
414     *            </li>
415     *            <li>D<SUB>2</SUB>D<SUB>1</SUB>D<SUB>0</SUB>: 等待应答音的超时时间(0~7)
416     *            <ul>
417     *            <li>000 -- 5秒</li>
418     *            <li>001 -- 8秒</li>
419     *            <li>010 -- 11秒</li>
420     *            <li>011 -- 14秒</li>
421     *            <li>100 -- 17秒</li>
422     *            <li>101 -- 20秒</li>
423     *            <li>110 -- 23秒</li>
424     *            <li>111 -- 26秒</li>
425     *            </ul>
426     *            </li>
427     * 
428     *            </ul>
429     *            </div> <div class="en">
430     *            <ul>
431     *            <li>D<SUB>7</SUB>: asynchronous synchronization options
432     *            <ul>
433     *            <li>0 -- synchronous</li>
434     *            <li>1 -- asynchronous</li>
435     *            </ul>
436     *            </li>
437     *            <li>D<SUB>6</SUB>D<SUB>5</SUB>: set the baudrate
438     *            <ul>
439     *            <li>00 -- 1200</li>
440     *            <li>01 -- 2400</li>
441     *            <li>10 -- 9600</li>
442     *            <li>11 -- 14400</li>
443     *            </ul>
444     *            </li>
445     *            <li>D<SUB>4</SUB>D<SUB>3</SUB>: line format(detection mode of answer tone)
446     *            <ul>
447     *            <li>10 -- BELL(only applicable to 1200BPS)</li>
448     *            <li>11 -- CCITT</li>
449     *            <li>0X -- CCITT</li>
450     *            </ul>
451     *            </li>
452     *            <li>D<SUB>2</SUB>D<SUB>1</SUB>D<SUB>0</SUB>: Waiting for the timeout of response tone (0~7)
453     *            <ul>
454     *            <li>000 -- 5s</li>
455     *            <li>001 -- 8s</li>
456     *            <li>010 -- 11s</li>
457     *            <li>011 -- 14s</li>
458     *            <li>100 -- 17s</li>
459     *            <li>101 -- 20s</li>
460     *            <li>110 -- 23s</li>
461     *            <li>111 -- 26s</li>
462     *            </ul>
463     *            </li>
464     * 
465     *            </ul>
466     *            </div>
467     * 
468     * 
469     */
470    public void setSsetup(int ssetup) {
471        this.ssetup = ssetup;
472    }
473
474    /**
475     * <div class="zh"> 获取循环拨号总次数 </div> <div class="en"> Redial times,must be equal or greater than 1 </div>
476     * 
477     * @return
478     */
479    public int getRedialTimes() {
480        return redialTimes;
481    }
482
483    /**
484     * <div class="zh"> 循环拨号总次数,若为0则被转换成1, 拨完拨号串的所有号码为一次循环 [有效范围1~255] </div> <div class="en"> Redial times,must be
485     * equal or greater than 1 </div>
486     * 
487     * @param redialTimes
488     */
489    public void setRedialTimes(int redialTimes) {
490        this.redialTimes = redialTimes;
491    }
492
493    /**
494     * <div class="zh"> 获取超时时间 </div> <div class="en"> There is no application-layer data exchange in specified time,
495     * MODEM then hang up. Unit 10s, no timeout if it is 0. The maximum timeout of the model which support FSK function
496     * is 900s,and the model which has no FSK function is 650s </div>
497     * 
498     * @return
499     */
500    public int getTimeout() {
501        return timeout;
502    }
503
504    /**
505     * <div class="zh"> 规定的时间内没有应用层数据交换,MODEM则挂断,以10秒为单位,为0时无超时。支持FSK功能的机型最大值为900秒;无FSK功能机型最大值为650秒 </div> <div
506     * class="en"> There is no application-layer data exchange in specified time, MODEM then hang up. Unit 10s, no
507     * timeout if it is 0. The maximum timeout of the model which support FSK function is 900s,and the model which has
508     * no FSK function is 650s </div>
509     * 
510     * @param timeout
511     */
512    public void setTimeout(int timeout) {
513        this.timeout = timeout;
514    }
515
516    /**
517     * <div class="zh"> 获取异步通讯的速率(高4位)、字符格式(低四位), 参考{@link #setAsyncMode(int)} </div> <div class="en"> The rate of
518     * asynchronous communication (higher 4 bit)、Character format(lower 4 bit) {@link #setAsyncMode(int)} </div>
519     * 
520     * @return
521     */
522    public int getAsyncMode() {
523        return asyncMode;
524    }
525
526    /**
527     * <div class="zh"> 异步通讯的速率(高4位)、字符格式(低四位) </div> <div class="en"> The rate of asynchronous communication (higher 4
528     * bit)、Character format(lower 4 bit) </div>
529     * 
530     * @param asyncMode
531     *            <div class="zh">
532     *            <ul>
533     *            <li>D<SUB>3</SUB>D<SUB>2</SUB>D<SUB>1</SUB>D<SUB>0</SUB>
534     *            <ul>
535     *            <li>0 -- "8,n,1"</li>
536     *            <li>1 -- "8,e,1"</li>
537     *            <li>2 -- "8,o,1"</li>
538     *            <li>4 -- "7,e,1"</li>
539     *            <li>5 -- "7,o,1"</li>
540     *            <li>8 -- FSK 使用B202通信协议</li>
541     *            <li>9 -- FSK 使用V23C通信协议</li>
542     *            </ul>
543     *            </li> <li>D<SUB>7</SUB>D<SUB>6</SUB>D<SUB>5</SUB>D<SUB>4</SUB>
544     *            <ul>
545     *            <li>0 -- 由SSETUP的D6D5位决定</li>
546     *            <li>1 -- 1200 bps</li>
547     *            <li>2 -- 2400 bps</li>
548     *            <li>3 -- 4800 bps</li>
549     *            <li>4 -- 7200 bps</li>
550     *            <li>5 -- 9600 bps</li>
551     *            <li>6 -- 12000 bps</li>
552     *            <li>7 -- 14400 bps</li>
553     *            <li>8 -- 19200 bps</li>
554     *            <li>9 -- 24000 bps</li>
555     *            <li>10 -- 26400 bps</li>
556     *            <li>11 -- 28800 bps</li>
557     *            <li>12 -- 31200 bps</li>
558     *            <li>13 -- 33600 bps</li>
559     *            <li>14 -- 48000 bps</li>
560     *            <li>15 -- 56000 bps</li>
561     *            </ul>
562     *            </li> </ul> </div> <div class="en">
563     *            <ul>
564     *            <li>D<SUB>3</SUB>D<SUB>2</SUB>D<SUB>1</SUB>D<SUB>0</SUB>
565     *            <ul>
566     *            <li>0 -- "8,n,1"</li>
567     *            <li>1 -- "8,e,1"</li>
568     *            <li>2 -- "8,o,1"</li>
569     *            <li>4 -- "7,e,1"</li>
570     *            <li>5 -- "7,o,1"</li>
571     *            <li>8 -- FSK use the B202communication protocol</li>
572     *            <li>9 -- FSK use the V23Ccommunication protocol</li>
573     *            </ul>
574     *            </li> <li>D<SUB>7</SUB>D<SUB>6</SUB>D<SUB>5</SUB>D<SUB>4</SUB>
575     *            <ul>
576     *            <li>0 -- determined by D6D5 bit of SSETUP</li>
577     *            <li>1 -- 1200 bps</li>
578     *            <li>2 -- 2400 bps</li>
579     *            <li>3 -- 4800 bps</li>
580     *            <li>4 -- 7200 bps</li>
581     *            <li>5 -- 9600 bps</li>
582     *            <li>6 -- 12000 bps</li>
583     *            <li>7 -- 14400 bps</li>
584     *            <li>8 -- 19200 bps</li>
585     *            <li>9 -- 24000 bps</li>
586     *            <li>10 -- 26400 bps</li>
587     *            <li>11 -- 28800 bps</li>
588     *            <li>12 -- 31200 bps</li>
589     *            <li>13 -- 33600 bps</li>
590     *            <li>14 -- 48000 bps</li>
591     *            <li>15 -- 56000 bps</li>
592     *            </ul>
593     *            </li> </ul> </div>
594     * 
595     */
596    public void setAsyncMode(int asyncMode) {
597        this.asyncMode = asyncMode;
598    }
599
600    /**
601     * <div class="zh"> 是否阻塞模式 </div> <div class="en"> is dial blocking </div>
602     * 
603     * @return
604     */
605    public boolean isDialBlocking() {
606        return isDialBlocking;
607    }
608
609    /**
610     * <div class="zh"> 设置是否阻塞模式 </div> <div class="en"> set dial blocking </div>
611     * 
612     * @param isDialBlocking
613     */
614    public void setDialBlocking(boolean isDialBlocking) {
615        this.isDialBlocking = isDialBlocking;
616    }
617
618    public ModemParam() {
619        this.telNo1 = "00000000";
620        this.telNo2 = "00000000";
621        this.telNo3 = "00000000";
622        this.extNum = "";
623        this.delayTime = 0;
624        this.level = 11;
625        this.dp = 0;
626        this.chdt = 0;
627        this.dt1 = 40;
628        this.dt2 = 10;
629        this.ht = 100;
630        this.wt = 10;
631        this.ssetup = 4;
632        this.redialTimes = 1;
633        this.timeout = 7;
634        this.asyncMode = 0;
635        this.isDialBlocking = true;
636    }
637
638}