00001
00010 /*00011 * Copyright 2008. Los Alamos National Security, LLC. This material00012 * was produced under U.S. Government contract DE-AC52-06NA25396 for00013 * Los Alamos National Laboratory (LANL), which is operated by Los00014 * Alamos National Security, LLC, for the Department of Energy. The00015 * U.S. Government has rights to use, reproduce, and distribute this00016 * software. NEITHER THE GOVERNMENT NOR LOS ALAMOS NATIONAL SECURITY,00017 * LLC, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL00018 * LIABILITY FOR THE USE OF THIS SOFTWARE. If software is modified to00019 * produce derivative works, such modified software should be clearly00020 * marked, so as not to confuse it with the version available from LANL.00021 *00022 * Additionally, this program is free software; you can redistribute00023 * it and/or modify it under the terms of the GNU General Public00024 * License as published by the Free Software Foundation; version 2 of00025 * the License. Accordingly, this program is distributed in the hope00026 * it will be useful, but WITHOUT ANY WARRANTY; without even the00027 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR00028 * PURPOSE. See the GNU General Public License for more details.00029 *00030 * You should have received a copy of the GNU General Public License00031 * along with this program; if not, write to the Free Software00032 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00033 */00034
00035 package sensix.sensing;
00036
00037 import sensix.*;
00038
00039
00040publicclass SensoryextendsFunctor00041 {
00042protected byte sense;
00043protected byte h_level;
00044protectedlongtime;
00045protecteddoubleenergy;
00046protecteddoublevalue;
00047
00048
00049publicSensory(byte l, byte s, Functor[] subfs) {
00050 super(subfs);
00051 h_level = l;
00052 sense = s;
00053 }
00054
00055publicSensory(byte l, byte s) {
00056 super();
00057 h_level = l;
00058 sense = s;
00059 }
00060
00061publicSensory(Functor[] subfs) {
00062 super(subfs);
00063 h_level = Sensix.INVALID;
00064 sense = Sensix.INVALID;
00065 }
00066
00067publicSensory() {
00068 super();
00069 h_level = Sensix.INVALID;
00070 sense = Sensix.INVALID;
00071 }
00072
00073publicSensory(byte l, byte s, Functor[] subfs, int seq) {
00074 super(subfs, seq);
00075 h_level = l;
00076 sense = s;
00077 }
00078
00079publicSensory(byte l, byte s, int seq) {
00080 super(seq);
00081 h_level = l;
00082 sense = s;
00083 }
00084
00085
00086public byte level() {
00087 returnh_level;
00088 }
00089
00090public byte sensor() {
00091 returnsense;
00092 }
00093
00094publiclongtimeused() {
00095 returntime;
00096 }
00097
00098publicvoidtimeused(long t) {
00099 time = t;
00100 }
00101
00102publicdoubleenergyused() {
00103 returnenergy;
00104 }
00105
00106publicvoidenergyused(double e) {
00107 energy = e;
00108 }
00109 }