Skip to content

Commit 9ca37ed

Browse files
instpeZhangJian He
andauthored
feat: add service group code (#7)
Signed-off-by: wei <[email protected]> Co-authored-by: ZhangJian He <[email protected]>
1 parent e106753 commit 9ca37ed

File tree

6 files changed

+79
-0
lines changed

6 files changed

+79
-0
lines changed

mdtp-client/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
<groupId>io.netty</groupId>
1717
<artifactId>netty-handler</artifactId>
1818
</dependency>
19+
<dependency>
20+
<groupId>io.github.protocol-laboratory</groupId>
21+
<artifactId>mdtp-common</artifactId>
22+
<version>${project.version}</version>
23+
</dependency>
1924
</dependencies>
2025

2126
</project>

mdtp-common/pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
<parent>
7+
<groupId>io.github.protocol-laboratory</groupId>
8+
<artifactId>mdtp-parent</artifactId>
9+
<version>0.0.1-SNAPSHOT</version>
10+
</parent>
11+
12+
<artifactId>mdtp-common</artifactId>
13+
14+
<dependencies>
15+
<dependency>
16+
<groupId>io.netty</groupId>
17+
<artifactId>netty-handler</artifactId>
18+
</dependency>
19+
</dependencies>
20+
21+
</project>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package iot.github.protocol.mdtp.common.model;
2+
3+
import lombok.Getter;
4+
5+
@Getter
6+
public enum DiscoveryServiceCode {
7+
DEVICE_DISCOVERY(1, "DEVICE_DISCOVERY"),
8+
9+
DEVICE_INFO_QUERY(2, "DEVICE_INFO_QUERY");
10+
11+
private final int code;
12+
private final String description;
13+
14+
DiscoveryServiceCode(int code, String description) {
15+
this.code = code;
16+
this.description = description;
17+
}
18+
19+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package iot.github.protocol.mdtp.common.model;
2+
3+
import lombok.Getter;
4+
5+
@Getter
6+
public enum ServiceGroup {
7+
8+
DISCOVERY_SERVICE(1, "DISCOVERY_SERVICE"),
9+
10+
SECURITY_SERVICE(2, "SECURITY_SERVICE"),
11+
12+
CONNECTION_SERVICE(3, "CONNECTION_SERVICE"),
13+
14+
BILLING_SERVICE(4, "BILLING_SERVICE"),
15+
16+
SETTING_SERVICE(5, "SETTING_SERVICE"),
17+
18+
METHOD_SERVICE(6, "METHOD_SERVICE");
19+
20+
private final int code;
21+
22+
private final String description;
23+
24+
ServiceGroup(int code, String description) {
25+
this.code = code;
26+
this.description = description;
27+
}
28+
}

mdtp-server/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
<artifactId>mdtp-server</artifactId>
1313

1414
<dependencies>
15+
<dependency>
16+
<groupId>io.github.protocol-laboratory</groupId>
17+
<artifactId>mdtp-common</artifactId>
18+
<version>${project.version}</version>
19+
</dependency>
1520
<dependency>
1621
<groupId>io.netty</groupId>
1722
<artifactId>netty-handler</artifactId>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
<modules>
1313
<module>mdtp-client</module>
14+
<module>mdtp-common</module>
1415
<module>mdtp-examples</module>
1516
<module>mdtp-server</module>
1617
</modules>

0 commit comments

Comments
 (0)