xiwa 2 éve
szülő
commit
57fce9102a
100 módosított fájl, 97 hozzáadás és 94 törlés
  1. BIN
      data/components/eabb131d-8fd1-43a8-88d9-a198abfd3d42/iot-mqtt-component-0.3.1-SNAPSHOT.jar
  2. 1 1
      data/init/protocolComponent.json
  3. 3 3
      iot-auth-server/pom.xml
  4. 1 0
      iot-auth-server/readme.txt
  5. 0 0
      iot-auth-server/src/main/java/cc/iotkit/oauth/controller/AuthClientController.java
  6. 0 0
      iot-auth-server/src/main/java/cc/iotkit/oauth/controller/AuthServerController.java
  7. 0 0
      iot-auth-server/src/main/java/cc/iotkit/oauth/service/SaOAuth2TemplateImpl.java
  8. 0 0
      iot-auth-server/src/main/java/cc/iotkit/oauth/service/StpInterfaceImpl.java
  9. 0 0
      iot-auth-server/src/main/java/cc/iotkit/oauth/service/TokenRequestHandler.java
  10. 0 0
      iot-auth-server/src/main/java/cc/iotkit/oauth/vo/UserInfoVo.java
  11. 0 0
      iot-auth-server/src/main/java/cc/iotkit/utils/AuthUtil.java
  12. 0 0
      iot-auth-server/src/main/java/cc/iotkit/utils/SoMap.java
  13. 0 0
      iot-auth-server/src/main/resources/templates/confirm.html
  14. 0 0
      iot-auth-server/src/main/resources/templates/login.html
  15. 0 0
      iot-auth-server/src/test/java/GenPwdSecret.java
  16. 2 2
      iot-common/pom.xml
  17. 1 0
      iot-common/readme.txt
  18. 1 1
      iot-common/src/main/java/cc/iotkit/common/ComponentClassLoader.java
  19. 0 0
      iot-common/src/main/java/cc/iotkit/common/Constants.java
  20. 0 0
      iot-common/src/main/java/cc/iotkit/common/exception/BizException.java
  21. 0 0
      iot-common/src/main/java/cc/iotkit/common/exception/NotFoundException.java
  22. 0 0
      iot-common/src/main/java/cc/iotkit/common/exception/OfflineException.java
  23. 0 0
      iot-common/src/main/java/cc/iotkit/common/thing/ThingService.java
  24. 0 0
      iot-common/src/main/java/cc/iotkit/common/utils/CodecUtil.java
  25. 0 0
      iot-common/src/main/java/cc/iotkit/common/utils/DeviceUtil.java
  26. 0 0
      iot-common/src/main/java/cc/iotkit/common/utils/HexUtil.java
  27. 0 0
      iot-common/src/main/java/cc/iotkit/common/utils/JsonUtil.java
  28. 0 0
      iot-common/src/main/java/cc/iotkit/common/utils/ReflectUtil.java
  29. 0 0
      iot-common/src/main/java/cc/iotkit/common/utils/ThreadUtil.java
  30. 0 0
      iot-common/src/main/java/cc/iotkit/common/utils/UniqueIdUtil.java
  31. BIN
      iot-components/.DS_Store
  32. BIN
      iot-components/iot-component-base/.DS_Store
  33. 7 7
      iot-components/iot-component-base/pom.xml
  34. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/AbstractDeviceComponent.java
  35. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/CompConfig.java
  36. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/IComponent.java
  37. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/IDeviceComponent.java
  38. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/IMessageHandler.java
  39. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/model/AuthInfo.java
  40. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/model/DeviceState.java
  41. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/model/ReceiveResult.java
  42. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/model/RegisterInfo.java
  43. 0 0
      iot-components/iot-component-base/src/main/java/cc/iotkit/comp/utils/SpringUtils.java
  44. BIN
      iot-components/iot-component-converter/.DS_Store
  45. 7 7
      iot-components/iot-component-converter/pom.xml
  46. 0 0
      iot-components/iot-component-converter/src/main/java/cc/iotkit/converter/Device.java
  47. 0 0
      iot-components/iot-component-converter/src/main/java/cc/iotkit/converter/DeviceMessage.java
  48. 0 0
      iot-components/iot-component-converter/src/main/java/cc/iotkit/converter/IConverter.java
  49. 0 0
      iot-components/iot-component-converter/src/main/java/cc/iotkit/converter/ScriptConverter.java
  50. BIN
      iot-components/iot-component-server/.DS_Store
  51. 9 9
      iot-components/iot-component-server/pom.xml
  52. 0 0
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/ApiTool.java
  53. 0 0
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/BizComponentManager.java
  54. 0 0
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/ComponentManager.java
  55. 4 4
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/DeviceComponentManager.java
  56. 0 0
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/DeviceMessageHandler.java
  57. 0 0
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/DeviceRouter.java
  58. 0 0
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/config/CacheKey.java
  59. 0 0
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/config/ComponentConfig.java
  60. 1 1
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/service/DeviceBehaviourService.java
  61. 0 0
      iot-components/iot-component-server/src/main/java/cc/iotkit/comps/service/DeviceMessageConsumer.java
  62. BIN
      iot-components/iot-ctwing-component/.DS_Store
  63. 0 0
      iot-components/iot-ctwing-component/lib/ag-sdk-biz-84356.tar.gz-20220603.182201-SNAPSHOT.jar
  64. 0 0
      iot-components/iot-ctwing-component/lib/ctg-ag-sdk-core-2.5.0-20220512.061430-51.jar
  65. 8 8
      iot-components/iot-ctwing-component/pom.xml
  66. 0 0
      iot-components/iot-ctwing-component/src/main/java/cc/iotkit/comp/http/CtwingConfig.java
  67. 0 0
      iot-components/iot-ctwing-component/src/main/java/cc/iotkit/comp/http/CtwingDeviceComponent.java
  68. 0 0
      iot-components/iot-ctwing-component/src/main/java/cc/iotkit/comp/http/ProtocolUtil.java
  69. 0 0
      iot-components/iot-ctwing-component/src/main/resources/component.js
  70. 0 0
      iot-components/iot-ctwing-component/src/main/resources/component.spi
  71. BIN
      iot-components/iot-emqx-component/.DS_Store
  72. 17 17
      iot-components/iot-emqx-component/dependency-reduced-pom.xml
  73. 11 10
      iot-components/iot-emqx-component/pom.xml
  74. 0 0
      iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/AuthVerticle.java
  75. 0 0
      iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/EmqxConfig.java
  76. 0 0
      iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/EmqxDeviceComponent.java
  77. 0 0
      iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/IScripter.java
  78. 0 0
      iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/JsScripter.java
  79. 0 0
      iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/LuaScripter.java
  80. 0 0
      iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/TransparentConverter.java
  81. 0 0
      iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/TransparentMsg.java
  82. 0 0
      iot-components/iot-emqx-component/src/main/resources/component.js
  83. 0 0
      iot-components/iot-emqx-component/src/main/resources/component.spi
  84. 0 0
      iot-components/iot-http-biz-component/.DS_Store
  85. 5 5
      iot-components/iot-http-biz-component/dependency-reduced-pom.xml
  86. 4 4
      iot-components/iot-http-biz-component/pom.xml
  87. 0 0
      iot-components/iot-http-biz-component/src/main/java/cc/iotkit/comp/biz/HttpBizComponent.java
  88. 0 0
      iot-components/iot-http-biz-component/src/main/java/cc/iotkit/comp/biz/HttpConfig.java
  89. 0 0
      iot-components/iot-http-biz-component/src/main/resources/component.spi
  90. 0 0
      iot-components/iot-http-biz-component/src/main/resources/onenet接入脚本示例.js
  91. 0 0
      iot-components/iot-http-biz-component/src/main/resources/小度音箱接入脚本示例.js
  92. 0 0
      iot-components/iot-mqtt-component/.DS_Store
  93. 9 9
      iot-components/iot-mqtt-component/dependency-reduced-pom.xml
  94. 6 6
      iot-components/iot-mqtt-component/pom.xml
  95. 0 0
      iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/IScripter.java
  96. 0 0
      iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/JsScripter.java
  97. 0 0
      iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/LuaScripter.java
  98. 0 0
      iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttConfig.java
  99. 0 0
      iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttDeviceComponent.java
  100. 0 0
      iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttVerticle.java

BIN
data/components/eabb131d-8fd1-43a8-88d9-a198abfd3d42/mqtt-component-0.3.0-SNAPSHOT.jar → data/components/eabb131d-8fd1-43a8-88d9-a198abfd3d42/iot-mqtt-component-0.3.1-SNAPSHOT.jar


+ 1 - 1
data/init/protocolComponent.json

@@ -17,7 +17,7 @@
     "name": "MQTT标准协议组件",
     "type": "device",
     "protocol": "mqtt",
-    "jarFile": "mqtt-component-0.2.1-SNAPSHOT.jar",
+    "jarFile": "iot-mqtt-component-0.3.1-SNAPSHOT.jar",
     "config": "{\"port\":1883,\"ssl\":false,\"type\":\"server\"}",
     "converter": "6260396d67aced2696184053",
     "state": "running",

+ 3 - 3
oauth2-server/pom.xml → iot-auth-server/pom.xml

@@ -5,11 +5,11 @@
     <parent>
         <artifactId>iotkit-parent</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>oauth2-server</artifactId>
+    <artifactId>iot-auth-server</artifactId>
 
     <dependencies>
 
@@ -45,7 +45,7 @@
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>dao</artifactId>
+            <artifactId>iot-dao</artifactId>
         </dependency>
 
         <dependency>

