📄 atcommand.java
字号:
package com.jzl.sirius.at;
public abstract class ATCommand implements ATResponse {
public static final int COMMAND_TYPE_READ = 0;
public static final int COMMAND_TYPE_TEST = 1;
public static final int COMMAND_TYPE_ACTION = 2;
private boolean finished = false;
private int resultCode = -1;
private int cmeErrorCode = -1;
private int cmsErrorCode = -1;
private boolean hasCmeErrorCode = false;
private boolean hasCmsErrorCode = false;
protected ATEngine engine;
public abstract String buildCommand();
public void execute(ATEngine engine, long timeout) throws ATException {
this.engine = engine;
engine.execute(this, timeout);
}
public void execute(ATEngine engine) throws ATException {
this.engine = engine;
engine.execute(this);
}
public boolean isTimeout() {
return !finished;
}
public boolean isFinished() {
return finished;
}
public void finish() {
finished = true;
}
// public void setTimeout(boolean timeout) {
// this.timeout = timeout;
// }
public int getResultCode() {
return resultCode;
}
protected void setResultCode(int resultCode) {
this.resultCode = resultCode;
}
public int getCmeErrorCode() {
return cmeErrorCode;
}
protected void setCmeErrorCode(int cmeErrorCode) {
this.cmeErrorCode = cmeErrorCode;
hasCmeErrorCode = true;
}
public int getCmsErrorCode() {
return cmsErrorCode;
}
protected void setCmsErrorCode(int cmsErrorCode) {
this.cmsErrorCode = cmsErrorCode;
hasCmsErrorCode = true;
}
public boolean hasCmeErrorCode() {
return hasCmeErrorCode;
}
public boolean hasCmsErrorCode() {
return hasCmsErrorCode;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -