From 2d5f7e042e08bc37ab91fc37c06fa7654b1abc34 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Thu, 21 Jul 2016 12:02:04 +0200 Subject: [PATCH] Closedown --- config/devices.properties | 6 ++++-- config/plugins.properties | 4 ++++ plugins/RobotModbus.java | 21 +++++++++++++++++++++ plugins/RobotTCP.py | 6 +++--- plugins/RobotTcp.java | 21 +++++++++++++++++++++ 5 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 plugins/RobotModbus.java create mode 100644 plugins/RobotTcp.java diff --git a/config/devices.properties b/config/devices.properties index ddea26b..abc199c 100644 --- a/config/devices.properties +++ b/config/devices.properties @@ -1,2 +1,4 @@ -robot=ch.psi.pshell.modbus.ModbusTCP|127.0.0.1||| -temperature=ch.psi.pshell.modbus.AnalogInput|robot 0||| +robot=RobotTcp|127.0.0.1:2222||| +robot_modbus=RobotModbus|127.0.0.1||| +dewar=ch.psi.pshell.modbus.ModbusTCP|127.0.0.1||| +temperature=ch.psi.pshell.modbus.AnalogInput|dewar 0||| diff --git a/config/plugins.properties b/config/plugins.properties index 5119417..f2dbedb 100644 --- a/config/plugins.properties +++ b/config/plugins.properties @@ -1 +1,5 @@ +RobotModbus.java=enabled +RobotTcp.java=enabled +Beeper.java=disabled +RobotTCP.py=disabled gui.java=disabled diff --git a/plugins/RobotModbus.java b/plugins/RobotModbus.java new file mode 100644 index 0000000..2f3bf8c --- /dev/null +++ b/plugins/RobotModbus.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2014 Paul Scherrer Institute. All rights reserved. + */ + +import ch.psi.pshell.device.*; +import ch.psi.pshell.modbus.*; + +/** + */ +public class RobotModbus extends ModbusTCP { + + public RobotModbus(String name, String server) { + super(name, server); + } + + public Object run() throws Exception{ + Thread.sleep(1000); + return ("Done"); + } + +} diff --git a/plugins/RobotTCP.py b/plugins/RobotTCP.py index 9678829..8ee7294 100644 --- a/plugins/RobotTCP.py +++ b/plugins/RobotTCP.py @@ -1,10 +1,10 @@ from ch.psi.pshell.device import * -from ch.psi.pshell.serial import * -from ch.psi.pshell.modbus import * +#from ch.psi.pshell.serial import * +#from ch.psi.pshell.modbus import * #TcpDevice class RobotTCP(DeviceBase): - def __init__(self, server): + def __init__(self): DeviceBase.__init__(self) def do(self): diff --git a/plugins/RobotTcp.java b/plugins/RobotTcp.java new file mode 100644 index 0000000..d3f4c33 --- /dev/null +++ b/plugins/RobotTcp.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2014 Paul Scherrer Institute. All rights reserved. + */ + +import ch.psi.pshell.device.*; +import ch.psi.pshell.serial.*; + +/** + */ +public class RobotTcp extends TcpDevice { + + public RobotTcp(String name, String server) { + super(name, server); + } + + public Object run() throws Exception{ + Thread.sleep(1000); + return ("Done"); + } + +}