+ 1 - 0
iot-auth-server/readme.txt

@@ -0,0 +1 @@
+此模块为认证服务,提供oauth2认证界面和接口

+ 0 - 0
oauth2-server/src/main/java/cc/iotkit/oauth/controller/AuthClientController.java → iot-auth-server/src/main/java/cc/iotkit/oauth/controller/AuthClientController.java


+ 0 - 0
oauth2-server/src/main/java/cc/iotkit/oauth/controller/AuthServerController.java → iot-auth-server/src/main/java/cc/iotkit/oauth/controller/AuthServerController.java


+ 0 - 0
oauth2-server/src/main/java/cc/iotkit/oauth/service/SaOAuth2TemplateImpl.java → iot-auth-server/src/main/java/cc/iotkit/oauth/service/SaOAuth2TemplateImpl.java


+ 0 - 0
oauth2-server/src/main/java/cc/iotkit/oauth/service/StpInterfaceImpl.java → iot-auth-server/src/main/java/cc/iotkit/oauth/service/StpInterfaceImpl.java


+ 0 - 0
oauth2-server/src/main/java/cc/iotkit/oauth/service/TokenRequestHandler.java → iot-auth-server/src/main/java/cc/iotkit/oauth/service/TokenRequestHandler.java


+ 0 - 0
oauth2-server/src/main/java/cc/iotkit/oauth/vo/UserInfoVo.java → iot-auth-server/src/main/java/cc/iotkit/oauth/vo/UserInfoVo.java


+ 0 - 0
oauth2-server/src/main/java/cc/iotkit/utils/AuthUtil.java → iot-auth-server/src/main/java/cc/iotkit/utils/AuthUtil.java


+ 0 - 0
oauth2-server/src/main/java/cc/iotkit/utils/SoMap.java → iot-auth-server/src/main/java/cc/iotkit/utils/SoMap.java


+ 0 - 0
oauth2-server/src/main/resources/templates/confirm.html → iot-auth-server/src/main/resources/templates/confirm.html


+ 0 - 0
oauth2-server/src/main/resources/templates/login.html → iot-auth-server/src/main/resources/templates/login.html


+ 0 - 0
oauth2-server/src/test/java/GenPwdSecret.java → iot-auth-server/src/test/java/GenPwdSecret.java


+ 2 - 2
common/pom.xml → iot-common/pom.xml

@@ -5,11 +5,11 @@
     <parent>
         <artifactId>iotkit-parent</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>common</artifactId>
+    <artifactId>iot-common</artifactId>
 
     <dependencies>
 

+ 1 - 0
iot-common/readme.txt

@@ -0,0 +1 @@
+此模块为通用业务逻辑或工具类

+ 1 - 1
common/src/main/java/cc/iotkit/common/ComponentClassLoader.java → iot-common/src/main/java/cc/iotkit/common/ComponentClassLoader.java

