-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: mtconnect add examples module (#3)
Signed-off-by: ZhangJian He <shoothzj@gmail.com>
- Loading branch information
Showing
5 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?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/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>io.github.protocol-laboratory</groupId> | ||
<artifactId>mtconnect-parent</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>mtconnect-examples</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.github.protocol-laboratory</groupId> | ||
<artifactId>mtconnect-client</artifactId> | ||
<version>${version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.github.protocol-laboratory</groupId> | ||
<artifactId>mtconnect-server</artifactId> | ||
<version>${version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
11 changes: 11 additions & 0 deletions
11
...-examples/src/main/java/io/github/protocol/mtconnect/examples/MtConnectClientExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package io.github.protocol.mtconnect.examples; | ||
|
||
import io.github.protocol.mtconnect.client.MtConnectClient; | ||
import io.github.protocol.mtconnect.client.MtConnectClientConfiguration; | ||
|
||
public class MtConnectClientExample { | ||
public static void main(String[] args) { | ||
MtConnectClientConfiguration configuration = new MtConnectClientConfiguration(); | ||
new MtConnectClient(configuration); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...-examples/src/main/java/io/github/protocol/mtconnect/examples/MtConnectServerExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.github.protocol.mtconnect.examples; | ||
|
||
import io.github.protocol.mtconnect.server.MtConnectServer; | ||
import io.github.protocol.mtconnect.server.MtConnectServerConfiguration; | ||
|
||
public class MtConnectServerExample { | ||
public static void main(String[] args) { | ||
MtConnectServerConfiguration configuration = new MtConnectServerConfiguration(); | ||
MtConnectServer mtConnectServer = new MtConnectServer(configuration); | ||
mtConnectServer.start().join(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters