1 /*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5
6 package net.sf.atmodem4j.core;
7
8 /*
9 * #%L
10 * ATModem4J Core
11 * %%
12 * Copyright (C) 2009 - 2014 atmodem4j
13 * %%
14 * atmodem4j - Drivers for the AT modem - http://atmodem4j.sourceforge.net/
15 * Copyright (C) 2009-2014, atmodem4j.sf.net, and individual contributors as indicated
16 * by the @authors tag. See the copyright.txt in the distribution for a
17 * full listing of individual contributors.
18 *
19 * This is free software; you can redistribute it and/or modify it
20 * under the terms of the GNU General Public License as
21 * published by the Free Software Foundation; either version 3 of
22 * the License, or (at your option) any later version.
23 *
24 * This software is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
28 *
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this software; if not, write to the Free
31 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
32 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
33 * #L%
34 */
35
36 import java.io.IOException;
37 import net.sf.atmodem4j.core.Modem.ModemCapabilities;
38
39 /**
40 *
41 * @author aploese
42 */
43 public class ItuV250Modem extends AbstractModem {
44
45 public ItuV250Modem() {
46 super();
47 }
48
49 @Override
50 public String getManufacturerId() throws IOException, InterruptedException {
51 return extractLineData(sendAndEctractData("AT+GMI"));
52 }
53
54 @Override
55 public String getModelId() throws IOException, InterruptedException {
56 return extractLineData(sendAndEctractData("AT+GMM"));
57 }
58
59 @Override
60 public String getRevisionId() throws IOException, InterruptedException {
61 return extractLineData(sendAndEctractData("AT+GMR"));
62 }
63
64 @Override
65 public String getSerialNumber() throws IOException, InterruptedException {
66 return extractLineData(sendAndEctractData("AT+GSN"));
67 }
68
69 @Override
70 public String getObjectId() throws IOException, InterruptedException {
71 return extractLineData(sendAndEctractData("AT+GOI"));
72 }
73
74 @Override
75 public ModemCapabilities[] getCapabilities() throws IOException, InterruptedException {
76 return ModemCapabilities.parseCapabilities(extractLineData(sendAndEctractData("AT+GCAP")));
77 }
78
79 @Override
80 public String getCountryOfInstallation() throws IOException,
81 InterruptedException {
82 return sendAndEctractData("AT+GCI?")[0];
83 }
84
85 }