@@ -58,7 +58,7 @@ public class ComponentClassLoader {
     public static <T> T getComponent(String name, File jarFile) throws Exception {
         String className = addUrl(name, jarFile);
         Class<T> componentClass = findClass(name, className);
-        return componentClass.newInstance();
+        return componentClass.getDeclaredConstructor().newInstance();
     }
 
 }

+ 0 - 0
common/src/main/java/cc/iotkit/common/Constants.java → iot-common/src/main/java/cc/iotkit/common/Constants.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/exception/BizException.java → iot-common/src/main/java/cc/iotkit/common/exception/BizException.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/exception/NotFoundException.java → iot-common/src/main/java/cc/iotkit/common/exception/NotFoundException.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/exception/OfflineException.java → iot-common/src/main/java/cc/iotkit/common/exception/OfflineException.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/thing/ThingService.java → iot-common/src/main/java/cc/iotkit/common/thing/ThingService.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/utils/CodecUtil.java → iot-common/src/main/java/cc/iotkit/common/utils/CodecUtil.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/utils/DeviceUtil.java → iot-common/src/main/java/cc/iotkit/common/utils/DeviceUtil.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/utils/HexUtil.java → iot-common/src/main/java/cc/iotkit/common/utils/HexUtil.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/utils/JsonUtil.java → iot-common/src/main/java/cc/iotkit/common/utils/JsonUtil.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/utils/ReflectUtil.java → iot-common/src/main/java/cc/iotkit/common/utils/ReflectUtil.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/utils/ThreadUtil.java → iot-common/src/main/java/cc/iotkit/common/utils/ThreadUtil.java


+ 0 - 0
common/src/main/java/cc/iotkit/common/utils/UniqueIdUtil.java → iot-common/src/main/java/cc/iotkit/common/utils/UniqueIdUtil.java


BIN
iot-components/.DS_Store


BIN
protocol-gateway/mqtt-client-simulator/.DS_Store → iot-components/iot-component-base/.DS_Store


+ 7 - 7
protocol-gateway/component/pom.xml → iot-components/iot-component-base/pom.xml

@@ -3,13 +3,13 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>protocol-gateway</artifactId>
+        <artifactId>iot-components</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>component</artifactId>
+    <artifactId>iot-component-base</artifactId>
 
     <properties>
         <maven.compiler.source>8</maven.compiler.source>
@@ -19,13 +19,13 @@
     <dependencies>
 
         <dependency>
-            <groupId>cc.iotkit</groupId>
-            <artifactId>converter</artifactId>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
+            <groupId>cc.iotkit</groupId>
+            <artifactId>iot-component-converter</artifactId>
         </dependency>
 
     </dependencies>

+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/AbstractDeviceComponent.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/AbstractDeviceComponent.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/CompConfig.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/CompConfig.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/IComponent.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/IComponent.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/IDeviceComponent.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/IDeviceComponent.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/IMessageHandler.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/IMessageHandler.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/model/AuthInfo.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/model/AuthInfo.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/model/DeviceState.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/model/DeviceState.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/model/ReceiveResult.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/model/ReceiveResult.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/model/RegisterInfo.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/model/RegisterInfo.java


+ 0 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/utils/SpringUtils.java → iot-components/iot-component-base/src/main/java/cc/iotkit/comp/utils/SpringUtils.java


BIN
protocol-gateway/.DS_Store → iot-components/iot-component-converter/.DS_Store


+ 7 - 7
protocol-gateway/converter/pom.xml → iot-components/iot-component-converter/pom.xml

@@ -3,13 +3,13 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>protocol-gateway</artifactId>
+        <artifactId>iot-components</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>converter</artifactId>
+    <artifactId>iot-component-converter</artifactId>
 
     <properties>
         <maven.compiler.source>8</maven.compiler.source>
@@ -29,13 +29,13 @@
         </dependency>
 
         <dependency>
-            <groupId>cc.iotkit</groupId>
-            <artifactId>model</artifactId>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
+            <groupId>cc.iotkit</groupId>
+            <artifactId>iot-model</artifactId>
         </dependency>
 
     </dependencies>

+ 0 - 0
protocol-gateway/converter/src/main/java/cc/iotkit/converter/Device.java → iot-components/iot-component-converter/src/main/java/cc/iotkit/converter/Device.java


