Commit f952d1c6 authored by captainwong's avatar captainwong

swig

parent 4b4cf3b7
generated/
.vscode/
.vs/
.VSCodeCounter/
......
This diff is collapsed.
......@@ -50,7 +50,7 @@ extern "C" {
// Prototypes
typedef uint32_t AdemcoId;
typedef uint8_t AdemcoGG;
typedef uint32_t AdemcoGG;
typedef uint32_t AdemcoZone;
//! 安定宝ID范围
......@@ -369,8 +369,10 @@ ADEMCO_EXPORT_SYMBOL int ademcoAppendDataSegment2(AdemcoDataSegment* dataSegment
ADEMCO_EXPORT_SYMBOL AdemcoParseResult ademcoParseDataSegment(const uint8_t* packet, int packet_len, AdemcoDataSegment* dataSegment);
// return 0 for empty packet, CONGWIN_FE100_PACKET_LEN for non-empty packet
ADEMCO_EXPORT_SYMBOL int ademcoDataSegmentToCongwinFe100(uint8_t* fe100, const AdemcoDataSegment* dataSegment);
ADEMCO_EXPORT_SYMBOL const uint8_t* ademcoXDataGetValidContentAddr(const AdemcoXDataSegment* xdata);
// get valid content length of xdata (except [len])
ADEMCO_EXPORT_SYMBOL int ademcoXDataGetValidContentLen(const AdemcoXDataSegment* xdata);
// return 0 if xdata's valid content is exactly the same as [buf, buf+buf_len)
ADEMCO_EXPORT_SYMBOL int ademcoXDataMemcmp(const AdemcoXDataSegment* xdata, const void* buf, int buf_len);
// return ADEMCO_OK for success, return ADEMCO_ERR for len is too long
ADEMCO_EXPORT_SYMBOL int ademcoMakeXData(AdemcoXDataSegment* xdata, AdemcoXDataLengthFormat xlf, AdemcoXDataTransform xtr, const uint8_t* content, int len);
......@@ -411,7 +413,7 @@ ADEMCO_EXPORT_SYMBOL AdemcoParseResult ademcoPacketParse(const uint8_t* buff, in
* Xor constant to output CRC : 0x0000
* Output for "123456789" : 0xBB3D
*/
ADEMCO_EXPORT_SYMBOL uint16_t ademcoCRC16(const char* buff, int len);
ADEMCO_EXPORT_SYMBOL uint16_t ademcoCRC16(const uint8_t* buff, int len);
/* Hengbo */
......@@ -779,7 +781,9 @@ ADEMCO_EXPORT_SYMBOL void hbSum(uint8_t* data, int len);
// 校验和是否正确, return 0 for incorrect, otherwise correct
ADEMCO_EXPORT_SYMBOL int hbCheckSum(const uint8_t* data, int len);
ADEMCO_EXPORT_SYMBOL HbComRequestType hbComParseRequest(const uint8_t* buff, int len);
ADEMCO_EXPORT_SYMBOL HbComRequestType hbComParseXDataRequest(const AdemcoXDataSegment* xdata);
ADEMCO_EXPORT_SYMBOL HbComResponseType hbComParseResponse(const uint8_t* buff, int len);
ADEMCO_EXPORT_SYMBOL void hbComMakeReqA0_getMachineStatus(HbComData* data);
......
This diff is collapsed.
import java.io.*;
import java.net.*;
import java.util.Arrays;
import java.util.regex.*;
import com.hb3344.ademco.AdemcoPacket;
import com.hb3344.ademco.AdemcoPacketId;
import com.hb3344.ademco.AdemcoParseResult;
import com.hb3344.ademco.SWIGTYPE_p_int;
import com.hb3344.ademco.libademco;
public class SimpleServerThread extends Thread {
private Socket socket;
private long lastTimeStatusChange = 0;
public SimpleServerThread(Socket socket) {
this.socket = socket;
}
/**
* 16进制表示的字符串转换为字节数组
*
* @param s 16进制表示的字符串
* @return byte[] 字节数组
*/
public static byte[] hexStringToByteArray(String s) {
int len = s.length();
byte[] b = new byte[len / 2];
for (int i = 0; i < len; i += 2) {
// 两位一组,表示一个字节,把这样表示的16进制字符串,还原成一个字节
b[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character
.digit(s.charAt(i + 1), 16));
}
return b;
}
public static String printable_bytes(byte[] b){
String HEX_STRING = "0123456789ABCDEF";
String s = "";
for(int i = 0; i < b.length; i++){
byte c = b[i];
if(32 <= c && c <= 127){
s += (char)c;
}else{
s += "\\x" + HEX_STRING.charAt(b[i] >>> 4);
s += HEX_STRING.charAt(b[i] & 0x0F);
}
}
return s;
}
public void run() {
try {
InputStream input = socket.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(input));
OutputStream output = socket.getOutputStream();
PrintWriter writer = new PrintWriter(output, true);
// String line;
// // 创建 Pattern 对象
// String pattern1 = "\"(.+)\"(\\d{4}).+\\#(.+)\\[";
// Pattern r1 = Pattern.compile(pattern1);
// String pattern2 = "\\[\\#([\\d\\|a-fA-F]{6})\\|(\\d{4})\\s(\\d{2})\\s(\\d{3})\\]";
// Pattern r2 = Pattern.compile(pattern2);
//char[] cache = new char[0];
while(true){
String line = reader.readLine();
System.out.println(line);
//cache = append(cache, b2c(line.getBytes()));
SWIGTYPE_p_int cb = libademco.new_intp();
AdemcoPacket pkt = new AdemcoPacket();
AdemcoParseResult res = libademco.ademcoPacketParse(line.getBytes(), line.length(), pkt, cb);
System.out.println(res);
switch(res) {
case RESULT_OK:
//cache = Arrays.copyOfRange(cache, libademco.intp_value(cb), cache.length - libademco.intp_value(cb));
handle(pkt, writer);
break;
case RESULT_NOT_ENOUGH:
break;
case RESULT_ERROR:
//cache = new char[0];
break;
}
//line = reader.readLine();
//if(line==null)continue;
//System.out.println(line);
// // 现在创建 matcher 对象
// Matcher m = r1.matcher(line);
// if (m.find()) {
// String id = m.group(1);
// int seq = Integer.parseInt(m.group(2));
// String acct = m.group(3);
// System.out.println("Found id: " + id);
// System.out.println("Found seq: " + seq);
// System.out.println("Found acct: " + acct);
// switch(id){
// case "ACK":break;
// case "NULL": // reply ack
// {
// String ack = lib.packAck(seq, acct);
// System.out.println("replying ack:" + ack);
// writer.write(ack);
// writer.flush();
// break;
// }
// case "HENG-BO":
// case "ADM-CID":
// {
// // reply ack
// String ack = lib.packAck(seq, acct);
// System.out.println("replying ack:" + ack);
// writer.write(ack);
// writer.flush();
// // handle event
// m = r2.matcher(line);
// if (m.find()) {
// int ademco_id16 = Integer.parseInt(m.group(1), 16);
// int ademco_event = Integer.parseInt(m.group(2));
// int gg = Integer.parseInt(m.group(3));
// int zone = Integer.parseInt(m.group(4));
// System.out.println("Found ademco_event: " + ademco_event);
// System.out.println("Found gg: " + gg);
// System.out.println("Found zone: " + zone);
// // 主机状态改变间隔超过5秒,则触发一次远程控制命令发送给主机
// if(ademco_event == 3400 || ademco_event == 1400){
// long now = System.currentTimeMillis();
// if(now - lastTimeStatusChange > 5000){
// lastTimeStatusChange = now;
// if(ademco_event == 3400){ // 布防则发撤防命令
// String cmd = lib.pack2(seq+1, acct, ademco_id16, 1400, 0, 0, "123456");
// byte[] data = hexStringToByteArray(cmd);
// System.out.println("sending 1400 command:" + printable_bytes(data));
// output.write(data);
// output.flush();
// }else{ // 撤防就发布防命令
// String cmd = lib.pack(seq+1, acct, ademco_id16, 3400, 0, 0);
// System.out.println("sending 3400 command:" + cmd);
// writer.write(ack);
// writer.flush();
// }
// }
// }
// }else{
// System.out.println("r2 NO MATCH");
// }
// break;
// }
// }
// } else {
// System.out.println("r1 NO MATCH");
// }
}
} catch (IOException ex) {
System.out.println("Server exception: " + ex.getMessage());
ex.printStackTrace();
}
}
public void handle(AdemcoPacket pkt, PrintWriter writer){
switch(pkt.getId()){
case AID_NULL:
libademco.ademcoMakeAckPacket2(pkt, pkt.getSeq(), pkt.getAcct(), 0l);
writer.write(b2c(pkt.getRaw()), pkt.getRaw_len(), 0);
break;
case AID_ACK:
break;
case AID_HB:
case AID_ADM_CID:
}
}
}
\ No newline at end of file
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class AdemcoDataSegment {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected AdemcoDataSegment(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(AdemcoDataSegment obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libademcoJNI.delete_AdemcoDataSegment(swigCPtr);
}
swigCPtr = 0;
}
}
public void setRaw(byte[] value) {
libademcoJNI.AdemcoDataSegment_raw_set(swigCPtr, this, value);
}
public byte[] getRaw() {
return libademcoJNI.AdemcoDataSegment_raw_get(swigCPtr, this);
}
public void setRaw_len(int value) {
libademcoJNI.AdemcoDataSegment_raw_len_set(swigCPtr, this, value);
}
public int getRaw_len() {
return libademcoJNI.AdemcoDataSegment_raw_len_get(swigCPtr, this);
}
public void setAdemcoId(long value) {
libademcoJNI.AdemcoDataSegment_ademcoId_set(swigCPtr, this, value);
}
public long getAdemcoId() {
return libademcoJNI.AdemcoDataSegment_ademcoId_get(swigCPtr, this);
}
public void setAdemcoEvent(AdemcoEvent value) {
libademcoJNI.AdemcoDataSegment_ademcoEvent_set(swigCPtr, this, value.swigValue());
}
public AdemcoEvent getAdemcoEvent() {
return AdemcoEvent.swigToEnum(libademcoJNI.AdemcoDataSegment_ademcoEvent_get(swigCPtr, this));
}
public void setGg(long value) {
libademcoJNI.AdemcoDataSegment_gg_set(swigCPtr, this, value);
}
public long getGg() {
return libademcoJNI.AdemcoDataSegment_gg_get(swigCPtr, this);
}
public void setZone(long value) {
libademcoJNI.AdemcoDataSegment_zone_set(swigCPtr, this, value);
}
public long getZone() {
return libademcoJNI.AdemcoDataSegment_zone_get(swigCPtr, this);
}
public AdemcoDataSegment() {
this(libademcoJNI.new_AdemcoDataSegment(), true);
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum AdemcoEvent {
EVENT_INVALID_EVENT(libademcoJNI.EVENT_INVALID_EVENT_get()),
EVENT_ARM(libademcoJNI.EVENT_ARM_get()),
EVENT_DISARM(libademcoJNI.EVENT_DISARM_get()),
EVENT_HALFARM_1456(libademcoJNI.EVENT_HALFARM_1456_get()),
EVENT_HALFARM(libademcoJNI.EVENT_HALFARM_get()),
EVENT_EMERGENCY(libademcoJNI.EVENT_EMERGENCY_get()),
EVENT_BURGLAR(libademcoJNI.EVENT_BURGLAR_get()),
EVENT_DOORRINGING(libademcoJNI.EVENT_DOORRINGING_get()),
EVENT_FIRE(libademcoJNI.EVENT_FIRE_get()),
EVENT_DURESS(libademcoJNI.EVENT_DURESS_get()),
EVENT_GAS(libademcoJNI.EVENT_GAS_get()),
EVENT_WATER(libademcoJNI.EVENT_WATER_get()),
EVENT_TAMPER(libademcoJNI.EVENT_TAMPER_get()),
EVENT_ZONE_TAMPER(libademcoJNI.EVENT_ZONE_TAMPER_get()),
EVENT_BYPASS(libademcoJNI.EVENT_BYPASS_get()),
EVENT_BYPASS_RESUME(libademcoJNI.EVENT_BYPASS_RESUME_get()),
EVENT_AC_BROKE(libademcoJNI.EVENT_AC_BROKE_get()),
EVENT_AC_RECOVER(libademcoJNI.EVENT_AC_RECOVER_get()),
EVENT_LOWBATTERY(libademcoJNI.EVENT_LOWBATTERY_get()),
EVENT_BATTERY_RECOVER(libademcoJNI.EVENT_BATTERY_RECOVER_get()),
EVENT_BADBATTERY(libademcoJNI.EVENT_BADBATTERY_get()),
EVENT_BADBATTERY_RECOVER(libademcoJNI.EVENT_BADBATTERY_RECOVER_get()),
EVENT_SOLARDISTURB(libademcoJNI.EVENT_SOLARDISTURB_get()),
EVENT_SOLARDISTURB_RECOVER(libademcoJNI.EVENT_SOLARDISTURB_RECOVER_get()),
EVENT_DISCONNECT(libademcoJNI.EVENT_DISCONNECT_get()),
EVENT_RECONNECT(libademcoJNI.EVENT_RECONNECT_get()),
EVENT_BATTERY_EXCEPTION(libademcoJNI.EVENT_BATTERY_EXCEPTION_get()),
EVENT_BATTERY_EXCEPTION_RECOVER(libademcoJNI.EVENT_BATTERY_EXCEPTION_RECOVER_get()),
EVENT_OTHER_EXCEPTION(libademcoJNI.EVENT_OTHER_EXCEPTION_get()),
EVENT_OTHER_EXCEPTION_RECOVER(libademcoJNI.EVENT_OTHER_EXCEPTION_RECOVER_get()),
EVENT_LOST(libademcoJNI.EVENT_LOST_get()),
EVENT_LOST_RECOVER(libademcoJNI.EVENT_LOST_RECOVER_get()),
EVENT_3100(libademcoJNI.EVENT_3100_get()),
EVENT_SERIAL485DIS(libademcoJNI.EVENT_SERIAL485DIS_get()),
EVENT_SERIAL485CONN(libademcoJNI.EVENT_SERIAL485CONN_get()),
EVENT_CONN_HANGUP(libademcoJNI.EVENT_CONN_HANGUP_get()),
EVENT_CONN_RESUME(libademcoJNI.EVENT_CONN_RESUME_get()),
EVENT_DISARM_PWD_ERR(libademcoJNI.EVENT_DISARM_PWD_ERR_get()),
EVENT_SUB_MACHINE_SENSOR_EXCEPTION(libademcoJNI.EVENT_SUB_MACHINE_SENSOR_EXCEPTION_get()),
EVENT_SUB_MACHINE_SENSOR_RESUME(libademcoJNI.EVENT_SUB_MACHINE_SENSOR_RESUME_get()),
EVENT_SUB_MACHINE_POWER_EXCEPTION(libademcoJNI.EVENT_SUB_MACHINE_POWER_EXCEPTION_get()),
EVENT_SUB_MACHINE_POWER_RESUME(libademcoJNI.EVENT_SUB_MACHINE_POWER_RESUME_get()),
EVENT_COM_PASSTHROUGH(libademcoJNI.EVENT_COM_PASSTHROUGH_get()),
EVENT_ENTER_SET_MODE(libademcoJNI.EVENT_ENTER_SET_MODE_get()),
EVENT_EXIT_SET_MODE(libademcoJNI.EVENT_EXIT_SET_MODE_get()),
EVENT_QUERY_SUB_MACHINE(libademcoJNI.EVENT_QUERY_SUB_MACHINE_get()),
EVENT_WRITE_TO_MACHINE(libademcoJNI.EVENT_WRITE_TO_MACHINE_get()),
EVENT_I_AM_NET_MODULE(libademcoJNI.EVENT_I_AM_NET_MODULE_get()),
EVENT_I_AM_GPRS(libademcoJNI.EVENT_I_AM_GPRS_get()),
EVENT_I_AM_LCD_MACHINE(libademcoJNI.EVENT_I_AM_LCD_MACHINE_get()),
EVENT_I_AM_WIRE_MACHINE(libademcoJNI.EVENT_I_AM_WIRE_MACHINE_get()),
EVENT_I_AM_WIFI_MACHINE(libademcoJNI.EVENT_I_AM_WIFI_MACHINE_get()),
EVENT_I_AM_3_SECTION_MACHINE(libademcoJNI.EVENT_I_AM_3_SECTION_MACHINE_get()),
EVENT_I_AM_IOT_MACHINE(libademcoJNI.EVENT_I_AM_IOT_MACHINE_get()),
EVENT_I_AM_TRUE_COLOR(libademcoJNI.EVENT_I_AM_TRUE_COLOR_get()),
EVENT_I_AM_GPRS_IOT(libademcoJNI.EVENT_I_AM_GPRS_IOT_get()),
EVENT_I_AM_GPRS_PHONE(libademcoJNI.EVENT_I_AM_GPRS_PHONE_get()),
EVENT_I_AM_NB_MACHINE(libademcoJNI.EVENT_I_AM_NB_MACHINE_get()),
EVENT_PHONE_USER_SOS(libademcoJNI.EVENT_PHONE_USER_SOS_get()),
EVENT_PHONE_USER_CANCLE_ALARM(libademcoJNI.EVENT_PHONE_USER_CANCLE_ALARM_get()),
EVENT_ENTER_SETTING_MODE(libademcoJNI.EVENT_ENTER_SETTING_MODE_get()),
EVENT_EXIT_SETTING_MODE(libademcoJNI.EVENT_EXIT_SETTING_MODE_get()),
EVENT_RESTORE_FACTORY_SETTINGS_710(libademcoJNI.EVENT_RESTORE_FACTORY_SETTINGS_710_get()),
EVENT_RESTORE_FACTORY_SETTINGS(libademcoJNI.EVENT_RESTORE_FACTORY_SETTINGS_get()),
EVENT_SIM_IS_IOT_CARD(libademcoJNI.EVENT_SIM_IS_IOT_CARD_get()),
EVENT_SIM_IS_IOT_PLATFORM_CARD(libademcoJNI.EVENT_SIM_IS_IOT_PLATFORM_CARD_get()),
EVENT_SIM_IS_NOT_IOT_CARD(libademcoJNI.EVENT_SIM_IS_NOT_IOT_CARD_get()),
EVENT_WHAT_IS_YOUR_TYPE(libademcoJNI.EVENT_WHAT_IS_YOUR_TYPE_get()),
EVENT_SIGNAL_STRENGTH_CHANGED(libademcoJNI.EVENT_SIGNAL_STRENGTH_CHANGED_get()),
EVENT_OFFLINE(libademcoJNI.EVENT_OFFLINE_get()),
EVENT_ONLINE(libademcoJNI.EVENT_ONLINE_get());
public final int swigValue() {
return swigValue;
}
public static AdemcoEvent swigToEnum(int swigValue) {
AdemcoEvent[] swigValues = AdemcoEvent.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (AdemcoEvent swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + AdemcoEvent.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private AdemcoEvent() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private AdemcoEvent(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private AdemcoEvent(AdemcoEvent swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum AdemcoEventLevel {
EVENT_LEVEL_NULL,
EVENT_LEVEL_STATUS,
EVENT_LEVEL_EXCEPTION_RESUME,
EVENT_LEVEL_EXCEPTION,
EVENT_LEVEL_ALARM;
public final int swigValue() {
return swigValue;
}
public static AdemcoEventLevel swigToEnum(int swigValue) {
AdemcoEventLevel[] swigValues = AdemcoEventLevel.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (AdemcoEventLevel swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + AdemcoEventLevel.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private AdemcoEventLevel() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private AdemcoEventLevel(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private AdemcoEventLevel(AdemcoEventLevel swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class AdemcoPacket {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected AdemcoPacket(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(AdemcoPacket obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libademcoJNI.delete_AdemcoPacket(swigCPtr);
}
swigCPtr = 0;
}
}
public void setCrc(int value) {
libademcoJNI.AdemcoPacket_crc_set(swigCPtr, this, value);
}
public int getCrc() {
return libademcoJNI.AdemcoPacket_crc_get(swigCPtr, this);
}
public void setLen(int value) {
libademcoJNI.AdemcoPacket_len_set(swigCPtr, this, value);
}
public int getLen() {
return libademcoJNI.AdemcoPacket_len_get(swigCPtr, this);
}
public void setId(AdemcoPacketId value) {
libademcoJNI.AdemcoPacket_id_set(swigCPtr, this, value.swigValue());
}
public AdemcoPacketId getId() {
return AdemcoPacketId.swigToEnum(libademcoJNI.AdemcoPacket_id_get(swigCPtr, this));
}
public void setSeq(int value) {
libademcoJNI.AdemcoPacket_seq_set(swigCPtr, this, value);
}
public int getSeq() {
return libademcoJNI.AdemcoPacket_seq_get(swigCPtr, this);
}
public void setAcct(String value) {
libademcoJNI.AdemcoPacket_acct_set(swigCPtr, this, value);
}
public String getAcct() {
return libademcoJNI.AdemcoPacket_acct_get(swigCPtr, this);
}
public void setData(AdemcoDataSegment value) {
libademcoJNI.AdemcoPacket_data_set(swigCPtr, this, AdemcoDataSegment.getCPtr(value), value);
}
public AdemcoDataSegment getData() {
long cPtr = libademcoJNI.AdemcoPacket_data_get(swigCPtr, this);
return (cPtr == 0) ? null : new AdemcoDataSegment(cPtr, false);
}
public void setXdata(AdemcoXDataSegment value) {
libademcoJNI.AdemcoPacket_xdata_set(swigCPtr, this, AdemcoXDataSegment.getCPtr(value), value);
}
public AdemcoXDataSegment getXdata() {
long cPtr = libademcoJNI.AdemcoPacket_xdata_get(swigCPtr, this);
return (cPtr == 0) ? null : new AdemcoXDataSegment(cPtr, false);
}
public void setTimestamp(SWIGTYPE_p_time_t value) {
libademcoJNI.AdemcoPacket_timestamp_set(swigCPtr, this, SWIGTYPE_p_time_t.getCPtr(value));
}
public SWIGTYPE_p_time_t getTimestamp() {
return new SWIGTYPE_p_time_t(libademcoJNI.AdemcoPacket_timestamp_get(swigCPtr, this), true);
}
public void setRaw(byte[] value) {
libademcoJNI.AdemcoPacket_raw_set(swigCPtr, this, value);
}
public byte[] getRaw() {
return libademcoJNI.AdemcoPacket_raw_get(swigCPtr, this);
}
public void setRaw_len(int value) {
libademcoJNI.AdemcoPacket_raw_len_set(swigCPtr, this, value);
}
public int getRaw_len() {
return libademcoJNI.AdemcoPacket_raw_len_get(swigCPtr, this);
}
public AdemcoPacket() {
this(libademcoJNI.new_AdemcoPacket(), true);
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum AdemcoPacketId {
AID_NULL,
AID_ACK,
AID_NAK,
AID_DUH,
AID_HB,
AID_ADM_CID,
AID_MOD_REG,
AID_REG_RSP,
AID_COUNT,
AID_INVALID(libademcoJNI.AID_INVALID_get());
public final int swigValue() {
return swigValue;
}
public static AdemcoPacketId swigToEnum(int swigValue) {
AdemcoPacketId[] swigValues = AdemcoPacketId.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (AdemcoPacketId swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + AdemcoPacketId.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private AdemcoPacketId() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private AdemcoPacketId(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private AdemcoPacketId(AdemcoPacketId swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum AdemcoParseResult {
RESULT_OK,
RESULT_NOT_ENOUGH,
RESULT_ERROR;
public final int swigValue() {
return swigValue;
}
public static AdemcoParseResult swigToEnum(int swigValue) {
AdemcoParseResult[] swigValues = AdemcoParseResult.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (AdemcoParseResult swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + AdemcoParseResult.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private AdemcoParseResult() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private AdemcoParseResult(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private AdemcoParseResult(AdemcoParseResult swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum AdemcoXDataLengthFormat {
TWO_HEX,
FOUR_DECIMAL;
public final int swigValue() {
return swigValue;
}
public static AdemcoXDataLengthFormat swigToEnum(int swigValue) {
AdemcoXDataLengthFormat[] swigValues = AdemcoXDataLengthFormat.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (AdemcoXDataLengthFormat swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + AdemcoXDataLengthFormat.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private AdemcoXDataLengthFormat() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private AdemcoXDataLengthFormat(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private AdemcoXDataLengthFormat(AdemcoXDataLengthFormat swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class AdemcoXDataSegment {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected AdemcoXDataSegment(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(AdemcoXDataSegment obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libademcoJNI.delete_AdemcoXDataSegment(swigCPtr);
}
swigCPtr = 0;
}
}
public void setLenghFormat(AdemcoXDataLengthFormat value) {
libademcoJNI.AdemcoXDataSegment_lenghFormat_set(swigCPtr, this, value.swigValue());
}
public AdemcoXDataLengthFormat getLenghFormat() {
return AdemcoXDataLengthFormat.swigToEnum(libademcoJNI.AdemcoXDataSegment_lenghFormat_get(swigCPtr, this));
}
public void setRaw(byte[] value) {
libademcoJNI.AdemcoXDataSegment_raw_set(swigCPtr, this, value);
}
public byte[] getRaw() {
return libademcoJNI.AdemcoXDataSegment_raw_get(swigCPtr, this);
}
public void setRaw_len(int value) {
libademcoJNI.AdemcoXDataSegment_raw_len_set(swigCPtr, this, value);
}
public int getRaw_len() {
return libademcoJNI.AdemcoXDataSegment_raw_len_get(swigCPtr, this);
}
public AdemcoXDataSegment() {
this(libademcoJNI.new_AdemcoXDataSegment(), true);
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum AdemcoXDataTransform {
AdemcoXDataTransform_as_is,
AdemcoXDataTransform_to_ascii;
public final int swigValue() {
return swigValue;
}
public static AdemcoXDataTransform swigToEnum(int swigValue) {
AdemcoXDataTransform[] swigValues = AdemcoXDataTransform.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (AdemcoXDataTransform swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + AdemcoXDataTransform.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private AdemcoXDataTransform() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private AdemcoXDataTransform(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private AdemcoXDataTransform(AdemcoXDataTransform swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class HbComData {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HbComData(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HbComData obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libademcoJNI.delete_HbComData(swigCPtr);
}
swigCPtr = 0;
}
}
public void setData(byte[] value) {
libademcoJNI.HbComData_data_set(swigCPtr, this, value);
}
public byte[] getData() {
return libademcoJNI.HbComData_data_get(swigCPtr, this);
}
public void setLen(int value) {
libademcoJNI.HbComData_len_set(swigCPtr, this, value);
}
public int getLen() {
return libademcoJNI.HbComData_len_get(swigCPtr, this);
}
public HbComData() {
this(libademcoJNI.new_HbComData(), true);
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbComReq_A3_op {
HbComReq_A3_p3_del(libademcoJNI.HbComReq_A3_p3_del_get()),
HbComReq_A3_p3_learn(libademcoJNI.HbComReq_A3_p3_learn_get()),
HbComReq_A3_p3_stop(libademcoJNI.HbComReq_A3_p3_stop_get()),
HbComReq_A3_p3_modify(libademcoJNI.HbComReq_A3_p3_modify_get());
public final int swigValue() {
return swigValue;
}
public static HbComReq_A3_op swigToEnum(int swigValue) {
HbComReq_A3_op[] swigValues = HbComReq_A3_op.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbComReq_A3_op swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbComReq_A3_op.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbComReq_A3_op() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbComReq_A3_op(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbComReq_A3_op(HbComReq_A3_op swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbComRequestType {
HbComReq_A0,
HbComReq_A1,
HbComReq_A2,
HbComReq_A3,
HbComReq_A5,
HbComReq_A7,
HbComReq_A9,
HbComReq_AA,
HbComReq_AC,
HbComReq_AD,
HbComReq_AE,
HbComReq_B0,
HbComReq_RD_acct,
HbComReq_WR_acct,
HbComReq_Invalid(libademcoJNI.HbComReq_Invalid_get());
public final int swigValue() {
return swigValue;
}
public static HbComRequestType swigToEnum(int swigValue) {
HbComRequestType[] swigValues = HbComRequestType.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbComRequestType swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbComRequestType.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbComRequestType() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbComRequestType(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbComRequestType(HbComRequestType swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbComResp_A2_p1 {
HbComResp_A2_p1_nomore(libademcoJNI.HbComResp_A2_p1_nomore_get()),
HbComResp_A2_p1_more(libademcoJNI.HbComResp_A2_p1_more_get());
public final int swigValue() {
return swigValue;
}
public static HbComResp_A2_p1 swigToEnum(int swigValue) {
HbComResp_A2_p1[] swigValues = HbComResp_A2_p1.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbComResp_A2_p1 swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbComResp_A2_p1.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbComResp_A2_p1() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbComResp_A2_p1(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbComResp_A2_p1(HbComResp_A2_p1 swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbComResp_A4_p3 {
HbComResp_A4_p3_fail(libademcoJNI.HbComResp_A4_p3_fail_get()),
HbComResp_A4_p3_ok(libademcoJNI.HbComResp_A4_p3_ok_get()),
HbComResp_A4_p3_dup(libademcoJNI.HbComResp_A4_p3_dup_get()),
HbComResp_A4_p3_ne(libademcoJNI.HbComResp_A4_p3_ne_get());
public final int swigValue() {
return swigValue;
}
public static HbComResp_A4_p3 swigToEnum(int swigValue) {
HbComResp_A4_p3[] swigValues = HbComResp_A4_p3.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbComResp_A4_p3 swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbComResp_A4_p3.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbComResp_A4_p3() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbComResp_A4_p3(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbComResp_A4_p3(HbComResp_A4_p3 swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbComResp_AB_p2 {
HbComResp_AB_p2_close(libademcoJNI.HbComResp_AB_p2_close_get()),
HbComResp_AB_p2_open(libademcoJNI.HbComResp_AB_p2_open_get()),
HbComResp_AB_p2_reject(libademcoJNI.HbComResp_AB_p2_reject_get());
public final int swigValue() {
return swigValue;
}
public static HbComResp_AB_p2 swigToEnum(int swigValue) {
HbComResp_AB_p2[] swigValues = HbComResp_AB_p2.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbComResp_AB_p2 swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbComResp_AB_p2.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbComResp_AB_p2() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbComResp_AB_p2(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbComResp_AB_p2(HbComResp_AB_p2 swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbComResp_AD_p1 {
HbComResp_AD_p1_single(libademcoJNI.HbComResp_AD_p1_single_get()),
HbComResp_AD_p1_double(libademcoJNI.HbComResp_AD_p1_double_get());
public final int swigValue() {
return swigValue;
}
public static HbComResp_AD_p1 swigToEnum(int swigValue) {
HbComResp_AD_p1[] swigValues = HbComResp_AD_p1.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbComResp_AD_p1 swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbComResp_AD_p1.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbComResp_AD_p1() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbComResp_AD_p1(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbComResp_AD_p1(HbComResp_AD_p1 swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbComResp_AD_p2 {
HbComResp_AD_p2_nomore(libademcoJNI.HbComResp_AD_p2_nomore_get()),
HbComResp_AD_p2_more(libademcoJNI.HbComResp_AD_p2_more_get());
public final int swigValue() {
return swigValue;
}
public static HbComResp_AD_p2 swigToEnum(int swigValue) {
HbComResp_AD_p2[] swigValues = HbComResp_AD_p2.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbComResp_AD_p2 swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbComResp_AD_p2.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbComResp_AD_p2() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbComResp_AD_p2(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbComResp_AD_p2(HbComResp_AD_p2 swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbComResponseType {
HbComResp_A0,
HbComResp_A2,
HbComResp_A3,
HbComResp_A4,
HbComResp_A6,
HbComResp_A7,
HbComResp_A8,
HbComResp_A9,
HbComResp_AB,
HbComResp_AD,
HbComResp_AF,
HbComResp_B1,
HbComResp_Invalid(libademcoJNI.HbComResp_Invalid_get());
public final int swigValue() {
return swigValue;
}
public static HbComResponseType swigToEnum(int swigValue) {
HbComResponseType[] swigValues = HbComResponseType.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbComResponseType swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbComResponseType.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbComResponseType() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbComResponseType(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbComResponseType(HbComResponseType swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbCom_3sec_status {
HbCom_3sec_arm(libademcoJNI.HbCom_3sec_arm_get()),
HbCom_3sec_disarm(libademcoJNI.HbCom_3sec_disarm_get());
public final int swigValue() {
return swigValue;
}
public static HbCom_3sec_status swigToEnum(int swigValue) {
HbCom_3sec_status[] swigValues = HbCom_3sec_status.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbCom_3sec_status swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbCom_3sec_status.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbCom_3sec_status() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbCom_3sec_status(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbCom_3sec_status(HbCom_3sec_status swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbCom_3sec_which {
HbCom_3sec_machine,
HbCom_3sec_section1,
HbCom_3sec_section2,
HbCom_3sec_section3;
public final int swigValue() {
return swigValue;
}
public static HbCom_3sec_which swigToEnum(int swigValue) {
HbCom_3sec_which[] swigValues = HbCom_3sec_which.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbCom_3sec_which swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbCom_3sec_which.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbCom_3sec_which() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbCom_3sec_which(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbCom_3sec_which(HbCom_3sec_which swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbMachineStatus {
HMS_ARM,
HMS_HALF_ARM,
HMS_DISARM,
HMS_SETTING,
HMS_COUNT,
HMS_INVALID(libademcoJNI.HMS_INVALID_get());
public final int swigValue() {
return swigValue;
}
public static HbMachineStatus swigToEnum(int swigValue) {
HbMachineStatus[] swigValues = HbMachineStatus.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbMachineStatus swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbMachineStatus.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbMachineStatus() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbMachineStatus(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbMachineStatus(HbMachineStatus swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class HbMachineTimePoint {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HbMachineTimePoint(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HbMachineTimePoint obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libademcoJNI.delete_HbMachineTimePoint(swigCPtr);
}
swigCPtr = 0;
}
}
public void setHour(short value) {
libademcoJNI.HbMachineTimePoint_hour_set(swigCPtr, this, value);
}
public short getHour() {
return libademcoJNI.HbMachineTimePoint_hour_get(swigCPtr, this);
}
public void setMinute(short value) {
libademcoJNI.HbMachineTimePoint_minute_set(swigCPtr, this, value);
}
public short getMinute() {
return libademcoJNI.HbMachineTimePoint_minute_get(swigCPtr, this);
}
public HbMachineTimePoint() {
this(libademcoJNI.new_HbMachineTimePoint(), true);
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class HbMachineTimer {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HbMachineTimer(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HbMachineTimer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libademcoJNI.delete_HbMachineTimer(swigCPtr);
}
swigCPtr = 0;
}
}
public void setTimer(HbTimer value) {
libademcoJNI.HbMachineTimer_timer_set(swigCPtr, this, HbTimer.getCPtr(value), value);
}
public HbTimer getTimer() {
long cPtr = libademcoJNI.HbMachineTimer_timer_get(swigCPtr, this);
return (cPtr == 0) ? null : new HbTimer(cPtr, false);
}
public void setData(byte[] value) {
libademcoJNI.HbMachineTimer_data_set(swigCPtr, this, value);
}
public byte[] getData() {
return libademcoJNI.HbMachineTimer_data_get(swigCPtr, this);
}
public HbMachineTimer() {
this(libademcoJNI.new_HbMachineTimer(), true);
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbMachineType {
HMT_WIFI,
HMT_CAMERA,
HMT_GPRS_IOT,
HMT_NETMOD,
HMT_GPRS,
HMT_LCD,
HMT_WIRED,
HMT_TRUE_COLOR,
HMT_3_SECTION,
HMT_IOT,
HMT_GPRS_PHONE,
HMT_NB,
HMT_COUNT,
HMT_INVALID(libademcoJNI.HMT_INVALID_get());
public final int swigValue() {
return swigValue;
}
public static HbMachineType swigToEnum(int swigValue) {
HbMachineType[] swigValues = HbMachineType.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbMachineType swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbMachineType.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbMachineType() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbMachineType(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbMachineType(HbMachineType swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class HbTimer {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected HbTimer(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(HbTimer obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
libademcoJNI.delete_HbTimer(swigCPtr);
}
swigCPtr = 0;
}
}
public void setArmAt(HbMachineTimePoint value) {
libademcoJNI.HbTimer_armAt_set(swigCPtr, this, HbMachineTimePoint.getCPtr(value), value);
}
public HbMachineTimePoint getArmAt() {
long cPtr = libademcoJNI.HbTimer_armAt_get(swigCPtr, this);
return (cPtr == 0) ? null : new HbMachineTimePoint(cPtr, false);
}
public void setDisarmAt(HbMachineTimePoint value) {
libademcoJNI.HbTimer_disarmAt_set(swigCPtr, this, HbMachineTimePoint.getCPtr(value), value);
}
public HbMachineTimePoint getDisarmAt() {
long cPtr = libademcoJNI.HbTimer_disarmAt_get(swigCPtr, this);
return (cPtr == 0) ? null : new HbMachineTimePoint(cPtr, false);
}
public HbTimer() {
this(libademcoJNI.new_HbTimer(), true);
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public enum HbZoneProperty {
HZP_BUGLAR,
HZP_EMERGENCY,
HZP_FIRE,
HZP_DURESS,
HZP_GAS,
HZP_WATER,
HZP_SUB_MACHINE,
HZP_REMOTE_CONTROL,
HZP_BUGLAR_HALF,
HZP_SHIELD,
HZP_DOOR_RING,
HZP_RESERVED_0B,
HZP_RESERVED_0C,
HZP_RESERVED_0D,
HZP_RESERVED_0E,
HZP_BYPASS,
HZP_COUNT,
HZP_INVALID(libademcoJNI.HZP_INVALID_get());
public final int swigValue() {
return swigValue;
}
public static HbZoneProperty swigToEnum(int swigValue) {
HbZoneProperty[] swigValues = HbZoneProperty.class.getEnumConstants();
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (HbZoneProperty swigEnum : swigValues)
if (swigEnum.swigValue == swigValue)
return swigEnum;
throw new IllegalArgumentException("No enum " + HbZoneProperty.class + " with value " + swigValue);
}
@SuppressWarnings("unused")
private HbZoneProperty() {
this.swigValue = SwigNext.next++;
}
@SuppressWarnings("unused")
private HbZoneProperty(int swigValue) {
this.swigValue = swigValue;
SwigNext.next = swigValue+1;
}
@SuppressWarnings("unused")
private HbZoneProperty(HbZoneProperty swigEnum) {
this.swigValue = swigEnum.swigValue;
SwigNext.next = this.swigValue+1;
}
private final int swigValue;
private static class SwigNext {
private static int next = 0;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_AdemcoEvent {
private transient long swigCPtr;
protected SWIGTYPE_p_AdemcoEvent(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_AdemcoEvent() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_AdemcoEvent obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_HbZoneProperty {
private transient long swigCPtr;
protected SWIGTYPE_p_HbZoneProperty(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_HbZoneProperty() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_HbZoneProperty obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_int {
private transient long swigCPtr;
protected SWIGTYPE_p_int(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_int() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_int obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_time_t {
private transient long swigCPtr;
protected SWIGTYPE_p_time_t(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_time_t() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_time_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_uint16_t {
private transient long swigCPtr;
protected SWIGTYPE_p_uint16_t(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_uint16_t() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_uint16_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_uint32_t {
private transient long swigCPtr;
protected SWIGTYPE_p_uint32_t(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_uint32_t() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_uint32_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_uint8_t {
private transient long swigCPtr;
protected SWIGTYPE_p_uint8_t(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_uint8_t() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_uint8_t obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_unsigned_int {
private transient long swigCPtr;
protected SWIGTYPE_p_unsigned_int(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_unsigned_int() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_unsigned_int obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_unsigned_short {
private transient long swigCPtr;
protected SWIGTYPE_p_unsigned_short(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_unsigned_short() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_unsigned_short obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public class SWIGTYPE_p_void {
private transient long swigCPtr;
protected SWIGTYPE_p_void(long cPtr, @SuppressWarnings("unused") boolean futureUse) {
swigCPtr = cPtr;
}
protected SWIGTYPE_p_void() {
swigCPtr = 0;
}
protected static long getCPtr(SWIGTYPE_p_void obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
}
This diff is collapsed.
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.hb3344.ademco;
public interface libademcoConstants {
public final static int ADEMCO_OK = libademcoJNI.ADEMCO_OK_get();
public final static int ADEMCO_ERR = libademcoJNI.ADEMCO_ERR_get();
public final static int ADEMCO_PACKET_ACCT_MAX_LEN = libademcoJNI.ADEMCO_PACKET_ACCT_MAX_LEN_get();
public final static int ADEMCO_PACKET_DATA_SEGMENT_EMPTY_LEN = libademcoJNI.ADEMCO_PACKET_DATA_SEGMENT_EMPTY_LEN_get();
public final static int ADEMCO_PACKET_DATA_SEGMENT_FULL_LEN = libademcoJNI.ADEMCO_PACKET_DATA_SEGMENT_FULL_LEN_get();
public final static int ADEMCO_PACKET_DATA_SEGMENT_FULL_LEN_MAX = libademcoJNI.ADEMCO_PACKET_DATA_SEGMENT_FULL_LEN_MAX_get();
public final static int ADEMCO_PACKET_MAX_LEN = libademcoJNI.ADEMCO_PACKET_MAX_LEN_get();
public final static int CONGWIN_FE100_PACKET_LEN = libademcoJNI.CONGWIN_FE100_PACKET_LEN_get();
public final static int ADEMCO_PACKET_TIMESTAMP_LEN = libademcoJNI.ADEMCO_PACKET_TIMESTAMP_LEN_get();
public final static int ADEMCO_PACKET_XDATA_MAX_LEN = libademcoJNI.ADEMCO_PACKET_XDATA_MAX_LEN_get();
public final static int ADEMCO_ID_MIN = libademcoJNI.ADEMCO_ID_MIN_get();
public final static int ADEMCO_ID_MAX = libademcoJNI.ADEMCO_ID_MAX_get();
public final static int ADEMCO_ID_SENTINEL = libademcoJNI.ADEMCO_ID_SENTINEL_get();
public final static int ADEMCO_ZONE_FOR_MACHINE_SELF = libademcoJNI.ADEMCO_ZONE_FOR_MACHINE_SELF_get();
public final static int ADEMCO_ZONE_MIN = libademcoJNI.ADEMCO_ZONE_MIN_get();
public final static int ADEMCO_ZONE_MAX = libademcoJNI.ADEMCO_ZONE_MAX_get();
public final static int ADEMCO_ZONE_SENTINEL = libademcoJNI.ADEMCO_ZONE_SENTINEL_get();
public final static int ADEMCO_GG_MIN = libademcoJNI.ADEMCO_GG_MIN_get();
public final static int ADEMCO_GG_MAX = libademcoJNI.ADEMCO_GG_MAX_get();
public final static int ADEMCO_GG_SENTINEL = libademcoJNI.ADEMCO_GG_SENTINEL_get();
public final static String ADEMCO_PACKET_ID_NULL = libademcoJNI.ADEMCO_PACKET_ID_NULL_get();
public final static String ADEMCO_PACKET_ID_ACK = libademcoJNI.ADEMCO_PACKET_ID_ACK_get();
public final static String ADEMCO_PACKET_ID_NAK = libademcoJNI.ADEMCO_PACKET_ID_NAK_get();
public final static String ADEMCO_PACKET_ID_DUH = libademcoJNI.ADEMCO_PACKET_ID_DUH_get();
public final static String ADEMCO_PACKET_ID_HB = libademcoJNI.ADEMCO_PACKET_ID_HB_get();
public final static String ADEMCO_PACKET_ID_ADM_CID = libademcoJNI.ADEMCO_PACKET_ID_ADM_CID_get();
public final static String ADEMCO_PACKET_ID_MOD_REG = libademcoJNI.ADEMCO_PACKET_ID_MOD_REG_get();
public final static String ADEMCO_PACKET_ID_REG_RSP = libademcoJNI.ADEMCO_PACKET_ID_REG_RSP_get();
public final static String ADEMCO_RRCVR_DEFAULT = libademcoJNI.ADEMCO_RRCVR_DEFAULT_get();
public final static String ADEMCO_LPREF_DEFAULT = libademcoJNI.ADEMCO_LPREF_DEFAULT_get();
public final static char ADEMCO_PACKET_PREFIX = libademcoJNI.ADEMCO_PACKET_PREFIX_get();
public final static char ADEMCO_PACKET_SUFIX = libademcoJNI.ADEMCO_PACKET_SUFIX_get();
public final static int HB_3SECTION_MACHINE_GG_MIN = libademcoJNI.HB_3SECTION_MACHINE_GG_MIN_get();
public final static int HB_3SECTION_MACHINE_GG_MAX = libademcoJNI.HB_3SECTION_MACHINE_GG_MAX_get();
public final static int HB_COM_DATA_MAX_LEN = libademcoJNI.HB_COM_DATA_MAX_LEN_get();
public final static int HbComReq_A0_len = libademcoJNI.HbComReq_A0_len_get();
public final static String HbComReq_A0_data = libademcoJNI.HbComReq_A0_data_get();
public final static int HbComResp_A0_len = libademcoJNI.HbComResp_A0_len_get();
public final static String HbComResp_A0_head = libademcoJNI.HbComResp_A0_head_get();
public final static int HbComReq_A1_len = libademcoJNI.HbComReq_A1_len_get();
public final static String HbComReq_A1_data = libademcoJNI.HbComReq_A1_data_get();
public final static int HbComResp_A2_len_min = libademcoJNI.HbComResp_A2_len_min_get();
public final static int HbComResp_A2_max_zone = libademcoJNI.HbComResp_A2_max_zone_get();
public final static int HbComResp_A2_len_max = libademcoJNI.HbComResp_A2_len_max_get();
public final static String HbComResp_A2_head = libademcoJNI.HbComResp_A2_head_get();
public final static int HbComReq_A2_len = libademcoJNI.HbComReq_A2_len_get();
public final static String HbComReq_A2_data = libademcoJNI.HbComReq_A2_data_get();
public final static int HbComReq_A3_len = libademcoJNI.HbComReq_A3_len_get();
public final static String HbComReq_A3_head = libademcoJNI.HbComReq_A3_head_get();
public final static int HbComResp_A3_len = libademcoJNI.HbComResp_A3_len_get();
public final static String HbComResp_A3_data = libademcoJNI.HbComResp_A3_data_get();
public final static int HbComResp_A4_len = libademcoJNI.HbComResp_A4_len_get();
public final static String HbComResp_A4_head = libademcoJNI.HbComResp_A4_head_get();
public final static int HbComReq_A5_len = libademcoJNI.HbComReq_A5_len_get();
public final static String HbComReq_A5_data = libademcoJNI.HbComReq_A5_data_get();
public final static int HbComResp_A6_len = libademcoJNI.HbComResp_A6_len_get();
public final static String HbComResp_A6_head = libademcoJNI.HbComResp_A6_head_get();
public final static int HbComReq_A7_len = libademcoJNI.HbComReq_A7_len_get();
public final static String HbComReq_A7_head = libademcoJNI.HbComReq_A7_head_get();
public final static int HbComResp_A7_len = libademcoJNI.HbComResp_A7_len_get();
public final static String HbComResp_A7_data = libademcoJNI.HbComResp_A7_data_get();
public final static int HbComResp_A8_len = libademcoJNI.HbComResp_A8_len_get();
public final static String HbComResp_A8_data = libademcoJNI.HbComResp_A8_data_get();
public final static int HbComReq_AA_len = libademcoJNI.HbComReq_AA_len_get();
public final static String HbComReq_AA_head = libademcoJNI.HbComReq_AA_head_get();
public final static int HbComResp_AB_len = libademcoJNI.HbComResp_AB_len_get();
public final static String HbComResp_AB_head = libademcoJNI.HbComResp_AB_head_get();
public final static int HbComReq_AC_len = libademcoJNI.HbComReq_AC_len_get();
public final static String HbComReq_AC_data = libademcoJNI.HbComReq_AC_data_get();
public final static int HbComReq_AD_len = libademcoJNI.HbComReq_AD_len_get();
public final static String HbComReq_AD_data = libademcoJNI.HbComReq_AD_data_get();
public final static int HbComResp_AD_len_min = libademcoJNI.HbComResp_AD_len_min_get();
public final static int HbComResp_AD_max_zone = libademcoJNI.HbComResp_AD_max_zone_get();
public final static int HbComResp_AD_len_max = libademcoJNI.HbComResp_AD_len_max_get();
public final static String HbComResp_AD_head = libademcoJNI.HbComResp_AD_head_get();
public final static int HbComReq_AE_len = libademcoJNI.HbComReq_AE_len_get();
public final static String HbComReq_AE_head = libademcoJNI.HbComReq_AE_head_get();
public final static int HbComResp_AF_len = libademcoJNI.HbComResp_AF_len_get();
public final static String HbComResp_AF_head = libademcoJNI.HbComResp_AF_head_get();
public final static int HbComReq_B0_len = libademcoJNI.HbComReq_B0_len_get();
public final static String HbComReq_B0_data = libademcoJNI.HbComReq_B0_data_get();
public final static int HbComResp_B1_len = libademcoJNI.HbComResp_B1_len_get();
public final static String HbComResp_B1_head = libademcoJNI.HbComResp_B1_head_get();
public final static int HbComReq_RD_acct_len = libademcoJNI.HbComReq_RD_acct_len_get();
public final static String HbComReq_RD_acct_data = libademcoJNI.HbComReq_RD_acct_data_get();
public final static int HbComResp_RD_acct_len = libademcoJNI.HbComResp_RD_acct_len_get();
public final static String HbComResp_RD_acct_head = libademcoJNI.HbComResp_RD_acct_head_get();
public final static int HbComReq_WR_acct_len = libademcoJNI.HbComReq_WR_acct_len_get();
public final static String HbComReq_WR_acct_head = libademcoJNI.HbComReq_WR_acct_head_get();
public final static int HbComResp_WR_acct_len = libademcoJNI.HbComResp_WR_acct_len_get();
public final static String HbComResp_WR_acct_head = libademcoJNI.HbComResp_WR_acct_head_get();
}
This diff is collapsed.
%module libademco
%include "constraints.i"
%include "typemaps.i"
%include "cpointer.i"
%include "stdint.i"
%include "arrays_java.i";
%include "enums.swg" /*NB: requires JDK-1.5+
See: http://www.swig.org/Doc1.3/Java.html#enumerations */
%{
/* Includes the header in the wrapper code */
#include "../ademco.h"
%}
// from arrays_java.i (signed char)
JAVA_ARRAYS_DECL(uint8_t, jbyte, Byte, Uint8)
JAVA_ARRAYS_IMPL(uint8_t, jbyte, Byte, Uint8)
JAVA_ARRAYS_TYPEMAPS(uint8_t, byte, jbyte, Uint8, "[B")
%apply uint8_t[] { uint8_t* }
%pointer_functions(int, intp);
%pointer_functions(uint16_t, uint16p);
%pointer_functions(uint32_t, uint32p);
/* Parse the header file to generate wrappers */
%include "../ademco.h"
This diff is collapsed.
mkdir com\hb3344\ademco
"C:\Users\Jack\Downloads\swigwin-3.0.12\swig.exe" -java -package com.hb3344.ademco -outdir com/hb3344/ademco -o libademco_java_wrap.c libademco.swig
cl -c ../ademco.c libademco_java_wrap.c -I"../" -I"%JAVA_HOME%include" -I"%JAVA_HOME%include/win32"
cl -LD ademco.obj libademco_java_wrap.obj -o libademco.dll
#include "../../c/ademco.h"
#include <assert.h>
#include <string.h>
#include <stdio.h>
#ifdef _WIN64
#ifdef _DEBUG
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment