From 274957068845d8474bac2daa3dcdd5065186900a Mon Sep 17 00:00:00 2001 From: zhaowg Date: Thu, 30 Aug 2018 14:55:09 +0800 Subject: [PATCH] 电信IOT插件 --- VehicleDetector_FH_FH/VehicleDetector-FH-FH.iml | 36 ------------------------------------ VehicleDetector_FH_FH/lib/com.huawei.m2m.cig.tup-1.3.1.jar | Bin 1615 -> 0 bytes VehicleDetector_FH_FH/package/package-info.json | 1 - VehicleDetector_FH_FH/package/package.zip | Bin 152260 -> 0 bytes VehicleDetector_FH_FH/package/preload/VehicleDetector-FH-FH-1.0.0.jar | Bin 152176 -> 0 bytes VehicleDetector_FH_FH/pom.xml | 115 ------------------------------------------------------------------------------------------------------------------- VehicleDetector_FH_FH/src/main/java/com/fh/party/CmdProcess.java | 44 -------------------------------------------- VehicleDetector_FH_FH/src/main/java/com/fh/party/ProtocolAdapterImpl.java | 61 ------------------------------------------------------------- VehicleDetector_FH_FH/src/main/java/com/fh/party/ReportProcess.java | 111 --------------------------------------------------------------------------------------------------------------- VehicleDetector_FH_FH/src/main/java/com/fh/party/Utilty.java | 59 ----------------------------------------------------------- VehicleDetector_FH_FH/src/main/resources/OSGI-INF/CodecProvideHandler.xml | 7 ------- VehicleDetector_FH_FH/src/test/java/com/fh/party/ProtocolServiceImplTest.java | 214 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pom.xml | 2 +- zteits-nbiot-fh/VehicleDetector-FH-FH.iml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ zteits-nbiot-fh/lib/com.huawei.m2m.cig.tup-1.3.1.jar | Bin 0 -> 1615 bytes zteits-nbiot-fh/package/package-info.json | 1 + zteits-nbiot-fh/package/package.zip | Bin 0 -> 152260 bytes zteits-nbiot-fh/package/preload/VehicleDetector-FH-FH-1.0.0.jar | Bin 0 -> 152176 bytes zteits-nbiot-fh/pom.xml | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zteits-nbiot-fh/src/main/java/com/fh/party/CmdProcess.java | 44 ++++++++++++++++++++++++++++++++++++++++++++ zteits-nbiot-fh/src/main/java/com/fh/party/ProtocolAdapterImpl.java | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zteits-nbiot-fh/src/main/java/com/fh/party/ReportProcess.java | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zteits-nbiot-fh/src/main/java/com/fh/party/Utilty.java | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zteits-nbiot-fh/src/main/resources/OSGI-INF/CodecProvideHandler.xml | 7 +++++++ zteits-nbiot-fh/src/test/java/com/fh/party/ProtocolServiceImplTest.java | 214 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zteits-nbiot-fh/zteits-nbiot-fh.iml | 20 ++++++++++++++++++++ 26 files changed, 686 insertions(+), 649 deletions(-) delete mode 100644 VehicleDetector_FH_FH/VehicleDetector-FH-FH.iml delete mode 100644 VehicleDetector_FH_FH/lib/com.huawei.m2m.cig.tup-1.3.1.jar delete mode 100644 VehicleDetector_FH_FH/package/package-info.json delete mode 100644 VehicleDetector_FH_FH/package/package.zip delete mode 100644 VehicleDetector_FH_FH/package/preload/VehicleDetector-FH-FH-1.0.0.jar delete mode 100644 VehicleDetector_FH_FH/pom.xml delete mode 100644 VehicleDetector_FH_FH/src/main/java/com/fh/party/CmdProcess.java delete mode 100644 VehicleDetector_FH_FH/src/main/java/com/fh/party/ProtocolAdapterImpl.java delete mode 100644 VehicleDetector_FH_FH/src/main/java/com/fh/party/ReportProcess.java delete mode 100644 VehicleDetector_FH_FH/src/main/java/com/fh/party/Utilty.java delete mode 100644 VehicleDetector_FH_FH/src/main/resources/OSGI-INF/CodecProvideHandler.xml delete mode 100644 VehicleDetector_FH_FH/src/test/java/com/fh/party/ProtocolServiceImplTest.java create mode 100644 zteits-nbiot-fh/VehicleDetector-FH-FH.iml create mode 100644 zteits-nbiot-fh/lib/com.huawei.m2m.cig.tup-1.3.1.jar create mode 100644 zteits-nbiot-fh/package/package-info.json create mode 100644 zteits-nbiot-fh/package/package.zip create mode 100644 zteits-nbiot-fh/package/preload/VehicleDetector-FH-FH-1.0.0.jar create mode 100644 zteits-nbiot-fh/pom.xml create mode 100644 zteits-nbiot-fh/src/main/java/com/fh/party/CmdProcess.java create mode 100644 zteits-nbiot-fh/src/main/java/com/fh/party/ProtocolAdapterImpl.java create mode 100644 zteits-nbiot-fh/src/main/java/com/fh/party/ReportProcess.java create mode 100644 zteits-nbiot-fh/src/main/java/com/fh/party/Utilty.java create mode 100644 zteits-nbiot-fh/src/main/resources/OSGI-INF/CodecProvideHandler.xml create mode 100644 zteits-nbiot-fh/src/test/java/com/fh/party/ProtocolServiceImplTest.java create mode 100644 zteits-nbiot-fh/zteits-nbiot-fh.iml diff --git a/VehicleDetector_FH_FH/VehicleDetector-FH-FH.iml b/VehicleDetector_FH_FH/VehicleDetector-FH-FH.iml deleted file mode 100644 index 4d43525..0000000 --- a/VehicleDetector_FH_FH/VehicleDetector-FH-FH.iml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/VehicleDetector_FH_FH/lib/com.huawei.m2m.cig.tup-1.3.1.jar b/VehicleDetector_FH_FH/lib/com.huawei.m2m.cig.tup-1.3.1.jar deleted file mode 100644 index 389ffc0..0000000 Binary files a/VehicleDetector_FH_FH/lib/com.huawei.m2m.cig.tup-1.3.1.jar and /dev/null differ diff --git a/VehicleDetector_FH_FH/package/package-info.json b/VehicleDetector_FH_FH/package/package-info.json deleted file mode 100644 index f121152..0000000 --- a/VehicleDetector_FH_FH/package/package-info.json +++ /dev/null @@ -1 +0,0 @@ -{"specVersion":"1.0","fileName":"package.zip","version":"1.0.0","deviceType":"VehicleDetector","manufacturerName":"FH","model":"FH","description":"CIG codec plugin auto-generated by sps.","platform":"linux","packageType":"CIGPlugin","date":"Wed Aug 29 03:47:49 GMT 2018","ignoreList":[],"bundles":[{"bundleName":"VehicleDetector-FH-FH","bundleVersion":"1.0.0","priority":5,"fileName":"VehicleDetector-FH-FH-1.0.0.jar","bundleDesc":"","versionDesc":""}]} \ No newline at end of file diff --git a/VehicleDetector_FH_FH/package/package.zip b/VehicleDetector_FH_FH/package/package.zip deleted file mode 100644 index 9fa2798..0000000 Binary files a/VehicleDetector_FH_FH/package/package.zip and /dev/null differ diff --git a/VehicleDetector_FH_FH/package/preload/VehicleDetector-FH-FH-1.0.0.jar b/VehicleDetector_FH_FH/package/preload/VehicleDetector-FH-FH-1.0.0.jar deleted file mode 100644 index 7f22bac..0000000 Binary files a/VehicleDetector_FH_FH/package/preload/VehicleDetector-FH-FH-1.0.0.jar and /dev/null differ diff --git a/VehicleDetector_FH_FH/pom.xml b/VehicleDetector_FH_FH/pom.xml deleted file mode 100644 index a50405c..0000000 --- a/VehicleDetector_FH_FH/pom.xml +++ /dev/null @@ -1,115 +0,0 @@ - - 4.0.0 - - com.fh.party - - VehicleDetector-FH-FH - 1.0.0 - - bundle - - - UTF-8 - 4.11 - 2.7.4 - 2.5.4 - 2.4 - 1.3.1 - 1.7.6 - ./ - - - - - - junit - junit - ${junit.version} - - - - org.slf4j - slf4j-api - ${slf4j.api.version} - - - - com.fasterxml.jackson.core - jackson-databind - ${fasterxml.jackson.version} - - - - - com.huawei - protocal-jar - 1.3.1 - system - ${basedir}/lib/com.huawei.m2m.cig.tup-1.3.1.jar - - - - - net.sf.json-lib - json-lib - 2.4 - jdk15 - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - - org.apache.felix - maven-bundle-plugin - ${felix.maven.plugin.version} - true - - ./target - - false - - - J2SE-1.5 - - OSGI-INF/* - - VehicleDetector-FH-FH - - - org.slf4j, - org.slf4j.spi, - org.apache.log4j.spi, - com.huawei.m2m.cig.tup.modules.protocol_adapter, - com.fasterxml.jackson.databind, - com.fasterxml.jackson.databind.node - - - - json-lib - - - - - - generate-resource - - manifest - - - - - - - \ No newline at end of file diff --git a/VehicleDetector_FH_FH/src/main/java/com/fh/party/CmdProcess.java b/VehicleDetector_FH_FH/src/main/java/com/fh/party/CmdProcess.java deleted file mode 100644 index a396939..0000000 --- a/VehicleDetector_FH_FH/src/main/java/com/fh/party/CmdProcess.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.fh.party; - -import com.fasterxml.jackson.databind.JsonNode; -import com.fasterxml.jackson.databind.node.ObjectNode; - -public class CmdProcess { - - //private String identifier = "123"; - private byte cmdid = 0x01; - private int pid; - private int tid; - private int eventcnt; - private int verno; - private int eventstate; - - - public CmdProcess() { - } - - public CmdProcess(ObjectNode input) { - try { - this.pid = (byte)input.get("pid").asInt(); - this.tid = (byte)input.get("tid").asInt(); - this.eventcnt = (byte)input.get("eventcnt").asInt(); - this.verno = (byte)input.get("verno").asInt(); - this.eventstate = (byte)input.get("eventstate").asInt(); - } catch (Exception e) { - e.printStackTrace(); - } - - } - - public byte[] toByte() { - byte[] bytes = new byte[6]; - bytes[0] = cmdid; - bytes[1] = (byte)pid; - bytes[2] = (byte)tid; - bytes[3] = (byte)eventcnt; - bytes[4] = (byte)verno; - bytes[5] = (byte)eventstate; - return bytes; - } - -} diff --git a/VehicleDetector_FH_FH/src/main/java/com/fh/party/ProtocolAdapterImpl.java b/VehicleDetector_FH_FH/src/main/java/com/fh/party/ProtocolAdapterImpl.java deleted file mode 100644 index d912eab..0000000 --- a/VehicleDetector_FH_FH/src/main/java/com/fh/party/ProtocolAdapterImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.fh.party; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.huawei.m2m.cig.tup.modules.protocol_adapter.IProtocolAdapter; - - -public class ProtocolAdapterImpl implements IProtocolAdapter { - - private static final Logger logger = LoggerFactory.getLogger(ProtocolAdapterImpl.class); - // 厂商名称 - private static final String MANU_FACTURERID = "FH"; - // 设备型号 - private static final String MODEL = "FH"; - - @Override - public String getManufacturerId() { - return MANU_FACTURERID; - } - - @Override - public String getModel() { - return MODEL; - } - - public void activate() { - logger.info("Codec demo HttpMessageHander activated."); - } - - public void deactivate() { - logger.info("Codec demo HttpMessageHander deactivated."); - } - - public byte[] encode(ObjectNode input) throws Exception { - /*logger.info("dynamic lrbtest " + input.toString()); - try { - CmdProcess cmdProcess = new CmdProcess(input); - byte[] byteNode = cmdProcess.toByte(); - return byteNode; - } catch (Exception e) { - e.printStackTrace(); - return null; - }*/ - return null; - } - - public ObjectNode decode(byte[] binaryData) throws Exception { - try { - ReportProcess lightProcess = new ReportProcess(binaryData); - ObjectNode objectNode = lightProcess.toJsonNode(); - logger.info("dynamic lrbtest " + objectNode.toString()); - return objectNode; - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - -} diff --git a/VehicleDetector_FH_FH/src/main/java/com/fh/party/ReportProcess.java b/VehicleDetector_FH_FH/src/main/java/com/fh/party/ReportProcess.java deleted file mode 100644 index efece23..0000000 --- a/VehicleDetector_FH_FH/src/main/java/com/fh/party/ReportProcess.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.fh.party; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; - -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - -public class ReportProcess { - private byte cmdid = 0x01; - private int pid; - private int tid; - private int eventcnt; - private int verno; - private byte eventstate; - - // - private String factoryCode = "fh"; - private String model = "fh"; - private int reportType; - private int reportTime; - private int state; - private int packCount; - private int voltage; - private int magId; - private int rssi; - private int version; - - public ReportProcess(byte[] binaryData) throws ParseException { - pid = binaryData[1]; - tid = binaryData[2]; - eventcnt = binaryData[3]; - verno = binaryData[4]; - eventstate = binaryData[5]; - if((eventstate & 1) == 1){ - reportType = 33; - } - if((eventstate & 2) == 2){ - reportType = 32; - } - if((eventstate & 3) == 3){ - reportType = 32; - } - magId = tid; - reportTime = calLastedTime(); - if((eventstate & 32) == 32){ - state = 1; - }else{ - state = 0; - } - } - - public ObjectNode toJsonNode() { - try { - //组装body体 - ObjectMapper mapper = new ObjectMapper(); - ObjectNode root = mapper.createObjectNode(); - // root.put("identifier", this.identifier); - root.put("factoryCode", this.factoryCode); - root.put("model", this.model); - root.put("reportType", this.reportType); - root.put("reportTime", this.reportTime); - root.put("state", this.state); - root.put("magId", this.magId); - return root; - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } - - /** - * 1970-1-1 经过的秒总数 - * @return - */ - public static int calLastedTime() throws ParseException { - long a = new Date().getTime(); - DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); - Date startDate = dateFormat.parse("1970-01-01"); - long b = startDate.getTime(); - return (int)((a - b) / 1000); - } - - /** - * 将byte转换为一个长度为8的byte数组,数组每个值代表bit - */ - public static byte[] byteToArray(byte b) { - byte[] array = new byte[8]; - for (int i = 7; i >= 0; i--) { - array[i] = (byte)(b & 1); - b = (byte) (b >> 1); - } - return array; - } - - /** - * 把byte转为字符串的bit - */ - public static String byteToBit(byte b) { - return "" - + (byte) ((b >> 7) & 0x1) + (byte) ((b >> 6) & 0x1) - + (byte) ((b >> 5) & 0x1) + (byte) ((b >> 4) & 0x1) - + (byte) ((b >> 3) & 0x1) + (byte) ((b >> 2) & 0x1) - + (byte) ((b >> 1) & 0x1) + (byte) ((b >> 0) & 0x1); - } - - public static void main(String[] args) throws ParseException { - } -} \ No newline at end of file diff --git a/VehicleDetector_FH_FH/src/main/java/com/fh/party/Utilty.java b/VehicleDetector_FH_FH/src/main/java/com/fh/party/Utilty.java deleted file mode 100644 index dde0641..0000000 --- a/VehicleDetector_FH_FH/src/main/java/com/fh/party/Utilty.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.fh.party; - - -public class Utilty { - - private static Utilty instance = new Utilty(); - - public static Utilty getInstance() { - return instance; - } - - public static final int MIN_MID_VALUE = 1; - - public static final int MAX_MID_VALUE = 65535; - - - public int bytes2Int(byte[] b, int start, int length) { - int sum = 0; - int end = start + length; - for (int k = start; k < end; k++) { - int n = ((int) b[k]) & 0xff; - n <<= (--length) * 8; - sum += n; - } - return sum; - } - - public byte[] int2Bytes(int value, int length) { - byte[] b = new byte[length]; - for (int k = 0; k < length; k++) { - b[length - k - 1] = (byte) ((value >> 8 * k) & 0xff); - } - return b; - } - - public boolean isValidofMid(int mId) { - if (mId < MIN_MID_VALUE || mId > MAX_MID_VALUE) { - return false; - } - return true; - } - - - public static String parseByte2HexStr(byte[] buf) { - if (null == buf) { - return null; - } - - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < buf.length; i++) { - String hex = Integer.toHexString(buf[i] & 0xFF); - if (hex.length() == 1) { - hex = '0' + hex; - } - sb.append(hex.toUpperCase()); - } - return sb.toString(); - } -} diff --git a/VehicleDetector_FH_FH/src/main/resources/OSGI-INF/CodecProvideHandler.xml b/VehicleDetector_FH_FH/src/main/resources/OSGI-INF/CodecProvideHandler.xml deleted file mode 100644 index 615f98e..0000000 --- a/VehicleDetector_FH_FH/src/main/resources/OSGI-INF/CodecProvideHandler.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/VehicleDetector_FH_FH/src/test/java/com/fh/party/ProtocolServiceImplTest.java b/VehicleDetector_FH_FH/src/test/java/com/fh/party/ProtocolServiceImplTest.java deleted file mode 100644 index a93962c..0000000 --- a/VehicleDetector_FH_FH/src/test/java/com/fh/party/ProtocolServiceImplTest.java +++ /dev/null @@ -1,214 +0,0 @@ -package com.fh.party; - -import org.junit.Before; -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.node.ObjectNode; -import com.huawei.m2m.cig.tup.modules.protocol_adapter.IProtocolAdapter; - -/** - * Unit test for simple App. - */ -public class ProtocolServiceImplTest { - - private IProtocolAdapter protocolAdapter; - - @Before - public void setProtocolAdapter() { - this.protocolAdapter = new ProtocolAdapterImpl(); - } - - /** - * 测试用例1:设备向平台上报数据。 - *

- *

-     * 设备上报数据:AA72000032088D0320623399
-     * 
- * - * @throws Exception - */ - @Test - public void testDecodeDeviceReportData() throws Exception { - byte[] deviceReqByte = getArray(); - ObjectNode objectNode = protocolAdapter.decode(deviceReqByte); - String str = objectNode.toString(); - System.out.println(str); - } - - /** - * 测试用例2:平台向设备下发控制命令: - *

- *

-     * {
-     * //"identifier": "123",
-     * "msgType": "cloudReq",
-     * "cmd": "SET_DEVICE_LEVEL",
-     * "mid": 2016,
-     * "paras": { "value": "10" },
-     * "hasMore": 0
-     * }
-     * 
- */ - //@Test - public byte[] testEncodeIoTSendCommand() throws Exception { - ObjectNode CloudReqObjectNode = initCloudReqObjectNode(); - byte[] outputByte = protocolAdapter.encode(CloudReqObjectNode); - System.out.println("cloudReq output:" + parseByte2HexStr(outputByte)); - return outputByte; - } - - /** - * 测试用例3:设备对平台命令的应答消息 有命令短id - *

- *

-     * 设备应答消息:AA7201000107E0
-     *
-     * 
-     *
-     * @throws Exception
-     */
-    //@Test
-    public void testDecodeDeviceResponseIoT() throws Exception {
-        byte[] deviceRspByte = initDeviceRspByte();
-        ObjectNode objectNode = protocolAdapter.decode(deviceRspByte);
-        String str = objectNode.toString();
-        System.out.println(str);
-    }
-
-    /**
-     * 测试用例4:平台收到设备的上报数据后对设备的应答,如果不需要应答则返回null即可
-     * 
-     * {
-     * "identifier": "0",
-     * "msgType": "cloudRsp",
-     * "request": [AA,72,00,00,32,08,8D,03,20,62,33,99],
-     * "errcode": 0,
-     * "hasMore": 0
-     * }
-     *
-     * 
-     *
-     * @throws Exception
-     */
-    //@Test
-    public void testEncodeIoTResponseDevice() throws Exception {
-        byte[] deviceReqByte = initDeviceReqByte();
-        ObjectNode cloudRspObjectNode = initCloudRspObjectNode(deviceReqByte);
-        byte[] outputByte2 = protocolAdapter.encode(cloudRspObjectNode);
-        System.out.println("cloudRsp output:" + parseByte2HexStr(outputByte2));
-    }
-
-    public static String parseByte2HexStr(byte[] buf) {
-        if (null == buf) {
-            return null;
-        }
-
-        StringBuffer sb = new StringBuffer();
-        for (int i = 0; i < buf.length; i++) {
-            String hex = Integer.toHexString(buf[i] & 0xFF);
-            if (hex.length() == 1) {
-                hex = '0' + hex;
-            }
-            sb.append(hex.toUpperCase());
-        }
-        return sb.toString();
-    }
-
-    /*
-     * 初始化:设备数据上报码流
-     */
-    private static byte[] initDeviceReqByte() {
-        /**
-         * 本例入参: AA 72 00 00 32 08 8D 03 20 62 33 99
-         */
-        byte[] byteDeviceReq = new byte[12];
-        byteDeviceReq[0] = (byte) 0xAA;
-        byteDeviceReq[1] = (byte) 0x72;
-        byteDeviceReq[2] = (byte) 0x00;
-        byteDeviceReq[3] = (byte) 0x00;
-        byteDeviceReq[4] = (byte) 0x32;
-        byteDeviceReq[5] = (byte) 0x08;
-        byteDeviceReq[6] = (byte) 0x8D;
-        byteDeviceReq[7] = (byte) 0x03;
-        byteDeviceReq[8] = (byte) 0x20;
-        byteDeviceReq[9] = (byte) 0x62;
-        byteDeviceReq[10] = (byte) 0x33;
-        byteDeviceReq[11] = (byte) 0x99;
-        System.out.println(byteDeviceReq[5]);
-        return byteDeviceReq;
-    }
-
-    /*
-     * 初始化:平台向设备命令下发数据
-     */
-    private static ObjectNode initCloudReqObjectNode() {
-        ObjectMapper mapper = new ObjectMapper();
-        ObjectNode cloudReqObjectNode = mapper.createObjectNode();
-        ObjectNode paras = mapper.createObjectNode();
-        paras.put("value", "10");
-        cloudReqObjectNode.put("identifier", "123");
-        cloudReqObjectNode.put("msgType", "cloudReq");
-        cloudReqObjectNode.put("cmd", "SET_DEVICE_LEVEL");
-        cloudReqObjectNode.put("paras", paras);
-        cloudReqObjectNode.put("hasMore", 0);
-        cloudReqObjectNode.put("mid", 2016);
-        return cloudReqObjectNode;
-    }
-
-    private static byte[] getArray() {
-        byte[] input = new byte[9];
-        input[0] = 0x01;
-        input[1] = 0x27;
-        input[2] = 0x02;
-        input[3] = 0x12;
-        input[4] = 0x01;
-        input[5] = 0x31;
-        input[6] = 0x44;
-        input[7] = 0x55;
-        input[8] = 0x01;
-        /*cloudReqObjectNode.put("cmdid", (byte)0x01);
-        cloudReqObjectNode.put("pid", (byte) 0xAA);
-        cloudReqObjectNode.put("tid", (byte) 0x01);
-        cloudReqObjectNode.put("eventcnt", (byte) 0x01);
-        cloudReqObjectNode.put("verno", (byte) 0x01);
-        cloudReqObjectNode.put("eventstate", (byte) 0xE0);*/
-        return input;
-    }
-
-
-
-    /*
-     * 初始化:设备对平台的响应码流
-     */
-    private static byte[] initDeviceRspByte() {
-        /*
-         * 测试用例:有命令短mid 设备应答消息:AA7201000107E0
-         */
-        byte[] byteDeviceRsp = new byte[12];
-        byteDeviceRsp[0] = (byte) 0xAA;
-        byteDeviceRsp[1] = (byte) 0x72;
-        byteDeviceRsp[2] = (byte) 0x01;
-        byteDeviceRsp[3] = (byte) 0x00;
-        byteDeviceRsp[4] = (byte) 0x01;
-        byteDeviceRsp[5] = (byte) 0x07;
-        byteDeviceRsp[6] = (byte) 0xE0;
-        return byteDeviceRsp;
-    }
-
-    /*
-     * 初始化:平台对设备的应答数据
-     */
-    private static ObjectNode initCloudRspObjectNode(byte[] device2CloudByte) {
-
-        ObjectMapper mapper = new ObjectMapper();
-        ObjectNode cloudRspObjectNode = mapper.createObjectNode();
-        cloudRspObjectNode.put("identifier", "123");
-        cloudRspObjectNode.put("msgType", "cloudRsp");
-        // 设备上报的码流
-        cloudRspObjectNode.put("request", device2CloudByte);
-        cloudRspObjectNode.put("errcode", 0);
-        cloudRspObjectNode.put("hasMore", 0);
-        return cloudRspObjectNode;
-    }
-}
diff --git a/pom.xml b/pom.xml
index 4570ec0..d434dcd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,7 @@
     
         zteits-job
         zteits-nbiot
-        VehicleDetector_FH_FH
+        zteits-nbiot-fh
     
 
 
\ No newline at end of file
diff --git a/zteits-nbiot-fh/VehicleDetector-FH-FH.iml b/zteits-nbiot-fh/VehicleDetector-FH-FH.iml
new file mode 100644
index 0000000..105ce93
--- /dev/null
+++ b/zteits-nbiot-fh/VehicleDetector-FH-FH.iml
@@ -0,0 +1,53 @@
+
+
+  
+    
+      
+        
+          
+          
+          
+          
+          
+          
+          
+          
+        
+        
+      
+    
+  
+  
+    
+    
+    
+      
+      
+      
+      
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+      
+        
+          
+        
+        
+        
+      
+    
+    
+    
+    
+    
+    
+    
+  
+
\ No newline at end of file
diff --git a/zteits-nbiot-fh/lib/com.huawei.m2m.cig.tup-1.3.1.jar b/zteits-nbiot-fh/lib/com.huawei.m2m.cig.tup-1.3.1.jar
new file mode 100644
index 0000000..389ffc0
Binary files /dev/null and b/zteits-nbiot-fh/lib/com.huawei.m2m.cig.tup-1.3.1.jar differ
diff --git a/zteits-nbiot-fh/package/package-info.json b/zteits-nbiot-fh/package/package-info.json
new file mode 100644
index 0000000..f121152
--- /dev/null
+++ b/zteits-nbiot-fh/package/package-info.json
@@ -0,0 +1 @@
+{"specVersion":"1.0","fileName":"package.zip","version":"1.0.0","deviceType":"VehicleDetector","manufacturerName":"FH","model":"FH","description":"CIG codec plugin auto-generated by sps.","platform":"linux","packageType":"CIGPlugin","date":"Wed Aug 29 03:47:49 GMT 2018","ignoreList":[],"bundles":[{"bundleName":"VehicleDetector-FH-FH","bundleVersion":"1.0.0","priority":5,"fileName":"VehicleDetector-FH-FH-1.0.0.jar","bundleDesc":"","versionDesc":""}]}
\ No newline at end of file
diff --git a/zteits-nbiot-fh/package/package.zip b/zteits-nbiot-fh/package/package.zip
new file mode 100644
index 0000000..9fa2798
Binary files /dev/null and b/zteits-nbiot-fh/package/package.zip differ
diff --git a/zteits-nbiot-fh/package/preload/VehicleDetector-FH-FH-1.0.0.jar b/zteits-nbiot-fh/package/preload/VehicleDetector-FH-FH-1.0.0.jar
new file mode 100644
index 0000000..7f22bac
Binary files /dev/null and b/zteits-nbiot-fh/package/preload/VehicleDetector-FH-FH-1.0.0.jar differ
diff --git a/zteits-nbiot-fh/pom.xml b/zteits-nbiot-fh/pom.xml
new file mode 100644
index 0000000..a50405c
--- /dev/null
+++ b/zteits-nbiot-fh/pom.xml
@@ -0,0 +1,115 @@
+
+	4.0.0
+
+	com.fh.party
+	
+	VehicleDetector-FH-FH
+	1.0.0
+	
+	bundle
+
+	
+		UTF-8
+		4.11
+		2.7.4
+		2.5.4
+		2.4
+		1.3.1
+		1.7.6
+		./
+	
+
+	
+		
+		
+			junit
+			junit
+			${junit.version}
+		
+		
+		
+			org.slf4j
+			slf4j-api
+			${slf4j.api.version}
+		
+		
+		
+			com.fasterxml.jackson.core
+			jackson-databind
+			${fasterxml.jackson.version}
+		
+		
+		
+		
+			com.huawei
+			protocal-jar
+			1.3.1
+			system
+			${basedir}/lib/com.huawei.m2m.cig.tup-1.3.1.jar
+		
+
+		
+		
+			net.sf.json-lib
+			json-lib
+			2.4
+			jdk15
+		
+
+	
+	
+		
+			
+			
+				org.apache.maven.plugins
+				maven-compiler-plugin
+				
+					1.8
+					1.8
+				
+			
+			
+			
+				org.apache.felix
+				maven-bundle-plugin
+				${felix.maven.plugin.version}
+				true
+				
+					./target
+					
+						false
+					
+					
+						J2SE-1.5
+						
+						OSGI-INF/*
+						
+						VehicleDetector-FH-FH
+						
+						
+							org.slf4j,
+							org.slf4j.spi,
+							org.apache.log4j.spi,
+							com.huawei.m2m.cig.tup.modules.protocol_adapter,
+							com.fasterxml.jackson.databind,
+							com.fasterxml.jackson.databind.node
+						
+						
+						
+							json-lib
+						
+					
+				
+				
+					
+						generate-resource
+						
+							manifest
+						
+					
+				
+			
+		
+	
+
\ No newline at end of file
diff --git a/zteits-nbiot-fh/src/main/java/com/fh/party/CmdProcess.java b/zteits-nbiot-fh/src/main/java/com/fh/party/CmdProcess.java
new file mode 100644
index 0000000..a396939
--- /dev/null
+++ b/zteits-nbiot-fh/src/main/java/com/fh/party/CmdProcess.java
@@ -0,0 +1,44 @@
+package com.fh.party;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+public class CmdProcess {
+
+    //private String identifier = "123";
+    private byte cmdid = 0x01;
+    private int pid;
+    private int tid;
+    private int eventcnt;
+    private int verno;
+    private int eventstate;
+
+
+    public CmdProcess() {
+    }
+
+    public CmdProcess(ObjectNode input) {
+        try {
+            this.pid = (byte)input.get("pid").asInt();
+            this.tid = (byte)input.get("tid").asInt();
+            this.eventcnt = (byte)input.get("eventcnt").asInt();
+            this.verno = (byte)input.get("verno").asInt();
+            this.eventstate = (byte)input.get("eventstate").asInt();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+
+    }
+
+    public byte[] toByte() {
+        byte[] bytes = new byte[6];
+        bytes[0] = cmdid;
+        bytes[1] = (byte)pid;
+        bytes[2] = (byte)tid;
+        bytes[3] = (byte)eventcnt;
+        bytes[4] = (byte)verno;
+        bytes[5] = (byte)eventstate;
+        return bytes;
+    }
+
+}
diff --git a/zteits-nbiot-fh/src/main/java/com/fh/party/ProtocolAdapterImpl.java b/zteits-nbiot-fh/src/main/java/com/fh/party/ProtocolAdapterImpl.java
new file mode 100644
index 0000000..d912eab
--- /dev/null
+++ b/zteits-nbiot-fh/src/main/java/com/fh/party/ProtocolAdapterImpl.java
@@ -0,0 +1,61 @@
+package com.fh.party;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.huawei.m2m.cig.tup.modules.protocol_adapter.IProtocolAdapter;
+
+
+public class ProtocolAdapterImpl implements IProtocolAdapter {
+
+    private static final Logger logger = LoggerFactory.getLogger(ProtocolAdapterImpl.class);
+    // 厂商名称
+    private static final String MANU_FACTURERID = "FH";
+    // 设备型号
+    private static final String MODEL = "FH";
+
+    @Override
+    public String getManufacturerId() {
+        return MANU_FACTURERID;
+    }
+
+    @Override
+    public String getModel() {
+        return MODEL;
+    }
+
+    public void activate() {
+        logger.info("Codec demo HttpMessageHander activated.");
+    }
+
+    public void deactivate() {
+        logger.info("Codec demo HttpMessageHander deactivated.");
+    }
+
+    public byte[] encode(ObjectNode input) throws Exception {
+        /*logger.info("dynamic lrbtest " + input.toString());
+        try {
+            CmdProcess cmdProcess = new CmdProcess(input);
+            byte[] byteNode = cmdProcess.toByte();
+            return byteNode;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }*/
+        return null;
+    }
+
+    public ObjectNode decode(byte[] binaryData) throws Exception {
+        try {
+            ReportProcess lightProcess = new ReportProcess(binaryData);
+            ObjectNode objectNode = lightProcess.toJsonNode();
+            logger.info("dynamic lrbtest " + objectNode.toString());
+            return objectNode;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+}
diff --git a/zteits-nbiot-fh/src/main/java/com/fh/party/ReportProcess.java b/zteits-nbiot-fh/src/main/java/com/fh/party/ReportProcess.java
new file mode 100644
index 0000000..efece23
--- /dev/null
+++ b/zteits-nbiot-fh/src/main/java/com/fh/party/ReportProcess.java
@@ -0,0 +1,111 @@
+package com.fh.party;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class ReportProcess {
+    private byte cmdid = 0x01;
+    private int pid;
+    private int tid;
+    private int eventcnt;
+    private int verno;
+    private byte eventstate;
+
+    //
+    private String factoryCode = "fh";
+    private String model = "fh";
+    private int reportType;
+    private int reportTime;
+    private int state;
+    private int packCount;
+    private int voltage;
+    private int magId;
+    private int rssi;
+    private int version;
+
+    public ReportProcess(byte[] binaryData) throws ParseException {
+        pid = binaryData[1];
+        tid = binaryData[2];
+        eventcnt = binaryData[3];
+        verno = binaryData[4];
+        eventstate = binaryData[5];
+        if((eventstate & 1) == 1){
+            reportType = 33;
+        }
+        if((eventstate & 2) == 2){
+            reportType = 32;
+        }
+        if((eventstate & 3) == 3){
+            reportType = 32;
+        }
+        magId = tid;
+        reportTime = calLastedTime();
+        if((eventstate & 32) == 32){
+            state = 1;
+        }else{
+            state = 0;
+        }
+    }
+
+    public ObjectNode toJsonNode() {
+        try {
+            //组装body体
+            ObjectMapper mapper = new ObjectMapper();
+            ObjectNode root = mapper.createObjectNode();
+            // root.put("identifier", this.identifier);
+            root.put("factoryCode", this.factoryCode);
+            root.put("model", this.model);
+            root.put("reportType", this.reportType);
+            root.put("reportTime", this.reportTime);
+            root.put("state", this.state);
+            root.put("magId", this.magId);
+            return root;
+        } catch (Exception e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+
+    /**
+     * 1970-1-1 经过的秒总数
+     * @return
+     */
+    public static int calLastedTime() throws ParseException {
+        long a = new Date().getTime();
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date startDate = dateFormat.parse("1970-01-01");
+        long b = startDate.getTime();
+        return (int)((a - b) / 1000);
+    }
+
+    /**
+     * 将byte转换为一个长度为8的byte数组,数组每个值代表bit
+     */
+    public static byte[] byteToArray(byte b) {
+        byte[] array = new byte[8];
+        for (int i = 7; i >= 0; i--) {
+            array[i] = (byte)(b & 1);
+            b = (byte) (b >> 1);
+        }
+        return array;
+    }
+
+    /**
+     * 把byte转为字符串的bit
+     */
+    public static String byteToBit(byte b) {
+        return ""
+                + (byte) ((b >> 7) & 0x1) + (byte) ((b >> 6) & 0x1)
+                + (byte) ((b >> 5) & 0x1) + (byte) ((b >> 4) & 0x1)
+                + (byte) ((b >> 3) & 0x1) + (byte) ((b >> 2) & 0x1)
+                + (byte) ((b >> 1) & 0x1) + (byte) ((b >> 0) & 0x1);
+    }
+
+    public static void main(String[] args) throws ParseException {
+    }
+}
\ No newline at end of file
diff --git a/zteits-nbiot-fh/src/main/java/com/fh/party/Utilty.java b/zteits-nbiot-fh/src/main/java/com/fh/party/Utilty.java
new file mode 100644
index 0000000..dde0641
--- /dev/null
+++ b/zteits-nbiot-fh/src/main/java/com/fh/party/Utilty.java
@@ -0,0 +1,59 @@
+package com.fh.party;
+
+
+public class Utilty {
+
+    private static Utilty instance = new Utilty();
+
+    public static Utilty getInstance() {
+        return instance;
+    }
+
+    public static final int MIN_MID_VALUE = 1;
+
+    public static final int MAX_MID_VALUE = 65535;
+
+
+    public int bytes2Int(byte[] b, int start, int length) {
+        int sum = 0;
+        int end = start + length;
+        for (int k = start; k < end; k++) {
+            int n = ((int) b[k]) & 0xff;
+            n <<= (--length) * 8;
+            sum += n;
+        }
+        return sum;
+    }
+
+    public byte[] int2Bytes(int value, int length) {
+        byte[] b = new byte[length];
+        for (int k = 0; k < length; k++) {
+            b[length - k - 1] = (byte) ((value >> 8 * k) & 0xff);
+        }
+        return b;
+    }
+
+    public boolean isValidofMid(int mId) {
+        if (mId < MIN_MID_VALUE || mId > MAX_MID_VALUE) {
+            return false;
+        }
+        return true;
+    }
+
+
+    public static String parseByte2HexStr(byte[] buf) {
+        if (null == buf) {
+            return null;
+        }
+
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < buf.length; i++) {
+            String hex = Integer.toHexString(buf[i] & 0xFF);
+            if (hex.length() == 1) {
+                hex = '0' + hex;
+            }
+            sb.append(hex.toUpperCase());
+        }
+        return sb.toString();
+    }
+}
diff --git a/zteits-nbiot-fh/src/main/resources/OSGI-INF/CodecProvideHandler.xml b/zteits-nbiot-fh/src/main/resources/OSGI-INF/CodecProvideHandler.xml
new file mode 100644
index 0000000..615f98e
--- /dev/null
+++ b/zteits-nbiot-fh/src/main/resources/OSGI-INF/CodecProvideHandler.xml
@@ -0,0 +1,7 @@
+
+
+    
+    
+		
+	
+
diff --git a/zteits-nbiot-fh/src/test/java/com/fh/party/ProtocolServiceImplTest.java b/zteits-nbiot-fh/src/test/java/com/fh/party/ProtocolServiceImplTest.java
new file mode 100644
index 0000000..a93962c
--- /dev/null
+++ b/zteits-nbiot-fh/src/test/java/com/fh/party/ProtocolServiceImplTest.java
@@ -0,0 +1,214 @@
+package com.fh.party;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.node.ObjectNode;
+import com.huawei.m2m.cig.tup.modules.protocol_adapter.IProtocolAdapter;
+
+/**
+ * Unit test for simple App.
+ */
+public class ProtocolServiceImplTest {
+
+    private IProtocolAdapter protocolAdapter;
+
+    @Before
+    public void setProtocolAdapter() {
+        this.protocolAdapter = new ProtocolAdapterImpl();
+    }
+
+    /**
+     * 测试用例1:设备向平台上报数据。
+     * 

+ *

+     * 设备上报数据:AA72000032088D0320623399
+     * 
+ * + * @throws Exception + */ + @Test + public void testDecodeDeviceReportData() throws Exception { + byte[] deviceReqByte = getArray(); + ObjectNode objectNode = protocolAdapter.decode(deviceReqByte); + String str = objectNode.toString(); + System.out.println(str); + } + + /** + * 测试用例2:平台向设备下发控制命令: + *

+ *

+     * {
+     * //"identifier": "123",
+     * "msgType": "cloudReq",
+     * "cmd": "SET_DEVICE_LEVEL",
+     * "mid": 2016,
+     * "paras": { "value": "10" },
+     * "hasMore": 0
+     * }
+     * 
+ */ + //@Test + public byte[] testEncodeIoTSendCommand() throws Exception { + ObjectNode CloudReqObjectNode = initCloudReqObjectNode(); + byte[] outputByte = protocolAdapter.encode(CloudReqObjectNode); + System.out.println("cloudReq output:" + parseByte2HexStr(outputByte)); + return outputByte; + } + + /** + * 测试用例3:设备对平台命令的应答消息 有命令短id + *

+ *

+     * 设备应答消息:AA7201000107E0
+     *
+     * 
+     *
+     * @throws Exception
+     */
+    //@Test
+    public void testDecodeDeviceResponseIoT() throws Exception {
+        byte[] deviceRspByte = initDeviceRspByte();
+        ObjectNode objectNode = protocolAdapter.decode(deviceRspByte);
+        String str = objectNode.toString();
+        System.out.println(str);
+    }
+
+    /**
+     * 测试用例4:平台收到设备的上报数据后对设备的应答,如果不需要应答则返回null即可
+     * 
+     * {
+     * "identifier": "0",
+     * "msgType": "cloudRsp",
+     * "request": [AA,72,00,00,32,08,8D,03,20,62,33,99],
+     * "errcode": 0,
+     * "hasMore": 0
+     * }
+     *
+     * 
+     *
+     * @throws Exception
+     */
+    //@Test
+    public void testEncodeIoTResponseDevice() throws Exception {
+        byte[] deviceReqByte = initDeviceReqByte();
+        ObjectNode cloudRspObjectNode = initCloudRspObjectNode(deviceReqByte);
+        byte[] outputByte2 = protocolAdapter.encode(cloudRspObjectNode);
+        System.out.println("cloudRsp output:" + parseByte2HexStr(outputByte2));
+    }
+
+    public static String parseByte2HexStr(byte[] buf) {
+        if (null == buf) {
+            return null;
+        }
+
+        StringBuffer sb = new StringBuffer();
+        for (int i = 0; i < buf.length; i++) {
+            String hex = Integer.toHexString(buf[i] & 0xFF);
+            if (hex.length() == 1) {
+                hex = '0' + hex;
+            }
+            sb.append(hex.toUpperCase());
+        }
+        return sb.toString();
+    }
+
+    /*
+     * 初始化:设备数据上报码流
+     */
+    private static byte[] initDeviceReqByte() {
+        /**
+         * 本例入参: AA 72 00 00 32 08 8D 03 20 62 33 99
+         */
+        byte[] byteDeviceReq = new byte[12];
+        byteDeviceReq[0] = (byte) 0xAA;
+        byteDeviceReq[1] = (byte) 0x72;
+        byteDeviceReq[2] = (byte) 0x00;
+        byteDeviceReq[3] = (byte) 0x00;
+        byteDeviceReq[4] = (byte) 0x32;
+        byteDeviceReq[5] = (byte) 0x08;
+        byteDeviceReq[6] = (byte) 0x8D;
+        byteDeviceReq[7] = (byte) 0x03;
+        byteDeviceReq[8] = (byte) 0x20;
+        byteDeviceReq[9] = (byte) 0x62;
+        byteDeviceReq[10] = (byte) 0x33;
+        byteDeviceReq[11] = (byte) 0x99;
+        System.out.println(byteDeviceReq[5]);
+        return byteDeviceReq;
+    }
+
+    /*
+     * 初始化:平台向设备命令下发数据
+     */
+    private static ObjectNode initCloudReqObjectNode() {
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode cloudReqObjectNode = mapper.createObjectNode();
+        ObjectNode paras = mapper.createObjectNode();
+        paras.put("value", "10");
+        cloudReqObjectNode.put("identifier", "123");
+        cloudReqObjectNode.put("msgType", "cloudReq");
+        cloudReqObjectNode.put("cmd", "SET_DEVICE_LEVEL");
+        cloudReqObjectNode.put("paras", paras);
+        cloudReqObjectNode.put("hasMore", 0);
+        cloudReqObjectNode.put("mid", 2016);
+        return cloudReqObjectNode;
+    }
+
+    private static byte[] getArray() {
+        byte[] input = new byte[9];
+        input[0] = 0x01;
+        input[1] = 0x27;
+        input[2] = 0x02;
+        input[3] = 0x12;
+        input[4] = 0x01;
+        input[5] = 0x31;
+        input[6] = 0x44;
+        input[7] = 0x55;
+        input[8] = 0x01;
+        /*cloudReqObjectNode.put("cmdid", (byte)0x01);
+        cloudReqObjectNode.put("pid", (byte) 0xAA);
+        cloudReqObjectNode.put("tid", (byte) 0x01);
+        cloudReqObjectNode.put("eventcnt", (byte) 0x01);
+        cloudReqObjectNode.put("verno", (byte) 0x01);
+        cloudReqObjectNode.put("eventstate", (byte) 0xE0);*/
+        return input;
+    }
+
+
+
+    /*
+     * 初始化:设备对平台的响应码流
+     */
+    private static byte[] initDeviceRspByte() {
+        /*
+         * 测试用例:有命令短mid 设备应答消息:AA7201000107E0
+         */
+        byte[] byteDeviceRsp = new byte[12];
+        byteDeviceRsp[0] = (byte) 0xAA;
+        byteDeviceRsp[1] = (byte) 0x72;
+        byteDeviceRsp[2] = (byte) 0x01;
+        byteDeviceRsp[3] = (byte) 0x00;
+        byteDeviceRsp[4] = (byte) 0x01;
+        byteDeviceRsp[5] = (byte) 0x07;
+        byteDeviceRsp[6] = (byte) 0xE0;
+        return byteDeviceRsp;
+    }
+
+    /*
+     * 初始化:平台对设备的应答数据
+     */
+    private static ObjectNode initCloudRspObjectNode(byte[] device2CloudByte) {
+
+        ObjectMapper mapper = new ObjectMapper();
+        ObjectNode cloudRspObjectNode = mapper.createObjectNode();
+        cloudRspObjectNode.put("identifier", "123");
+        cloudRspObjectNode.put("msgType", "cloudRsp");
+        // 设备上报的码流
+        cloudRspObjectNode.put("request", device2CloudByte);
+        cloudRspObjectNode.put("errcode", 0);
+        cloudRspObjectNode.put("hasMore", 0);
+        return cloudRspObjectNode;
+    }
+}
diff --git a/zteits-nbiot-fh/zteits-nbiot-fh.iml b/zteits-nbiot-fh/zteits-nbiot-fh.iml
new file mode 100644
index 0000000..e69fa68
--- /dev/null
+++ b/zteits-nbiot-fh/zteits-nbiot-fh.iml
@@ -0,0 +1,20 @@
+
+
+  
+    
+      
+        
+          
+          
+          
+          
+          
+          
+          
+          
+        
+        
+      
+    
+  
+
\ No newline at end of file
--
libgit2 0.21.4