[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/diku/evb13192/tos/interfaces/ieee802154/phy PhyReset.nc, NONE, 1.1 PhyEnergyDetect.nc, 1.1, 1.2 PhyTransmit.nc, 1.1, 1.2 PhyTypes.h, 1.2, 1.3 PhyAttributes.nc, 1.1, 1.2 PhyReceive.nc, 1.1, 1.2 PhyControl.nc, 1.2, 1.3

Jan Flora janflora at users.sourceforge.net
Wed Aug 23 03:09:14 PDT 2006


Update of /cvsroot/tinyos/tinyos-1.x/contrib/diku/evb13192/tos/interfaces/ieee802154/phy
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv24427/tos/interfaces/ieee802154/phy

Modified Files:
	PhyEnergyDetect.nc PhyTransmit.nc PhyTypes.h PhyAttributes.nc 
	PhyReceive.nc PhyControl.nc 
Added Files:
	PhyReset.nc 
Log Message:
802.15.4 interface updates

--- NEW FILE: PhyReset.nc ---
/* Copyright (c) 2006, Jan Flora <janflora at diku.dk>
 * 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 University of Copenhagen 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 COPYRIGHT OWNER 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.
 */

/*
  @author Jan Flora <janflora at diku.dk>
*/

interface PhyReset
{
	command void reset();
}

Index: PhyEnergyDetect.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/diku/evb13192/tos/interfaces/ieee802154/phy/PhyEnergyDetect.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PhyEnergyDetect.nc	8 Mar 2006 15:48:12 -0000	1.1
--- PhyEnergyDetect.nc	23 Aug 2006 10:09:12 -0000	1.2
***************
*** 1,2 ****
--- 1,31 ----
+ /* Copyright (c) 2006, Jan Flora <janflora at diku.dk>
+  * 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 University of Copenhagen 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 COPYRIGHT OWNER 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.
+  */
+ 
+ /*
+   @author Jan Flora <janflora at diku.dk>
+ */
  
  interface PhyEnergyDetect

Index: PhyTransmit.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/diku/evb13192/tos/interfaces/ieee802154/phy/PhyTransmit.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PhyTransmit.nc	8 Mar 2006 15:48:12 -0000	1.1
--- PhyTransmit.nc	23 Aug 2006 10:09:12 -0000	1.2
***************
*** 1,7 ****
! // This interface should be parameterized with an uint8_t
  
  interface PhyTransmit
  {	
  	command phy_error_t tx(txdata_t *data);
! 	event void txDone(phy_error_t error);
  }
--- 1,37 ----
! /* Copyright (c) 2006, Jan Flora <janflora at diku.dk>
!  * 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 University of Copenhagen 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 COPYRIGHT OWNER 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.
!  */
! 
! /*
!   @author Jan Flora <janflora at diku.dk>
! */
! 
! #include "PhyTypes.h"
  
  interface PhyTransmit
  {	
  	command phy_error_t tx(txdata_t *data);
! 	async event void txDone(phy_error_t error);
  }

Index: PhyTypes.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/diku/evb13192/tos/interfaces/ieee802154/phy/PhyTypes.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PhyTypes.h	9 Mar 2006 16:46:00 -0000	1.2
--- PhyTypes.h	23 Aug 2006 10:09:12 -0000	1.3
***************
*** 1,7 ****
  #ifndef _PHYTYPES_H_
  #define _PHYTYPES_H_
  
- typedef uint32_t symboltime_t;
- 
  typedef enum
  {
--- 1,35 ----
+ /* Copyright (c) 2006, Jan Flora <janflora at diku.dk>
+  * 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 University of Copenhagen 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 COPYRIGHT OWNER 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.
+  */
+ 
+ /*
+   @author Jan Flora <janflora at diku.dk>
+ */
+ 
  #ifndef _PHYTYPES_H_
  #define _PHYTYPES_H_
  
  typedef enum
  {
***************
*** 25,29 ****
  	bool cca;
  	bool immediateCommence;
! 	symboltime_t commenceTime;
  } txdata_t;
  
--- 53,57 ----
  	bool cca;
  	bool immediateCommence;
! 	uint32_t commenceTime;
  } txdata_t;
  
***************
*** 33,37 ****
  	uint8_t length;
  	uint8_t linkQuality;
! 	symboltime_t recvTime;
  } rxdata_t;
  
