/** * Global Sensor Networks (GSN) Source Code * Copyright (c) 2006-2016, Ecole Polytechnique Federale de Lausanne (EPFL) * * This file is part of GSN. * * GSN is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GSN 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. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GSN. If not, see <http://www.gnu.org/licenses/>. * * File: src/ch/epfl/gsn/wrappers/tinyos/SensorScopeConfMsg.java * * @author Ali Salehi * */ package ch.epfl.gsn.wrappers.tinyos; /** * This class is automatically generated by mig. DO NOT EDIT THIS FILE. * This class implements a Java interface to the 'SensorScopeConfMsg' * message type. */ public class SensorScopeConfMsg extends net.tinyos.message.Message { /** The default size of this message type in bytes. */ public static final int DEFAULT_MESSAGE_SIZE = 22; /** The Active Message type associated with this message. */ public static final int AM_TYPE = 29; /** Create a new SensorScopeConfMsg of size 22. */ public SensorScopeConfMsg() { super(DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** Create a new SensorScopeConfMsg of the given data_length. */ public SensorScopeConfMsg(int data_length) { super(data_length); amTypeSet(AM_TYPE); } /** * Create a new SensorScopeConfMsg with the given data_length * and base offset. */ public SensorScopeConfMsg(int data_length, int base_offset) { super(data_length, base_offset); amTypeSet(AM_TYPE); } /** * Create a new SensorScopeConfMsg using the given byte array * as backing store. */ public SensorScopeConfMsg(byte[] data) { super(data); amTypeSet(AM_TYPE); } /** * Create a new SensorScopeConfMsg using the given byte array * as backing store, with the given base offset. */ public SensorScopeConfMsg(byte[] data, int base_offset) { super(data, base_offset); amTypeSet(AM_TYPE); } /** * Create a new SensorScopeConfMsg using the given byte array * as backing store, with the given base offset and data length. */ public SensorScopeConfMsg(byte[] data, int base_offset, int data_length) { super(data, base_offset, data_length); amTypeSet(AM_TYPE); } /** * Create a new SensorScopeConfMsg embedded in the given message * at the given base offset. */ public SensorScopeConfMsg(net.tinyos.message.Message msg, int base_offset) { super(msg, base_offset, DEFAULT_MESSAGE_SIZE); amTypeSet(AM_TYPE); } /** * Create a new SensorScopeConfMsg embedded in the given message * at the given base offset and length. */ public SensorScopeConfMsg(net.tinyos.message.Message msg, int base_offset, int data_length) { super(msg, base_offset, data_length); amTypeSet(AM_TYPE); } /** /* Return a String representation of this message. Includes the * message type name and the non-indexed field values. */ public String toString() { String s = "Message <SensorScopeConfMsg> \n"; try { s += " [nodeid=0x"+Long.toHexString(get_nodeid())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [command_id=0x"+Long.toHexString(get_command_id())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [tx_power=0x"+Long.toHexString(get_tx_power())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [tx_freq=0x"+Long.toHexString(get_tx_freq())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [solarBoardStatus=0x"+Long.toHexString(get_solarBoardStatus())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [config_subsampling=0x"+Long.toHexString(get_config_subsampling())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [sequence_number=0x"+Long.toHexString(get_sequence_number())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [measure_period_milli=0x"+Long.toHexString(get_measure_period_milli())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [radio_on_time=0x"+Long.toHexString(get_radio_on_time())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [reboot_time=0x"+Long.toHexString(get_reboot_time())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [currGlobal=0x"+Long.toHexString(get_currGlobal())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [voltSuperCap=0x"+Long.toHexString(get_voltSuperCap())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [voltBattery=0x"+Long.toHexString(get_voltBattery())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } try { s += " [currSolar=0x"+Long.toHexString(get_currSolar())+"]\n"; } catch (ArrayIndexOutOfBoundsException aioobe) { /* Skip field */ } return s; } // Message-type-specific access methods appear below. ///////////////////////////////////////////////////////// // Accessor methods for field: nodeid // Field type: short, unsigned // Offset (bits): 0 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'nodeid' is signed (false). */ public static boolean isSigned_nodeid() { return false; } /** * Return whether the field 'nodeid' is an array (false). */ public static boolean isArray_nodeid() { return false; } /** * Return the offset (in bytes) of the field 'nodeid' */ public static int offset_nodeid() { return (0 / 8); } /** * Return the offset (in bits) of the field 'nodeid' */ public static int offsetBits_nodeid() { return 0; } /** * Return the value (as a short) of the field 'nodeid' */ public short get_nodeid() { return (short)getUIntBEElement(offsetBits_nodeid(), 8); } /** * Set the value of the field 'nodeid' */ public void set_nodeid(short value) { setUIntBEElement(offsetBits_nodeid(), 8, value); } /** * Return the size, in bytes, of the field 'nodeid' */ public static int size_nodeid() { return (8 / 8); } /** * Return the size, in bits, of the field 'nodeid' */ public static int sizeBits_nodeid() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: command_id // Field type: short, unsigned // Offset (bits): 8 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'command_id' is signed (false). */ public static boolean isSigned_command_id() { return false; } /** * Return whether the field 'command_id' is an array (false). */ public static boolean isArray_command_id() { return false; } /** * Return the offset (in bytes) of the field 'command_id' */ public static int offset_command_id() { return (8 / 8); } /** * Return the offset (in bits) of the field 'command_id' */ public static int offsetBits_command_id() { return 8; } /** * Return the value (as a short) of the field 'command_id' */ public short get_command_id() { return (short)getUIntBEElement(offsetBits_command_id(), 8); } /** * Set the value of the field 'command_id' */ public void set_command_id(short value) { setUIntBEElement(offsetBits_command_id(), 8, value); } /** * Return the size, in bytes, of the field 'command_id' */ public static int size_command_id() { return (8 / 8); } /** * Return the size, in bits, of the field 'command_id' */ public static int sizeBits_command_id() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: tx_power // Field type: short, unsigned // Offset (bits): 16 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'tx_power' is signed (false). */ public static boolean isSigned_tx_power() { return false; } /** * Return whether the field 'tx_power' is an array (false). */ public static boolean isArray_tx_power() { return false; } /** * Return the offset (in bytes) of the field 'tx_power' */ public static int offset_tx_power() { return (16 / 8); } /** * Return the offset (in bits) of the field 'tx_power' */ public static int offsetBits_tx_power() { return 16; } /** * Return the value (as a short) of the field 'tx_power' */ public short get_tx_power() { return (short)getUIntBEElement(offsetBits_tx_power(), 8); } /** * Set the value of the field 'tx_power' */ public void set_tx_power(short value) { setUIntBEElement(offsetBits_tx_power(), 8, value); } /** * Return the size, in bytes, of the field 'tx_power' */ public static int size_tx_power() { return (8 / 8); } /** * Return the size, in bits, of the field 'tx_power' */ public static int sizeBits_tx_power() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: tx_freq // Field type: short, unsigned // Offset (bits): 24 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'tx_freq' is signed (false). */ public static boolean isSigned_tx_freq() { return false; } /** * Return whether the field 'tx_freq' is an array (false). */ public static boolean isArray_tx_freq() { return false; } /** * Return the offset (in bytes) of the field 'tx_freq' */ public static int offset_tx_freq() { return (24 / 8); } /** * Return the offset (in bits) of the field 'tx_freq' */ public static int offsetBits_tx_freq() { return 24; } /** * Return the value (as a short) of the field 'tx_freq' */ public short get_tx_freq() { return (short)getUIntBEElement(offsetBits_tx_freq(), 8); } /** * Set the value of the field 'tx_freq' */ public void set_tx_freq(short value) { setUIntBEElement(offsetBits_tx_freq(), 8, value); } /** * Return the size, in bytes, of the field 'tx_freq' */ public static int size_tx_freq() { return (8 / 8); } /** * Return the size, in bits, of the field 'tx_freq' */ public static int sizeBits_tx_freq() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: solarBoardStatus // Field type: short, unsigned // Offset (bits): 32 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'solarBoardStatus' is signed (false). */ public static boolean isSigned_solarBoardStatus() { return false; } /** * Return whether the field 'solarBoardStatus' is an array (false). */ public static boolean isArray_solarBoardStatus() { return false; } /** * Return the offset (in bytes) of the field 'solarBoardStatus' */ public static int offset_solarBoardStatus() { return (32 / 8); } /** * Return the offset (in bits) of the field 'solarBoardStatus' */ public static int offsetBits_solarBoardStatus() { return 32; } /** * Return the value (as a short) of the field 'solarBoardStatus' */ public short get_solarBoardStatus() { return (short)getUIntBEElement(offsetBits_solarBoardStatus(), 8); } /** * Set the value of the field 'solarBoardStatus' */ public void set_solarBoardStatus(short value) { setUIntBEElement(offsetBits_solarBoardStatus(), 8, value); } /** * Return the size, in bytes, of the field 'solarBoardStatus' */ public static int size_solarBoardStatus() { return (8 / 8); } /** * Return the size, in bits, of the field 'solarBoardStatus' */ public static int sizeBits_solarBoardStatus() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: config_subsampling // Field type: short, unsigned // Offset (bits): 40 // Size (bits): 8 ///////////////////////////////////////////////////////// /** * Return whether the field 'config_subsampling' is signed (false). */ public static boolean isSigned_config_subsampling() { return false; } /** * Return whether the field 'config_subsampling' is an array (false). */ public static boolean isArray_config_subsampling() { return false; } /** * Return the offset (in bytes) of the field 'config_subsampling' */ public static int offset_config_subsampling() { return (40 / 8); } /** * Return the offset (in bits) of the field 'config_subsampling' */ public static int offsetBits_config_subsampling() { return 40; } /** * Return the value (as a short) of the field 'config_subsampling' */ public short get_config_subsampling() { return (short)getUIntBEElement(offsetBits_config_subsampling(), 8); } /** * Set the value of the field 'config_subsampling' */ public void set_config_subsampling(short value) { setUIntBEElement(offsetBits_config_subsampling(), 8, value); } /** * Return the size, in bytes, of the field 'config_subsampling' */ public static int size_config_subsampling() { return (8 / 8); } /** * Return the size, in bits, of the field 'config_subsampling' */ public static int sizeBits_config_subsampling() { return 8; } ///////////////////////////////////////////////////////// // Accessor methods for field: sequence_number // Field type: int, unsigned // Offset (bits): 48 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'sequence_number' is signed (false). */ public static boolean isSigned_sequence_number() { return false; } /** * Return whether the field 'sequence_number' is an array (false). */ public static boolean isArray_sequence_number() { return false; } /** * Return the offset (in bytes) of the field 'sequence_number' */ public static int offset_sequence_number() { return (48 / 8); } /** * Return the offset (in bits) of the field 'sequence_number' */ public static int offsetBits_sequence_number() { return 48; } /** * Return the value (as a int) of the field 'sequence_number' */ public int get_sequence_number() { return (int)getUIntBEElement(offsetBits_sequence_number(), 16); } /** * Set the value of the field 'sequence_number' */ public void set_sequence_number(int value) { setUIntBEElement(offsetBits_sequence_number(), 16, value); } /** * Return the size, in bytes, of the field 'sequence_number' */ public static int size_sequence_number() { return (16 / 8); } /** * Return the size, in bits, of the field 'sequence_number' */ public static int sizeBits_sequence_number() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: measure_period_milli // Field type: int, unsigned // Offset (bits): 64 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'measure_period_milli' is signed (false). */ public static boolean isSigned_measure_period_milli() { return false; } /** * Return whether the field 'measure_period_milli' is an array (false). */ public static boolean isArray_measure_period_milli() { return false; } /** * Return the offset (in bytes) of the field 'measure_period_milli' */ public static int offset_measure_period_milli() { return (64 / 8); } /** * Return the offset (in bits) of the field 'measure_period_milli' */ public static int offsetBits_measure_period_milli() { return 64; } /** * Return the value (as a int) of the field 'measure_period_milli' */ public int get_measure_period_milli() { return (int)getUIntBEElement(offsetBits_measure_period_milli(), 16); } /** * Set the value of the field 'measure_period_milli' */ public void set_measure_period_milli(int value) { setUIntBEElement(offsetBits_measure_period_milli(), 16, value); } /** * Return the size, in bytes, of the field 'measure_period_milli' */ public static int size_measure_period_milli() { return (16 / 8); } /** * Return the size, in bits, of the field 'measure_period_milli' */ public static int sizeBits_measure_period_milli() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: radio_on_time // Field type: int, unsigned // Offset (bits): 80 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'radio_on_time' is signed (false). */ public static boolean isSigned_radio_on_time() { return false; } /** * Return whether the field 'radio_on_time' is an array (false). */ public static boolean isArray_radio_on_time() { return false; } /** * Return the offset (in bytes) of the field 'radio_on_time' */ public static int offset_radio_on_time() { return (80 / 8); } /** * Return the offset (in bits) of the field 'radio_on_time' */ public static int offsetBits_radio_on_time() { return 80; } /** * Return the value (as a int) of the field 'radio_on_time' */ public int get_radio_on_time() { return (int)getUIntBEElement(offsetBits_radio_on_time(), 16); } /** * Set the value of the field 'radio_on_time' */ public void set_radio_on_time(int value) { setUIntBEElement(offsetBits_radio_on_time(), 16, value); } /** * Return the size, in bytes, of the field 'radio_on_time' */ public static int size_radio_on_time() { return (16 / 8); } /** * Return the size, in bits, of the field 'radio_on_time' */ public static int sizeBits_radio_on_time() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: reboot_time // Field type: int, unsigned // Offset (bits): 96 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'reboot_time' is signed (false). */ public static boolean isSigned_reboot_time() { return false; } /** * Return whether the field 'reboot_time' is an array (false). */ public static boolean isArray_reboot_time() { return false; } /** * Return the offset (in bytes) of the field 'reboot_time' */ public static int offset_reboot_time() { return (96 / 8); } /** * Return the offset (in bits) of the field 'reboot_time' */ public static int offsetBits_reboot_time() { return 96; } /** * Return the value (as a int) of the field 'reboot_time' */ public int get_reboot_time() { return (int)getUIntBEElement(offsetBits_reboot_time(), 16); } /** * Set the value of the field 'reboot_time' */ public void set_reboot_time(int value) { setUIntBEElement(offsetBits_reboot_time(), 16, value); } /** * Return the size, in bytes, of the field 'reboot_time' */ public static int size_reboot_time() { return (16 / 8); } /** * Return the size, in bits, of the field 'reboot_time' */ public static int sizeBits_reboot_time() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: currGlobal // Field type: int, unsigned // Offset (bits): 112 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'currGlobal' is signed (false). */ public static boolean isSigned_currGlobal() { return false; } /** * Return whether the field 'currGlobal' is an array (false). */ public static boolean isArray_currGlobal() { return false; } /** * Return the offset (in bytes) of the field 'currGlobal' */ public static int offset_currGlobal() { return (112 / 8); } /** * Return the offset (in bits) of the field 'currGlobal' */ public static int offsetBits_currGlobal() { return 112; } /** * Return the value (as a int) of the field 'currGlobal' */ public int get_currGlobal() { return (int)getUIntBEElement(offsetBits_currGlobal(), 16); } /** * Set the value of the field 'currGlobal' */ public void set_currGlobal(int value) { setUIntBEElement(offsetBits_currGlobal(), 16, value); } /** * Return the size, in bytes, of the field 'currGlobal' */ public static int size_currGlobal() { return (16 / 8); } /** * Return the size, in bits, of the field 'currGlobal' */ public static int sizeBits_currGlobal() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: voltSuperCap // Field type: int, unsigned // Offset (bits): 128 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'voltSuperCap' is signed (false). */ public static boolean isSigned_voltSuperCap() { return false; } /** * Return whether the field 'voltSuperCap' is an array (false). */ public static boolean isArray_voltSuperCap() { return false; } /** * Return the offset (in bytes) of the field 'voltSuperCap' */ public static int offset_voltSuperCap() { return (128 / 8); } /** * Return the offset (in bits) of the field 'voltSuperCap' */ public static int offsetBits_voltSuperCap() { return 128; } /** * Return the value (as a int) of the field 'voltSuperCap' */ public int get_voltSuperCap() { return (int)getUIntBEElement(offsetBits_voltSuperCap(), 16); } /** * Set the value of the field 'voltSuperCap' */ public void set_voltSuperCap(int value) { setUIntBEElement(offsetBits_voltSuperCap(), 16, value); } /** * Return the size, in bytes, of the field 'voltSuperCap' */ public static int size_voltSuperCap() { return (16 / 8); } /** * Return the size, in bits, of the field 'voltSuperCap' */ public static int sizeBits_voltSuperCap() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: voltBattery // Field type: int, unsigned // Offset (bits): 144 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'voltBattery' is signed (false). */ public static boolean isSigned_voltBattery() { return false; } /** * Return whether the field 'voltBattery' is an array (false). */ public static boolean isArray_voltBattery() { return false; } /** * Return the offset (in bytes) of the field 'voltBattery' */ public static int offset_voltBattery() { return (144 / 8); } /** * Return the offset (in bits) of the field 'voltBattery' */ public static int offsetBits_voltBattery() { return 144; } /** * Return the value (as a int) of the field 'voltBattery' */ public int get_voltBattery() { return (int)getUIntBEElement(offsetBits_voltBattery(), 16); } /** * Set the value of the field 'voltBattery' */ public void set_voltBattery(int value) { setUIntBEElement(offsetBits_voltBattery(), 16, value); } /** * Return the size, in bytes, of the field 'voltBattery' */ public static int size_voltBattery() { return (16 / 8); } /** * Return the size, in bits, of the field 'voltBattery' */ public static int sizeBits_voltBattery() { return 16; } ///////////////////////////////////////////////////////// // Accessor methods for field: currSolar // Field type: int, unsigned // Offset (bits): 160 // Size (bits): 16 ///////////////////////////////////////////////////////// /** * Return whether the field 'currSolar' is signed (false). */ public static boolean isSigned_currSolar() { return false; } /** * Return whether the field 'currSolar' is an array (false). */ public static boolean isArray_currSolar() { return false; } /** * Return the offset (in bytes) of the field 'currSolar' */ public static int offset_currSolar() { return (160 / 8); } /** * Return the offset (in bits) of the field 'currSolar' */ public static int offsetBits_currSolar() { return 160; } /** * Return the value (as a int) of the field 'currSolar' */ public int get_currSolar() { return (int)getUIntBEElement(offsetBits_currSolar(), 16); } /** * Set the value of the field 'currSolar' */ public void set_currSolar(int value) { setUIntBEElement(offsetBits_currSolar(), 16, value); } /** * Return the size, in bytes, of the field 'currSolar' */ public static int size_currSolar() { return (16 / 8); } /** * Return the size, in bits, of the field 'currSolar' */ public static int sizeBits_currSolar() { return 16; } }