[zb4osgi-changeset] [scm] ZigBee 4 OSGi repository change: r406 - in /projects/zb4osgi/sandbox/howlab/telegesis-gateway-api: ./ src/ src/main/ src/main/assembly/ src/main/java/ src/main/java/es/ src/main/java/es/unizar/ src/main/java/es/unizar/howlab/ src/main/java/es/unizar/howlab/core/ src/main/java/es/unizar/howlab/core/zigbee/ src/main/java/es/unizar/howlab/core/zigbee/telegesis/ src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/ src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/osgi/ src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/ src/main/resources/ src/main/resources/es/ src/main/resources/es/unizar/ src/main/resources/es/unizar/howlab/ src/main/resources/es/unizar/howlab/core/ src/main/resources/es/unizar/howlab/core/zigbee/ src/main/resources/es/unizar/howlab/core/zigbee/telegesis/ src/main/resources/es/unizar/howlab/core/zigbee/telegesis/gateway/ src/main/resources/es/unizar/howlab/core/zigbee/telegesis/gateway/api/ src/test/ src/test/java/ src/test/java/es/ src/test/java/es/unizar/ src/test/java/es/unizar/howlab/ src/test/java/es/unizar/howlab/core/ src/test/java/es/unizar/howlab/core/zigbee/ src/test/java/es/unizar/howlab/core/zigbee/telegesis/ src/test/java/es/unizar/howlab/core/zigbee/telegesis/gateway/ src/test/java/es/unizar/howlab/core/zigbee/telegesis/gateway/api/
scm-notify at zb4osgi.aaloa.org
scm-notify at zb4osgi.aaloa.org
Thu Feb 2 13:18:47 CET 2012
Author: alvaro.marco
Date: Thu Feb 2 13:18:47 2012
New Revision: 406
Log:
howlab import
Added:
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/LICENSE
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/nb-configuration.xml
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/nbactions.xml
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/pom.xml
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/assembly/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/assembly/felix.xml
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/Gateway.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/GatewayFactory.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/GatewayListener.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/TelegesisErrorException.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/ZigbeeDeviceType.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/osgi/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/osgi/Constants.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/AddressTableEntry.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/MulticastTableEntry.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NeighbourTableEntry.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NetworkInformation.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NetworkJoinedInfo.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/PANScanResult.java
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/LICENSE
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/es/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/es/unizar/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/es/unizar/howlab/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/es/unizar/howlab/core/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/es/unizar/howlab/core/zigbee/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/es/unizar/howlab/core/zigbee/telegesis/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/es/unizar/howlab/core/zigbee/telegesis/gateway/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/es/unizar/howlab/core/zigbee/telegesis/gateway/api/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/es/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/es/unizar/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/es/unizar/howlab/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/es/unizar/howlab/core/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/es/unizar/howlab/core/zigbee/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/es/unizar/howlab/core/zigbee/telegesis/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/es/unizar/howlab/core/zigbee/telegesis/gateway/
projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/test/java/es/unizar/howlab/core/zigbee/telegesis/gateway/api/
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/LICENSE
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/LICENSE (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/LICENSE Thu Feb 2 13:18:47 2012
@@ -1,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/nb-configuration.xml
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/nb-configuration.xml (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/nb-configuration.xml Thu Feb 2 13:18:47 2012
@@ -1,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-shared-configuration>
+ <!--
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+-->
+ <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
+ <!--
+Properties that influence various parts of the IDE, especially code formatting and the like.
+You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
+That way multiple projects can share the same settings (useful for formatting rules for example).
+Any value defined here will override the pom.xml file value but is only applicable to the current project.
+-->
+ <netbeans.compile.on.save>all</netbeans.compile.on.save>
+ </properties>
+</project-shared-configuration>
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/nbactions.xml
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/nbactions.xml (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/nbactions.xml Thu Feb 2 13:18:47 2012
@@ -1,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+ <action>
+ <actionName>run</actionName>
+ <goals>
+ <goal>package</goal>
+ <goal>antrun:run</goal>
+ </goals>
+ <activatedProfiles>
+ <activatedProfile>run-on-felix</activatedProfile>
+ </activatedProfiles>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </action>
+ <action>
+ <actionName>debug</actionName>
+ <goals>
+ <goal>package</goal>
+ <goal>antrun:run</goal>
+ </goals>
+ <properties>
+ <vm.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</vm.args>
+ <jpda.listen>true</jpda.listen>
+ </properties>
+ <activatedProfiles>
+ <activatedProfile>run-on-felix</activatedProfile>
+ </activatedProfiles>
+ </action>
+ <action>
+ <actionName>profile</actionName>
+ <goals>
+ <goal>package</goal>
+ <goal>antrun:run</goal>
+ </goals>
+ <properties>
+ <vm.args>${profiler.args}</vm.args>
+ <!-- XXX <java jvm="${profiler.java}" ...> -->
+ <profiler.action>profile</profiler.action>
+ </properties>
+ <activatedProfiles>
+ <activatedProfile>run-on-felix</activatedProfile>
+ </activatedProfiles>
+ </action>
+ <action>
+ <actionName>build</actionName>
+ <goals>
+ <goal>install</goal>
+ </goals>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </action>
+ <action>
+ <actionName>rebuild</actionName>
+ <goals>
+ <goal>clean</goal>
+ <goal>install</goal>
+ </goals>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </action>
+ <action>
+ <actionName>CUSTOM-Prepare a Release</actionName>
+ <displayName>Prepare a Release</displayName>
+ <goals>
+ <goal>release:prepare</goal>
+ </goals>
+ </action>
+ <action>
+ <actionName>CUSTOM-Perform a Release</actionName>
+ <displayName>Perform a Release</displayName>
+ <goals>
+ <goal>release:perform</goal>
+ </goals>
+ </action>
+</actions>
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/pom.xml
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/pom.xml (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/pom.xml Thu Feb 2 13:18:47 2012
@@ -1,0 +1,243 @@
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>es.unizar.howlab.core.zigbee.telegesis</groupId>
+ <artifactId>telegesis-gateway-api</artifactId>
+ <version>1.5-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <name>telegesis-gateway-api OSGi Bundle</name>
+
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0, January 2004</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ </license>
+ </licenses>
+
+ <!-- Añadir ruta developer, estableciendo la ruta al trunk: -->
+ <scm>
+ <developerConnection>scm:svn:https://web.hermes.cps.unizar.es/repos/howlab/Software/core/zigbee/telegesis/gateway-api/trunk</developerConnection>
+ </scm>
+
+<!-- Añadir distribution management (en el settings.xml tenemos que tener el usuario y contraseña para el id en el server: -->
+ <distributionManagement>
+ <repository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>repo_nas_rel</id>
+ <url>ftp://howlab.dyndns.org/repo/software/releases/</url>
+ <layout>default</layout>
+ </repository>
+ <snapshotRepository>
+ <uniqueVersion>false</uniqueVersion>
+ <id>repo_nas_snap</id>
+ <url>ftp://howlab.dyndns.org/repo/software/snapshots</url>
+ <layout>default</layout>
+ </snapshotRepository>
+ </distributionManagement>
+
+ <!-- Añadir los repositorios para poder localizar otros proyectos generados: -->
+ <repositories>
+ <repository>
+ <id>repo_nas_rel</id>
+ <url>ftp://howlab.dyndns.org/repo/software/releases/</url>
+ </repository>
+ <repository>
+ <id>repo_nas_snap</id>
+ <url>ftp://howlab.dyndns.org/repo/software/snapshots</url>
+ </repository>
+ </repositories>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.osgi.core</artifactId>
+ <version>1.4.0</version>
+ </dependency>
+ <dependency>
+ <groupId>es.unizar.howlab.core.io.serial</groupId>
+ <artifactId>serial-api</artifactId>
+ <version>1.3</version>
+ <type>bundle</type>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>2.2.0</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.8</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Añadir pluggin maven-release-plugin -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.2.1</version>
+ </plugin>
+ </plugins>
+
+ <!-- Añadir extensiones wagon para que se pueda acceder al respositorio de distribucion por ftp -->
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ftp</artifactId>
+ <version>1.0</version>
+ </extension>
+ </extensions>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>build-for-felix</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.main</artifactId>
+ <version>3.0.7</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- To include a shell:
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.gogo.shell</artifactId>
+ <version>0.6.1</version>
+ </dependency>
+ -->
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <pathconvert property="plugins.jars" pathsep="${path.separator}">
+ <path refid="maven.runtime.classpath" />
+ <map from="${project.build.directory}${file.separator}classes" to="" />
+ </pathconvert>
+ <pathconvert pathsep=" " property="bundles">
+ <path path="${plugins.jars}" />
+ <mapper>
+ <chainedmapper>
+ <flattenmapper />
+ <globmapper from="*" to="file:modules/*" casesensitive="no" />
+ </chainedmapper>
+ </mapper>
+ </pathconvert>
+ <propertyfile file="${project.build.directory}/config.properties">
+ <entry key="felix.auto.start" value="${bundles} file:modules/${project.build.finalName}.jar" />
+ <entry key="org.osgi.framework.bootdelegation" value="*" />
+ </propertyfile>
+ <copy file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" tofile="${project.build.directory}/felix.jar" />
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>create-executable-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
+ </descriptors>
+ <finalName>${project.build.finalName}</finalName>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>run-on-felix</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.main</artifactId>
+ <version>3.0.7</version>
+ <scope>provided</scope>
+ </dependency>
+ <!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 useless from Maven since stdin is swallowed -->
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <configuration>
+ <target>
+ <property name="vm.args" value="" />
+ <pathconvert property="plugins.jars" pathsep="${path.separator}">
+ <path refid="maven.runtime.classpath" />
+ <map from="${project.build.directory}${file.separator}classes" to="" />
+ </pathconvert>
+ <makeurl property="urls" separator=" ">
+ <path path="${plugins.jars}" />
+ <path location="${project.build.directory}/${project.build.finalName}.jar" />
+ </makeurl>
+ <propertyfile file="${project.build.directory}/run.properties">
+ <entry key="felix.auto.start" value="${urls}" />
+ <entry key="felix.auto.deploy.action" value="uninstall,install,update,start" />
+ <entry key="org.osgi.framework.storage" value="${project.build.directory}${file.separator}felix-cache" />
+ <entry key="org.osgi.framework.bootdelegation" value="*" />
+ </propertyfile>
+ <makeurl property="run.properties.url" file="${project.build.directory}/run.properties" />
+ <java fork="true" jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">
+ <sysproperty key="felix.config.properties" value="${run.properties.url}" />
+ <jvmarg line="${vm.args}" />
+ </java>
+ </target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/assembly/felix.xml
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/assembly/felix.xml (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/assembly/felix.xml Thu Feb 2 13:18:47 2012
@@ -1,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<assembly>
+ <id>all</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <dependencySets>
+ <dependencySet>
+ <useProjectArtifact>false</useProjectArtifact>
+ <outputDirectory>modules</outputDirectory>
+ <excludes>
+ <exclude>org.apache.felix:org.apache.felix.main</exclude>
+ </excludes>
+ </dependencySet>
+ </dependencySets>
+ <files>
+ <file>
+ <source>${project.build.directory}/${project.build.finalName}.jar</source>
+ <outputDirectory>modules</outputDirectory>
+ </file>
+ <file>
+ <source>${project.build.directory}/felix.jar</source>
+ <outputDirectory>bin</outputDirectory>
+ </file>
+ <file>
+ <source>${project.build.directory}/config.properties</source>
+ <outputDirectory>conf</outputDirectory>
+ </file>
+ </files>
+</assembly>
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/Gateway.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/Gateway.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/Gateway.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,610 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway;
+
+import es.unizar.howlab.core.io.serial.SerialConnection;
+import es.unizar.howlab.core.zigbee.telegesis.gateway.util.AddressTableEntry;
+import es.unizar.howlab.core.zigbee.telegesis.gateway.util.MulticastTableEntry;
+import es.unizar.howlab.core.zigbee.telegesis.gateway.util.NetworkInformation;
+import es.unizar.howlab.core.zigbee.telegesis.gateway.util.NetworkJoinedInfo;
+import es.unizar.howlab.core.zigbee.telegesis.gateway.util.PANScanResult;
+
+/**
+ * Public interface for interacting with the Telegesis Zigbee USB-dongle
+ * @author alvaro
+ */
+public interface Gateway {
+
+ // <editor-fold defaultstate="collapsed" desc="MODULE CONTROL AND CONFIGURATION">
+ /**
+ * Reads product information, returning
+ * - Device Name
+ * - Firmware revision
+ * - EUI64 address
+ * @return String array or null if error
+ */
+ public String[] getProductId();
+
+ /**
+ * Resets module
+ */
+ public void reset();
+
+ /**
+ * Performs a factory defaults reset
+ */
+ public void restoreFactoryDefaults();
+
+ /**
+ * Reads contents of register regAddress on the local node
+ * @param regAddress Register to read
+ * @return String containing register data (should be parsed externally)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public String readRegister(short regAddress) throws TelegesisErrorException;
+
+ /**
+ * Reads bit bitNumber of register regAddress on the local node
+ * @param regAddress Register to read
+ * @param bitNumber number of the bit to read
+ * @return True if register bit value was 1, false if value was 0
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public boolean readRegisterBit(short regAddress, short bitNumber) throws TelegesisErrorException;
+
+ /**
+ * Writes into register regAddress the data provided
+ * @param regAddress Register to write
+ * @param regData Data to write
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void writeRegister(short regAddress, String regData) throws TelegesisErrorException;
+
+ /**
+ * Writes into bit bitNumber of register regAddress on the local node the value provided
+ * @param regAddress Register to write
+ * @param bitNumber number of the bit to write
+ * @param bitData True if value must be set to 1, false if value must be set to 0
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void writeRegisterBit(short regAddress, short bitNumber, boolean bitData) throws TelegesisErrorException;
+
+ /**
+ * Writes into register regAddress the data provided
+ * @param regAddress Register to write
+ * @param regData Data to write
+ * @param password Password, required for write-protected registers
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void writeRegister(short regAddress, String regData, String password) throws TelegesisErrorException;
+
+ /**
+ * Writes into bit bitNumber of register regAddress on the local node the value provided
+ * @param regAddress Register to write
+ * @param bitNumber number of the bit to write
+ * @param bitData True if value must be set to 1, false if value must be set to 0
+ * @param password Password, required for write-protected registers
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void writeRegisterBit(short regAddress, short bitNumber, boolean bitData, String password) throws TelegesisErrorException;
+
+ /**
+ * Reads contents of register regAddress on the node provided
+ * @param EUI64Addr Remote node address
+ * @param regAddress Register to read
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short readRemoteRegisterRequest(String EUI64Addr, short regAddress) throws TelegesisErrorException;
+
+ /**
+ * Reads bit bitNumber of register regAddress on the node provided
+ * @param EUI64Addr Remote node address
+ * @param regAddress Register to read
+ * @param bitNumber number of the bit to read
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short readRemoteRegisterBitRequest(String EUI64Addr, short regAddress, short bitNumber) throws TelegesisErrorException;
+
+ /**
+ * Writes into register regAddress of provided node the data provided
+ * @param EUI64Addr Remote node address
+ * @param regAddress Register to write
+ * @param regData Data to write
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short writeRemoteRegisterRequest(String EUI64Addr, short regAddress, String regData) throws TelegesisErrorException;
+
+ /**
+ * Writes into bit bitNumber of register regAddress on the provided node the value provided
+ * @param EUI64Addr Remote node address
+ * @param regAddress Register to write
+ * @param bitNumber number of the bit to write
+ * @param bitData True if value must be set to 1, false if value must be set to 0
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short writeRemoteRegisterBitRequest(String EUI64Addr, short regAddress, short bitNumber, boolean bitData) throws TelegesisErrorException;
+
+ /**
+ * Writes into register regAddress of provided node the data provided
+ * @param EUI64Addr Remote node address
+ * @param regAddress Register to write
+ * @param regData Data to write
+ * @param password Password, required for write-protected registers
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short writeRemoteRegisterRequest(String EUI64Addr, short regAddress, String regData, String password) throws TelegesisErrorException;
+
+ /**
+ * Writes into register regAddress of provided node the data provided
+ * @param EUI64Addr Remote node address
+ * @param regAddress Register to write
+ * @param bitNumber number of the bit to write
+ * @param bitData True if value must be set to 1, false if value must be set to 0
+ * @param password Password, required for write-protected registers
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short writeRemoteRegisterBitRequest(String EUI64Addr, short regAddress, short bitNumber, boolean bitData, String password) throws TelegesisErrorException;
+ /*
+ * Not available commands:
+ * +BLOAD
+ * +CLONE
+ * +PASSTHROUGH
+ * +RECOVER
+ * SALL
+ * +TOKDUMP
+ */
+ // </editor-fold>
+ // <editor-fold defaultstate="collapsed" desc="NETWORK CONTROL AND CONFIGURATION">
+ /**
+ * Performs an energy scan on every channel. Returns energy on a 16-length
+ * short array:
+ * - energy[0] ==> channel 11
+ * ..
+ * - energy[15] ==> channel 26
+ *
+ * Note: it may takes up to 16 seconds
+ * @return short array contaning result or null
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short[] scanEnergy() throws TelegesisErrorException;
+
+ /**
+ * Performs a scan for active networks
+ * @return Array containing PANScanResult for every network found
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public PANScanResult[] scanForActivePANs() throws TelegesisErrorException;
+
+ /**
+ * Establish a Personal Area Network, using the following procedure:
+ * 1. The local node becomes a coordinator and performs an energy scan on
+ * all channels selected in S00.
+ * 2. It then starts a PAN with a random unused PAN ID and extended PAN ID
+ * on the quietest channel. If a PAN ID and/or extended PAN ID is specified
+ * in S02 or S03 the provided IDs are used instead of random ones, given
+ * the selected IDs are not already in use by other networks within range
+ * @return sucessfull network creation information
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public NetworkJoinedInfo createNetwork() throws TelegesisErrorException;
+
+ /**
+ * Joins an exiting Personal Area Network, using the following procedure:
+ * 1. The local node scans all channels selected in register S00 for the
+ * existence of a PAN.
+ * 2. When finding any PAN which allows joining it will automatically join
+ * in via the remote node with the highest RSSI. In case registers S02 and
+ * S03 differ from the default value of all zeros the node will only join a
+ * PAN with the specified Pan ID and/or extended PAN ID
+ * @return sucessfull network joining information
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public NetworkJoinedInfo joinNetwork() throws TelegesisErrorException;
+
+ /**
+ * Joins a specific Personal Area Network, ignoring related information
+ * stored on configuration registers
+ * @param channel New channel (ranging from 0x0B to 0x1A)
+ * @param PID String containing PID or EPID
+ * @return sucessfull network joining information
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public NetworkJoinedInfo joinNetwork(int channel, String PID) throws TelegesisErrorException;
+
+ /**
+ * Request local node to leave network
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void leaveNetwork() throws TelegesisErrorException;
+
+ /**
+ * Request remote node to leave network
+ * @param address Node's remote address (it can be its EUI64Addr, or a table
+ * address index)
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short leaveNetworkRequest(String address) throws TelegesisErrorException;
+
+ /**
+ * Displays network information
+ * @return Network info or null if no PAN established
+ */
+ public NetworkInformation getNetworkInformation();
+
+ /**
+ * Ask for neighbour table on the node provided
+ * @param index table index start
+ * @param address Node's address (it can be the remote EUI64 address, NodeID
+ * or address table entry)
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException
+ */
+ public short requestNeighbourTable(short index, String address) throws TelegesisErrorException;
+
+ /**
+ * Request Node's network address
+ * @param address Node address (can be EUI64Addr or address table entry)
+ * @throws TelegesisErrorException when some error occur
+ */
+ public void requestNodeId(String address) throws TelegesisErrorException;
+
+ /**
+ * Request the node indicated by address to provide the Node's EUI64address
+ * of nodeId
+ * @param address Node which is requested to provide info (can be its
+ * EUI64Addr, network address or address table entry)
+ * @param nodeId Network address of the node with unknonw EUI64Addr
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short requestNodeEUI64Addr(String address, String nodeId) throws TelegesisErrorException;
+
+ /**
+ * Request the node indicated by address to provide the Node descriptor of nodeId
+ * @param address Node which is requested to provide info (can be its
+ * EUI64Addr, network address or address table entry)
+ * @param nodeId Network address of the node with unknown descriptor
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short requestNodeDescriptor(String address, String nodeId) throws TelegesisErrorException;
+
+ /**
+ * Request the node indicated by address to provide the Node Power descriptor
+ * of nodeId
+ * @param address Node which is requested to provide info (can be its
+ * EUI64Addr, network address or address table entry)
+ * @param nodeId Network address of the node with unknown power descriptor
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short requestNodePowerDescriptor(String address, String nodeId) throws TelegesisErrorException;
+
+ /**
+ * Request the node indicated by address to provide the list of Active End
+ * Points of nodeId
+ * @param address Node which is requested to provide the info (can be its
+ * EUI64Addr, network address or address table entry)
+ * @param nodeId Network address of the node with unknown endpoints
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short requestNodeActiveEndPoints(String address, String nodeId) throws TelegesisErrorException;
+
+ /**
+ * Request the node indicated by address to provide the simple descriptor of
+ * Active End Point of nodeId
+ * @param address Node which is requested to provide the info (can be its
+ * EUI64Addr, network address or address table entry)
+ * @param nodeId Network address of the node with requested endpoint descriptor
+ * @param EP End point to read its simple descriptor
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short requestNodeEndPointSimpleDescriptor(String address, String nodeId, short EP) throws TelegesisErrorException;
+
+ /**
+ * Request find nodes which match a specific descriptor. Nodes matching
+ * profileId and at least one of the specified clusters will respond to this
+ * broadcast message
+ * @param profileId required ProfileID
+ * @param inClusterList Required IN cluster list (may be null)
+ * @param outClusterList Required OUT cluster list (may be null)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void findNodesMatchingDescriptor(String profileId, String[] inClusterList, String[] outClusterList) throws TelegesisErrorException;
+
+ /**
+ * Anounces local device on the network
+ * @throws TelegesisErrorException when some error ocurs
+ */
+ public void annouceLocalNode() throws TelegesisErrorException;
+
+ /**
+ * Set the source route of a message sent to a remote device, starting with
+ * the NodeID of the remote device followed by all NodeIDs on the route from
+ * the remote node to the local node
+ * @param destNode Network address of destination node
+ * @param route Strking array containing intermediate node's network address
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void setSourceRoute(String destNode, String[] route) throws TelegesisErrorException;
+
+ /**
+ * Tries to find source route information to the specified device by sending
+ * a ZDO request to the remote device and thus triggering a reply.
+ * @param address Node address (can be EUI64Addr or address table entry)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void findRoute(String address) throws TelegesisErrorException;
+
+ /**
+ * Scan network for nodes, indicating number of hops (from 0 to 30)to extend scan:
+ * - 1, only direct neighbours will reply
+ * - 0, scan whole network
+ * @param numHops number of hops to scan
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void scanNetwork(int numHops) throws TelegesisErrorException;
+
+ /**
+ * Updates the Network Key with a new random key
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void updateNetworkKey() throws TelegesisErrorException;
+
+ /**
+ * Local Device takes over the Trust Centre. Can only be used if no other
+ * device in the network is Trust Centre (i.e. the network has been started
+ * in distributed Trust Centre mode)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void becomeTrustCenter() throws TelegesisErrorException;
+
+ /**
+ * Local Device takes over role of Network Manager. By default the COO is
+ * the Network Manager, but any other router in the network can take over
+ * this responsibility. The Network Manager can change the radio channel
+ * and the PAN ID.
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void becomeNetworkManager() throws TelegesisErrorException;
+
+ /**
+ * Aks nodes to change network channel to a new one ramdomly chosen
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void changeNetworkChannel() throws TelegesisErrorException;
+
+ /**
+ * Aks nodes to change network channel to the specified one
+ * @param channel New channel (ranging from 0x0B to 0x1A)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void changeNetworkChannel(int channel) throws TelegesisErrorException;
+
+ /*
+ * Not available commands:
+ * +SJN
+ * +RTABLE
+ * +POLL
+ * +REJOIN
+ *
+ *
+ */
+ // </editor-fold>
+ // <editor-fold defaultstate="collapsed" desc="MESSAGING">
+ /**
+ * Ask local node for its Address Table
+ * @return Array containing table entries
+ */
+ public AddressTableEntry[] getAddressTable();
+
+ /**
+ * Sets provided address table entry
+ * @param index Entry index
+ * @param nodeID Node's network ID (must be set to "FFFF" if unknown)
+ * @param EUI64Addr Node's IEEE 802.11.5 address
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void setAddressTableEntry(short index, String nodeID, String EUI64Addr) throws TelegesisErrorException;
+
+ /**
+ * Ask local node for its multicast Table
+ * @return Array containing table entries
+ */
+ public MulticastTableEntry[] getMulticastTable();
+
+ /**
+ * Sets provided multicast table entry
+ * @param index Entry index
+ * @param ID multicast gorup's network ID
+ * @param EP Node's endpoint to attend message (must be set to 01 to
+ * generate a MCAST promt)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void setMulticastTableEntry(short index, String ID, short EP) throws TelegesisErrorException;
+
+ /**
+ * Transmit a broadcast message through numHops hops
+ * @param numHops Number of hops to retransmit broadcast, ranging from 0 to
+ * 30, where 0 means entire network
+ * @param data String message to send. Limited to 82 chars (74 if including EUI)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void sendBroadcast(int numHops, String data) throws TelegesisErrorException;
+
+ /**
+ * Transmit a broadcast message through numHops hops
+ * @param numHops Number of hops to retransmit broadcast, ranging from 0 to
+ * 30, where 0 means entire network
+ * @param data Binary message to send. Limited to 82 bytes (74 if including EUI)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void sendBroadcast(int numHops, byte[] data) throws TelegesisErrorException;
+
+ /**
+ * Request to send a message to the provided node
+ * @param address Node's address (can be EUI64Addr, Network address or adress table entry)
+ * @param data String message to send. Limited to 82 chars (74 if including
+ * EUI, and -2 bytes/hop if route is known)
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short sendMessageRequest(String address, String data) throws TelegesisErrorException;
+
+ /**
+ * Request to send a message to the provided node
+ * @param address Node's address (can be EUI64Addr, Network address or adress table entry)
+ * @param data Binary message to send. Limited to 82 bytes (74 if including
+ * EUI, and -2 bytes/hop if route is known)
+ * @return Short containing seq number for ACK tracking
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public short sendMessageRequest(String address, byte[] data) throws TelegesisErrorException;
+
+ /**
+ * Transmit a multicast message through numHops hops
+ * @param numHops Number of hops to retransmit broadcast, ranging from 0 to
+ * 30, where 0 means entire network
+ * @param ID Multicast network address
+ * @param data String message to send. Limited to 82 chars (74 if including EUI)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void sendMulticastBroadcast(int numHops, String ID, String data) throws TelegesisErrorException;
+
+ /**
+ * Transmit a multicast message through numHops hops
+ * @param numHops Number of hops to retransmit broadcast, ranging from 0 to
+ * 30, where 0 means entire network
+ * @param ID Multicast network address
+ * @param data Binary message to send. Limited to 82 chars (74 if including EUI)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public void sendMulticastBroadcast(int numHops, String ID, byte[] data) throws TelegesisErrorException;
+
+ /*
+ * Not available commands:
+ * +SCAST
+ * +SCASTB
+ * +SSINK
+ * +DMODE
+ * +++
+ * +IDENT
+ * +RDATAB
+ */
+ // </editor-fold>
+ /**
+ * Sends a command (directly) to the gateway. If a command response is
+ * expected, it is returned after sucessfull execution, or an exception is
+ * thrown
+ * @param cmd Command to write
+ * @param expectResponse Indicates if a response is expected
+ * @return Command response (if any)
+ * @throws TelegesisErrorException when some error occurs
+ */
+ public String writeCommand(String cmd, boolean expectResponse) throws TelegesisErrorException ;
+
+ // <editor-fold defaultstate="collapsed" desc="GATEWAY CONTROL">
+
+ /**
+ * Returns underlying serial connection
+ * @return SerialConnection
+ */
+ public SerialConnection getConnection();
+
+ /**
+ * Returns Device name, as obtained by calling getProductID
+ * - Device Name
+ * - Firmware revision
+ * - EUI64 address
+ * @return Device name
+ */
+ public String getDeviceName();
+ /**
+ * Returns Firmware revision, as obtained by calling getProductID
+ * @return Firmware revision
+ */
+ public String getFirmwareRevision();
+ /**
+ * Returns dongle Address, as obtained by calling getProductID
+ * @return dongle EUI64Addr
+ */
+ public String getDongleAddress();
+
+ /**
+ * Tries to open connection with physical gateway.
+ * NOTE: communication wont be established until OPEN returns TRUE.
+ * Must be called prior to use
+ * @return TRUE if sucessfully open, FALSE in other case
+ */
+ public boolean open();
+
+ /**
+ * Closes connection with physical gateway, and breakes communication
+ * @return TRUE if sucessfully closed, FALSE in other case
+ */
+ public boolean close();
+
+ /**
+ * Checks if gateway is open
+ * @return TRUE if open, FALSE if closed
+ */
+ public boolean isOpen();
+
+ /**
+ * Tries locking gateway to prevent use while executing protected operations
+ * Note: calling this method will NOT stop execution
+ * @param milliseconds Max. lock time prior to autommatic unlock
+ * @return TRUE if sucessful lock or FALSE in other case (locked by another thread)
+ */
+ public boolean tryLock(int milliseconds);
+
+ /**
+ * Locks gateway to prevent use while executing protected operations
+ * Note: calling this method WILL stop execution until sucessfully lock
+ * @param milliseconds Max. lock time prior to autommatic unlock
+ */
+ public void lock(int milliseconds);
+
+ /**
+ * Unlock gateway to allow executing protected operations by another threads
+ * Note: Thread must be owner of the lock to unlock
+ * @return TRUE if sucessfully unlcoked or FALSE in other case (not lock owner)
+ */
+ public boolean unlock();
+
+ // </editor-fold>
+ /**
+ * Register a gateway listener
+ * @param lstnr
+ */
+ public void registerListener(GatewayListener lstnr);
+
+ /**
+ * Unregister a gateway listener
+ * @param lstnr
+ */
+ public void unregisterListener(GatewayListener lstnr);
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/GatewayFactory.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/GatewayFactory.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/GatewayFactory.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,35 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway;
+
+import es.unizar.howlab.core.io.serial.SerialConnection;
+
+/**
+ *
+ * @author alvaro
+ */
+public interface GatewayFactory {
+
+ /**
+ * Creates a gateway operating the provided connection, checking communication
+ * to determine right implementation
+ * @param connection Where the gateway is connected
+ * @return Gateway or null if error or not supported gateway
+ */
+ public Gateway createGateway(SerialConnection connection);
+
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/GatewayListener.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/GatewayListener.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/GatewayListener.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,233 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package es.unizar.howlab.core.zigbee.telegesis.gateway;
+
+import es.unizar.howlab.core.zigbee.telegesis.gateway.util.NeighbourTableEntry;
+import java.util.Map;
+
+/**
+ * Public interface for receiving information from the Telegesis Zigbee
+ * USB-dongle
+ * @author alvaro
+ */
+public interface GatewayListener {
+
+ /**
+ * Notifies about acknowledgement of a node communication operation,
+ * providing SEQ number and acknowledge result (ACK/NACK)
+ * @param seqNumber SEQ number
+ * @param wasACK True for ACK, false for NACK
+ * @param gtwy Gateway launching notification
+ */
+ public void acknowledgement(short seqNumber, boolean wasACK, Gateway gtwy);
+
+ /**
+ * Notifies about a route to a remote device found
+ * @param EUI64Addr Remote node address
+ * @param numHops Number of hops
+ * @param route Array containing network addresses of intermediate nodes up
+ * to remote node, excluding local node
+ * @param gtwy Gateway launching notification
+ */
+ public void routeRecordReceived(String EUI64Addr, int numHops, String[] route, Gateway gtwy);
+
+ /**
+ * Notifies about reception of a broadcast message
+ * @param EUI64Addr Sender address
+ * @param message Message received
+ */
+ public void broadcastMessageReceived(String EUI64Addr, byte[] message, Gateway gtwy);
+
+ /**
+ * Notifies about reception of a message, whether it was a broadcast message
+ * multicast or unicast
+ * @param EUI64Addr Sender address
+ * @param message Message received
+ * @param type Message type
+ * @param gtwy Gateway launching notification
+ */
+ public void messageReceived(String EUI64Addr, byte[] message, String type, Gateway gtwy);
+
+ /**
+ * Notifies about reception of a message not handled by Telegesis dongle,
+ * providing whole APS frame
+ * @param EUI64Addr Sender address
+ * @param nodeID Sender network address
+ * @param sourceEP Sender EndPoint id
+ * @param destEP Receiver EndPoint id
+ * @param profileID ProfileID
+ * @param clusterID ClusterID
+ * @param payload Message received
+ * @param gtwy Gateway launching notification
+ */
+ public void endpointMessageReceived(String EUI64Addr, String nodeID, short sourceEP, short destEP, String profileID, String clusterID, byte[] payload, Gateway gtwy);
+ /**
+ * Notifies about a node announce when sucesfully joined the network
+ * @param type DeviceType (COO, FFD...)
+ * @param EUI64Addr Node's address
+ * @param nodeID Node's network address
+ * @param RSSI RSSI level (dBm) of the last hop
+ * @param LQI LQI indicator of the last hop
+ * @param gtwy Gateway launching notification
+ */
+ public void nodeAnnounce(ZigbeeDeviceType type, String EUI64Addr, String nodeID, int RSSI, short LQI, Gateway gtwy);
+
+ /**
+ * Notifies about a new node joining the network.
+ * Note: when node is sucessfully joined, a nodeAnnounce is raised
+ * @param EUI64Addr Node's address
+ * @param nodeID Node's network address
+ * @param parentID Parent's network address or null
+ * @param gtwy Gateway launching notification
+ */
+ public void newNode(String EUI64Addr, String nodeID, String parentID, Gateway gtwy);
+
+ /**
+ * Notifies about local node left PAN
+ * Note: also notifies about end device losing parent
+ * @param gtwy Gateway launching notification
+ */
+ public void leftPAN(Gateway gtwy);
+
+ /**
+ * Notifies about local node joining PAN
+ * @param channel Network channel (ranging from 0x0B to 0x1A)
+ * @param PID Network PID
+ * @param EPID Network EPID
+ * @param gtwy Gateway launching notification
+ */
+ public void joinedPan(int channel, String PID, String EPID, Gateway gtwy);
+
+ /**
+ * Notifies about operation result of writing on a register
+ * @param nodeID Node's network address
+ * @param EUI64Addr Node's address
+ * @param errorCode Operation result
+ * @param gtwy Gateway launching notification
+ */
+ public void registerWrited(String nodeID, String EUI64Addr, short errorCode, Gateway gtwy);
+
+ /**
+ * Notifies about reading of a register
+ * @param nodeID Node's network address
+ * @param EUI64Addr Node's address
+ * @param register Register readed
+ * @param errorCode Operation result
+ * @param data Register contents
+ * @param gtwy Gateway launching notification
+ */
+ public void registerReaded(String nodeID, String EUI64Addr, short register, short errorCode, String data, Gateway gtwy);
+
+ /**
+ * Notifies response about an address request to a node
+ * @param errorCode request result
+ * @param nodeID Node's network address
+ * @param EUI64Addr Node's address
+ * @param gtwy Gateway launching notification
+ */
+ public void addrResponse(short errorCode, String nodeID, String EUI64Addr, Gateway gtwy);
+
+ /**
+ * Notifies about a Neighbour table request response.
+ * Note: tableLength != table.length() means there are records pending to
+ * receive (if requested)
+ * @param nodeID Node's network address
+ * @param errorCode request result
+ * @param tableLength Total neighbour table
+ * @param table received records
+ * @param gtwy Gateway launching notification
+ */
+ public void neighbourTableResponse(String nodeID, short errorCode, int tableLength, NeighbourTableEntry[] table, Gateway gtwy);
+
+ /**
+ * Notifies about a node descriptor request response
+ * @param nodeID Node's network address
+ * @param errorCode request result
+ * @param descriptor Map containig pairs <key,value> of related descriptor
+ * @param gtwy Gateway launching notification
+ */
+ public void nodeDescriptorResponse(String nodeID, short errorCode, Map descriptor, Gateway gtwy);
+
+ /**
+ * Notifies about a node descriptor request response
+ * @param nodeID Node's network address
+ * @param errorCode request result
+ * @param descriptor power descriptor
+ * @param gtwy Gateway launching notification
+ */
+ public void powerDescriptorResponse(String nodeID, short errorCode, String descriptor, Gateway gtwy);
+
+ /**
+ * Notifies about a node descriptor request response
+ * @param nodeID Node's network address
+ * @param errorCode request result
+ * @param EPList EndPoint list
+ * @param gtwy Gateway launching notification
+ */
+ public void nodeActiveEPResponse(String nodeID, short errorCode, short[] EPList, Gateway gtwy);
+
+ /**
+ * Notifies about a node EndPoint simple descriptor request response
+ * @param nodeID Node's network address
+ * @param errorCode request result
+ * @param EP EndPoint requested
+ * @param ProfileID
+ * @param DeviceID
+ * @param inClusterList String array containing supported in cluster
+ * @param outClusterList String array containing supported out cluster
+ * @param gtwy Gateway launching notification
+ */
+ public void nodeEndPointSimpleDescriptorResponse(String nodeID, short errorCode, short EP, String ProfileID, String DeviceID, String[] inClusterList, String[] outClusterList, Gateway gtwy);
+
+ /**
+ * Notifies about a node matching a previous descriptor request response
+ * NOTE: profile
+ * @param nodeID Node's network address
+ * @param errorCode request result
+ * @param EPList EndPoint list
+ * @param gtwy Gateway launching notification
+ */
+ public void nodeMatchingDescriptorResponse(String nodeID, short errorCode, short[] EPList, Gateway gtwy);
+
+ /**
+ * Notifies about and unhandled telegesis command:
+ * - SDATA
+ * - FN0130
+ * - SINK
+ * - ADSK
+ * - DataMODE
+ * - OPEN
+ * - CLOSED
+ * - TRACK
+ * - TRACK2
+ * - PWRCHANGE
+ * - NM
+ * - ENTERING BLOAD
+ * @param command not handled command
+ * @param parameters command parameters list
+ * @param gtwy Gateway launching notification
+ */
+ public void unhandledCommand(String command, String[] parameters, Gateway gtwy);
+
+ /**
+ * Notifies about unknonwn incomming messages
+ * @param message
+ * @param gtwy Gateway launching notification
+ */
+ public void unknownMessage(String message, Gateway gtwy);
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/TelegesisErrorException.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/TelegesisErrorException.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/TelegesisErrorException.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,48 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway;
+
+/**
+ * Exception to manage telegesis error codes
+ * @author alvaro
+ */
+public class TelegesisErrorException extends Exception {
+
+ private String mErrorCode;
+ private String mErrorMessage;
+
+ public TelegesisErrorException(String errorCode, String errorMessage) {
+
+ mErrorCode = errorCode;
+ mErrorMessage = errorMessage;
+
+ }
+
+ /**
+ * @return Telegesis error code
+ */
+ public String getErrorCode() {
+ return mErrorCode;
+ }
+
+ /**
+ * @return Telegesis error message
+ */
+ public String getErrorMessage() {
+ return mErrorMessage;
+ }
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/ZigbeeDeviceType.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/ZigbeeDeviceType.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/ZigbeeDeviceType.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,49 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway;
+
+/**
+ * Zigbee allowed devices
+ * @author alvaro
+ */
+public enum ZigbeeDeviceType {
+
+ /**
+ * unknown device type
+ */
+ Unknown,
+ /**
+ * device is a FFD (full function device) coordinator
+ */
+ Coordinator,
+ /**
+ * device is a FFD (full function device) router
+ */
+ Router,
+ /**
+ * device is a RFD (reduced function device)
+ */
+ EndDevice,
+ /**
+ * device is a RFD (reduced function device) sleepy
+ */
+ SleepyEndDevice,
+ /**
+ * device is a RFD (reduced function device) mobile
+ */
+ MobileEndDevice
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/osgi/Constants.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/osgi/Constants.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/osgi/Constants.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,28 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway.osgi;
+
+/**
+ *
+ * @author HowLab, University of Zaragoza (alvaro)
+ */
+public class Constants {
+ public static final String GATEWAY_DONGLE_ADDRESS = "gateway.dongle_address";
+ public static final String GATEWAY_FIRMWARE_REVISION = "gateway.firmware_revision";
+ public static final String GATEWAY_DEVICE_NAME = "gateway.device_name";
+
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/AddressTableEntry.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/AddressTableEntry.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/AddressTableEntry.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,103 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway.util;
+
+/**
+ * Address table result class
+ * @author alvaro
+ */
+public class AddressTableEntry {
+
+ private short mIndex;
+ private boolean mActive;
+ private String mID;
+ private String mEUI64Addr;
+
+ @Override
+ public String toString() {
+ return String.format("index: %d Active: %s ID: %s EUI64Addr: %s", mIndex, mActive, mID, mEUI64Addr);
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 71 * hash + this.mIndex;
+ hash = 71 * hash + (this.mActive ? 1 : 0);
+ hash = 71 * hash + (this.mID != null ? this.mID.hashCode() : 0);
+ hash = 71 * hash + (this.mEUI64Addr != null ? this.mEUI64Addr.hashCode() : 0);
+ return hash;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final AddressTableEntry other = (AddressTableEntry) obj;
+ if (this.mIndex != other.mIndex) {
+ return false;
+ }
+ if (this.mActive != other.mActive) {
+ return false;
+ }
+ if ((this.mID == null) ? (other.mID != null) : !this.mID.equals(other.mID)) {
+ return false;
+ }
+ if ((this.mEUI64Addr == null) ? (other.mEUI64Addr != null) : !this.mEUI64Addr.equals(other.mEUI64Addr)) {
+ return false;
+ }
+ return true;
+ }
+ public AddressTableEntry(short index, boolean active, String ID, String EUI64Addr) {
+
+ mIndex = index;
+ mActive = active;
+ mID = ID;
+ mEUI64Addr = EUI64Addr;
+ }
+
+ /**
+ * @return the index
+ */
+ public short getIndex() {
+ return mIndex;
+ }
+
+ /**
+ * @return the active
+ */
+ public boolean getActive() {
+ return mActive;
+ }
+
+ /**
+ * @return the ID
+ */
+ public String getID() {
+ return mID;
+ }
+
+ /**
+ * @return the EUI64Addr
+ */
+ public String getEUI64Addr() {
+ return mEUI64Addr;
+ }
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/MulticastTableEntry.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/MulticastTableEntry.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/MulticastTableEntry.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,91 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway.util;
+
+/**
+ * Multicast table result class
+ * @author HowLab, University of Zaragoza (alvaro)
+ */
+public class MulticastTableEntry {
+ private short mIndex;
+ private String mID;
+ private short mEP;
+
+ @Override
+ public String toString() {
+ return String.format("index: %d ID: %s EP: %s", mIndex, mID, mEP);
+ }
+
+ public MulticastTableEntry(short index, String ID, short EP){
+ mIndex = index;
+ mID = ID;
+ mEP = EP;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final MulticastTableEntry other = (MulticastTableEntry) obj;
+ if (this.mIndex != other.mIndex) {
+ return false;
+ }
+ if ((this.mID == null) ? (other.mID != null) : !this.mID.equals(other.mID)) {
+ return false;
+ }
+ if (this.mEP != other.mEP) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 3;
+ hash = 19 * hash + this.mIndex;
+ hash = 19 * hash + (this.mID != null ? this.mID.hashCode() : 0);
+ hash = 19 * hash + this.mEP;
+ return hash;
+ }
+
+ /**
+ * @return the Index
+ */
+ public short getIndex() {
+ return mIndex;
+ }
+
+ /**
+ * @return the ID
+ */
+ public String getID() {
+ return mID;
+ }
+
+ /**
+ * @return the EP
+ */
+ public short getEP() {
+ return mEP;
+ }
+
+
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NeighbourTableEntry.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NeighbourTableEntry.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NeighbourTableEntry.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,129 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway.util;
+
+import es.unizar.howlab.core.zigbee.telegesis.gateway.ZigbeeDeviceType;
+
+/**
+ * Zigbee relationships table entry
+ * @author alvaro
+ */
+public class NeighbourTableEntry {
+
+ private short mIndex;
+ private ZigbeeDeviceType mType;
+ private String mEUI64Addr;
+ private String mID;
+ private short mLQI;
+
+ @Override
+ public String toString() {
+ return String.format("index: %d Type: %s EUI64Addr: %s ID: %s LQI: %02X", mIndex, mType, mEUI64Addr, mID, mLQI);
+ }
+
+ public NeighbourTableEntry(short index, ZigbeeDeviceType type, String EUI64Addr, String ID, short LQI) {
+
+ mIndex = index;
+ mType = type;
+ mEUI64Addr = EUI64Addr;
+ mID = ID;
+ mLQI = LQI;
+
+ }
+
+
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 83 * hash + this.mIndex;
+ hash = 83 * hash + (this.mType != null ? this.mType.hashCode() : 0);
+ hash = 83 * hash + (this.mEUI64Addr != null ? this.mEUI64Addr.hashCode() : 0);
+ hash = 83 * hash + (this.mID != null ? this.mID.hashCode() : 0);
+ hash = 83 * hash + this.mLQI;
+ return hash;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final NeighbourTableEntry other = (NeighbourTableEntry) obj;
+ if (this.mIndex != other.mIndex) {
+ return false;
+ }
+ if (this.mType != other.mType) {
+ return false;
+ }
+ if ((this.mEUI64Addr == null) ? (other.mEUI64Addr != null) : !this.mEUI64Addr.equals(other.mEUI64Addr)) {
+ return false;
+ }
+ if ((this.mID == null) ? (other.mID != null) : !this.mID.equals(other.mID)) {
+ return false;
+ }
+ if (this.mLQI != other.mLQI) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * @return Table index
+ */
+ public int getIndex() {
+ return mIndex;
+ }
+
+ /**
+ * @return the Zigbee device type
+ */
+ public ZigbeeDeviceType getType() {
+ return mType;
+ }
+
+ /**
+ * @return Device EUI64Addr
+ */
+ public String getEUI64Addr() {
+ return mEUI64Addr;
+ }
+
+ /**
+ * @return Device Network Address
+ */
+ public String getID() {
+ return mID;
+ }
+
+ /**
+ * @return Link Quality Indicator
+ */
+ public short getLQI() {
+ return mLQI;
+ }
+
+ /**
+ * @param LQI the LQI to set
+ */
+ public void setLQI(short LQI) {
+ this.mLQI = LQI;
+ }
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NetworkInformation.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NetworkInformation.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NetworkInformation.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,119 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway.util;
+
+import es.unizar.howlab.core.zigbee.telegesis.gateway.ZigbeeDeviceType;
+
+/**
+ * Display network Info result class
+ * @author alvaro
+ */
+public class NetworkInformation {
+
+ private ZigbeeDeviceType mDeviceType;
+ private int mChannel;
+ private short mPower;
+ private String mPID;
+ private String mEPID;
+
+ @Override
+ public String toString() {
+ return String.format("Channel: %d Power: %02X PID: %s EPID: %s ", mChannel, mPower, mPID, mEPID);
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final NetworkInformation other = (NetworkInformation) obj;
+ if (this.mDeviceType != other.mDeviceType) {
+ return false;
+ }
+ if (this.mChannel != other.mChannel) {
+ return false;
+ }
+ if (this.mPower != other.mPower) {
+ return false;
+ }
+ if ((this.mPID == null) ? (other.mPID != null) : !this.mPID.equals(other.mPID)) {
+ return false;
+ }
+ if ((this.mEPID == null) ? (other.mEPID != null) : !this.mEPID.equals(other.mEPID)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 3;
+ hash = 89 * hash + (this.mDeviceType != null ? this.mDeviceType.hashCode() : 0);
+ hash = 89 * hash + this.mChannel;
+ hash = 89 * hash + this.mPower;
+ hash = 89 * hash + (this.mPID != null ? this.mPID.hashCode() : 0);
+ hash = 89 * hash + (this.mEPID != null ? this.mEPID.hashCode() : 0);
+ return hash;
+ }
+
+ public NetworkInformation(ZigbeeDeviceType deviceType, int channel, short power, String PID, String EPID) {
+ mDeviceType = deviceType;
+ mChannel = channel;
+ mPower = power;
+ mPID = PID;
+ mEPID = EPID;
+
+ }
+
+ /**
+ * @return Node functionality on the PAN (FFD, COO, ZE, SED, MED)
+ */
+ public ZigbeeDeviceType getDeviceType() {
+ return mDeviceType;
+ }
+
+ /**
+ * @return Network IEEE 802.15.4 channel (11-26)
+ */
+ public int getChannel() {
+ return mChannel;
+ }
+
+ /**
+ * @return Node's output power in dBm
+ */
+ public short getPower() {
+ return mPower;
+ }
+
+ /**
+ * @return Network's PID
+ */
+ public String getPID() {
+ return mPID;
+ }
+
+ /**
+ * @return Network's EPID
+ */
+ public String getEPID() {
+ return mEPID;
+ }
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NetworkJoinedInfo.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NetworkJoinedInfo.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/NetworkJoinedInfo.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,90 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway.util;
+
+/**
+ * Network join result class
+ * @author alvaro
+ */
+public class NetworkJoinedInfo {
+ private int mChannel;
+ private String mPANID;
+ private String mEPID;
+ public NetworkJoinedInfo(int channel, String PANID, String EPID) {
+
+ mChannel = channel;
+ mPANID = PANID;
+ mEPID = EPID;
+ }
+
+ @Override
+ public String toString() {
+ return String.format("Channel: %d PANID: %s EPID: %s ", mChannel, mPANID, mEPID);
+ }
+
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final NetworkJoinedInfo other = (NetworkJoinedInfo) obj;
+ if (this.mChannel != other.mChannel) {
+ return false;
+ }
+ if ((this.mPANID == null) ? (other.mPANID != null) : !this.mPANID.equals(other.mPANID)) {
+ return false;
+ }
+ if ((this.mEPID == null) ? (other.mEPID != null) : !this.mEPID.equals(other.mEPID)) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 7;
+ hash = 59 * hash + this.mChannel;
+ hash = 59 * hash + (this.mPANID != null ? this.mPANID.hashCode() : 0);
+ hash = 59 * hash + (this.mEPID != null ? this.mEPID.hashCode() : 0);
+ return hash;
+ }
+
+ /**
+ * @return the Channel
+ */
+ public int getChannel() {
+ return mChannel;
+ }
+
+ /**
+ * @return the PANID
+ */
+ public String getPANID() {
+ return mPANID;
+ }
+
+ /**
+ * @return the EPID
+ */
+ public String getEPID() {
+ return mEPID;
+ }
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/PANScanResult.java
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/PANScanResult.java (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/java/es/unizar/howlab/core/zigbee/telegesis/gateway/util/PANScanResult.java Thu Feb 2 13:18:47 2012
@@ -1,0 +1,117 @@
+/*
+ * Copyright 2011-2012 HOWLab. http://howlab.unizar.es/
+ * Human OpenWare Research Lab. Universidad Zaragoza
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package es.unizar.howlab.core.zigbee.telegesis.gateway.util;
+
+/**
+ * PANSCAN result class
+ * @author alvaro
+ */
+public class PANScanResult {
+
+ private int mChannel;
+ private String mPANID;
+ private String mEPID;
+ private short mProfile;
+ private boolean mJoinPermission;
+
+ @Override
+ public String toString() {
+ return String.format("Channel: %d PANID: %s EPID: %s Profile: %s JoinPermission: %b", mChannel, mPANID, mEPID, mProfile, mJoinPermission);
+ }
+
+ public PANScanResult(int channel, String PANID, String EPID, short profile, boolean joinPermission) {
+
+ mChannel = channel;
+ mPANID = PANID;
+ mEPID = EPID;
+ mProfile = profile;
+ mJoinPermission = joinPermission;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ final PANScanResult other = (PANScanResult) obj;
+ if (this.mChannel != other.mChannel) {
+ return false;
+ }
+ if ((this.mPANID == null) ? (other.mPANID != null) : !this.mPANID.equals(other.mPANID)) {
+ return false;
+ }
+ if ((this.mEPID == null) ? (other.mEPID != null) : !this.mEPID.equals(other.mEPID)) {
+ return false;
+ }
+ if (this.mProfile != other.mProfile) {
+ return false;
+ }
+ if (this.mJoinPermission != other.mJoinPermission) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 3;
+ hash = 23 * hash + this.mChannel;
+ hash = 23 * hash + (this.mPANID != null ? this.mPANID.hashCode() : 0);
+ hash = 23 * hash + (this.mEPID != null ? this.mEPID.hashCode() : 0);
+ hash = 23 * hash + this.mProfile;
+ hash = 23 * hash + (this.mJoinPermission ? 1 : 0);
+ return hash;
+ }
+
+ /**
+ * @return the Channel
+ */
+ public int getChannel() {
+ return mChannel;
+ }
+
+ /**
+ * @return the PANID
+ */
+ public String getPANID() {
+ return mPANID;
+ }
+
+ /**
+ * @return the EPID
+ */
+ public String getEPID() {
+ return mEPID;
+ }
+
+ /**
+ * @return the Profile
+ */
+ public short getProfile() {
+ return mProfile;
+ }
+
+ /**
+ * @return the JoinPermission
+ */
+ public boolean getJoinPermission() {
+ return mJoinPermission;
+ }
+}
Added: projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/LICENSE
==============================================================================
--- projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/LICENSE (added)
+++ projects/zb4osgi/sandbox/howlab/telegesis-gateway-api/src/main/resources/LICENSE Thu Feb 2 13:18:47 2012
@@ -1,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
More information about the Commit
mailing list