From c7c49df7eecba9b7f3f13adbc5d021baa6a47650 Mon Sep 17 00:00:00 2001 From: lebrush Date: Tue, 4 Jun 2013 11:34:23 +0200 Subject: [PATCH] Merged into se.sics package and added license. --- com/tado/mspsim/chip/TemperatureChip.java | 40 ---------- {com/tado => se/sics}/mspsim/chip/TMP112.java | 35 ++++++++- se/sics/mspsim/chip/TemperatureChip.java | 73 +++++++++++++++++++ 3 files changed, 107 insertions(+), 41 deletions(-) delete mode 100644 com/tado/mspsim/chip/TemperatureChip.java rename {com/tado => se/sics}/mspsim/chip/TMP112.java (65%) create mode 100644 se/sics/mspsim/chip/TemperatureChip.java diff --git a/com/tado/mspsim/chip/TemperatureChip.java b/com/tado/mspsim/chip/TemperatureChip.java deleted file mode 100644 index da6ea98..0000000 --- a/com/tado/mspsim/chip/TemperatureChip.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.tado.mspsim.chip; - -/** - * Interface for a temperature chip. - * - * Implementing this interface makes it compatible with the cooja-interfaces - * and hence makes the peripheral implementation way easier - * - * @author Víctor Ariño - */ -public interface TemperatureChip { - /** - * Get the current temperature on the chip - * - * @return - */ - public int getTemperature(); - - /** - * Set a new temperature on the chip - * - * @param temp - * temperature to set in XXYY format where XX.YY°C - */ - public void setTemperature(int temp); - - /** - * Get the maximum temperature allowed by the chipset - * - * @return - */ - public int getMaxTemperature(); - - /** - * Get the minimum temperature allowed by the chipset - * - * @return - */ - public int getMinTemperature(); -} diff --git a/com/tado/mspsim/chip/TMP112.java b/se/sics/mspsim/chip/TMP112.java similarity index 65% rename from com/tado/mspsim/chip/TMP112.java rename to se/sics/mspsim/chip/TMP112.java index b74f696..51a1a0b 100644 --- a/com/tado/mspsim/chip/TMP112.java +++ b/se/sics/mspsim/chip/TMP112.java @@ -1,4 +1,37 @@ -package com.tado.mspsim.chip; +/* Copyright (c) 2013, tado° GmbH. Munich, Germany. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of MSPSim. + * + * Author: Víctor Ariño + * + */ + +package se.sics.mspsim.chip; import se.sics.mspsim.core.MSP430Core; import se.sics.mspsim.core.USARTSource; diff --git a/se/sics/mspsim/chip/TemperatureChip.java b/se/sics/mspsim/chip/TemperatureChip.java new file mode 100644 index 0000000..829610c --- /dev/null +++ b/se/sics/mspsim/chip/TemperatureChip.java @@ -0,0 +1,73 @@ +/* Copyright (c) 2013, tado° GmbH. Munich, Germany. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This file is part of MSPSim. + * + * Author: Víctor Ariño + * + */ + +package se.sics.mspsim.chip; + +/** + * Interface for a temperature chip. + * + * Implementing this interface makes it compatible with the cooja-interfaces + * and hence makes the peripheral implementation way easier + * + * @author Víctor Ariño + */ +public interface TemperatureChip { + /** + * Get the current temperature on the chip + * + * @return + */ + public int getTemperature(); + + /** + * Set a new temperature on the chip + * + * @param temp + * temperature to set in XXYY format where XX.YY°C + */ + public void setTemperature(int temp); + + /** + * Get the maximum temperature allowed by the chipset + * + * @return + */ + public int getMaxTemperature(); + + /** + * Get the minimum temperature allowed by the chipset + * + * @return + */ + public int getMinTemperature(); +}