Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenta-shimizu/secs4java8
This library is SEMI-SECS-communicate implementation on Java8.
https://github.com/kenta-shimizu/secs4java8
gem hsms hsms-gs hsms-ss java java8 secs secs-i secs-ii semi sml
Last synced: 3 days ago
JSON representation
This library is SEMI-SECS-communicate implementation on Java8.
- Host: GitHub
- URL: https://github.com/kenta-shimizu/secs4java8
- Owner: kenta-shimizu
- License: apache-2.0
- Created: 2019-03-22T17:28:47.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T08:31:03.000Z (8 months ago)
- Last Synced: 2024-12-08T02:12:51.125Z (14 days ago)
- Topics: gem, hsms, hsms-gs, hsms-ss, java, java8, secs, secs-i, secs-ii, semi, sml
- Language: Java
- Homepage:
- Size: 2.22 MB
- Stars: 123
- Watchers: 10
- Forks: 61
- Open Issues: 2
-
Metadata Files:
- Readme: README-HSMS-GS.md
- License: LICENSE
Awesome Lists containing this project
README
# secs4java8 HSMS-GS
## Create HSMS-GS-Communicator instance and open
- For use HSMS-GS-Passive example
```java
/* HSMS-GS-Passive open example */
HsmsGsCommunicatorConfig config = new HsmsGsCommunicatorConfig();
config.addSessionId(100);
config.addSessionId(200);
config.addSessionId(300);
config.socketAddress(new InetSocketAddress("127.0.0.1", 5000));
config.isEquip(true);
config.connectionMode(HsmsConnectionMode.PASSIVE);
config.rebindIfPassive(5.0F);
config.notTrySelectRequest();
config.timeout().t3(45.0F);
config.timeout().t6( 5.0F);
config.timeout().t8( 5.0F);
config.gem().mdln("MDLN-A");
config.gem().softrev("000001");
config.gem().clockType(ClockType.A16);HsmsGsCommunicator passive = HsmsGsCommunicator.newInstance(config);
passive.open();
```- For use HSMS-GS-Active example
```java
/* HSMS-GS-Active open example */
HsmsGsCommunicatorConfig config = new HsmsGsCommunicatorConfig();
config.addSessionId(100);
config.addSessionId(200);
config.addSessionId(300);
config.socketAddress(new InetSocketAddress("127.0.0.1", 5000));
config.isEquip(false);
config.connectionMode(HsmsConnectionMode.ACTIVE);
config.retrySelectRequestTimeout(5.0F);
config.timeout().t3(45.0F);
config.timeout().t5(10.0F);
config.timeout().t6( 5.0F);
config.timeout().t8( 5.0F);
config.linktest(180.0F);
config.gem().clockType(ClockType.A16);HsmsGsCommunicator active = HsmsGsCommunicator.newInstance(config);
active.open();
```Notice: `HsmsGsCommunicator` is **NOT** instance of `SecsCommunicator`.
## Get Session instance from HsmsGsCommunicator
`HsmsSession` is instance of `SecsCommunicator`. `SecsCommunicator` methods are available.
```java
/* from Session-ID */
HsmsSession session100 = passive.getHsmsSession(100);/* Session Set */
Set sessions = passive.getHsmsSessions();
```See also ["/src/examples/example6"](/src/examples/example6)