This repository has been archived by the owner on Jun 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#4 Moved from NpduResult and BvlcResult to ParserResult<T>
- Loading branch information
Showing
8 changed files
with
92 additions
and
33 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 |
---|---|---|
@@ -1,2 +1,25 @@ | ||
# bacnet-typelib | ||
Domain objects, mappers and builders for Bacnet. | ||
|
||
## Inspiration | ||
Inspired by java.net.HttpClient and HttpRequest/HttpResponse | ||
``` | ||
java.net.HttpClient client = HttpClient.newHttpClient(); | ||
java.net.HttpRequest request = HttpRequest.newBuilder() | ||
.uri(URI.create("http://openjdk.java.net/")) | ||
.build(); | ||
java.net.HttpResponse client.send(..) | ||
or | ||
CompletableFuture<HttpResponse<T>> client.sendAsync | ||
``` | ||
Response | ||
``` | ||
CompletableFuture<HttpResponse<T>> client.sendAsync | ||
jdk.internal.net.http.HeaderParser | ||
jdk.internal.net.http.HttpRequestImpl | ||
``` | ||
Link will be the combination of sendTo Address, and InvokeId. The response will be received from the | ||
sendTo Address, now as sender Address. | ||
|
||
Step 1 will have to be more simple though. |
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,17 @@ | ||
package no.entra.bacnet; | ||
|
||
import no.entra.bacnet.bvlc.Bvlc; | ||
import no.entra.bacnet.bvlc.BvlcParser; | ||
import no.entra.bacnet.npdu.Npdu; | ||
import no.entra.bacnet.npdu.NpduParser; | ||
import no.entra.bacnet.parseandmap.ParserResult; | ||
|
||
public class BacnetMessageParser { | ||
|
||
public static BacnetMessage parse(String fullBacnetHexString) { | ||
ParserResult<Bvlc> bvlcResult = BvlcParser.parse(fullBacnetHexString); | ||
String hexString = bvlcResult.getUnparsedHexString(); | ||
ParserResult<Npdu> npduRestult = NpduParser.parse(hexString); | ||
return null; | ||
} | ||
} |
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
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
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