资源简介
使用java8 scoket 实现西门子s7协议 可以读写 s7系列全部plc
没有dll 文件 纯原生java
代码片段和文件信息
/*
* PROJECT Mokka7 (fork of Snap7/Moka7)
*
* Copyright (c) 2017 J.Zimmermann (comtel2000)
*
* All rights reserved. This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Mokka7 is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE whatever license you
* decide to adopt.
*
* Contributors: J.Zimmermann - Mokka7 fork
*
*/
package org.comtel2000.mokka7.client;
import org.comtel2000.mokka7.client.presentation.MainView;
import org.comtel2000.mokka7.client.service.SessionManager;
import org.comtel2000.mokka7.metrics.MonitoredS7Client;
import org.slf4j.LoggerFactory;
import com.airhacks.afterburner.injection.Injector;
import javafx.application.Application;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
public class Mokka7App extends Application {
private final static org.slf4j.Logger logger = LoggerFactory.getLogger(Mokka7App.class);
private final SimpleDoubleProperty sceneWidthProperty = new SimpleDoubleProperty(1024);
private final SimpleDoubleProperty sceneHeightProperty = new SimpleDoubleProperty(600);
@Override
public void start(Stage stage) throws Exception {
String version = Mokka7App.class.getPackage().getImplementationVersion();
stage.settitle(String.format(“Mokka7 client v.%s“ version != null ? version : “DEV“));
stage.setResizable(true);
Injector.setLogger((t) -> logger.trace(t));
Injector.setModelOrService(MonitoredS7Client.class new MonitoredS7Client());
SessionManager session = Injector.instantiateModelOrService(SessionManager.class);
session.setSession(getClass().getName().toLowerCase());
session.loadSession();
session.bind(sceneWidthProperty “scene.width“);
session.bind(sceneHeightProperty “scene.height“);
MainView main = new MainView();
final Scene scene = new Scene(main.getView() sceneWidthProperty.get() sceneHeightProperty.get());
stage.setOnCloseRequest((e) -> {
sceneWidthProperty.set(scene.getWidth());
sceneHeightProperty.set(scene.getHeight());
Injector.forgetAll();
System.exit(0);
});
stage.setScene(scene);
Image icon16 = new Image(getClass().getResourceAsStream(“icon-16x16.png“));
Image icon32 = new Image(getClass().getResourceAsStream(“icon-32x32.png“));
Image icon48 = new Image(getClass().getResourceAsStream(“icon-48x48.png“));
stage.getIcons().addAll(icon16 icon32 icon48);
stage.show();
}
public static void main(String[] args) {
launch(args);
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-05-21 10:12 mokka7-master\
文件 182 2017-05-21 10:12 mokka7-master\.gitignore
文件 213 2017-05-21 10:12 mokka7-master\.travis.yml
文件 11514 2017-05-21 10:12 mokka7-master\LICENSE
文件 2250 2017-05-21 10:12 mokka7-master\README.md
目录 0 2017-05-21 10:12 mokka7-master\doc\
文件 36847 2017-05-21 10:12 mokka7-master\doc\chart.png
文件 24321 2017-05-21 10:12 mokka7-master\doc\read_write.png
文件 20040 2017-05-21 10:12 mokka7-master\doc\sys_info.png
文件 12637 2017-05-21 10:12 mokka7-master\epl-v10.html
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\
文件 2461 2017-05-21 10:12 mokka7-master\mokka7-client\pom.xm
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\deploy\
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\deploy\package\
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\deploy\package\macosx\
文件 94561 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\deploy\package\macosx\mokka7.icns
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\deploy\package\windows\
文件 3806 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\deploy\package\windows\mokka7-setup-icon.bmp
文件 370070 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\deploy\package\windows\mokka7.ico
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\comtel2000\
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\comtel2000\mokka7\
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\comtel2000\mokka7\client\
文件 2969 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\comtel2000\mokka7\client\Mokka7App.java
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\comtel2000\mokka7\client\control\
文件 5106 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\comtel2000\mokka7\client\control\HexTableView.java
文件 463 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\comtel2000\mokka7\client\control\hex-table.css
目录 0 2017-05-21 10:12 mokka7-master\mokka7-client\src\main\java\org\comtel2000\mokka7\client\presentation\
............此处省略117个文件信息
相关资源
- 基于socket的用户注册,登录,文件上
- 汪文君Java8新特性及实战视频教程完整
- 用java写的多线程聊天程序GUI界面soc
- JAVA程序与PLC通信——学习使用
- Java socket 代理邮件发送程序
- java局域网聊天室(RSA算法加密)
- 基于客户端通信的DES加密的java实现
-
Android应用与fr
amework的socket通信 - java基于socket聊天室源代码.rar
- java socket超精美仿qq通信软件(mysql)
- PC与Android设备通过USB建立通信连接
- Java实现RSA加密解密数字证书生成与验
- java基于socket/server的多线程聊天室程序
- socket的应用 计算机网络 java版
- Java实现Socket长连接和短连接
- java聊天室socket编程
- java 采用ssl的socket交互
- java socket异步长连接demo
- websocket demojava客户端,心跳监测
- java通过socket编写小型聊天室
- Java Socket聊天和文件传输工具(更新)
- 基于websocket的聊天室源码
- 基于java socket的机票预订程序
- Java-WebSocket完整代码包
- java socket 简单成绩管理系统
- jmeter增加websocket插件所需依赖包全
- Java聊天室程序,socket编程
- android利用Socket实现手机客户端与PC进
- java实现基于websocket的聊天室
- Android的APp作为Socket服务端与pc通过U
评论
共有 条评论