--- 61,65 ----
  	uint8_t length;
  	uint8_t linkQuality;
! 	uint32_t recvTime;
  } rxdata_t;
  

Index: PhyAttributes.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/diku/evb13192/tos/interfaces/ieee802154/phy/PhyAttributes.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PhyAttributes.nc	8 Mar 2006 15:48:12 -0000	1.1
--- PhyAttributes.nc	23 Aug 2006 10:09:12 -0000	1.2
***************
*** 1,2 ****
--- 1,31 ----
+ /* Copyright (c) 2006, Jan Flora <janflora at diku.dk>
+  * 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 University of Copenhagen 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 COPYRIGHT OWNER 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.
+  */
+ 
+ /*
+   @author Jan Flora <janflora at diku.dk>
+ */
  
  interface PhyAttributes
***************
*** 5,14 ****
  	command result_t setContentionWindow(uint8_t size);
  	command result_t setTransmitPower(uint8_t power);
  	
! 	command uint8_t getChannel();
  	command uint32_t getSupportedChannels();
! 	command uint8_t getContentionWindow();
! 	command uint8_t getTransmitPower();
  }
- 
- // TODO: consider adding filtering setup to the PHY interface
\ No newline at end of file
--- 34,44 ----
  	command result_t setContentionWindow(uint8_t size);
  	command result_t setTransmitPower(uint8_t power);
+ 	command result_t setAckBackoffAlignment(bool align);
+ 	command result_t setFilter(bool (*filter)(uint8_t*));
+ 	command result_t clearFilter();
  	
! 	//command uint8_t getChannel();
  	command uint32_t getSupportedChannels();
! 	//command uint8_t getContentionWindow();
! 	//command uint8_t getTransmitPower();
  }

Index: PhyReceive.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/diku/evb13192/tos/interfaces/ieee802154/phy/PhyReceive.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PhyReceive.nc	8 Mar 2006 15:48:12 -0000	1.1
--- PhyReceive.nc	23 Aug 2006 10:09:12 -0000	1.2
***************
*** 1,6 ****
  
  interface PhyReceive
  {
! 	//TODO: To async or not? that's the question!
! 	event void dataReady(rxdata_t *data);
  }
--- 1,37 ----
+ /* Copyright (c) 2006, Jan Flora <janflora at diku.dk>
+  * 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 University of Copenhagen 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 COPYRIGHT OWNER 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.
+  */
  
+ /*
+   @author Jan Flora <janflora at diku.dk>
+ */
+ 
+ #include "PhyTypes.h"
  interface PhyReceive
  {
! 	command void initRxBuffer(uint8_t *packetBuf);
! 	command phy_error_t rxOn(uint32_t commenceTime, bool immediateCommence);
! 	async event uint8_t *dataReady(rxdata_t *data);
  }

Index: PhyControl.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/diku/evb13192/tos/interfaces/ieee802154/phy/PhyControl.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PhyControl.nc	9 Mar 2006 16:46:00 -0000	1.2
--- PhyControl.nc	23 Aug 2006 10:09:12 -0000	1.3
***************
*** 1,6 ****
  interface PhyControl
  {
! 	command phy_error_t rxOn(uint32_t commenceTime, bool (*filterFunc)(uint8_t*));
! 	command phy_error_t trxOff(bool force);
  	command void sleep(uint32_t wakeUpTime);
  }
--- 1,35 ----
+ /* Copyright (c) 2006, Jan Flora <janflora at diku.dk>
+  * 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 University of Copenhagen 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 COPYRIGHT OWNER 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.
+  */
+ 
+ /*
+   @author Jan Flora <janflora at diku.dk>
+ */
+ 
  interface PhyControl
  {
! 	command result_t trxOff(bool force);
  	command void sleep(uint32_t wakeUpTime);
  }



More information about the Tinyos-contrib-commits mailing list