xiwa 3 жил өмнө
parent
commit
758f6e12f8

+ 10 - 0
dao/src/main/java/cc/iotkit/dao/DeviceDao.java

@@ -11,6 +11,12 @@ spring:
       password: 密码
       connection-timeout: 10s
 
+  redis:
+    host: redis地址
+    port: 6379
+    database: 0
+    password: redis密码
+
   cache:
     cache-names: foo,bar
     caffeine:
@@ -47,6 +53,10 @@ keycloak-admin-clientid : 填写keycloak中定义的clientId
 keycloak-admin-user : 填写keycloak中添加的管理员用户名
 keycloak-admin-password : 填写keycloak中添加的管理员密码
 
+pulsar:
+  broker: pulsar://pulsar broker地址:6650
+  service: http://pulsar 服务地址:8080
+
 app:
   systemRole: iot_system_user
 

+ 10 - 2
manager/src/main/resources/application.yml

@@ -7,10 +7,14 @@ spring:
   elasticsearch:
     rest:
       uris: http://elasticsearch 连接地址
-      username: elasticsearch 用户名
-      password: 密码
       connection-timeout: 10s
 
+  redis:
+    host: redis地址
+    port: 6379
+    database: 0
+    password:
+
   cache:
     cache-names: foo,bar
     caffeine:
@@ -47,6 +51,10 @@ keycloak-admin-clientid : 填写keycloak中定义的clientId
 keycloak-admin-user : 填写keycloak中添加的管理员用户名
 keycloak-admin-password : 填写keycloak中添加的管理员密码
 
+pulsar:
+  broker: pulsar://pulsar broker地址:6650
+  service: http://pulsar 服务地址:8080
+
 app:
   systemRole: iot_system_user
 

+ 15 - 0
model/src/main/java/cc/iotkit/model/device/message/DeviceProperty.java

@@ -1,5 +1,8 @@
 package cc.iotkit.comp;
 
+import cc.iotkit.comp.model.AuthInfo;
+import cc.iotkit.comp.model.DeviceState;
+import cc.iotkit.comp.model.RegisterInfo;
 import cc.iotkit.converter.IConverter;
 import lombok.Data;
 
@@ -17,6 +20,18 @@ public abstract class AbstractComponent implements IComponent {
         this.config=config;
     }
 
+    @Override
+    public void onDeviceRegister(RegisterInfo info) {
+    }
+
+    @Override
+    public void onDeviceAuth(AuthInfo authInfo) {
+    }
+
+    @Override
+    public void onDeviceStateChange(DeviceState state) {
+    }
+
     @Override
     public CompConfig getConfig() {
         return config;

+ 5 - 0
protocol-gateway/component/src/main/java/cc/iotkit/comp/CompConfig.java

@@ -1,5 +1,6 @@
 package cc.iotkit.comp;
 
+import cc.iotkit.comp.model.AuthInfo;
 import cc.iotkit.comp.model.DeviceState;
 import cc.iotkit.comp.model.RegisterInfo;
 import cc.iotkit.converter.DeviceMessage;
@@ -15,6 +16,10 @@ public interface IComponent {
 
     void destroy();
 
+    void onDeviceAuth(AuthInfo authInfo);
+
+    void onDeviceRegister(RegisterInfo info);
+
     void onDeviceStateChange(DeviceState state);
 
     void send(DeviceMessage message);

BIN
protocol-gateway/component/src/main/java/cc/iotkit/comp/model/ReceiveResult.java


+ 34 - 0
protocol-gateway/mqtt-component/pom.xml

@@ -45,4 +45,38 @@
 
     </dependencies>
 
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <version>3.2.4</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <artifactSet>
+                        <includes>
+                            <include>io.vertx:vertx-core</include>
+                            <include>io.vertx:vertx-mqtt</include>
+                        </includes>
+                    </artifactSet>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>8</source>
+                    <target>8</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
 </project>

+ 1 - 0
protocol-gateway/mqtt-component/src/main/resources/component.js

@@ -17,6 +17,7 @@
         <module>mqtt-component</module>
         <module>emqx-component</module>
         <module>component</module>
+        <module>mqtt-client-simulator</module>
     </modules>
 
 </project>

+ 0 - 0
rule-engine/src/main/java/cc/iotkit/ruleengine/action/DeviceActionService.java