+ 0 - 0
protocol-gateway/converter/src/main/java/cc/iotkit/converter/DeviceMessage.java → iot-components/iot-component-converter/src/main/java/cc/iotkit/converter/DeviceMessage.java


+ 0 - 0
protocol-gateway/converter/src/main/java/cc/iotkit/converter/IConverter.java → iot-components/iot-component-converter/src/main/java/cc/iotkit/converter/IConverter.java


+ 0 - 0
protocol-gateway/converter/src/main/java/cc/iotkit/converter/ScriptConverter.java → iot-components/iot-component-converter/src/main/java/cc/iotkit/converter/ScriptConverter.java


BIN
iot-components/iot-component-server/.DS_Store


+ 9 - 9
protocol-gateway/component-server/pom.xml → iot-components/iot-component-server/pom.xml

@@ -3,13 +3,13 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>protocol-gateway</artifactId>
+        <artifactId>iot-components</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>component-server</artifactId>
+    <artifactId>iot-component-server</artifactId>
 
     <dependencies>
 
@@ -64,32 +64,32 @@
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>common</artifactId>
+            <artifactId>iot-common</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>converter</artifactId>
+            <artifactId>iot-component-converter</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>model</artifactId>
+            <artifactId>iot-model</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>dao</artifactId>
+            <artifactId>iot-dao</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>component</artifactId>
+            <artifactId>iot-component-base</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>message-bus</artifactId>
+            <artifactId>iot-message-bus</artifactId>
         </dependency>
 
     </dependencies>

+ 0 - 0
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/ApiTool.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/ApiTool.java


+ 0 - 0
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/BizComponentManager.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/BizComponentManager.java


+ 0 - 0
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/ComponentManager.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/ComponentManager.java


+ 4 - 4
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/DeviceComponentManager.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/DeviceComponentManager.java

