⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 servodescriptor.java

📁 这是一个以JAVA编写的程序,本人还没有试过,是一个简单的温度控制系统
💻 JAVA
字号:
package net.sf.dz.setup.core;import org.freehold.servomaster.device.model.Meta;import org.freehold.servomaster.device.model.Servo;/** * A servo descriptor. * * @author Copyright &copy; <a href="mailto:vt@freehold.crocodile.org">Vadim Tkachenko</a> 2004 * @version $Id: ServoDescriptor.java,v 1.3 2004/07/27 05:15:08 vtt Exp $ */class ServoDescriptor implements Comparable {    /**     * Servo instance.     *     * Used to retrieve the servo identifier and controller class.     */    public Servo servo;        /**     * Zone to which this servo is assigned, if any.     */    public ZoneDescriptor zone;        public ServoDescriptor(Servo servo) {            this.servo = servo;    }        public String toString() {            return getComparable() + (zone != null ? "+" : "");    }        public int compareTo(Object other) {            return getComparable().compareTo(((ServoDescriptor)other).getComparable());    }        public String getComparable() {            return getControllerId() + "/" + servo.getName();    }        /**     * Get a unique servo controller identifier.     */    public String getControllerId() {            // Let's concoct it on the fly.                Meta meta = servo.getController().getMeta();        String model = (String)meta.getProperty("manufacturer/model");        String port = servo.getController().getPort();                return model + "/" + port;    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -