From: mmaroti Date: Mon, 31 Aug 2009 21:15:20 +0000 (+0000) Subject: These files have been rolled into the tos/interfaces and tos/types directory X-Git-Tag: rc_6_tinyos_2_1_1~315 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=a074765b9770d38a2ac833f2d3860e283bc13e26 These files have been rolled into the tos/interfaces and tos/types directory --- diff --git a/tos/chips/rf2xx/util/IEEE802154.h b/tos/chips/rf2xx/util/IEEE802154.h deleted file mode 100644 index 028bdb65..00000000 --- a/tos/chips/rf2xx/util/IEEE802154.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2005-2006 Arch Rock Corporation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - 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. - * - Neither the name of the Arch Rock Corporation 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 COPYRIGHT HOLDERS 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 - * ARCHED ROCK OR ITS 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 - * - * @author Jonathan Hui - * @version $Revision$ $Date$ - */ - -#ifndef __IEEE802154_H__ -#define __IEEE802154_H__ - -/* - * Define an address representation. - * Only short addresses are currently used in this stack. - */ -typedef uint16_t ieee154_panid_t; -typedef uint16_t ieee154_saddr_t; - -enum { - IEEE154_BROADCAST_ADDR = 0xffff, -}; - -#if 0 -// some ideas of how to represent long addresses -typedef enum { - IEEE154_SHORT_ADDR, - IEEE154_LONG_ADDR, -} ieee154_atype_t; - -typedef union { - uint8_t u_addr[8]; - uint16_t u_addr16[4]; - uint32_t u_addr32[2]; -} ieee154_laddr_t; - -typedef struct { - ieee154_atype_t type; - union { - ieee154_saddr_t s_addr; - ieee154_laddr_t l_addr; - } addr; -#define addr addr.l_addr.u_addr -#define addr16 addr.l_addr.u_addr16 -#define addr32 addr.l_addr.u_addr32 -} ieee154_addr_t; -#endif - -#endif diff --git a/tos/chips/rf2xx/util/Ieee154Packet.nc b/tos/chips/rf2xx/util/Ieee154Packet.nc deleted file mode 100644 index 7b9352f6..00000000 --- a/tos/chips/rf2xx/util/Ieee154Packet.nc +++ /dev/null @@ -1,44 +0,0 @@ -/* - * "Copyright (c) 2008 The Regents of the University of California. - * All rights reserved." - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice, the following - * two paragraphs and the author appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." - * - */ - -#include - -interface Ieee154Packet { - - command ieee154_saddr_t address(); - - command ieee154_saddr_t destination(message_t* msg); - - command ieee154_saddr_t source(message_t* msg); - - command void setDestination(message_t* msg, ieee154_saddr_t addr); - - command void setSource(message_t* msg, ieee154_saddr_t addr); - - command bool isForMe(message_t* msg); - - command ieee154_panid_t pan(message_t* msg); - - command void setPan(message_t* msg, ieee154_panid_t grp); - - command ieee154_panid_t localPan(); -} diff --git a/tos/chips/rf2xx/util/Ieee154Send.nc b/tos/chips/rf2xx/util/Ieee154Send.nc deleted file mode 100644 index 3728c72b..00000000 --- a/tos/chips/rf2xx/util/Ieee154Send.nc +++ /dev/null @@ -1,108 +0,0 @@ -/* - * "Copyright (c) 2008 The Regents of the University of California. - * All rights reserved." - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose, without fee, and without written agreement is - * hereby granted, provided that the above copyright notice, the following - * two paragraphs and the author appear in all copies of this software. - * - * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR - * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT - * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF - * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS - * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO - * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." - * - */ - -#include -#include -#include - -/* - * - * The only change from the AMSend interface is that instead of - * sending to an AMID, we now send to a ieee154_saddr_t. - * - */ - -interface Ieee154Send { - - /** - * Send a packet with a data payload of len to address - * addr. To determine the maximum available size, use the - * Packet interface of the component providing AMSend. If send - * returns SUCCESS, then the component will signal the sendDone - * event in the future; if send returns an error, it will not - * signal the event. Note that a component may accept a send - * request which it later finds it cannot satisfy; in this case, it - * will signal sendDone with error code. - * - * @param addr address to which to send the packet - * @param msg the packet - * @param len the length of the data in the packet payload - * @return SUCCESS if the request to send succeeded and a - * sendDone will be signaled later, EBUSY if the - * abstraction cannot send now but will be able to - * later, or FAIL if the communication layer is not - * in a state that can send (e.g., off). - * @see sendDone - */ - command error_t send(ieee154_saddr_t addr, message_t* msg, uint8_t len); - - /** - * Cancel a requested transmission. Returns SUCCESS if the - * transmission was canceled properly (not sent in its - * entirety). Note that the component may not know - * if the send was successfully canceled, if the radio is - * handling much of the logic; in this case, a component - * should be conservative and return an appropriate error code. - * A successful call to cancel must always result in a - * sendFailed event, and never a sendSucceeded event. - * - * @param msg the packet whose transmission should be cancelled. - * @return SUCCESS if the transmission was cancelled, FAIL otherwise. - * @see sendDone - */ - command error_t cancel(message_t* msg); - - /** - * Signaled in response to an accepted send request. msg is - * the message buffer sent, and error indicates whether - * the send was successful. - * - * @param msg the packet which was submitted as a send request - * @param error SUCCESS if it was sent successfully, FAIL if it was not, - * ECANCEL if it was cancelled - * @see send - * @see cancel - */ - event void sendDone(message_t* msg, error_t error); - - - /** - * Return the maximum payload length that this communication layer - * can provide. This command behaves identically to - * Packet.maxPayloadLength and is included in this - * interface as a convenience. - * - * @return the maximum payload length - */ - command uint8_t maxPayloadLength(); - - /** - * Return a pointer to a protocol's payload region in a packet. - * This command behaves identically to Packet.getPayload - * (minus the length parameter) and is included in this interface - * as a convenience. - * - * @param msg the packet - * @return the payload of the packet - */ - command void* getPayload(message_t* msg, uint8_t len); -}