@@ -94,7 +94,7 @@ public class DeviceComponentManager {
         try {
             componentInstance = ComponentClassLoader.getComponent(component.getId(), file);
         } catch (Throwable e) {
-            throw new BizException("get device component instance error");
+            throw new BizException("get device component instance error", e);
         }
         componentInstance.create(new CompConfig(300, component.getConfig()));
 
@@ -204,17 +204,17 @@ public class DeviceComponentManager {
         }
 
         String sendMid = message.getMid();
-        long timeout=deviceComponent.getConfig().getCmdTimeout();
+        long timeout = deviceComponent.getConfig().getCmdTimeout();
 
         //保存设备端mid与平台mid对应关系
-        saveMidMapping(message,timeout,service.getMid());
+        saveMidMapping(message, timeout, service.getMid());
         //发送消息给设备
         message = deviceComponent.send(message);
 
         //mid发生改变
         if (!sendMid.equals(message.getMid())) {
             //重新保存消息id映射
-            saveMidMapping(message,timeout,service.getMid());
+            saveMidMapping(message, timeout, service.getMid());
         }
 
         //产生下发消息

+ 0 - 0
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/DeviceMessageHandler.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/DeviceMessageHandler.java


+ 0 - 0
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/DeviceRouter.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/DeviceRouter.java


+ 0 - 0
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/config/CacheKey.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/config/CacheKey.java


+ 0 - 0
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/config/ComponentConfig.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/config/ComponentConfig.java


+ 1 - 1
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/service/DeviceBehaviourService.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/service/DeviceBehaviourService.java

@@ -80,7 +80,7 @@ public class DeviceBehaviourService {
         }
 
         Optional<Product> optProduct = productRepository.findById(pk);
-        if (!optProduct.isPresent()) {
+        if (optProduct.isEmpty()) {
             throw new BizException("Product does not exist");
         }
         Product product = optProduct.get();

+ 0 - 0
protocol-gateway/component-server/src/main/java/cc/iotkit/comps/service/DeviceMessageConsumer.java → iot-components/iot-component-server/src/main/java/cc/iotkit/comps/service/DeviceMessageConsumer.java


BIN
iot-components/iot-ctwing-component/.DS_Store


+ 0 - 0
protocol-gateway/ctwing-component/lib/ag-sdk-biz-84356.tar.gz-20220603.182201-SNAPSHOT.jar → iot-components/iot-ctwing-component/lib/ag-sdk-biz-84356.tar.gz-20220603.182201-SNAPSHOT.jar


+ 0 - 0
protocol-gateway/ctwing-component/lib/ctg-ag-sdk-core-2.5.0-20220512.061430-51.jar → iot-components/iot-ctwing-component/lib/ctg-ag-sdk-core-2.5.0-20220512.061430-51.jar


+ 8 - 8
protocol-gateway/ctwing-component/pom.xml → iot-components/iot-ctwing-component/pom.xml

@@ -3,13 +3,13 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>protocol-gateway</artifactId>
+        <artifactId>iot-components</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>ctwing-component</artifactId>
+    <artifactId>iot-ctwing-component</artifactId>
 
 
     <properties>
@@ -29,11 +29,6 @@
             <artifactId>vertx-web-proxy</artifactId>
         </dependency>
 
-        <dependency>
-            <groupId>cc.iotkit</groupId>
-            <artifactId>component</artifactId>
-        </dependency>
-
         <dependency>
             <groupId>com.ctg.ag</groupId>
             <artifactId>ctg-ag-sdk-core</artifactId>
@@ -46,6 +41,11 @@
             <version>20220603.182201-SNAPSHOT</version>
         </dependency>
 
+        <dependency>
+            <groupId>cc.iotkit</groupId>
+            <artifactId>iot-component-base</artifactId>
+        </dependency>
+
     </dependencies>
 
     <build>

+ 0 - 0
protocol-gateway/ctwing-component/src/main/java/cc/iotkit/comp/http/CtwingConfig.java → iot-components/iot-ctwing-component/src/main/java/cc/iotkit/comp/http/CtwingConfig.java


+ 0 - 0
protocol-gateway/ctwing-component/src/main/java/cc/iotkit/comp/http/CtwingDeviceComponent.java → iot-components/iot-ctwing-component/src/main/java/cc/iotkit/comp/http/CtwingDeviceComponent.java


+ 0 - 0
protocol-gateway/ctwing-component/src/main/java/cc/iotkit/comp/http/ProtocolUtil.java → iot-components/iot-ctwing-component/src/main/java/cc/iotkit/comp/http/ProtocolUtil.java


+ 0 - 0
protocol-gateway/ctwing-component/src/main/resources/component.js → iot-components/iot-ctwing-component/src/main/resources/component.js


+ 0 - 0
protocol-gateway/ctwing-component/src/main/resources/component.spi → iot-components/iot-ctwing-component/src/main/resources/component.spi


BIN
iot-components/iot-emqx-component/.DS_Store


+ 17 - 17
protocol-gateway/emqx-component/dependency-reduced-pom.xml → iot-components/iot-emqx-component/dependency-reduced-pom.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
-    <artifactId>protocol-gateway</artifactId>
+    <artifactId>iot-components</artifactId>
     <groupId>cc.iotkit</groupId>
-    <version>0.3.0-SNAPSHOT</version>
+    <version>0.3.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <artifactId>emqx-component</artifactId>
+  <artifactId>iot-emqx-component</artifactId>
   <build>
     <plugins>
       <plugin>
@@ -74,33 +74,33 @@
       <scope>provided</scope>
     </dependency>
     <dependency>
-      <groupId>cc.iotkit</groupId>
-      <artifactId>model</artifactId>
-      <version>0.3.0-SNAPSHOT</version>
-      <scope>compile</scope>
+      <groupId>org.luaj</groupId>
+      <artifactId>luaj-jse</artifactId>
+      <version>3.0.1</version>
+      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>cc.iotkit</groupId>
-      <artifactId>common</artifactId>
-      <version>0.3.0-SNAPSHOT</version>
+      <artifactId>iot-model</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>cc.iotkit</groupId>
-      <artifactId>component</artifactId>
-      <version>0.3.0-SNAPSHOT</version>
+      <artifactId>iot-dao</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
-      <groupId>org.luaj</groupId>
-      <artifactId>luaj-jse</artifactId>
-      <version>3.0.1</version>
-      <scope>provided</scope>
+      <groupId>cc.iotkit</groupId>
+      <artifactId>iot-common</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
+      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>cc.iotkit</groupId>
-      <artifactId>dao</artifactId>
-      <version>0.3.0-SNAPSHOT</version>
+      <artifactId>iot-component-base</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
   </dependencies>

+ 11 - 10
protocol-gateway/emqx-component/pom.xml → iot-components/iot-emqx-component/pom.xml

@@ -3,13 +3,13 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>protocol-gateway</artifactId>
+        <artifactId>iot-components</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>emqx-component</artifactId>
+    <artifactId>iot-emqx-component</artifactId>
 
     <dependencies>
 
@@ -29,29 +29,30 @@
         </dependency>
 
         <dependency>
-            <groupId>cc.iotkit</groupId>
-            <artifactId>model</artifactId>
+            <groupId>org.luaj</groupId>
+            <artifactId>luaj-jse</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>common</artifactId>
+            <artifactId>iot-model</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>component</artifactId>
+            <artifactId>iot-dao</artifactId>
         </dependency>
 
         <dependency>
-            <groupId>org.luaj</groupId>
-            <artifactId>luaj-jse</artifactId>
+            <groupId>cc.iotkit</groupId>
+            <artifactId>iot-common</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>dao</artifactId>
+            <artifactId>iot-component-base</artifactId>
         </dependency>
+
     </dependencies>
 
     <build>

+ 0 - 0
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/AuthVerticle.java → iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/AuthVerticle.java


+ 0 - 0
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/EmqxConfig.java → iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/EmqxConfig.java


+ 0 - 0
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/EmqxDeviceComponent.java → iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/EmqxDeviceComponent.java


+ 0 - 0
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/IScripter.java → iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/IScripter.java


+ 0 - 0
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/JsScripter.java → iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/JsScripter.java


+ 0 - 0
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/LuaScripter.java → iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/LuaScripter.java


+ 0 - 0
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/TransparentConverter.java → iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/TransparentConverter.java


+ 0 - 0
protocol-gateway/emqx-component/src/main/java/cc/iotkit/comp/emqx/TransparentMsg.java → iot-components/iot-emqx-component/src/main/java/cc/iotkit/comp/emqx/TransparentMsg.java


+ 0 - 0
protocol-gateway/emqx-component/src/main/resources/component.js → iot-components/iot-emqx-component/src/main/resources/component.js


+ 0 - 0
protocol-gateway/emqx-component/src/main/resources/component.spi → iot-components/iot-emqx-component/src/main/resources/component.spi


+ 0 - 0
protocol-gateway/http-biz-component/.DS_Store → iot-components/iot-http-biz-component/.DS_Store


+ 5 - 5
protocol-gateway/http-biz-component/dependency-reduced-pom.xml → iot-components/iot-http-biz-component/dependency-reduced-pom.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
-    <artifactId>protocol-gateway</artifactId>
+    <artifactId>iot-components</artifactId>
     <groupId>cc.iotkit</groupId>
-    <version>0.3.0-SNAPSHOT</version>
+    <version>0.3.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <artifactId>http-biz-component</artifactId>
+  <artifactId>iot-http-biz-component</artifactId>
   <build>
     <plugins>
       <plugin>
@@ -57,8 +57,8 @@
     </dependency>
     <dependency>
       <groupId>cc.iotkit</groupId>
-      <artifactId>component</artifactId>
-      <version>0.3.0-SNAPSHOT</version>
+      <artifactId>iot-component-base</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
   </dependencies>

+ 4 - 4
protocol-gateway/http-biz-component/pom.xml → iot-components/iot-http-biz-component/pom.xml

@@ -3,13 +3,13 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>protocol-gateway</artifactId>
+        <artifactId>iot-components</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>http-biz-component</artifactId>
+    <artifactId>iot-http-biz-component</artifactId>
 
     <properties>
         <maven.compiler.source>8</maven.compiler.source>
@@ -30,7 +30,7 @@
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>component</artifactId>
+            <artifactId>iot-component-base</artifactId>
         </dependency>
 
     </dependencies>

+ 0 - 0
protocol-gateway/http-biz-component/src/main/java/cc/iotkit/comp/biz/HttpBizComponent.java → iot-components/iot-http-biz-component/src/main/java/cc/iotkit/comp/biz/HttpBizComponent.java


+ 0 - 0
protocol-gateway/http-biz-component/src/main/java/cc/iotkit/comp/biz/HttpConfig.java → iot-components/iot-http-biz-component/src/main/java/cc/iotkit/comp/biz/HttpConfig.java


+ 0 - 0
protocol-gateway/http-biz-component/src/main/resources/component.spi → iot-components/iot-http-biz-component/src/main/resources/component.spi


+ 0 - 0
protocol-gateway/http-biz-component/src/main/resources/onenet接入脚本示例.js → iot-components/iot-http-biz-component/src/main/resources/onenet接入脚本示例.js


+ 0 - 0
protocol-gateway/http-biz-component/src/main/resources/小度音箱接入脚本示例.js → iot-components/iot-http-biz-component/src/main/resources/小度音箱接入脚本示例.js


+ 0 - 0
protocol-gateway/mqtt-component/.DS_Store → iot-components/iot-mqtt-component/.DS_Store


+ 9 - 9
protocol-gateway/mqtt-component/dependency-reduced-pom.xml → iot-components/iot-mqtt-component/dependency-reduced-pom.xml

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
-    <artifactId>protocol-gateway</artifactId>
+    <artifactId>iot-components</artifactId>
     <groupId>cc.iotkit</groupId>
-    <version>0.3.0-SNAPSHOT</version>
+    <version>0.3.1-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
-  <artifactId>mqtt-component</artifactId>
+  <artifactId>iot-mqtt-component</artifactId>
   <build>
     <plugins>
       <plugin>
@@ -79,20 +79,20 @@
     </dependency>
     <dependency>
       <groupId>cc.iotkit</groupId>
-      <artifactId>common</artifactId>
-      <version>0.3.0-SNAPSHOT</version>
+      <artifactId>iot-common</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>cc.iotkit</groupId>
-      <artifactId>component</artifactId>
-      <version>0.3.0-SNAPSHOT</version>
+      <artifactId>iot-component-base</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>cc.iotkit</groupId>
-      <artifactId>dao</artifactId>
-      <version>0.3.0-SNAPSHOT</version>
+      <artifactId>iot-dao</artifactId>
+      <version>0.3.1-SNAPSHOT</version>
       <scope>compile</scope>
     </dependency>
   </dependencies>

+ 6 - 6
protocol-gateway/mqtt-component/pom.xml → iot-components/iot-mqtt-component/pom.xml

@@ -3,13 +3,13 @@
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
-        <artifactId>protocol-gateway</artifactId>
+        <artifactId>iot-components</artifactId>
         <groupId>cc.iotkit</groupId>
-        <version>0.3.0-SNAPSHOT</version>
+        <version>0.3.1-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
-    <artifactId>mqtt-component</artifactId>
+    <artifactId>iot-mqtt-component</artifactId>
 
     <dependencies>
 
@@ -45,17 +45,17 @@
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>common</artifactId>
+            <artifactId>iot-common</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>component</artifactId>
+            <artifactId>iot-component-base</artifactId>
         </dependency>
 
         <dependency>
             <groupId>cc.iotkit</groupId>
-            <artifactId>dao</artifactId>
+            <artifactId>iot-dao</artifactId>
         </dependency>
 
     </dependencies>

+ 0 - 0
protocol-gateway/mqtt-component/src/main/java/cc/iotkit/comp/mqtt/IScripter.java → iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/IScripter.java


+ 0 - 0
protocol-gateway/mqtt-component/src/main/java/cc/iotkit/comp/mqtt/JsScripter.java → iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/JsScripter.java


+ 0 - 0
protocol-gateway/mqtt-component/src/main/java/cc/iotkit/comp/mqtt/LuaScripter.java → iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/LuaScripter.java


+ 0 - 0
protocol-gateway/mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttConfig.java → iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttConfig.java


+ 0 - 0
protocol-gateway/mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttDeviceComponent.java → iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttDeviceComponent.java


+ 0 - 0
protocol-gateway/mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttVerticle.java → iot-components/iot-mqtt-component/src/main/java/cc/iotkit/comp/mqtt/MqttVerticle.java


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott