2.08.01 release updates + Apache license
authorEman Copty <eman.copty@intel.com>
Sat, 6 Oct 2018 03:28:06 +0000 (20:28 -0700)
committerEman Copty <eman.copty@intel.com>
Mon, 8 Oct 2018 21:00:43 +0000 (14:00 -0700)
Remove FW file

101 files changed:
ATTRIBUTIONS
LICENSE
api/LICENSE
api/include/mvnc.h
api/include/ncCommPrivate.h
api/include/ncPrivateTypes.h
api/python/mvnc/mvncapi.py
api/src/Makefile
api/src/common/components/XLink/pc/UsbLinkPlatform.c [deleted file]
api/src/common/components/XLink/pc/XLinkPlatform.c [new file with mode: 0644]
api/src/common/components/XLink/pc/usb_boot.c
api/src/common/components/XLink/pc/usb_boot.h
api/src/common/components/XLink/shared/UsbLinkPlatform.h [deleted file]
api/src/common/components/XLink/shared/XLink.c
api/src/common/components/XLink/shared/XLink.h
api/src/common/components/XLink/shared/XLinkDispatcher.c
api/src/common/components/XLink/shared/XLinkDispatcher.h
api/src/common/components/XLink/shared/XLinkPlatform.h [new file with mode: 0644]
api/src/common/components/XLink/shared/XLinkPrivateDefines.h
api/src/common/components/XLink/shared/XLinkPublicDefines.h
api/src/common/components/XLink/shared/XLinkVersion.h
api/src/common/components/XLinkConsole/pc/XLinkConsole.c
api/src/common/components/XLinkConsole/pc/XLinkConsole.h
api/src/common/shared/include/mvLog.h
api/src/common/shared/include/mvMacros.h
api/src/get_mvcmd.sh [new file with mode: 0755]
api/src/mvnc_api.c
api/src/version.txt
docs/docker.html
docs/images/favicon.ico
docs/ncapi/ncapi2/c_api/ncDeviceClose.html
docs/ncapi/ncapi2/c_api/ncDeviceCreate.html
docs/ncapi/ncapi2/c_api/ncDeviceDestroy.html
docs/ncapi/ncapi2/c_api/ncDeviceGetOption.html
docs/ncapi/ncapi2/c_api/ncDeviceHandle_t.html
docs/ncapi/ncapi2/c_api/ncDeviceHwVersion_t.html
docs/ncapi/ncapi2/c_api/ncDeviceOpen.html
docs/ncapi/ncapi2/c_api/ncDeviceOption_t.html
docs/ncapi/ncapi2/c_api/ncDeviceSetOption.html
docs/ncapi/ncapi2/c_api/ncDeviceState_t.html
docs/ncapi/ncapi2/c_api/ncFifoAllocate.html
docs/ncapi/ncapi2/c_api/ncFifoCreate.html
docs/ncapi/ncapi2/c_api/ncFifoDataType_t.html
docs/ncapi/ncapi2/c_api/ncFifoDestroy.html
docs/ncapi/ncapi2/c_api/ncFifoGetOption.html
docs/ncapi/ncapi2/c_api/ncFifoHandle_t.html
docs/ncapi/ncapi2/c_api/ncFifoOption_t.html
docs/ncapi/ncapi2/c_api/ncFifoReadElem.html
docs/ncapi/ncapi2/c_api/ncFifoRemoveElem.html
docs/ncapi/ncapi2/c_api/ncFifoSetOption.html
docs/ncapi/ncapi2/c_api/ncFifoState_t.html
docs/ncapi/ncapi2/c_api/ncFifoType_t.html
docs/ncapi/ncapi2/c_api/ncFifoWriteElem.html
docs/ncapi/ncapi2/c_api/ncGlobalGetOption.html
docs/ncapi/ncapi2/c_api/ncGlobalOption_t.html
docs/ncapi/ncapi2/c_api/ncGlobalSetOption.html
docs/ncapi/ncapi2/c_api/ncGraphAllocate.html
docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifos.html
docs/ncapi/ncapi2/c_api/ncGraphAllocateWithFifosEx.html
docs/ncapi/ncapi2/c_api/ncGraphCreate.html
docs/ncapi/ncapi2/c_api/ncGraphDestroy.html
docs/ncapi/ncapi2/c_api/ncGraphGetOption.html
docs/ncapi/ncapi2/c_api/ncGraphHandle_t.html
docs/ncapi/ncapi2/c_api/ncGraphOption_t.html
docs/ncapi/ncapi2/c_api/ncGraphQueueInference.html
docs/ncapi/ncapi2/c_api/ncGraphQueueInferenceWithFifoElem.html
docs/ncapi/ncapi2/c_api/ncGraphSetOption.html
docs/ncapi/ncapi2/c_api/ncGraphState_t.html
docs/ncapi/ncapi2/c_api/ncLogLevel_t.html
docs/ncapi/ncapi2/c_api/ncStatus_t.html
docs/ncapi/ncapi2/c_api/ncTensorDescriptor_t.html
docs/ncapi/ncapi2/c_api/readme.html
docs/ncapi/ncapi2/py_api/FifoOption.html
docs/release_notes.html
docs/tools/tools_overview.html
examples/apps/hello_ncs_cpp/cpp/hello_ncs.cpp
examples/apps/hello_ncs_py/Makefile
examples/apps/hello_ncs_py/hello_ncs.py
examples/apps/multistick_cpp/cpp/multistick.cpp
examples/caffe/AlexNet/cpp/run.cpp
examples/caffe/AlexNet/run.py
examples/caffe/GoogLeNet/cpp/run.cpp
examples/caffe/GoogLeNet/run.py
examples/caffe/SqueezeNet/cpp/run.cpp
examples/caffe/SqueezeNet/run.py
examples/tensorflow/inception_v1/Makefile
examples/tensorflow/inception_v1/run.py
examples/tensorflow/inception_v3/Makefile
examples/tensorflow/inception_v3/run.py
extras/docker/Dockerfile
extras/docker/Dockerfile_NoPreviligeAccess [new file with mode: 0644]
extras/docker/README.md
extras/docker/docker_cmd.sh [new file with mode: 0755]
extras/docker/ncs_boot_devices/Makefile [new file with mode: 0644]
extras/docker/ncs_boot_devices/ncs_boot_devices.c [new file with mode: 0644]
extras/docker/ncs_boot_devices/readme.md [new file with mode: 0644]
install-utilities.sh
install.sh
requirements.txt
requirements_apt.txt
version.txt

index 2f92008..1eaeee6 100644 (file)
@@ -3,8 +3,7 @@
 
 The following are licenses for third party software that was used to develop the  Movidius Neural Compute API Library.
 These licenses are listed due to attribution requirements in these license agreements. For the avoidance of doubt,
-the Movidius Neural Compute API Library is solely governed by the terms and conditions of the Intel OBL SDK and Tools
-License License that accompanies it.
+the Movidius Neural Compute API Library is solely governed by the terms and conditions of the Intel Apache License that accompanies it.
 
 1. Numerical Python - NumPy
 
@@ -147,3 +146,383 @@ License License that accompanies it.
     LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
     OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
     OF THE POSSIBILITY OF SUCH DAMAGE.
+
+5. GNU C Library - glibc
+    License: GNU Lesser General Public License
+    homepage: http://www.gnu.org/software/libc/libc.html
+
+    GNU Lesser General Public License
+    Version 2.1, February 1999
+
+    Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+    59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+    Everyone is permitted to copy and distribute verbatim copies
+    of this license document, but changing it is not allowed.
+
+    [This is the first released version of the Lesser GPL. It also counts
+    as the successor of the GNU Library Public License, version 2, hence
+    the version number 2.1.]
+
+    Preamble
+    The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+    This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
+    When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
+    To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
+    For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+    We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
+    To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
+    Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
+    Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
+    When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
+    We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
+    For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
+    In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
+    Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
+    The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
+    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+    0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
+    A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+    The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+    "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+    Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+    1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+    You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+    2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+        a) The modified work must itself be a software library.
+        b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+        c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+        d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+            (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+            These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+        Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+        In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+    3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+    Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+    This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+    4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+    If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+    5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+    However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+    When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+    If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+    Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+    6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+    You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+        a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+        b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
+        c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+        d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+        e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+    For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+    It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+    7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+        a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+        b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+    8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+    9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+    10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
+    11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+    If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+    It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+    This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+    12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+    13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+    Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+    14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+    NO WARRANTY
+    15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+    16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+    END OF TERMS AND CONDITIONS
+    How to Apply These Terms to Your New Libraries
+    If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+    To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+        one line to give the library's name and an idea of what it does.
+        Copyright (C) year name of author
+        This library is free software; you can redistribute it and/or
+        modify it under the terms of the GNU Lesser General Public
+        License as published by the Free Software Foundation; either
+        version 2.1 of the License, or (at your option) any later version.
+        This library is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+        Lesser General Public License for more details.
+        You should have received a copy of the GNU Lesser General Public
+        License along with this library; if not, write to the Free Software
+        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+    Also add information on how to contact you by electronic and paper mail.
+    You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+        Yoyodyne, Inc., hereby disclaims all copyright interest in
+        the library `Frob' (a library for tweaking knobs) written
+        by James Random Hacker.
+        signature of Ty Coon, 1 April 1990
+        Ty Coon, President of Vice
+    That's all there is to it!
+
+6. Linux Kernel
+    License:   GNU General Public License v2.0 only
+    Homepage:  http://www.kernel.org/
+
+    The GNU General Public License (GPL)
+       Version 2, June 1991
+       Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+       59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+       Everyone is permitted to copy and distribute verbatim copies
+       of this license document, but changing it is not allowed.
+       Preamble
+       The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.
+       When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
+       To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
+       For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
+       We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
+       Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
+       Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
+       The precise terms and conditions for copying, distribution and modification follow.
+       TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+       0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
+       Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
+       1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
+       You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+       2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+           a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
+           b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
+           c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
+       These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+       Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
+       In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+       3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
+           a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+           b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
+           c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
+       The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+       If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
+       4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+       5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
+       6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
+       7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
+       If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
+       It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+       This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+       8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+       9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+       Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
+       10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+       NO WARRANTY
+       11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+       12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+       END OF TERMS AND CONDITIONS
+
+7. libusb
+    License:   GNU Lesser General Public License v2.1 or later
+    Homepage:  http://libusb.info/
+
+       GNU Lesser General Public License
+       Version 2.1, February 1999
+           Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+           59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+           Everyone is permitted to copy and distribute verbatim copies
+           of this license document, but changing it is not allowed.
+           [This is the first released version of the Lesser GPL. It also counts
+           as the successor of the GNU Library Public License, version 2, hence
+           the version number 2.1.]
+       Preamble
+       The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+       This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
+       When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
+       To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
+       For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+       We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
+       To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
+       Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
+       Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
+       When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
+       We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
+       For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
+       In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
+       Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
+       The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
+       TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+       0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
+       A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+       The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+       "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+       Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+       1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+       You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+       2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+           a) The modified work must itself be a software library.
+           b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+           c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+           d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+           (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+           These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+           Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+           In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+       3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+       Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+       This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+       4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+       If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+       5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+       However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+       When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+       If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+       Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+       6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+       You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+           a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+           b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
+           c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+           d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+           e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+       For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+       It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+       7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+           a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+           b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+       8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+       9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+       10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
+       11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+       If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+       It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+       This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+       12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+       13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+       Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+       14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+       NO WARRANTY
+       15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+       16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+       END OF TERMS AND CONDITIONS
+       How to Apply These Terms to Your New Libraries
+       If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+       To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+           one line to give the library's name and an idea of what it does.
+           Copyright (C) year name of author
+           This library is free software; you can redistribute it and/or
+           modify it under the terms of the GNU Lesser General Public
+           License as published by the Free Software Foundation; either
+           version 2.1 of the License, or (at your option) any later version.
+           This library is distributed in the hope that it will be useful,
+           but WITHOUT ANY WARRANTY; without even the implied warranty of
+           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+           Lesser General Public License for more details.
+           You should have received a copy of the GNU Lesser General Public
+           License along with this library; if not, write to the Free Software
+           Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+       Also add information on how to contact you by electronic and paper mail.
+       You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+           Yoyodyne, Inc., hereby disclaims all copyright interest in
+           the library `Frob' (a library for tweaking knobs) written
+           by James Random Hacker.
+           signature of Ty Coon, 1 April 1990
+           Ty Coon, President of Vice
+       That's all there is to it!
+
+8. systemd
+    License:   GNU Lesser General Public License v2.1 or later
+    Homepage:  http://freedesktop.org/wiki/Software/systemd/
+
+       GNU Lesser General Public License
+       Version 2.1, February 1999
+           Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+           59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+           Everyone is permitted to copy and distribute verbatim copies
+           of this license document, but changing it is not allowed.
+           [This is the first released version of the Lesser GPL. It also counts
+           as the successor of the GNU Library Public License, version 2, hence
+           the version number 2.1.]
+       Preamble
+       The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.
+       This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below.
+       When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things.
+       To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it.
+       For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights.
+       We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library.
+       To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others.
+       Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license.
+       Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs.
+       When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library.
+       We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances.
+       For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License.
+       In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system.
+       Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library.
+       The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run.
+       TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+       0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you".
+       A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables.
+       The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".)
+       "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library.
+       Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does.
+       1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library.
+       You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
+       2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
+           a) The modified work must itself be a software library.
+           b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change.
+           c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License.
+           d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful.
+           (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.)
+           These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
+           Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library.
+           In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
+       3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices.
+       Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy.
+       This option is useful when you wish to copy part of the code of the Library into a program that is not a library.
+       4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange.
+       If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code.
+       5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License.
+       However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables.
+       When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law.
+       If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.)
+       Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself.
+       6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications.
+       You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things:
+           a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.)
+           b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with.
+           c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution.
+           d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place.
+           e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy.
+       For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
+       It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute.
+       7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things:
+           a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above.
+           b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
+       8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
+       9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it.
+       10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License.
+       11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library.
+       If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances.
+       It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
+       This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
+       12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
+       13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
+       Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation.
+       14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
+       NO WARRANTY
+       15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+       16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+       END OF TERMS AND CONDITIONS
+       How to Apply These Terms to Your New Libraries
+       If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License).
+       To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
+           one line to give the library's name and an idea of what it does.
+           Copyright (C) year name of author
+           This library is free software; you can redistribute it and/or
+           modify it under the terms of the GNU Lesser General Public
+           License as published by the Free Software Foundation; either
+           version 2.1 of the License, or (at your option) any later version.
+           This library is distributed in the hope that it will be useful,
+           but WITHOUT ANY WARRANTY; without even the implied warranty of
+           MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+           Lesser General Public License for more details.
+           You should have received a copy of the GNU Lesser General Public
+           License along with this library; if not, write to the Free Software
+           Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+       Also add information on how to contact you by electronic and paper mail.
+       You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names:
+           Yoyodyne, Inc., hereby disclaims all copyright interest in
+           the library `Frob' (a library for tweaking knobs) written
+           by James Random Hacker.
+           signature of Ty Coon, 1 April 1990
+           Ty Coon, President of Vice
+       That's all there is to it!
diff --git a/LICENSE b/LICENSE
index a444ba1..617d376 100644 (file)
--- a/LICENSE
+++ b/LICENSE
-SOFTWARE TOOLS LICENSE AGREEMENT 
-
-DO NOT DOWNLOAD, INSTALL, ACCESS, COPY, OR USE ANY PORTION OF THE MATERIALS (DEFINED BELOW) UNTIL YOU HAVE READ AND ACCEPTED 
-THE TERMS AND CONDITIONS OF THIS AGREEMENT. BY INSTALLING, COPYING, ACCESSING, OR USING THE MATERIALS, YOU AGREE TO BE LEGALLY 
-BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. If You do not agree to be bound by, or the entity for whose benefit You act has not 
-authorized You to accept, these terms and conditions, do not install, access, copy, or use the Software and destroy all copies of the Software in Your 
-possession. 
-
-This DEVELOPMENT TOOLS LICENSE AGREEMENT (this "Agreement") is entered into between Intel Corporation, a Delaware corporation ("Intel") and You. 
-"You" refers to you or your employer or other entity for whose benefit you act, as applicable. If you are agreeing to the terms and conditions of this 
-Agreement on behalf of a company or other legal entity, you represent and warrant that you have the legal authority to bind that legal entity to the 
-Agreement, in which case, "You" or "Your" shall be in reference to such entity. Intel and You are referred to herein individually as a "Party" or, together, as 
-the "Parties". 
-
-The Parties, in consideration of the mutual covenants contained in this Agreement, and for other good and valuable consideration, the receipt and 
-sufficiency of which they acknowledge, and intending to be legally bound, agree as follows: 
-
-1. DEFINITIONS. The following definitions are used throughout this Agreement: 
-"Affiliate" means any entity controlling, controlled by or under common control with a Party hereto, where "control" means the direct or indirect ownership 
-of more than fifty percent (50%) of such entity"s capital or equivalent voting rights. An entity will be deemed an "Affiliate" only as long as such control exists 
-during the term of this Agreement. 
-
-"Contractor" means a third party consultant or subcontractor who requires access to or use of the Materials to perform work on Your behalf or at Your 
-behest. 
-
-"Development Tools" means the development, evaluation, production, or test tool software, and associated documentation or other collateral, identified 
-in the "development_tools.txt" text files, if any, included in the Materials. 
-
-"Derivatives" means derivative works as defined in 17 U.S.C " 101 et seq. 
-
-"Intel-based Device" means a device designed, manufactured, or configured by You or Your Affiliates to include or operate Intel hardware, software, or 
-services. 
-
-"Materials" means the software, documentation, the software product serial number and license key codes (if applicable), Development Tools, 
-Redistributables, and other materials or collateral, including any updates and upgrades thereto, in source code or object code form where applicable, that 
-are provided or otherwise made available by Intel to You under this Agreement. "Materials" do not include Open Source Software or any computer 
-programming code that is subject to an agreement, obligation or license (whether or not accompanying the Materials) intended to supersede this 
-Agreement. 
-
-"Redistributables" means the software, documentation, or other collateral identified in the "redist.txt" text files, if any, included in the Materials. 
-
-2. LIMITED LICENSE. 
-(A) Subject to the terms and conditions of this Agreement, Intel grants You and Your Affiliates, a limited, nonexclusive, nontransferable, revocable, 
-worldwide, fully paid-up license during the term of this Agreement, without the right to sublicense, unless expressly stated otherwise, to: 
-(1) internally reproduce and install a reasonable number of copies of the Materials for Your internal use solely for the purposes of designing, 
-developing, manufacturing and testing Intel-based Devices; 
-(2) internally reproduce the source code of the Development Tools, if provided to You by Intel, and to internally create and reproduce Derivatives of 
-the Development Tools, and to internally reproduce the binary code of the Development Tools, or any Derivatives created by You, in each case solely 
-for the purpose of designing, developing, manufacturing and testing the Intel-based Device, solely as necessary for the integration of any Intel software 
-and the output generated by the Development Tools, with and into Intel-based Devices; 
-(3) create Derivatives of the Redistributables, or any portions thereof, provided to You by Intel in source code form solely for the purposes of designing, 
-developing, debugging, modifying, distributing and testing software containing significantly more functionality and features than the Redistributables 
-in the form provided to You by Intel; 
-(4) distribute (or otherwise make available) on a royalty-free basis, subject to any other terms and conditions which may appear in the Redistributables 
-text files, the Redistributables, including any Derivatives of the Redistributables pursuant to Section 2(A)(3), or any portions thereof, only as integrated 
-or embedded in software (and not on a stand-alone basis) solely for use on an Intel-based Device; and 
-(5) have the tasks set forth in Section 2(A)(1) and (2) above performed by a Contractor on the conditions that You enter into a written confidentiality 
-agreement with any such Contractor, subject to Section 7 (Confidentiality), and You remain fully liable to Intel for the actions and inactions of Your 
-Contractors. 
-(B) You will be liable for Your Affiliate"s breach of these terms. In addition, You acknowledge that Your Affiliates are beneficiaries of the licenses granted by 
-Intel under Section 2. 
-(C) Intel hereby grants You the right to sub-license (without rights to further sublicense) the Development Tools, including any accompanying 
-documentation, to Your manufacturing partners, in the code format provided to You by Intel, solely for designing, developing, manufacturing and testing 
-the Intel-based Devices solely as necessary for the integration of any Intel software and the output generated by the Development Tools, with and into 
-Intel-based Devices. The sublicense is subject to a written sublicensing agreement that contains confidentiality obligations and license restrictions that are 
-no less protective of Intel than those provided in this Agreement. You will be fully responsible and liable towards Intel for Your sub-licensees" compliance 
-with all such confidentiality obligations and license restrictions. You may grant Your manufacturing partners the right to further distribute Redistributables 
-solely as integrated or embedded in software for Your Intel-based Devices. 
-
-3. LICENSE RESTRICTIONS. All right, title and interest in and to the Materials and associated documentation are and will remain the exclusive property of 
-Intel and its suppliers. Unless expressly permitted under the Agreement, You will not, and will not allow any third party to (i) use, copy, distribute, sell or 
-offer to sell the Materials or associated documentation; (ii) modify, adapt, enhance, disassemble, decompile, reverse engineer, change or create derivative 
-works from the Materials except and only to the extent as specifically required by mandatory applicable laws or any applicable third party license terms 
-accompanying the Materials; (iii) use or make the Materials available for the use or benefit of third parties; or (iv) use the Materials on Your products other 
-than those that include the Intel product(s), platform(s), or software identified in the Materials; or (v) publish or provide any Materials benchmark or 
-comparison test results. 
-If You received the Materials solely for evaluation purposes, You have no distribution rights to the Materials or any portion thereof. 
-
-Distribution of the Redistributables is also subject to the following conditions: You shall: (i) be solely responsible to Your customers and end users for any 
-update or support obligation or other liability which may arise from the distribution, (ii) not make any statement that Your software is "certified", or that its 
-performance is guaranteed, by Intel, (iii) not use Intel's name or trademarks to promote Your software without prior written permission, (iv) use a license 
-agreement that contains provisions that are at least as restrictive as this Agreement and which prohibits disassembly and reverse engineering of the 
-Materials provided in object code form, and (v) indemnify, hold harmless, and defend Intel, Intel"s Affiliates, and its licensors from and against any claims 
-or lawsuits, including attorney's fees, that arise or result from Your Derivatives or Your distribution of Your software. 
-
-The consideration under this Agreement is only for the licenses Intel expressly grants above. Any other rights including, but not limited to, additional patent 
-rights, will require an additional license and additional consideration. Nothing in this Agreement requires or will be treated to require Intel to grant any 
-additional license. You acknowledge that an essential basis of the bargain in this Agreement is that Intel grants You no licenses or other rights including, 
-but not limited to, patent, copyright, trade secret, trademark, trade name, service mark or other intellectual property licenses or rights with respect to the 
-Materials and associated documentation, by implication, estoppel or otherwise, except for the licenses expressly granted above. You acknowledge there 
-are significant uses of the Materials in their original, unmodified and uncombined form. The consideration for the licenses in this Agreement reflects Intel"s 
-continuing right to assert patent claims against any modifications or derivative works (including, without limitation, error corrections and bug fixes) of, or 
-combinations with, the Materials that You, Your Affiliates or third parties make that infringe any Intel patent claim. 
-
-4. LICENSE TO FEEDBACK. This Agreement does not obligate You to provide Intel with materials, information, comments, suggestions, Your Derivatives or 
-other communication regarding the features, functions, performance or use of the Materials ("Feedback"). If any software included in the Materials is 
-provided or otherwise made available by Intel in source code form, to the extent You provide Intel with Feedback in a tangible form, You grant to Intel and 
-its affiliates a non-exclusive, perpetual, sublicenseable, irrevocable, worldwide, royalty-free, fully paid-up and transferable license, to and under all of Your 
-intellectual property rights, whether perfected or not, to publicly perform, publicly display, reproduce, use, make, have made, sell, offer for sale, distribute, 
-import, create derivative works of and otherwise exploit any comments, suggestions, descriptions, ideas, Your Derivatives or other feedback regarding the 
-Materials provided by You or on Your behalf.
-
-5. OPEN SOURCE STATEMENT. The Materials may include Open Source Software (OSS) licensed pursuant to OSS license agreement(s) identified in the 
-OSS comments in the applicable source code file(s) and/or file header(s) provided with or otherwise associated with the Materials. Neither You nor any 
-Original Equipment Manufacturer (OEM), Original Device Manufacturer (ODM), customer, or distributor may subject any proprietary portion of the Materials 
-to any OSS license obligations including, without limitation, combining or distributing the Materials with OSS in a manner that subjects Intel, the Materials 
-or any portion thereof to any OSS license obligation. Nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any 
-applicable OSS license.
-
-6. THIRD PARTY SOFTWARE. Certain third party software provided with or within the Materials may only be used (a) upon securing a license directly from 
-the owner of the software or (b) in combination with hardware components purchased from such third party and (c) subject to further license limitations 
-by the software owner. A listing of any such third party limitations is in one or more text files accompanying the Materials. You acknowledge Intel is not 
-providing You with a license to such third party software and further that it is Your responsibility to obtain appropriate licenses from such third parties 
-directly.
-
-7. CONFIDENTIALITY. The terms and conditions of this Agreement, exchanged confidential information, as well as the Materials are subject to the terms 
-and conditions of the Non-Disclosure Agreement(s) or Intel Pre-Release Loan Agreement(s) (referred to herein collectively or individually as "NDA") entered 
-into by and in force between Intel and You, and in any case no less confidentiality protection than You apply to Your information of similar sensitivity. If 
-You would like to have a Contractor perform work on Your behalf that requires any access to or use of Materials You must obtain a written confidentiality 
-agreement from the Contractor which contains terms and conditions with respect to access to or use of Materials no less restrictive than those set forth in 
-this Agreement, excluding any distribution rights and use for any other purpose, and You will remain fully liable to Intel for the actions and inactions of 
-those Contractors. You may not use Intel's name in any publications, advertisements, or other announcements without Intel's prior written consent. 
-
-8. NO OBLIGATION; NO AGENCY. Intel may make changes to the Software, or items referenced therein, at any time without notice. Intel is not obligated to 
-support, update, provide training for, or develop any further version of the Software or to grant any license thereto. No agency, franchise, partnership, joint-
-venture, or employee-employer relationship is intended or created by this Agreement. 
-
-9. EXCLUSION OF WARRANTIES. THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING 
-WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. Intel does not warrant or assume responsibility 
-for the accuracy or completeness of any information, text, graphics, links or other items within the Materials. 
-
-10. LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL OR ITS AFFILIATES, LICENSORS OR SUPPLIERS (INCLUDING THEIR RESPECTIVE DIRECTORS, 
-OFFICERS, EMPLOYEES, AND AGENTS) BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS 
-INTERRUPTION, OR LOST DATA) ARISING OUT OF OR IN RELATION TO THIS AGREEMENT, INCLUDING THE USE OF OR INABILITY TO USE THE MATERIALS, 
-EVEN IF INTEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR LIMITATION OF LIABILITY 
-FOR IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE LIMITATION MAY IN PART NOT APPLY TO YOU. YOU MAY 
-ALSO HAVE OTHER LEGAL RIGHTS THAT VARY FROM JURISDICTION TO JURISDICTION. THE MATERIALS LICENSED HEREUNDER ARE NOT DESIGNED 
-OR INTENDED FOR USE IN ANY MEDICAL, LIFE SAVING OR LIFE SUSTAINING SYSTEMS, TRANSPORTATION SYSTEMS, NUCLEAR SYSTEMS, OR FOR ANY 
-OTHER MISSION CRITICAL APPLICATION IN WHICH THE FAILURE OF THE DEVELOPMENT TOOLS COULD LEAD TO PERSONAL INJURY OR DEATH. YOU 
-WILL INDEMNIFY AND HOLD INTEL AND ITS AFFILIATES, LICENSORS AND SUPPLIERS (INCLUDING THEIR RESPECTIVE DIRECTORS, OFFICERS, 
-EMPLOYEES, AND AGENTS) HARMLESS AGAINST ALL CLAIMS, LIABILITIES, LOSSES, COSTS, DAMAGES, AND EXPENSES (INCLUDING REASONABLE 
-ATTORNEY FEES), ARISING OUT OF, DIRECTLY OR INDIRECTLY, THE DISTRIBUTION OF THE MATERIALS AND ANY CLAIM OF PRODUCT LIABILITY, 
-PERSONAL INJURY OR DEATH ASSOCIATED WITH ANY UNINTENDED USE, EVEN IF SUCH CLAIM ALLEGES THAT INTEL OR AN INTEL AFFILIATE, LICENSOR 
-OR SUPPLIER WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. THE LIMITED REMEDIES, WARRANTY DISCLAIMER AND 
-LIMITED LIABILITY ARE FUNDAMENTAL ELEMENTS OF THE BASIS OF THE BARGAIN BETWEEN INTEL AND YOU AND INTEL WOULD NOT BE ABLE TO 
-PROVIDE THE MATERIALS WITHOUT SUCH LIMITATIONS. 
-
-11. TERMINATION AND SURVIVAL. Intel may terminate this Agreement for any reason with thirty (30) days" notice and immediately if You or someone 
-acting on Your behalf or at Your behest violates any of its terms or conditions. Upon termination You will immediately destroy and ensure the destruction 
-of the Materials (including providing certification of such destruction or return back to Intel). Upon termination of this Agreement, all licenses granted to 
-You hereunder terminate immediately. All Sections of this Agreement, except Section 2, will survive termination. In the event of termination of this 
-Agreement, the license grant to any Redistributables, including Your Derivatives of the Redistributables, distributed by You prior to the effective date of 
-such termination and in accordance with the terms and conditions of this Agreement shall survive any such termination of this Agreement. 
-
-12. GOVERNING LAW AND JURISDICTION. This Agreement and any dispute arising out of or relating to it will be governed by the laws of the U.S.A. and 
-Delaware, without regard to conflict of laws principles. The Parties exclude the application of the United Nations Convention on Contracts for the 
-International Sale of Goods (1980). The state and federal courts sitting in Delaware, U.S.A. will have exclusive jurisdiction over any dispute arising out of or 
-relating to this Agreement. The Parties consent to personal jurisdiction and venue in those courts. A Party that obtains a judgment against the other Party 
-in the courts identified in this section may enforce that judgment in any court that has jurisdiction over the Parties. 
-
-13. EXPORT REGULATIONS/EXPORT CONTROL. You agree that neither You nor Your subsidiaries or Affiliates will export/re-export the Materials, directly 
-or indirectly, to any country for which the U.S. Department of Commerce or any other agency or department of the U.S. Government or the foreign 
-government from where it is shipping requires an export license, or other governmental approval, without first obtaining any such required license or 
-approval. In the event the Materials are exported from the U.S.A. or re-exported from a foreign destination by You, Your subsidiaries, or Your Affiliates, You 
-will ensure that the distribution and export/re-export or import of the Materials complies with all laws, regulations, orders, or other restrictions of the U.S. 
-Export Administration Regulations and the appropriate foreign government. 
-
-14. GOVERNMENT RESTRICTED RIGHTS. The Materials are a commercial item (as defined in 48 C.F.R. 2.101) consisting of commercial computer software 
-and commercial computer software documentation (as those terms are used in 48 C.F.R. 12.212). Consistent with 48 C.F.R. 12.212 and 48 C.F.R 227.72021 
-through 227.7202-4, You will not provide the Materials to the U.S. Government. Contractor or Manufacturer is Intel Corporation, 2200 Mission College 
-Blvd., Santa Clara, CA 95054. 
-
-15. TRADEMARKS. Third party trademarks, trade names, product names and logos (the "Trademarks") contained in or used by the Materials are the 
-trademarks or registered trademarks of their respective owners, and the use of such Trademarks shall inure to the benefit of the trademark owner. The 
-reference to such Trademarks (if any) by Intel in any of the Materials does not constitute: (i) an affiliation by Intel and its licensors with such company, or (ii) 
-an endorsement or approval of such company of Intel and its licensors and its products or services. 
-
-16. ASSIGNMENT. You may not delegate, assign or transfer this Agreement, the license(s) granted or any of Your rights or duties hereunder, expressly, by 
-implication, by operation of law, or otherwise and any attempt to do so, without Intel"s express prior written consent, will be null and void. Intel may assign, 
-delegate and transfer this Agreement, and its rights and obligations hereunder, in its sole discretion. 
-
-17. ENTIRE AGREEMENT; SEVERABILITY. The terms and conditions of this Agreement and any NDA with Intel constitute the entire agreement between the 
-Parties with respect to the subject matter hereof, and merge and supersede all prior or contemporaneous agreements, understandings, negotiations and 
-discussions. Neither Party will be bound by any terms, conditions, definitions, warranties, understandings, or representations with respect to the subject 
-matter hereof other than as expressly provided herein. In the event any provision of this Agreement is unenforceable or invalid under any applicable law 
-or applicable court decision, such unenforceability or invalidity will not render this Agreement unenforceable or invalid as a whole, instead such provision 
-will be changed and interpreted so as to best accomplish the objectives of such provision within legal limits. 
-
-18. WAIVER. The failure of a Party to require performance by the other Party of any provision hereof will not affect the full right to require such performance 
-at any time thereafter; nor will waiver by a Party of a breach of any provision hereof constitute a waiver of the provision itself. 
-
-19. PRIVACY. YOUR PRIVACY RIGHTS ARE SET FORTH IN INTEL'S PRIVACY NOTICE, WHICH FORMS A PART OF THIS AGREEMENT. PLEASE REVIEW THE 
-PRIVACY NOTICE AT HTTP://WWW.INTEL.COM/PRIVACY TO LEARN HOW INTEL COLLECTS, USES AND SHARES INFORMATION ABOUT YOU.
+                                    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:
+    You must give any other recipients of the Work or Derivative Works a copy of this License; and
+    You must cause any modified files to carry prominent notices stating that You changed the files; and
+    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
+    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.
index a444ba1..617d376 100644 (file)
-SOFTWARE TOOLS LICENSE AGREEMENT 
-
-DO NOT DOWNLOAD, INSTALL, ACCESS, COPY, OR USE ANY PORTION OF THE MATERIALS (DEFINED BELOW) UNTIL YOU HAVE READ AND ACCEPTED 
-THE TERMS AND CONDITIONS OF THIS AGREEMENT. BY INSTALLING, COPYING, ACCESSING, OR USING THE MATERIALS, YOU AGREE TO BE LEGALLY 
-BOUND BY THE TERMS AND CONDITIONS OF THIS AGREEMENT. If You do not agree to be bound by, or the entity for whose benefit You act has not 
-authorized You to accept, these terms and conditions, do not install, access, copy, or use the Software and destroy all copies of the Software in Your 
-possession. 
-
-This DEVELOPMENT TOOLS LICENSE AGREEMENT (this "Agreement") is entered into between Intel Corporation, a Delaware corporation ("Intel") and You. 
-"You" refers to you or your employer or other entity for whose benefit you act, as applicable. If you are agreeing to the terms and conditions of this 
-Agreement on behalf of a company or other legal entity, you represent and warrant that you have the legal authority to bind that legal entity to the 
-Agreement, in which case, "You" or "Your" shall be in reference to such entity. Intel and You are referred to herein individually as a "Party" or, together, as 
-the "Parties". 
-
-The Parties, in consideration of the mutual covenants contained in this Agreement, and for other good and valuable consideration, the receipt and 
-sufficiency of which they acknowledge, and intending to be legally bound, agree as follows: 
-
-1. DEFINITIONS. The following definitions are used throughout this Agreement: 
-"Affiliate" means any entity controlling, controlled by or under common control with a Party hereto, where "control" means the direct or indirect ownership 
-of more than fifty percent (50%) of such entity"s capital or equivalent voting rights. An entity will be deemed an "Affiliate" only as long as such control exists 
-during the term of this Agreement. 
-
-"Contractor" means a third party consultant or subcontractor who requires access to or use of the Materials to perform work on Your behalf or at Your 
-behest. 
-
-"Development Tools" means the development, evaluation, production, or test tool software, and associated documentation or other collateral, identified 
-in the "development_tools.txt" text files, if any, included in the Materials. 
-
-"Derivatives" means derivative works as defined in 17 U.S.C " 101 et seq. 
-
-"Intel-based Device" means a device designed, manufactured, or configured by You or Your Affiliates to include or operate Intel hardware, software, or 
-services. 
-
-"Materials" means the software, documentation, the software product serial number and license key codes (if applicable), Development Tools, 
-Redistributables, and other materials or collateral, including any updates and upgrades thereto, in source code or object code form where applicable, that 
-are provided or otherwise made available by Intel to You under this Agreement. "Materials" do not include Open Source Software or any computer 
-programming code that is subject to an agreement, obligation or license (whether or not accompanying the Materials) intended to supersede this 
-Agreement. 
-
-"Redistributables" means the software, documentation, or other collateral identified in the "redist.txt" text files, if any, included in the Materials. 
-
-2. LIMITED LICENSE. 
-(A) Subject to the terms and conditions of this Agreement, Intel grants You and Your Affiliates, a limited, nonexclusive, nontransferable, revocable, 
-worldwide, fully paid-up license during the term of this Agreement, without the right to sublicense, unless expressly stated otherwise, to: 
-(1) internally reproduce and install a reasonable number of copies of the Materials for Your internal use solely for the purposes of designing, 
-developing, manufacturing and testing Intel-based Devices; 
-(2) internally reproduce the source code of the Development Tools, if provided to You by Intel, and to internally create and reproduce Derivatives of 
-the Development Tools, and to internally reproduce the binary code of the Development Tools, or any Derivatives created by You, in each case solely 
-for the purpose of designing, developing, manufacturing and testing the Intel-based Device, solely as necessary for the integration of any Intel software 
-and the output generated by the Development Tools, with and into Intel-based Devices; 
-(3) create Derivatives of the Redistributables, or any portions thereof, provided to You by Intel in source code form solely for the purposes of designing, 
-developing, debugging, modifying, distributing and testing software containing significantly more functionality and features than the Redistributables 
-in the form provided to You by Intel; 
-(4) distribute (or otherwise make available) on a royalty-free basis, subject to any other terms and conditions which may appear in the Redistributables 
-text files, the Redistributables, including any Derivatives of the Redistributables pursuant to Section 2(A)(3), or any portions thereof, only as integrated 
-or embedded in software (and not on a stand-alone basis) solely for use on an Intel-based Device; and 
-(5) have the tasks set forth in Section 2(A)(1) and (2) above performed by a Contractor on the conditions that You enter into a written confidentiality 
-agreement with any such Contractor, subject to Section 7 (Confidentiality), and You remain fully liable to Intel for the actions and inactions of Your 
-Contractors. 
-(B) You will be liable for Your Affiliate"s breach of these terms. In addition, You acknowledge that Your Affiliates are beneficiaries of the licenses granted by 
-Intel under Section 2. 
-(C) Intel hereby grants You the right to sub-license (without rights to further sublicense) the Development Tools, including any accompanying 
-documentation, to Your manufacturing partners, in the code format provided to You by Intel, solely for designing, developing, manufacturing and testing 
-the Intel-based Devices solely as necessary for the integration of any Intel software and the output generated by the Development Tools, with and into 
-Intel-based Devices. The sublicense is subject to a written sublicensing agreement that contains confidentiality obligations and license restrictions that are 
-no less protective of Intel than those provided in this Agreement. You will be fully responsible and liable towards Intel for Your sub-licensees" compliance 
-with all such confidentiality obligations and license restrictions. You may grant Your manufacturing partners the right to further distribute Redistributables 
-solely as integrated or embedded in software for Your Intel-based Devices. 
-
-3. LICENSE RESTRICTIONS. All right, title and interest in and to the Materials and associated documentation are and will remain the exclusive property of 
-Intel and its suppliers. Unless expressly permitted under the Agreement, You will not, and will not allow any third party to (i) use, copy, distribute, sell or 
-offer to sell the Materials or associated documentation; (ii) modify, adapt, enhance, disassemble, decompile, reverse engineer, change or create derivative 
-works from the Materials except and only to the extent as specifically required by mandatory applicable laws or any applicable third party license terms 
-accompanying the Materials; (iii) use or make the Materials available for the use or benefit of third parties; or (iv) use the Materials on Your products other 
-than those that include the Intel product(s), platform(s), or software identified in the Materials; or (v) publish or provide any Materials benchmark or 
-comparison test results. 
-If You received the Materials solely for evaluation purposes, You have no distribution rights to the Materials or any portion thereof. 
-
-Distribution of the Redistributables is also subject to the following conditions: You shall: (i) be solely responsible to Your customers and end users for any 
-update or support obligation or other liability which may arise from the distribution, (ii) not make any statement that Your software is "certified", or that its 
-performance is guaranteed, by Intel, (iii) not use Intel's name or trademarks to promote Your software without prior written permission, (iv) use a license 
-agreement that contains provisions that are at least as restrictive as this Agreement and which prohibits disassembly and reverse engineering of the 
-Materials provided in object code form, and (v) indemnify, hold harmless, and defend Intel, Intel"s Affiliates, and its licensors from and against any claims 
-or lawsuits, including attorney's fees, that arise or result from Your Derivatives or Your distribution of Your software. 
-
-The consideration under this Agreement is only for the licenses Intel expressly grants above. Any other rights including, but not limited to, additional patent 
-rights, will require an additional license and additional consideration. Nothing in this Agreement requires or will be treated to require Intel to grant any 
-additional license. You acknowledge that an essential basis of the bargain in this Agreement is that Intel grants You no licenses or other rights including, 
-but not limited to, patent, copyright, trade secret, trademark, trade name, service mark or other intellectual property licenses or rights with respect to the 
-Materials and associated documentation, by implication, estoppel or otherwise, except for the licenses expressly granted above. You acknowledge there 
-are significant uses of the Materials in their original, unmodified and uncombined form. The consideration for the licenses in this Agreement reflects Intel"s 
-continuing right to assert patent claims against any modifications or derivative works (including, without limitation, error corrections and bug fixes) of, or 
-combinations with, the Materials that You, Your Affiliates or third parties make that infringe any Intel patent claim. 
-
-4. LICENSE TO FEEDBACK. This Agreement does not obligate You to provide Intel with materials, information, comments, suggestions, Your Derivatives or 
-other communication regarding the features, functions, performance or use of the Materials ("Feedback"). If any software included in the Materials is 
-provided or otherwise made available by Intel in source code form, to the extent You provide Intel with Feedback in a tangible form, You grant to Intel and 
-its affiliates a non-exclusive, perpetual, sublicenseable, irrevocable, worldwide, royalty-free, fully paid-up and transferable license, to and under all of Your 
-intellectual property rights, whether perfected or not, to publicly perform, publicly display, reproduce, use, make, have made, sell, offer for sale, distribute, 
-import, create derivative works of and otherwise exploit any comments, suggestions, descriptions, ideas, Your Derivatives or other feedback regarding the 
-Materials provided by You or on Your behalf.
-
-5. OPEN SOURCE STATEMENT. The Materials may include Open Source Software (OSS) licensed pursuant to OSS license agreement(s) identified in the 
-OSS comments in the applicable source code file(s) and/or file header(s) provided with or otherwise associated with the Materials. Neither You nor any 
-Original Equipment Manufacturer (OEM), Original Device Manufacturer (ODM), customer, or distributor may subject any proprietary portion of the Materials 
-to any OSS license obligations including, without limitation, combining or distributing the Materials with OSS in a manner that subjects Intel, the Materials 
-or any portion thereof to any OSS license obligation. Nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any 
-applicable OSS license.
-
-6. THIRD PARTY SOFTWARE. Certain third party software provided with or within the Materials may only be used (a) upon securing a license directly from 
-the owner of the software or (b) in combination with hardware components purchased from such third party and (c) subject to further license limitations 
-by the software owner. A listing of any such third party limitations is in one or more text files accompanying the Materials. You acknowledge Intel is not 
-providing You with a license to such third party software and further that it is Your responsibility to obtain appropriate licenses from such third parties 
-directly.
-
-7. CONFIDENTIALITY. The terms and conditions of this Agreement, exchanged confidential information, as well as the Materials are subject to the terms 
-and conditions of the Non-Disclosure Agreement(s) or Intel Pre-Release Loan Agreement(s) (referred to herein collectively or individually as "NDA") entered 
-into by and in force between Intel and You, and in any case no less confidentiality protection than You apply to Your information of similar sensitivity. If 
-You would like to have a Contractor perform work on Your behalf that requires any access to or use of Materials You must obtain a written confidentiality 
-agreement from the Contractor which contains terms and conditions with respect to access to or use of Materials no less restrictive than those set forth in 
-this Agreement, excluding any distribution rights and use for any other purpose, and You will remain fully liable to Intel for the actions and inactions of 
-those Contractors. You may not use Intel's name in any publications, advertisements, or other announcements without Intel's prior written consent. 
-
-8. NO OBLIGATION; NO AGENCY. Intel may make changes to the Software, or items referenced therein, at any time without notice. Intel is not obligated to 
-support, update, provide training for, or develop any further version of the Software or to grant any license thereto. No agency, franchise, partnership, joint-
-venture, or employee-employer relationship is intended or created by this Agreement. 
-
-9. EXCLUSION OF WARRANTIES. THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING 
-WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. Intel does not warrant or assume responsibility 
-for the accuracy or completeness of any information, text, graphics, links or other items within the Materials. 
-
-10. LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL OR ITS AFFILIATES, LICENSORS OR SUPPLIERS (INCLUDING THEIR RESPECTIVE DIRECTORS, 
-OFFICERS, EMPLOYEES, AND AGENTS) BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, LOST PROFITS, BUSINESS 
-INTERRUPTION, OR LOST DATA) ARISING OUT OF OR IN RELATION TO THIS AGREEMENT, INCLUDING THE USE OF OR INABILITY TO USE THE MATERIALS, 
-EVEN IF INTEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME JURISDICTIONS PROHIBIT EXCLUSION OR LIMITATION OF LIABILITY 
-FOR IMPLIED WARRANTIES OR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE ABOVE LIMITATION MAY IN PART NOT APPLY TO YOU. YOU MAY 
-ALSO HAVE OTHER LEGAL RIGHTS THAT VARY FROM JURISDICTION TO JURISDICTION. THE MATERIALS LICENSED HEREUNDER ARE NOT DESIGNED 
-OR INTENDED FOR USE IN ANY MEDICAL, LIFE SAVING OR LIFE SUSTAINING SYSTEMS, TRANSPORTATION SYSTEMS, NUCLEAR SYSTEMS, OR FOR ANY 
-OTHER MISSION CRITICAL APPLICATION IN WHICH THE FAILURE OF THE DEVELOPMENT TOOLS COULD LEAD TO PERSONAL INJURY OR DEATH. YOU 
-WILL INDEMNIFY AND HOLD INTEL AND ITS AFFILIATES, LICENSORS AND SUPPLIERS (INCLUDING THEIR RESPECTIVE DIRECTORS, OFFICERS, 
-EMPLOYEES, AND AGENTS) HARMLESS AGAINST ALL CLAIMS, LIABILITIES, LOSSES, COSTS, DAMAGES, AND EXPENSES (INCLUDING REASONABLE 
-ATTORNEY FEES), ARISING OUT OF, DIRECTLY OR INDIRECTLY, THE DISTRIBUTION OF THE MATERIALS AND ANY CLAIM OF PRODUCT LIABILITY, 
-PERSONAL INJURY OR DEATH ASSOCIATED WITH ANY UNINTENDED USE, EVEN IF SUCH CLAIM ALLEGES THAT INTEL OR AN INTEL AFFILIATE, LICENSOR 
-OR SUPPLIER WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF THE MATERIALS. THE LIMITED REMEDIES, WARRANTY DISCLAIMER AND 
-LIMITED LIABILITY ARE FUNDAMENTAL ELEMENTS OF THE BASIS OF THE BARGAIN BETWEEN INTEL AND YOU AND INTEL WOULD NOT BE ABLE TO 
-PROVIDE THE MATERIALS WITHOUT SUCH LIMITATIONS. 
-
-11. TERMINATION AND SURVIVAL. Intel may terminate this Agreement for any reason with thirty (30) days" notice and immediately if You or someone 
-acting on Your behalf or at Your behest violates any of its terms or conditions. Upon termination You will immediately destroy and ensure the destruction 
-of the Materials (including providing certification of such destruction or return back to Intel). Upon termination of this Agreement, all licenses granted to 
-You hereunder terminate immediately. All Sections of this Agreement, except Section 2, will survive termination. In the event of termination of this 
-Agreement, the license grant to any Redistributables, including Your Derivatives of the Redistributables, distributed by You prior to the effective date of 
-such termination and in accordance with the terms and conditions of this Agreement shall survive any such termination of this Agreement. 
-
-12. GOVERNING LAW AND JURISDICTION. This Agreement and any dispute arising out of or relating to it will be governed by the laws of the U.S.A. and 
-Delaware, without regard to conflict of laws principles. The Parties exclude the application of the United Nations Convention on Contracts for the 
-International Sale of Goods (1980). The state and federal courts sitting in Delaware, U.S.A. will have exclusive jurisdiction over any dispute arising out of or 
-relating to this Agreement. The Parties consent to personal jurisdiction and venue in those courts. A Party that obtains a judgment against the other Party 
-in the courts identified in this section may enforce that judgment in any court that has jurisdiction over the Parties. 
-
-13. EXPORT REGULATIONS/EXPORT CONTROL. You agree that neither You nor Your subsidiaries or Affiliates will export/re-export the Materials, directly 
-or indirectly, to any country for which the U.S. Department of Commerce or any other agency or department of the U.S. Government or the foreign 
-government from where it is shipping requires an export license, or other governmental approval, without first obtaining any such required license or 
-approval. In the event the Materials are exported from the U.S.A. or re-exported from a foreign destination by You, Your subsidiaries, or Your Affiliates, You 
-will ensure that the distribution and export/re-export or import of the Materials complies with all laws, regulations, orders, or other restrictions of the U.S. 
-Export Administration Regulations and the appropriate foreign government. 
-
-14. GOVERNMENT RESTRICTED RIGHTS. The Materials are a commercial item (as defined in 48 C.F.R. 2.101) consisting of commercial computer software 
-and commercial computer software documentation (as those terms are used in 48 C.F.R. 12.212). Consistent with 48 C.F.R. 12.212 and 48 C.F.R 227.72021 
-through 227.7202-4, You will not provide the Materials to the U.S. Government. Contractor or Manufacturer is Intel Corporation, 2200 Mission College 
-Blvd., Santa Clara, CA 95054. 
-
-15. TRADEMARKS. Third party trademarks, trade names, product names and logos (the "Trademarks") contained in or used by the Materials are the 
-trademarks or registered trademarks of their respective owners, and the use of such Trademarks shall inure to the benefit of the trademark owner. The 
-reference to such Trademarks (if any) by Intel in any of the Materials does not constitute: (i) an affiliation by Intel and its licensors with such company, or (ii) 
-an endorsement or approval of such company of Intel and its licensors and its products or services. 
-
-16. ASSIGNMENT. You may not delegate, assign or transfer this Agreement, the license(s) granted or any of Your rights or duties hereunder, expressly, by 
-implication, by operation of law, or otherwise and any attempt to do so, without Intel"s express prior written consent, will be null and void. Intel may assign, 
-delegate and transfer this Agreement, and its rights and obligations hereunder, in its sole discretion. 
-
-17. ENTIRE AGREEMENT; SEVERABILITY. The terms and conditions of this Agreement and any NDA with Intel constitute the entire agreement between the 
-Parties with respect to the subject matter hereof, and merge and supersede all prior or contemporaneous agreements, understandings, negotiations and 
-discussions. Neither Party will be bound by any terms, conditions, definitions, warranties, understandings, or representations with respect to the subject 
-matter hereof other than as expressly provided herein. In the event any provision of this Agreement is unenforceable or invalid under any applicable law 
-or applicable court decision, such unenforceability or invalidity will not render this Agreement unenforceable or invalid as a whole, instead such provision 
-will be changed and interpreted so as to best accomplish the objectives of such provision within legal limits. 
-
-18. WAIVER. The failure of a Party to require performance by the other Party of any provision hereof will not affect the full right to require such performance 
-at any time thereafter; nor will waiver by a Party of a breach of any provision hereof constitute a waiver of the provision itself. 
-
-19. PRIVACY. YOUR PRIVACY RIGHTS ARE SET FORTH IN INTEL'S PRIVACY NOTICE, WHICH FORMS A PART OF THIS AGREEMENT. PLEASE REVIEW THE 
-PRIVACY NOTICE AT HTTP://WWW.INTEL.COM/PRIVACY TO LEARN HOW INTEL COLLECTS, USES AND SHARES INFORMATION ABOUT YOU.
+                                    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:
+    You must give any other recipients of the Work or Derivative Works a copy of this License; and
+    You must cause any modified files to carry prominent notices stating that You changed the files; and
+    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
+    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.
index 3059117..74f4b09 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 #ifndef __NC_H_INCLUDED__
index 1865305..9d8681b 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 ///
index 02e0d80..a016429 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 ///
index 14957f8..e7ec5b8 100644 (file)
@@ -1,18 +1,16 @@
-# Copyright 2018 Intel Corporation.
-# The source code, information and material ("Material") contained herein is
-# owned by Intel Corporation or its suppliers or licensors, and title to such
-# Material remains with Intel Corporation or its suppliers or licensors.
-# The Material contains proprietary information of Intel or its suppliers and
-# licensors. The Material is protected by worldwide copyright laws and treaty
-# provisions.
-# No part of the Material may be used, copied, reproduced, modified, published,
-# uploaded, posted, transmitted, distributed or disclosed in any way without
-# Intel's prior express written permission. No license under any patent,
-# copyright or other intellectual property rights in the Material is granted to
-# or conferred upon you, either expressly, by implication, inducement, estoppel
-# or otherwise.
-# Any license under such intellectual property rights must be express and
-# approved by Intel in writing.
+# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+#
+# 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.
 import os
 import sys
 import numpy
index 32af558..51a803d 100644 (file)
@@ -1,7 +1,10 @@
 ARCH := $(shell uname -m)
 
+NO_RESET ?= no
+NO_BOOT ?= no
 
-OUT := libmvnc.so.0
+LIB_NAME:= libmvnc
+OUT := $(LIB_NAME).so.0
 OBJDIR := obj-$(ARCH)
 INSTALLDIR := ${DESTDIR}/usr/local
 PYTHON3DIST := $(shell python3 -c "import site; print(site.getsitepackages()[0])")
@@ -21,7 +24,7 @@ XLINK_SRCS=$(XLINK_BASE)/pc/usb_boot.c
 XLINK_SRCS+=$(XLINK_BASE)/shared/XLink.c
 XLINK_SRCS+=$(XLINK_BASE)/shared/XLinkDispatcher.c
 XLINK_SRCS+=$(XLINKCONSOLE_BASE)/pc/XLinkConsole.c
-XLINK_SRCS+=$(XLINK_BASE)/pc/UsbLinkPlatform.c
+XLINK_SRCS+=$(XLINK_BASE)/pc/XLinkPlatform.c
 
 XLINK_CFLAGS= -I$(XLINK_BASE)/shared \
                        -I$(XLINK_BASE)/pc \
@@ -30,7 +33,12 @@ XLINK_CFLAGS= -I$(XLINK_BASE)/shared \
                        -I $(MV_COMMON_BASE)/shared/include/
 
 CFLAGS+=$(XLINK_CFLAGS) -D__PC__ -DUSE_USB_VSC -DVERSION_NAME="\"$(VERSION_NUMBER)\""
-#CFLAGS+=-DXLINK_NO_BOOT
+ifeq ($(NO_BOOT), yes)
+    CFLAGS+=-DXLINK_NO_BOOT
+endif
+ifeq ($(NO_RESET), yes)
+    CFLAGS+=-DXLINK_NO_RESET
+endif
 CFLAGS+=-DDEVICE_SHELL_ENABLED
 
 LIBS += -lpthread -lusb-1.0 -ldl
@@ -52,12 +60,15 @@ LDFLAGS += -shared
 OBJS := $(SRCS:%.c=$(OBJDIR)/%.o)
 OBJS += $(XLINK_SRCS:%.c=$(OBJDIR)/%.o)
 DEPS := $(OBJS:.o=.d)
-all: obj-$(ARCH)/libmvnc.so.0
+
+.PHONY: get_mvcmd
+
+all: $(OBJDIR)/$(OUT) get_mvcmd
 
 $(OBJDIR)/$(OUT): $(OBJS)
        if [ ! -e ./version.txt ] ; then echo "missing version.txt file"; exit 1; fi;
        $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS)
-       ln -fs $(OBJDIR)/$(OUT) libmvnc.so
+       ln -fs $(OBJDIR)/$(OUT) $(LIB_NAME).so
        ln -fs $(OBJDIR)/$(OUT) $(OUT)
 
 $(OBJDIR)/%.o: %.c
@@ -66,12 +77,15 @@ $(OBJDIR)/%.o: %.c
 
 -include $(DEPS)
 
+get_mvcmd:
+       @./get_mvcmd.sh
+
 basicinstall: $(OBJDIR)/$(OUT)
        mkdir -p $(INSTALLDIR)/include/
        mkdir -p $(INSTALLDIR)/include/mvnc2
        mkdir -p $(INSTALLDIR)/lib/
        cp $(OBJDIR)/$(OUT) $(INSTALLDIR)/lib/
-       ln -fs libmvnc.so.0 $(INSTALLDIR)/lib/libmvnc.so
+       ln -fs $(OUT) $(INSTALLDIR)/lib/$(LIB_NAME).so
        cp ../include/mvnc.h $(INSTALLDIR)/include/mvnc2
        ln -fs $(INSTALLDIR)/include/mvnc2/mvnc.h $(INSTALLDIR)/include/mvnc.h 
        mkdir -p $(INSTALLDIR)/lib/mvnc
@@ -90,11 +104,11 @@ postinstall:
        udevadm trigger
        ldconfig
 
-install: basicinstall pythoninstall postinstall
+install: get_mvcmd basicinstall pythoninstall postinstall
 
 uninstall:
-       rm -f $(INSTALLDIR)/lib/libmvnc.so.0
-       rm -f $(INSTALLDIR)/lib/libmvnc.so
+       rm -f $(INSTALLDIR)/lib/$(OUT)
+       rm -f $(INSTALLDIR)/lib/$(LIB_NAME).so
        rm -f $(INSTALLDIR)/include/mvnc.h
        rm -f $(INSTALLDIR)/include/mvnc2/mvnc.h
        rm -f $(INSTALLDIR)/lib/mvnc/MvNCAPI-*.mvcmd
@@ -107,4 +121,5 @@ clean:
        rm -f $(OUT)
        rm -f $(OBJS)
        rm -rf $(OBJDIR)
-       rm -f libmvnc.so
+       rm -f $(LIB_NAME).so
+       find mvnc/ -type f -delete
diff --git a/api/src/common/components/XLink/pc/UsbLinkPlatform.c b/api/src/common/components/XLink/pc/UsbLinkPlatform.c
deleted file mode 100644 (file)
index 0935e34..0000000
+++ /dev/null
@@ -1,530 +0,0 @@
-/*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
-*/
-
-///
-/// @brief     Application configuration Leon header
-///
-
-#include "UsbLinkPlatform.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include <sys/timeb.h>
-
-#include <errno.h>
-
-#if (defined(_WIN32) || defined(_WIN64) )
-#include "usb_winusb.h"
-#include "gettime.h"
-#include "win_pthread.h"
-extern void initialize_usb_boot();
-#else
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/un.h>
-#include <sys/ioctl.h>
-#include <termios.h>
-#include <libusb.h>
-#include <pthread.h>
-#endif
-#include "usb_boot.h"
-
-#ifdef USE_LINK_JTAG
-#include <sys/types.h>          /* See NOTES */
-#include <sys/socket.h>
-#include <netdb.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#endif  /*USE_LINK_JTAG*/
-
-#define USB_LINK_SOCKET_PORT 5678
-
-#define USBLINK_ERROR_PRINT
-#ifdef USBLINK_ERROR_PRINT
-#define USBLINK_ERROR(...) printf(__VA_ARGS__)
-#else
-#define USBLINK_ERROR(...) (void)0
-#endif  /*USBLINK_ERROR_PRINT*/
-
-#ifdef USBLINKDEBUG
-#define USBLINK_PRINT(...) printf(__VA_ARGS__)
-#else
-#define USBLINK_PRINT(...) (void)0
-#endif  /*USBLINKDEBUG*/
-
-
-#ifndef USE_USB_VSC
-int usbFdWrite = -1;
-int usbFdRead = -1;
-#endif  /*USE_USB_VSC*/
-
-static int statuswaittimeout = 5;
-
-#include <assert.h>
-
-pthread_t readerThreadId;
-
-#define MAX_EVENTS 64
-
-uint32_t numPoolsAllocated = 0;
-
-#define USB_ENDPOINT_IN 0x81
-#define USB_ENDPOINT_OUT 0x01
-
-//libusb_device_handle* f;
-
-static double seconds()
-{
-    static double s;
-    struct timespec ts;
-
-    clock_gettime(CLOCK_MONOTONIC, &ts);
-    if(!s)
-        s = ts.tv_sec + ts.tv_nsec * 1e-9;
-    return ts.tv_sec + ts.tv_nsec * 1e-9 - s;
-}
-
-static int usb_write(libusb_device_handle *f, const void *data, size_t size, unsigned int timeout)
-{
-    while(size > 0)
-    {
-        int bt,ss = size;
-        if(ss > 1024*1024*10)
-            ss = 1024*1024*10;
-#if (defined(_WIN32) || defined(_WIN64) )
-        int rc = usb_bulk_write(f, USB_ENDPOINT_OUT, (unsigned char *)data, ss, &bt, timeout);
-#else
-        int rc = libusb_bulk_transfer(f, USB_ENDPOINT_OUT, (unsigned char *)data, ss, &bt, timeout);
-#endif
-        if(rc)
-            return rc;
-        data = (char *)data + bt;
-        size -= bt;
-    }
-    return 0;
-}
-
-static int usb_read(libusb_device_handle *f, void *data, size_t size, unsigned int timeout)
-{
-    while(size > 0)
-    {
-        int bt,ss = size;
-        if(ss > 1024*1024*10)
-            ss = 1024*1024*10;
-#if (defined(_WIN32) || defined(_WIN64))
-        int rc = usb_bulk_read(f, USB_ENDPOINT_IN, (unsigned char *)data, ss, &bt, timeout);
-#else
-        int rc = libusb_bulk_transfer(f, USB_ENDPOINT_IN,(unsigned char *)data, ss, &bt, timeout);
-#endif
-        if(rc)
-            return rc;
-        data = ((char *)data) + bt;
-        size -= bt;
-    }
-    return 0;
-}
-
-libusb_device_handle *usblink_open(const char *path)
-{
-    usbBootError_t rc = USB_BOOT_DEVICE_NOT_FOUND;
-    libusb_device_handle *h = NULL;
-    libusb_device *dev = NULL;
-    double waittm = seconds() + statuswaittimeout;
-    while(seconds() < waittm){
-        int size = path != NULL ? strlen(path) : 0;
-        rc = usb_find_device(0, (char *)path, size, (void **)&dev, DEFAULT_OPENVID, DEFAULT_OPENPID);
-        if(rc == USB_BOOT_SUCCESS)
-            break;
-        usleep(1000);
-    }
-    if (rc == USB_BOOT_TIMEOUT || rc == USB_BOOT_DEVICE_NOT_FOUND) // Timeout
-        return 0;
-#if (defined(_WIN32) || defined(_WIN64) )
-       h = usb_open_device(dev, NULL, 0, NULL);
-       int libusb_rc = ((h != NULL) ? (0) : (-1));
-       if (libusb_rc < 0)
-       {
-               usb_close_device(h);
-               usb_free_device(dev);
-               return 0;
-       }
-       //usb_close_device(h);
-       //usb_free_device(dev);
-#else
-    int libusb_rc = libusb_open(dev, &h);
-    if (libusb_rc < 0)
-    {
-        libusb_unref_device(dev);
-        return 0;
-    }
-    libusb_unref_device(dev);
-    libusb_rc = libusb_claim_interface(h, 0);
-    if(libusb_rc < 0)
-    {
-        libusb_close(h);
-        return 0;
-    }
-#endif
-    return h;
-}
-
-void usblink_close(libusb_device_handle *f)
-{
-#if (defined(_WIN32) || defined(_WIN64))
-    usb_close_device(f);
-#else
-    libusb_release_interface(f, 0);
-    libusb_close(f);
-#endif
-}
-
-int USBLinkWrite(void* fd, void* data, int size, unsigned int timeout)
-{
-    int rc = 0;
-#ifndef USE_USB_VSC
-    int byteCount = 0;
-#ifdef USE_LINK_JTAG
-    while (byteCount < size){
-        byteCount += write(usbFdWrite, &((char*)data)[byteCount], size - byteCount);
-        printf("write %d %d\n", byteCount, size);
-    }
-#else
-    if(usbFdWrite < 0)
-    {
-        return -1;
-    }
-    while(byteCount < size)
-    {
-       int toWrite = (PACKET_LENGTH && (size - byteCount > PACKET_LENGTH)) \
-                        ? PACKET_LENGTH:size - byteCount;
-       int wc = write(usbFdWrite, ((char*)data) + byteCount, toWrite);
-//       printf("wwrite %x %d %x %d\n", wc, handler->commFd, ((char*)data) + byteCount, toWrite);
-
-       if ( wc != toWrite)
-       {
-           return -2;
-       }
-
-       byteCount += toWrite;
-       unsigned char acknowledge;
-       int rc;
-       rc = read(usbFdWrite, &acknowledge, sizeof(acknowledge));
-       if ( rc < 0)
-       {
-           return -2;
-       }
-       if (acknowledge == 0xEF)
-       {
-//         printf("read %x\n", acknowledge);
-       }
-       else
-       {
-//         printf("read err %x %d\n", acknowledge, rc);
-           return -2;
-       }
-    }
-#endif  /*USE_LINK_JTAG*/
-#else
-    rc = usb_write((libusb_device_handle *) fd, data, size, timeout);
-#endif  /*USE_USB_VSC*/
-    return rc;
-}
-
- int USBLinkRead(void* fd, void* data, int size, unsigned int timeout)
-{
-    //printf("%s() fd %p size %d\n", __func__, fd, size);
-    int rc = 0;
-#ifndef USE_USB_VSC
-    int nread =  0;
-#ifdef USE_LINK_JTAG
-    while (nread < size){
-        nread += read(usbFdWrite, &((char*)data)[nread], size - nread);
-        printf("read %d %d\n", nread, size);
-    }
-#else
-    if(usbFdRead < 0)
-    {
-        return -1;
-    }
-
-    while(nread < size)
-    {
-        int toRead = (PACKET_LENGTH && (size - nread > PACKET_LENGTH)) \
-                        ? PACKET_LENGTH : size - nread;
-
-        while(toRead > 0)
-        {
-            rc = read(usbFdRead, &((char*)data)[nread], toRead);
-//          printf("read %x %d\n", *(int*)data, nread);
-            if ( rc < 0)
-            {
-                return -2;
-            }
-            toRead -=rc;
-            nread += rc;
-        }
-        unsigned char acknowledge = 0xEF;
-        int wc = write(usbFdRead, &acknowledge, sizeof(acknowledge));
-        if (wc == sizeof(acknowledge))
-        {
-//          printf("write %x %d\n", acknowledge, wc);
-        }
-        else
-        {
-            return -2;
-        }
-    }
-#endif  /*USE_LINK_JTAG*/
-#else
-    rc = usb_read((libusb_device_handle *) fd, data, size, timeout);
-#endif  /*USE_USB_VSC*/
-    return rc;
-}
-
-int UsbLinkPlatformGetDeviceName(int index, char* name, int nameSize)
-{
-    usbBootError_t rc = usb_find_device(index, name, nameSize, 0, 0, 0);
-    switch(rc) {
-        case USB_BOOT_SUCCESS:
-            return USB_LINK_PLATFORM_SUCCESS;
-        case USB_BOOT_DEVICE_NOT_FOUND:
-            return USB_LINK_PLATFORM_DEVICE_NOT_FOUND;
-        case USB_BOOT_TIMEOUT:
-            return USB_LINK_PLATFORM_TIMEOUT;
-        default:
-            return USB_LINK_PLATFORM_ERROR;
-    }
-}
-//#define XLINK_NO_BOOT
-int UsbLinkPlatformBootRemote(const char* deviceName, const char* binaryPath)
-{
-#ifndef XLINK_NO_BOOT
-
-    unsigned filesize;
-    FILE *fp;
-    char *tx_buf;
-    char subaddr[28+2];
-    int rc;
-
-#ifndef USE_USB_VSC
-    if (usbFdRead != -1){
-        close(usbFdRead);
-        usbFdRead = -1;
-    }
-    if (usbFdWrite != -1){
-        close(usbFdWrite);
-        usbFdWrite = -1;
-    }
-#endif  /*USE_USB_VSC*/
-
-    // Load the executable
-    fp = fopen(binaryPath, "rb");
-    if(fp == NULL)
-    {
-        if(usb_loglevel)
-            perror(binaryPath);
-        return -7;
-    }
-    fseek(fp, 0, SEEK_END);
-    filesize = ftell(fp);
-    rewind(fp);
-    if(!(tx_buf = (char*)malloc(filesize)))
-    {
-        if(usb_loglevel)
-            perror("buffer");
-        fclose(fp);
-        return -3;
-    }
-    if(fread(tx_buf, 1, filesize, fp) != filesize)
-    {
-        if(usb_loglevel)
-            perror(binaryPath);
-        fclose(fp);
-        free(tx_buf);
-        return -7;
-    }
-    fclose(fp);
-
-    // This will be the string to search for in /sys/dev/char links
-    int chars_to_write = snprintf(subaddr, 28, "-%s:", deviceName);
-    if(chars_to_write >= 28) {
-        printf("Path to your boot util is too long for the char array here!\n");
-    }
-    // Boot it
-    rc = usb_boot(deviceName, tx_buf, filesize);
-    free(tx_buf);
-    if(rc)
-    {
-        return rc;
-    }
-    if(usb_loglevel > 1)
-        fprintf(stderr, "Boot successful, device address %s\n", deviceName);
-#endif
-    return 0;
-}
-
-int USBLinkPlatformResetRemote(void* fd)
-{
-#ifndef USE_USB_VSC
-#ifdef USE_LINK_JTAG
-    /*Nothing*/
-#else
-    if (usbFdRead != -1){
-        close(usbFdRead);
-        usbFdRead = -1;
-    }
-    if (usbFdWrite != -1){
-        close(usbFdWrite);
-        usbFdWrite = -1;
-    }
-#endif  /*USE_LINK_JTAG*/
-#else
-    usblink_close((libusb_device_handle *) fd);
-#endif  /*USE_USB_VSC*/
-    return -1;
-}
-int UsbLinkPlatformConnect(const char* devPathRead, const char* devPathWrite, void** fd)
-{
-    #ifndef USE_USB_VSC
-#ifdef USE_LINK_JTAG
-    struct sockaddr_in serv_addr;
-    usbFdWrite = socket(AF_INET, SOCK_STREAM, 0);
-    usbFdRead = socket(AF_INET, SOCK_STREAM, 0);
-    assert(usbFdWrite >=0);
-    assert(usbFdRead >=0);
-    memset(&serv_addr, '0', sizeof(serv_addr));
-
-    serv_addr.sin_family = AF_INET;
-    serv_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
-    serv_addr.sin_port = htons(USB_LINK_SOCKET_PORT);
-
-    if (connect(usbFdWrite, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0)
-    {
-        perror("ERROR connecting");
-        exit(1);
-    }
-    printf("this is working\n");
-    return 0;
-
-#else
-    usbFdRead= open(devPathRead, O_RDWR);
-    if(usbFdRead < 0)
-    {
-        return -1;
-    }
-    // set tty to raw mode
-    struct termios  tty;
-    speed_t     spd;
-    int rc;
-    rc = tcgetattr(usbFdRead, &tty);
-    if (rc < 0) {
-        usbFdRead = -1;
-        return -2;
-    }
-
-    spd = B115200;
-    cfsetospeed(&tty, (speed_t)spd);
-    cfsetispeed(&tty, (speed_t)spd);
-
-    cfmakeraw(&tty);
-
-    rc = tcsetattr(usbFdRead, TCSANOW, &tty);
-    if (rc < 0) {
-        usbFdRead = -1;
-        return -2;
-    }
-
-    usbFdWrite= open(devPathWrite, O_RDWR);
-    if(usbFdWrite < 0)
-    {
-        usbFdWrite = -1;
-        return -2;
-    }
-    // set tty to raw mode
-    rc = tcgetattr(usbFdWrite, &tty);
-    if (rc < 0) {
-        usbFdWrite = -1;
-        return -2;
-    }
-
-    spd = B115200;
-    cfsetospeed(&tty, (speed_t)spd);
-    cfsetispeed(&tty, (speed_t)spd);
-
-    cfmakeraw(&tty);
-
-    rc = tcsetattr(usbFdWrite, TCSANOW, &tty);
-    if (rc < 0) {
-        usbFdWrite = -1;
-        return -2;
-    }
-    return 0;
-#endif  /*USE_LINK_JTAG*/
-#else
-    *fd = usblink_open(devPathWrite);
-    if (*fd == 0)
-    {
-       /* could fail due to port name change */
-       //printf("fail\n");
-       return -1;
-    }
-//    dev = new fastmemDevice("usb");
-//    int usbInit = dev->fastmemInit();
-    if(*fd)
-        return 0;
-    else
-        return -1;
-#endif  /*USE_USB_VSC*/
-}
-int UsbLinkPlatformInit(int loglevel)
-{
-    usb_loglevel = loglevel;
-#if (defined(_WIN32) || defined(_WIN64))
-    initialize_usb_boot();
-#endif
-    return 0;
-}
-
-void deallocateData(void* ptr,uint32_t size, uint32_t alignment)
-{
-    if (!ptr)
-        return;
-#if (defined(_WIN32) || defined(_WIN64) )
-    _aligned_free(ptr);
-#else
-    free(ptr);
-#endif
-}
-
-void* allocateData(uint32_t size, uint32_t alignment)
-{
-    void* ret = NULL;
-#if (defined(_WIN32) || defined(_WIN64) )
-    ret = _aligned_malloc(size, alignment);
-#else
-    posix_memalign(&ret, alignment, size);
-#endif
-    return ret;
-}
-
diff --git a/api/src/common/components/XLink/pc/XLinkPlatform.c b/api/src/common/components/XLink/pc/XLinkPlatform.c
new file mode 100644 (file)
index 0000000..ca07ac2
--- /dev/null
@@ -0,0 +1,573 @@
+/*
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
+*/
+
+#include "XLinkPlatform.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <sys/timeb.h>
+#include <assert.h>
+#include <errno.h>
+
+#if (defined(_WIN32) || defined(_WIN64) )
+#include "usb_winusb.h"
+#include "gettime.h"
+extern void initialize_usb_boot();
+#include "win_pthread.h"
+#else
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/un.h>
+#include <sys/ioctl.h>
+#include <termios.h>
+#include <libusb.h>
+#include <pthread.h>
+#endif
+
+#include "usb_boot.h"
+
+#define MAX_EVENTS 64
+#define USB_ENDPOINT_IN 0x81
+#define USB_ENDPOINT_OUT 0x01
+
+//CDC io device descriptors
+int usbFdWrite = -1;
+int usbFdRead = -1;
+//PCIe io device descriptors
+int pcieFd = -1;
+
+//Communication protocol used
+int gl_protocol = -1;
+
+static int statuswaittimeout = 5;
+pthread_t readerThreadId;
+
+#if (defined(_WIN32) || defined(_WIN64) )
+#define __attribute__(x)
+#endif
+
+#if defined(USE_PCIE)
+size_t gl_packetLength = PCIE_MAX_BUFFER_SIZE;
+#else
+size_t gl_packetLength = PACKET_LENGTH;
+#endif
+
+/*#################################################################################
+################################# AUXILIARY FUNCTIONS #############################
+##################################################################################*/
+static double seconds()
+{
+    static double s;
+    struct timespec ts;
+
+    clock_gettime(CLOCK_MONOTONIC, &ts);
+    if(!s)
+        s = ts.tv_sec + ts.tv_nsec * 1e-9;
+    return ts.tv_sec + ts.tv_nsec * 1e-9 - s;
+}
+
+/*#################################################################################
+################################## USB CDC FUNCTIONS ##############################
+##################################################################################*/
+static int cdc_usb_write(void *f __attribute__((unused)),
+                        void* data, size_t size,
+                        unsigned int timeout __attribute__((unused)))
+{
+#if (!defined(_WIN32) && !defined(_WIN64))
+    size_t byteCount = 0;
+    if(usbFdWrite < 0)
+    {
+        return -1;
+    }
+    while(byteCount < size) {
+       int toWrite = (gl_packetLength && ((size - byteCount) > gl_packetLength)) \
+                        ? gl_packetLength : size - byteCount;
+       int wc = write(usbFdWrite, ((char*)data) + byteCount, toWrite);
+       if (wc != toWrite) {
+           return -2;
+       }
+       byteCount += toWrite;
+
+       //Acknowledge /*
+       unsigned char acknowledge;
+       int rc = read(usbFdWrite, &acknowledge, sizeof(acknowledge));
+
+       if ( rc < 0) {
+           return -2;
+       }
+       if (acknowledge == 0xEF) {
+           //printf("read ack %x\n", acknowledge);
+       }
+       else {
+           printf("read ack err %x %d\n", acknowledge, rc);
+           return -2;
+       } //*/
+    }
+#endif
+    return 0;
+}
+
+static int cdc_usb_read(void *f __attribute__((unused)),
+                        void* data, size_t size,
+                        unsigned int timeout __attribute__((unused)))
+{
+#if (!defined(_WIN32) && !defined(_WIN64))
+    if(usbFdRead < 0) {
+        return -1;
+    }
+    size_t byteCount =  0;
+    int toRead = 0;
+
+    while(byteCount < size) {
+        toRead = (gl_packetLength && ((size - byteCount) > gl_packetLength)) \
+                        ? gl_packetLength : size - byteCount;
+        while(toRead > 0)
+        {
+            int rc = read(usbFdRead, &((char*)data)[byteCount], toRead);
+            if (rc < 0) {
+                return -2;
+            }
+            toRead -= rc;
+            byteCount += rc;
+        }
+        //Acknowledge /*
+        unsigned char acknowledge = 0xEF;
+        int wc = write(usbFdRead, &acknowledge, sizeof(acknowledge));
+        if (wc == sizeof(acknowledge)) {
+          //printf("write %x %d\n", acknowledge, wc);
+        }
+        else {
+            return -2;
+        }   //*/
+    }
+#endif
+    return 0;
+}
+
+static int cdc_usb_open(const char* devPathRead,
+                        const char* devPathWrite,
+                        void **fd __attribute__((unused)))
+{
+#if (!defined(_WIN32) && !defined(_WIN64))
+    usbFdRead= open(devPathRead, O_RDWR);
+    if(usbFdRead < 0)
+    {
+        return -1;
+    }
+    // set tty to raw mode
+    struct termios  tty;
+    speed_t     spd;
+    int rc;
+    rc = tcgetattr(usbFdRead, &tty);
+    if (rc < 0) {
+        usbFdRead = -1;
+        return -2;
+    }
+
+    spd = B115200;
+    cfsetospeed(&tty, (speed_t)spd);
+    cfsetispeed(&tty, (speed_t)spd);
+
+    cfmakeraw(&tty);
+
+    rc = tcsetattr(usbFdRead, TCSANOW, &tty);
+    if (rc < 0) {
+        usbFdRead = -1;
+        return -2;
+    }
+
+    usbFdWrite= open(devPathWrite, O_RDWR);
+    if(usbFdWrite < 0)
+    {
+        usbFdWrite = -1;
+        return -2;
+    }
+    // set tty to raw mode
+    rc = tcgetattr(usbFdWrite, &tty);
+    if (rc < 0) {
+        usbFdWrite = -1;
+        return -2;
+    }
+
+    spd = B115200;
+    cfsetospeed(&tty, (speed_t)spd);
+    cfsetispeed(&tty, (speed_t)spd);
+
+    cfmakeraw(&tty);
+
+    rc = tcsetattr(usbFdWrite, TCSANOW, &tty);
+    if (rc < 0) {
+        usbFdWrite = -1;
+        return -2;
+    }
+#endif
+    return 0;
+}
+
+static int cdc_usb_close(void *f __attribute__((unused)))
+{
+#if (!defined(_WIN32) && !defined(_WIN64))
+    if (usbFdRead != -1){
+        close(usbFdRead);
+        usbFdRead = -1;
+    }
+    if (usbFdWrite != -1){
+        close(usbFdWrite);
+        usbFdWrite = -1;
+    }
+#endif
+    return 0;
+}
+
+/*#################################################################################
+################################## USB VSC FUNCTIONS ##############################
+##################################################################################*/
+static int vsc_usb_write(void *f, void *data, size_t size, unsigned int timeout)
+{
+    while(size > 0)
+    {
+        int bt,ss = size;
+        if(ss > 1024*1024*10)
+            ss = 1024*1024*10;
+ #if (defined(_WIN32) || defined(_WIN64) )
+        int rc = usb_bulk_write(f, USB_ENDPOINT_OUT, (unsigned char *)data, ss, &bt, timeout);
+ #else
+        int rc = libusb_bulk_transfer((libusb_device_handle*)f,
+                                    USB_ENDPOINT_OUT,
+                                    (unsigned char *)data,
+                                    ss,
+                                    &bt,
+                                    timeout);
+ #endif
+        if(rc)
+            return rc;
+        data = (char *)data + bt;
+        size -= bt;
+    }
+    return 0;
+}
+
+static int vsc_usb_read(void *f, void *data, size_t size, unsigned int timeout)
+{
+    while(size > 0)
+    {
+        int bt, ss = size;
+        if(ss > 1024*1024*10)
+            ss = 1024*1024*10;
+#if (defined(_WIN32) || defined(_WIN64) )
+        int rc = usb_bulk_read(f, USB_ENDPOINT_IN, (unsigned char *)data, ss, &bt, timeout);
+#else
+        int rc = libusb_bulk_transfer((libusb_device_handle*)f,
+                                    USB_ENDPOINT_IN,
+                                    (unsigned char *)data,
+                                    ss,
+                                    &bt,
+                                    timeout);
+#endif
+        if(rc)
+            return rc;
+        data = ((char *)data) + bt;
+        size -= bt;
+    }
+    return 0;
+}
+
+static int vsc_usb_open(const char* devPathRead __attribute__((unused)),
+                        const char* devPathWrite,
+                        void** fd)
+{
+    usbBootError_t rc = USB_BOOT_DEVICE_NOT_FOUND;
+    libusb_device_handle *h = NULL;
+    libusb_device *dev = NULL;
+    double waittm = seconds() + statuswaittimeout;
+    while(seconds() < waittm){
+        int size = devPathWrite != NULL ? strlen(devPathWrite) : 0;
+
+        rc = usb_find_device(0, (char *)devPathWrite, size, (void **)&dev, \
+                                DEFAULT_OPENVID, DEFAULT_OPENPID);
+        if(rc == USB_BOOT_SUCCESS)
+            break;
+        usleep(1000);
+    }
+    if (rc == USB_BOOT_TIMEOUT || rc == USB_BOOT_DEVICE_NOT_FOUND) // Timeout
+        return -1;
+
+ #if (defined(_WIN32) || defined(_WIN64) )
+        h = usb_open_device(dev, NULL, 0, NULL);
+        int libusb_rc = ((h != NULL) ? (0) : (-1));
+        if (libusb_rc < 0) {
+            usb_close_device(h);
+            usb_free_device(dev);
+            return 0;
+        }
+       //usb_close_device(h);
+       //usb_free_device(dev);
+ #else
+    int libusb_rc = libusb_open(dev, &h);
+    if (libusb_rc < 0)
+    {
+        libusb_unref_device(dev);
+        return -1;
+    }
+    libusb_unref_device(dev);
+    libusb_rc = libusb_claim_interface(h, 0);
+    if(libusb_rc < 0)
+    {
+        libusb_close(h);
+        return -1;
+    }
+ #endif
+    *fd = h;
+    if (*fd == 0)
+    {
+        // could fail due to port name change
+        //printf("fail\n");
+        return -1;
+    }
+    //dev = new fastmemDevice("usb");
+    //int usbInit = dev->fastmemInit();
+    if(*fd)
+        return 0;
+
+    return -1;
+}
+
+static int vsc_usb_close(void *f)
+{
+ #if (defined(_WIN32) || defined(_WIN64))
+    usb_close_device(f);
+ #else
+    libusb_release_interface((libusb_device_handle*)f, 0);
+    libusb_close((libusb_device_handle*)f);
+ #endif
+    return 0;
+}
+
+/*#################################################################################
+################################### PCIe FUNCTIONS ################################
+##################################################################################*/
+static int pcie_host_write(void *f __attribute__((unused)),
+                            void *data, size_t size,
+                            unsigned int timeout __attribute__((unused)))
+{
+    return write(pcieFd, ((char*)data), size);
+}
+
+static int pcie_host_read(void *f __attribute__((unused)),
+                            void *data, size_t size,
+                            unsigned int timeout __attribute__((unused)))
+{
+    return read(pcieFd, ((char*)data), size);
+}
+
+static int pcie_host_open(const char* devPathRead __attribute__((unused)),
+                        const char* devPathWrite,
+                        void** fd __attribute__((unused)))
+{
+    printf("pcie_host_open. Starting device test code example...\n");
+    pcieFd = open(devPathWrite, O_RDWR);
+    if (pcieFd < 0){
+        perror("Failed to open the device...");
+        return errno;
+    }
+    //*fd = &pcieFd;      //might not need
+    return 0;
+}
+
+static int pcie_host_close(void *f __attribute__((unused)))
+{
+    printf("pcie_host_close \n");
+    return close(pcieFd);
+}
+/*############################### FUNCTION ARRAYS #################################*/
+/*These arrays hold the write/read/open/close operation functions
+specific for each communication protocol.
+Add more functions if adding another protocol*/
+int (*write_fcts[protocols])(void*, void*, size_t, unsigned int) = \
+                            {vsc_usb_write, cdc_usb_write, pcie_host_write};
+int (*read_fcts[protocols])(void*, void*, size_t, unsigned int) = \
+                            {vsc_usb_read, cdc_usb_read, pcie_host_read};
+int (*open_fcts[protocols])(const char*, const char*, void**) = \
+                            {vsc_usb_open, cdc_usb_open, pcie_host_open};
+int (*close_fcts[protocols])(void*) = \
+                            {vsc_usb_close, cdc_usb_close, pcie_host_close};
+
+/*#################################################################################
+###################################################################################
+###################################### EXTERNAL ###################################
+###################################################################################
+##################################################################################*/
+int XLinkPlatformConnect(const char* devPathRead, const char* devPathWrite, void** fd)
+{
+    return open_fcts[gl_protocol](devPathRead, devPathWrite, fd);
+}
+
+int XLinkWrite(void* fd, void* data, int size, unsigned int timeout)
+{
+    return write_fcts[gl_protocol](fd, data, size, timeout);
+}
+
+ int XLinkRead(void* fd, void* data, int size, unsigned int timeout)
+{
+    return read_fcts[gl_protocol](fd, data, size, timeout);
+}
+
+int XLinkPlatformResetRemote(void* fd)
+{
+    return close_fcts[gl_protocol](fd);
+}
+
+int XLinkPlatformInit(protocol_t protocol, int loglevel)
+{
+    gl_protocol = protocol;
+    usb_loglevel = loglevel;
+#if (defined(_WIN32) || defined(_WIN64))
+    initialize_usb_boot();
+#endif
+    return 0;
+}
+
+
+int getDeviceName(int index, char* name, int nameSize , int pid)
+{
+    switch(gl_protocol){
+
+        case Pcie:
+            name = "/dev/ma2x8x_0"; //hardcoded for now
+            nameSize = strlen(name);
+            break;
+        case Ipc:
+            break;
+        case UsbCDC:
+        case UsbVSC:
+            /*should have common device(temporary moved to 'default')*/
+        default:
+            switch(usb_find_device(index, name, nameSize, 0, 0, pid))
+            {
+                case USB_BOOT_SUCCESS:
+                    return X_LINK_PLATFORM_SUCCESS;
+                case USB_BOOT_DEVICE_NOT_FOUND:
+                    return X_LINK_PLATFORM_DEVICE_NOT_FOUND;
+                case USB_BOOT_TIMEOUT:
+                    return X_LINK_PLATFORM_TIMEOUT;
+                default:
+                    return X_LINK_PLATFORM_ERROR;
+            }
+            break;
+    }
+    return X_LINK_PLATFORM_SUCCESS;
+}
+
+int XLinkPlatformGetDeviceName(int index, char* name, int nameSize)
+{
+    return getDeviceName(index, name, nameSize, 0);
+}
+
+int XLinkPlatformGetDeviceNameExtended(int index, char* name, int nameSize, int pid)
+{
+    return getDeviceName(index, name, nameSize, pid);
+}
+
+int XLinkPlatformBootRemote(const char* deviceName, const char* binaryPath)
+{
+#ifndef XLINK_NO_BOOT
+    unsigned filesize;
+    FILE *fp;
+    char *tx_buf;
+    char subaddr[28+2];
+    int rc;
+
+    if (usbFdRead != -1){
+        close(usbFdRead);
+        usbFdRead = -1;
+    }
+    if (usbFdWrite != -1){
+        close(usbFdWrite);
+        usbFdWrite = -1;
+    }
+    // Load the executable
+    fp = fopen(binaryPath, "rb");
+    if(fp == NULL)
+    {
+        if(usb_loglevel)
+            perror(binaryPath);
+        return -7;
+    }
+    fseek(fp, 0, SEEK_END);
+    filesize = ftell(fp);
+    rewind(fp);
+    if(!(tx_buf = (char*)malloc(filesize)))
+    {
+        if(usb_loglevel)
+            perror("buffer");
+        fclose(fp);
+        return -3;
+    }
+    if(fread(tx_buf, 1, filesize, fp) != filesize)
+    {
+        if(usb_loglevel)
+            perror(binaryPath);
+        fclose(fp);
+        free(tx_buf);
+        return -7;
+    }
+    fclose(fp);
+
+    // This will be the string to search for in /sys/dev/char links
+    int chars_to_write = snprintf(subaddr, 28, "-%s:", deviceName);
+    if(chars_to_write >= 28) {
+        printf("Path to your boot util is too long for the char array here!\n");
+    }
+    // Boot it
+    rc = usb_boot(deviceName, tx_buf, filesize);
+    free(tx_buf);
+    if(rc)
+    {
+        return rc;
+    }
+    if(usb_loglevel > 1)
+        fprintf(stderr, "Boot successful, device address %s\n", deviceName);
+#endif
+    return 0;
+}
+
+void deallocateData(void* ptr,uint32_t size, uint32_t alignment)
+{
+    if (!ptr)
+        return;
+#if (defined(_WIN32) || defined(_WIN64) )
+    _aligned_free(ptr);
+#else
+    free(ptr);
+#endif
+}
+
+void* allocateData(uint32_t size, uint32_t alignment)
+{
+    void* ret = NULL;
+#if (defined(_WIN32) || defined(_WIN64) )
+    ret = _aligned_malloc(size, alignment);
+#else
+    posix_memalign(&ret, alignment, size);
+#endif
+    return ret;
+}
+
index 69f792d..11b5672 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 // USB utility for use with Myriad2v2 ROM
@@ -202,13 +201,18 @@ usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize, void
     // 2 => pid
     // '255-' x 7 (also gives us nul-terminator for last entry)
     // 7 => to add "-maXXXX"
-    uint8_t devs[15][2 + 2 + 4 * 7 + 7] = { 0 };//to store ven_id,dev_id;
+    //uint8_t devs[15][2 + 2 + 4 * 7 + 7] = { 0 };//to store ven_id,dev_id;
+    static uint8_t devs[15][2 + 2 + 4 * 7 + 7] = { 0 };//to store ven_id,dev_id;
+    static int devs_cnt = 0;
 #else
     static libusb_device **devs;
     libusb_device *dev;
     struct libusb_device_descriptor desc;
 #endif
     int count = 0;
+#if (defined(_WIN32) || defined(_WIN64))
+    int create_count = 0;
+#endif
     size_t i;
 
     if(!initialized)
@@ -226,7 +230,10 @@ usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize, void
                 fprintf(stderr, "Unable to get USB device list: %s\n", libusb_strerror(res));
             return USB_BOOT_ERROR;
         }
+        devs_cnt = res;
     }
+    else
+        res = devs_cnt;
 #else
     if(!devs || idx == 0)
     {
@@ -248,7 +255,7 @@ usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize, void
     while (res-- > 0)
     {
         if (((int)(devs[res][0] << 8 | devs[res][1]) == vid && (devs[res][2] << 8 | devs[res][3]) == pid) ||
-            (pid == 0 && vid == 0 &&
+            ((pid == 0 || pid == -1) && vid == 0 &&
             (((int)(devs[res][0] << 8 | devs[res][1]) == DEFAULT_VID && is_pid_supported((int)(devs[res][2] << 8 | devs[res][3])) == 1) ||
             ((int)(devs[res][0] << 8 | devs[res][1]) == DEFAULT_OPENVID && (int)(devs[res][2] << 8 | devs[res][3]) == DEFAULT_OPENPID))))
         {
@@ -263,7 +270,20 @@ usbBootError_t usb_find_device(unsigned idx, char *addr, unsigned addrsize, void
                     return USB_BOOT_SUCCESS;
                 }
             }
-            else if (idx == count)
+            else if ((pid == -1) && (int)(devs[res][2] << 8 | devs[res][3]) != DEFAULT_OPENPID)//pid==-1 is an indicator to try to find Myriad devices, exclude VSC devices
+            {
+                if (idx == create_count)
+                {
+                    const char *caddr = &devs[res][4];
+                    if (usb_loglevel > 1)
+                        fprintf(stderr, "Device %d Address: %s - VID/PID %04x:%04x\n", idx, caddr, (int)(devs[res][0] << 8 | devs[res][1]), (int)(devs[res][2] << 8 | devs[res][3]));
+                    strncpy(addr, caddr, addrsize);
+                    return USB_BOOT_SUCCESS;
+                }
+                else
+                    create_count++;
+            }
+            else if ((idx == count) && (pid != -1))
             {
                 const char *caddr = &devs[res][4];
                 if (usb_loglevel > 1)
@@ -421,7 +441,6 @@ static int wait_findopen(const char *device_address, int timeout, libusb_device
         i++;
         usleep(100000);
     }
-    return 0;
 }
 
 static int send_file(libusb_device_handle *h, uint8_t endpoint, const uint8_t *tx_buf, unsigned filesize)
index cdcabb1..39b8d6d 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 #ifdef __cplusplus
 extern "C" {
@@ -37,4 +36,4 @@ int usb_boot(const char *addr, const void *mvcmd, unsigned size);
 
 #ifdef __cplusplus
 }
-#endif
+#endif
\ No newline at end of file
diff --git a/api/src/common/components/XLink/shared/UsbLinkPlatform.h b/api/src/common/components/XLink/shared/UsbLinkPlatform.h
deleted file mode 100644 (file)
index c59445f..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
-*/
-
-///
-/// @brief     Application configuration Leon header
-///
-#ifndef _XLINK_USBLINKPLATFORM_H
-#define _XLINK_USBLINKPLATFORM_H
-#include <stdint.h>
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#define MAX_POOLS_ALLOC 32
-#define PACKET_LENGTH (64*1024)
-
-#ifdef __PC__
-#define MAX_LINKS 16
-#else
-#define MAX_LINKS 1
-#endif
-/*
-The USB specific implementation is contained in the file called UsbLinkPlatform.c/cpp.
-It implements the following functions:
-*/
-int USBLinkWrite(void* fd, void* data, int size, unsigned int timeout);
-int USBLinkRead(void* fd, void* data, int size, unsigned int timeout);
-int UsbLinkPlatformConnect(const char* devPathRead,
-                           const char* devPathWrite, void** fd);
-int UsbLinkPlatformInit(int loglevel);
-
-int UsbLinkPlatformGetDeviceName(int index,
-                                 char* name,
-                                 int nameSize);
-
-int UsbLinkPlatformBootRemote(const char* deviceName,
-                                const char* binaryPath);
-int USBLinkPlatformResetRemote(void* fd);
-
-void* allocateData(uint32_t size, uint32_t alignment);
-void deallocateData(void* ptr,uint32_t size, uint32_t alignment);
-
-typedef enum usbLinkPlatformErrorCode {
-    USB_LINK_PLATFORM_SUCCESS = 0,
-    USB_LINK_PLATFORM_ERROR,
-    USB_LINK_PLATFORM_DEVICE_NOT_FOUND,
-    USB_LINK_PLATFORM_TIMEOUT
-} usbLinkPlatformErrorCode_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/* end of include file */
index d0404fc..1f6e5c7 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 ///
 #include "stdio.h"
 #include "stdint.h"
 #include "string.h"
-
 #include <assert.h>
 #include <stdlib.h>
+
+
 #if (defined(_WIN32) || defined(_WIN64))
+#include "gettime.h"
 #include "win_pthread.h"
 #include "win_semaphore.h"
-#include "gettime.h"
 #else
 #include <pthread.h>
 #include <semaphore.h>
 #endif
+
 #include "mvMacros.h"
-#include "UsbLinkPlatform.h"
+#include "XLinkPlatform.h"
 #include "XLinkDispatcher.h"
-#define _USBLINK_ENABLE_PRIVATE_INCLUDE_
+#define _XLINK_ENABLE_PRIVATE_INCLUDE_
 #include "XLinkPrivateDefines.h"
 
 #ifdef MVLOG_UNIT_NAME
@@ -91,14 +92,15 @@ linkId_t nextUniqueLinkId = 0; //incremental number, doesn't get decremented.
 typedef struct xLinkDesc_t {
     int nextUniqueStreamId; //incremental number, doesn't get decremented.
                                 //Needs to be per link to match remote
-    streamDesc_t availableStreams[USB_LINK_MAX_STREAMS];
+    streamDesc_t availableStreams[XLINK_MAX_STREAMS];
     xLinkState_t peerState;
     void* fd;
     linkId_t id;
+    int hostClosedFD;
 } xLinkDesc_t;
 
 xLinkDesc_t availableXLinks[MAX_LINKS];
-
+xLinkDesc_t* getLink(void* fd);
 sem_t  pingSem; //to b used by myriad
 
 
@@ -124,12 +126,13 @@ int handleIncomingEvent(xLinkEvent_t* event){
     //specific actions to this peer
     void* buffer ;
     streamDesc_t* stream ;
+    int sc = 0 ;
     switch (event->header.type){
     case USB_WRITE_REQ:
         /*If we got here, we will read the data no matter what happens.
           If we encounter any problems we will still read the data to keep
           the communication working but send a NACK.*/
-        stream = getStreamById(event->xLinkFD, event->header.streamId);
+        stream = getStreamById(event->xLinkFD, event->header.streamId);\
         ASSERT_X_LINK(stream);
 
         stream->localFillLevel += event->header.size;
@@ -141,7 +144,7 @@ int handleIncomingEvent(xLinkEvent_t* event){
             mvLog(MVLOG_FATAL,"out of memory\n");
             ASSERT_X_LINK(0);
         }
-        int sc = USBLinkRead(event->xLinkFD, buffer, event->header.size, USB_DATA_TIMEOUT);
+        sc = XLinkRead(event->xLinkFD, buffer, event->header.size, USB_DATA_TIMEOUT);
         if(sc < 0){
             mvLog(MVLOG_ERROR,"%s() Read failed %d\n", __func__, (int)sc);
         }
@@ -182,6 +185,32 @@ int handleIncomingEvent(xLinkEvent_t* event){
         break;
     case USB_RESET_RESP:
         break;
+    case PCIE_CREATE_STREAM_REQ:
+        break;
+    case PCIE_WRITE_REQ:
+        printf("PCIE_WRITE_REQ\n");
+        stream = getStreamById(event->xLinkFD, event->header.streamId);
+        printf("XLinkWrite sending size %d and bufer %p\n", (int)event->header.size, &event->data);
+        int rc = XLinkWrite(NULL, event->data, event->header.size, 0);
+        if(rc < 0) {
+            mvLog(MVLOG_ERROR,"Write failed %d\n", rc);
+        }
+        event->header.flags.bitField.ack = 0;
+        event->header.flags.bitField.nack = 1;
+        releaseStream(stream);
+        break;
+    case PCIE_READ_REQ:
+        break;
+    case PCIE_CLOSE_STREAM_REQ:
+        break;
+    case PCIE_WRITE_RESP:
+        break;
+    case PCIE_READ_RESP:
+        break;
+    case PCIE_CREATE_STREAM_RESP:
+        break;
+    case PCIE_CLOSE_STREAM_RESP:
+        break;
     default:
         ASSERT_X_LINK(0);
     }
@@ -191,12 +220,18 @@ int handleIncomingEvent(xLinkEvent_t* event){
 }
  int dispatcherEventReceive(xLinkEvent_t* event){
     static xLinkEvent_t prevEvent;
-    int sc = USBLinkRead(event->xLinkFD, &event->header, sizeof(event->header), 0);
+    int sc = XLinkRead(event->xLinkFD, &event->header, sizeof(event->header), 0);
 
     if(sc < 0 && event->header.type == USB_RESET_RESP) {
-               return sc;
+        return sc;
     }
-    if(sc < 0){
+    if(sc < 0) {
+        xLinkDesc_t* link = getLink(event->xLinkFD);
+        if (link->hostClosedFD) {
+            //host intentionally closed usb, finish normally
+            event->header.type = USB_RESET_RESP;
+            return 0;
+        }
         mvLog(MVLOG_ERROR,"%s() Read failed %d\n", __func__, (int)sc);
         return sc;
     }
@@ -268,7 +303,7 @@ int getNextAvailableStreamIndex(xLinkDesc_t* link)
         return -1;
 
     int idx;
-    for (idx = 0; idx < USB_LINK_MAX_STREAMS; idx++) {
+    for (idx = 0; idx < XLINK_MAX_STREAMS; idx++) {
         if (link->availableStreams[idx].id == INVALID_STREAM_ID)
             return idx;
     }
@@ -282,7 +317,7 @@ streamDesc_t* getStreamById(void* fd, streamId_t id)
     xLinkDesc_t* link = getLink(fd);
     ASSERT_X_LINK(link != NULL);
     int stream;
-    for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++) {
+    for (stream = 0; stream < XLINK_MAX_STREAMS; stream++) {
         if (link->availableStreams[stream].id == id) {
             sem_wait(&link->availableStreams[stream].sem);
             return &link->availableStreams[stream];
@@ -295,7 +330,7 @@ streamDesc_t* getStreamByName(xLinkDesc_t* link, const char* name)
 {
     ASSERT_X_LINK(link != NULL);
     int stream;
-    for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++) {
+    for (stream = 0; stream < XLINK_MAX_STREAMS; stream++) {
         if (link->availableStreams[stream].id != INVALID_STREAM_ID &&
             strcmp(link->availableStreams[stream].name, name) == 0) {
                 sem_wait(&link->availableStreams[stream].sem);
@@ -354,7 +389,6 @@ void deallocateStream(streamDesc_t* stream)
     }
 }
 
-
 int releasePacketFromStream(streamDesc_t* stream, uint32_t* releasedSize)
 {
     streamPacketDesc_t* currPack = &stream->packets[stream->firstPacket];
@@ -362,11 +396,14 @@ int releasePacketFromStream(streamDesc_t* stream, uint32_t* releasedSize)
         mvLog(MVLOG_ERROR,"There is no packet to release\n");
         return 0; // ignore this, although this is a big problem on application side
     }
+
     stream->localFillLevel -= currPack->length;
     mvLog(MVLOG_DEBUG,"Got release of %ld , current local fill level is %ld out of %ld %ld\n",
         currPack->length, stream->localFillLevel, stream->readSize, stream->writeSize);
 
-    deallocateData(currPack->data, ALIGN_UP_INT32((int32_t)currPack->length, __CACHE_LINE_SIZE), __CACHE_LINE_SIZE);
+    deallocateData(currPack->data,
+        ALIGN_UP_INT32((int32_t)currPack->length, __CACHE_LINE_SIZE), __CACHE_LINE_SIZE);
+
     CIRCULAR_INCREMENT(stream->firstPacket, USB_LINK_MAX_PACKETS_PER_STREAM);
     stream->blockedPackets--;
     *releasedSize = currPack->length;
@@ -396,10 +433,10 @@ int addNewPacketToStream(streamDesc_t* stream, void* buffer, uint32_t size){
 }
 
 streamId_t allocateNewStream(void* fd,
-                             const char* name,
-                             uint32_t writeSize,
-                             uint32_t readSize,
-                             streamId_t forcedId)
+                            const char* name,
+                            uint32_t writeSize,
+                            uint32_t readSize,
+                            streamId_t forcedId)
 {
     streamId_t streamId;
     streamDesc_t* stream;
@@ -487,7 +524,6 @@ int dispatcherLocalEventGetResponse(xLinkEvent_t* event, xLinkEvent_t* response)
             event->header.flags.bitField.block = 0;
             stream->remoteFillLevel += event->header.size;
             stream->remoteFillPacketLevel++;
-
             mvLog(MVLOG_DEBUG,"Got local write of %ld , remote fill level %ld out of %ld %ld\n",
                 event->header.size, stream->remoteFillLevel, stream->writeSize, stream->readSize);
         }
@@ -549,6 +585,35 @@ int dispatcherLocalEventGetResponse(xLinkEvent_t* event, xLinkEvent_t* response)
         //should not happen
         event->header.flags.bitField.localServe = 1;
         break;
+    case PCIE_CREATE_STREAM_REQ:
+        break;
+    case PCIE_WRITE_REQ:
+        break;
+    case PCIE_READ_REQ:
+        printf("PCIE_READ_REQ id:%d\n", (int)event->header.streamId);
+        stream = getStreamById(event->xLinkFD, event->header.streamId);
+        event->header.flags.bitField.ack = 1;
+        event->header.flags.bitField.nack = 0;
+        event->header.flags.bitField.block = 0;
+
+        printf("Xlink Read with data size %d and data %p \n",
+                (int)((streamPacketDesc_t*)event->data)->length, (streamPacketDesc_t*)event->data);
+        //int sc = XLinkRead(NULL, event->data->data, event->data->length, 0);
+        //if(sc < 0){
+        //    mvLog(MVLOG_ERROR,"%s() PCIE XLinkRead failed %d\n", __func__, (int)sc);
+        //}
+        releaseStream(stream);
+        break;
+    case PCIE_CLOSE_STREAM_REQ:
+        break;
+    case PCIE_WRITE_RESP:
+        break;
+    case PCIE_READ_RESP:
+        break;
+    case PCIE_CREATE_STREAM_RESP:
+        break;
+    case PCIE_CLOSE_STREAM_RESP:
+        break;
     default:
         ASSERT_X_LINK(0);
     }
@@ -710,11 +775,26 @@ int dispatcherRemoteEventGetResponse(xLinkEvent_t* event, xLinkEvent_t* response
             releaseStream(stream);
             break;
         }
-
         case USB_PING_RESP:
             break;
         case USB_RESET_RESP:
             break;
+        case PCIE_CREATE_STREAM_REQ:
+            break;
+        case PCIE_WRITE_REQ:
+            break;
+        case PCIE_READ_REQ:
+            break;
+        case PCIE_CLOSE_STREAM_REQ:
+            break;
+        case PCIE_WRITE_RESP:
+            break;
+        case PCIE_READ_RESP:
+            break;
+        case PCIE_CREATE_STREAM_RESP:
+            break;
+        case PCIE_CLOSE_STREAM_RESP:
+            break;
         default:
             ASSERT_X_LINK(0);
     }
@@ -724,18 +804,20 @@ int dispatcherRemoteEventGetResponse(xLinkEvent_t* event, xLinkEvent_t* response
 int dispatcherEventSend(xLinkEvent_t *event)
 {
     mvLog(MVLOG_DEBUG,"sending %d %d\n", (int)event->header.type,  (int)event->header.id);
-    int rc = USBLinkWrite(event->xLinkFD, &event->header, sizeof(event->header), 0);
+    int rc = XLinkWrite(event->xLinkFD, &event->header, sizeof(event->header), 0);
     if(rc < 0)
     {
         mvLog(MVLOG_ERROR,"Write failed %d\n", rc);
+        return rc;
     }
     if (event->header.type == USB_WRITE_REQ)
     {
         //write requested data
-        rc = USBLinkWrite(event->xLinkFD, event->data,
+        rc = XLinkWrite(event->xLinkFD, event->data,
                           event->header.size, USB_DATA_TIMEOUT);
         if(rc < 0) {
             mvLog(MVLOG_ERROR,"Write failed %d\n", rc);
+            return rc;
         }
     }
     // this function will send events to the remote node
@@ -749,45 +831,94 @@ static xLinkState_t getXLinkState(xLinkDesc_t* link)
     return link->peerState;
 }
 
-void dispatcherCloseUsbLink(void*fd)
+void dispatcherCloseLink(void*fd, int fullClose)
 {
     xLinkDesc_t* link = getLink(fd);
     ASSERT_X_LINK(link != NULL);
-    link->peerState = X_LINK_COMMUNICATION_NOT_OPEN;
-    link->id = INVALID_LINK_ID;
-    link->fd = NULL;
-    link->nextUniqueStreamId = 0;
+    if (fullClose)
+    {
+        link->peerState = X_LINK_COMMUNICATION_NOT_OPEN;
+        link->id = INVALID_LINK_ID;
+        link->fd = NULL;
+        link->nextUniqueStreamId = 0;
 
-    int stream;
-    for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++)
-        link->availableStreams[stream].id = INVALID_STREAM_ID;
+        int stream;
+        for (stream = 0; stream < XLINK_MAX_STREAMS; stream++)
+            link->availableStreams[stream].id = INVALID_STREAM_ID;
+    }
+    else
+    {
+        link->peerState = XLINK_DOWN;
+    }
 }
 
 void dispatcherResetDevice(void* fd)
 {
-    USBLinkPlatformResetRemote(fd);
+    XLinkPlatformResetRemote(fd);
 }
 
+XLinkError_t XLinkGetFillLevel(streamId_t streamId, int isRemote, int* fillLevel)
+{
+    linkId_t id;
+    EXTRACT_IDS(streamId,id);
+    xLinkDesc_t* link = getLinkById(id);
+    streamDesc_t* stream;
+
+    ASSERT_X_LINK(link != NULL);
+    if (getXLinkState(link) != XLINK_UP)
+    {
+        return X_LINK_COMMUNICATION_NOT_OPEN;
+    }
+    stream = getStreamById(link->fd, streamId);
+    ASSERT_X_LINK(stream);
+
+    if (isRemote)
+        *fillLevel = stream->remoteFillLevel;
+    else
+        *fillLevel = stream->localFillLevel;
+    releaseStream(stream);
+    return X_LINK_SUCCESS;
+}
 
 /*#################################################################################
 ###################################### EXTERNAL ###################################
 ##################################################################################*/
+/*
+PCIE inserts are a temporary solution for XLinkPcie,
+their purpose is to bypass using the dispatcher,
+calling the xlink Platform functions directly.
+Pcie calls should be moved to dispatcher as a next task/target.
+*/
+
 //Called only from app - per device
 XLinkError_t XLinkConnect(XLinkHandler_t* handler)
 {
+    /************* PCIE **************/
+    if (glHandler->protocol == PCIE) {
+        if(XLinkPlatformConnect(handler->devicePath2,   \
+                                handler->devicePath,    \
+                                NULL) < 0) {
+            return X_LINK_ERROR;
+        }
+        else {
+            handler->linkId = 0;
+            return X_LINK_SUCCESS;
+        }
+    }/*******************************/
+
     int index = getNextAvailableLinkIndex();
     ASSERT_X_LINK(index != -1);
 
     xLinkDesc_t* link = &availableXLinks[index];
     mvLog(MVLOG_DEBUG,"%s() device name %s \n", __func__, handler->devicePath);
 
-    if (UsbLinkPlatformConnect(handler->devicePath2, handler->devicePath, &link->fd) == -1)
-    {
+    if (XLinkPlatformConnect(handler->devicePath2,  \
+                            handler->devicePath,    \
+                            &link->fd) < 0) {
         return X_LINK_ERROR;
     }
 
     dispatcherStart(link->fd);
-
     xLinkEvent_t event = {0};
     event.header.type = USB_PING_REQ;
     event.xLinkFD = link->fd;
@@ -795,23 +926,36 @@ XLinkError_t XLinkConnect(XLinkHandler_t* handler)
     dispatcherWaitEventComplete(link->fd);
 
     link->id = nextUniqueLinkId++;
-    link->peerState = USB_LINK_UP;
+    link->peerState = XLINK_UP;
     handler->linkId = link->id;
-
-    return 0;
+    link->hostClosedFD = 0;
+    return X_LINK_SUCCESS;
 }
 
 XLinkError_t XLinkInitialize(XLinkGlobalHandler_t* handler)
 {
-    ASSERT_X_LINK(USB_LINK_MAX_STREAMS <= MAX_POOLS_ALLOC);
+    ASSERT_X_LINK(XLINK_MAX_STREAMS <= MAX_POOLS_ALLOC);
     glHandler = handler;
     sem_init(&pingSem,0,0);
     int i;
-    int sc = UsbLinkPlatformInit(handler->loglevel);
-    if (sc)
-    {
+
+#if (defined(_WIN32) || defined(_WIN64))
+    if (glHandler->protocol != USB_VSC) {
+        printf("Windows only support USB_VSC! \n");
+        return X_LINK_COMMUNICATION_NOT_OPEN;
+    }
+#endif
+
+    int sc = XLinkPlatformInit(glHandler->protocol, glHandler->loglevel);
+    if (sc != X_LINK_SUCCESS) {
        return X_LINK_COMMUNICATION_NOT_OPEN;
     }
+    /************* PCIE **************/
+    if (glHandler->protocol == PCIE) {
+        /*Bypass Dispatcher on PCIE for now*/
+        printf("PCIe initialized through Xlink! \n");
+        return X_LINK_SUCCESS;
+    }/*******************************/
 
     //initialize availableStreams
     xLinkDesc_t* link;
@@ -819,17 +963,16 @@ XLinkError_t XLinkInitialize(XLinkGlobalHandler_t* handler)
         link = &availableXLinks[i];
         link->id = INVALID_LINK_ID;
         link->fd = NULL;
-        link->peerState = USB_LINK_NOT_INIT;
+        link->peerState = XLINK_NOT_INIT;
         int stream;
-        for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++)
+        for (stream = 0; stream < XLINK_MAX_STREAMS; stream++)
             link->availableStreams[stream].id = INVALID_STREAM_ID;
     }
-
     controlFunctionTbl.eventReceive = &dispatcherEventReceive;
     controlFunctionTbl.eventSend = &dispatcherEventSend;
     controlFunctionTbl.localGetResponse = &dispatcherLocalEventGetResponse;
     controlFunctionTbl.remoteGetResponse = &dispatcherRemoteEventGetResponse;
-    controlFunctionTbl.closeLink = &dispatcherCloseUsbLink;
+    controlFunctionTbl.closeLink = &dispatcherCloseLink;
     controlFunctionTbl.resetDevice = &dispatcherResetDevice;
     dispatcherInitialize(&controlFunctionTbl);
 
@@ -841,52 +984,35 @@ XLinkError_t XLinkInitialize(XLinkGlobalHandler_t* handler)
     link = &availableXLinks[index];
     link->fd = NULL;
     link->id = nextUniqueLinkId++;
-    link->peerState = USB_LINK_UP;
+    link->peerState = XLINK_UP;
 
     sem_wait(&pingSem);
 #endif
     return X_LINK_SUCCESS;
 }
 
-
-XLinkError_t XLinkGetFillLevel(streamId_t streamId, int isRemote, int* fillLevel)
-{
-    linkId_t id;
-    EXTRACT_IDS(streamId,id);
-    xLinkDesc_t* link = getLinkById(id);
-    streamDesc_t* stream;
-
-    ASSERT_X_LINK(link != NULL);
-    if (getXLinkState(link) != USB_LINK_UP)
-    {
-        return X_LINK_COMMUNICATION_NOT_OPEN;
-    }
-    stream = getStreamById(link->fd, streamId);
-    ASSERT_X_LINK(stream);
-
-    if (isRemote)
-        *fillLevel = stream->remoteFillLevel;
-    else
-        *fillLevel = stream->localFillLevel;
-    releaseStream(stream);
-    return X_LINK_SUCCESS;
-}
-
 streamId_t XLinkOpenStream(linkId_t id, const char* name, int stream_write_size)
 {
+    /************* PCIE **************/
+    if (glHandler->protocol == PCIE) {
+        /*Exit on PCIe for now*/
+        return (streamId_t)id;
+    }/*******************************/
+    int operationTypes[NMB_OF_PROTOCOLS] = \
+        {USB_CREATE_STREAM_REQ, USB_CREATE_STREAM_REQ, \
+        PCIE_CREATE_STREAM_REQ, IPC_CREATE_STREAM_REQ};
+
     xLinkEvent_t event = {0};
     xLinkDesc_t* link = getLinkById(id);
     mvLog(MVLOG_DEBUG,"%s() id %d link %p\n", __func__, id, link);
     ASSERT_X_LINK(link != NULL);
-    if (getXLinkState(link) != USB_LINK_UP)
-    {
+    if (getXLinkState(link) != XLINK_UP) {
         /*no link*/
         mvLog(MVLOG_DEBUG,"%s() no link up\n", __func__);
         return INVALID_STREAM_ID;
     }
 
-    if(strlen(name) > MAX_NAME_LENGTH)
-    {
+    if(strlen(name) > MAX_NAME_LENGTH) {
         mvLog(MVLOG_WARN,"name too long\n");
         return INVALID_STREAM_ID;
     }
@@ -894,7 +1020,7 @@ streamId_t XLinkOpenStream(linkId_t id, const char* name, int stream_write_size)
     if(stream_write_size > 0)
     {
         stream_write_size = ALIGN_UP(stream_write_size, __CACHE_LINE_SIZE);
-        event.header.type = USB_CREATE_STREAM_REQ;
+        event.header.type = operationTypes[glHandler->protocol];
         strncpy(event.header.streamName, name, MAX_NAME_LENGTH);
         event.header.size = stream_write_size;
         event.header.streamId = INVALID_STREAM_ID;
@@ -902,7 +1028,6 @@ streamId_t XLinkOpenStream(linkId_t id, const char* name, int stream_write_size)
 
         dispatcherAddEvent(EVENT_LOCAL, &event);
         dispatcherWaitEventComplete(link->fd);
-
     }
     streamId_t streamId = getStreamIdByName(link, name);
     if (streamId > 0xFFFFFFF) {
@@ -925,7 +1050,7 @@ XLinkError_t XLinkCloseStream(streamId_t streamId)
     ASSERT_X_LINK(link != NULL);
 
     mvLog(MVLOG_DEBUG,"%s(): streamId %d\n", __func__, (int)streamId);
-    if (getXLinkState(link) != USB_LINK_UP)
+    if (getXLinkState(link) != XLINK_UP)
         return X_LINK_COMMUNICATION_NOT_OPEN;
 
     xLinkEvent_t event = {0};
@@ -948,7 +1073,7 @@ XLinkError_t XLinkGetAvailableStreams(linkId_t id)
 {
     xLinkDesc_t* link = getLinkById(id);
     ASSERT_X_LINK(link != NULL);
-    if (getXLinkState(link) != USB_LINK_UP)
+    if (getXLinkState(link) != XLINK_UP)
     {
         return X_LINK_COMMUNICATION_NOT_OPEN;
     }
@@ -956,38 +1081,62 @@ XLinkError_t XLinkGetAvailableStreams(linkId_t id)
     return X_LINK_SUCCESS;
 }
 
-XLinkError_t XLinkGetDeviceName(int index, char* name, int nameSize)
+XLinkError_t GetDeviceName(int index, char* name, int nameSize, int pid)
 {
-    int rc = UsbLinkPlatformGetDeviceName(index, name, nameSize);
-    switch(rc) {
-        case USB_LINK_PLATFORM_SUCCESS:
-            return X_LINK_SUCCESS;
-        case USB_LINK_PLATFORM_DEVICE_NOT_FOUND:
-            return X_LINK_DEVICE_NOT_FOUND;
-        case USB_LINK_PLATFORM_TIMEOUT:
-            return X_LINK_TIMEOUT;
-        default:
-            return X_LINK_ERROR;
+    int rc = -1;
+    if (!pid)
+        rc = XLinkPlatformGetDeviceName(index, name, nameSize);
+    else
+        rc = XLinkPlatformGetDeviceNameExtended(index, name, nameSize, pid);
 
+    switch (rc) {
+    case X_LINK_PLATFORM_SUCCESS:
+        return X_LINK_SUCCESS;
+    case X_LINK_PLATFORM_DEVICE_NOT_FOUND:
+        return X_LINK_DEVICE_NOT_FOUND;
+    case X_LINK_PLATFORM_TIMEOUT:
+        return X_LINK_TIMEOUT;
+    default:
+        return X_LINK_ERROR;
     }
 }
 
+XLinkError_t XLinkGetDeviceName(int index, char* name, int nameSize)
+{
+    return GetDeviceName(index, name, nameSize, 0);
+}
+
+XLinkError_t XLinkGetDeviceNameExtended(int index, char* name, int nameSize, int pid)
+{
+    return GetDeviceName(index, name, nameSize, pid);
+}
+
 XLinkError_t XLinkWriteData(streamId_t streamId, const uint8_t* buffer,
                             int size)
 {
+    /************* PCIE **************/
+    if (glHandler->protocol == PCIE) {
+        /*Bypass Dispatcher on PCIE for now*/
+        int rc = XLinkWrite(NULL, (void*)buffer, size, 0);
+        if(rc < 0) {
+            mvLog(MVLOG_ERROR,"Write failed %d\n", rc);
+        }
+        return X_LINK_SUCCESS;
+    }/*******************************/
+    int operationTypes[NMB_OF_PROTOCOLS] = \
+        {USB_WRITE_REQ, USB_WRITE_REQ, PCIE_WRITE_REQ, IPC_WRITE_REQ};
     linkId_t id;
     EXTRACT_IDS(streamId,id);
     xLinkDesc_t* link = getLinkById(id);
     ASSERT_X_LINK(link != NULL);
-    if (getXLinkState(link) != USB_LINK_UP)
+    if (getXLinkState(link) != XLINK_UP)
     {
         return X_LINK_COMMUNICATION_NOT_OPEN;
     }
     struct timespec start, end;
     clock_gettime(CLOCK_REALTIME, &start);
-
     xLinkEvent_t event = {0};
-    event.header.type = USB_WRITE_REQ;
+    event.header.type = operationTypes[glHandler->protocol];
     event.header.size = size;
     event.header.streamId = streamId;
     event.xLinkFD = link->fd;
@@ -995,9 +1144,8 @@ XLinkError_t XLinkWriteData(streamId_t streamId, const uint8_t* buffer,
 
     xLinkEvent_t* ev = dispatcherAddEvent(EVENT_LOCAL, &event);
     dispatcherWaitEventComplete(link->fd);
-    clock_gettime(CLOCK_REALTIME, &end);
-
 
+    clock_gettime(CLOCK_REALTIME, &end);
     if (ev->header.flags.bitField.ack == 1)
     {
          //profile only on success
@@ -1014,7 +1162,7 @@ XLinkError_t XLinkWriteData(streamId_t streamId, const uint8_t* buffer,
 
 XLinkError_t XLinkAsyncWriteData()
 {
-    if (getXLinkState(NULL) != USB_LINK_UP)
+    if (getXLinkState(NULL) != XLINK_UP)
     {
         return X_LINK_COMMUNICATION_NOT_OPEN;
     }
@@ -1023,19 +1171,37 @@ XLinkError_t XLinkAsyncWriteData()
 
 XLinkError_t XLinkReadData(streamId_t streamId, streamPacketDesc_t** packet)
 {
+    /************* PCIE **************/
+    if (glHandler->protocol == PCIE) {
+        /*Bypass Dispatcher on PCIE for now*/
+        int toRead = (int)(*packet)->length;
+        int byteCount = 0;
+
+        while (toRead) {
+            int sc = XLinkRead(NULL, ((*packet)->data) + byteCount, (*packet)->length, 0);
+            if(sc < 0){
+                mvLog(MVLOG_ERROR,"%s() PCIE XLinkRead failed %d\n", __func__, (int)sc);
+            }
+
+            toRead -= sc;
+            byteCount += sc;
+        }
+        return X_LINK_SUCCESS;
+    }/********************************/
+    int operationTypes[NMB_OF_PROTOCOLS] = \
+        {USB_READ_REQ, USB_READ_REQ, PCIE_READ_REQ, IPC_READ_REQ};
+    struct timespec start, end;
     linkId_t id;
     EXTRACT_IDS(streamId,id);
     xLinkDesc_t* link = getLinkById(id);
     ASSERT_X_LINK(link != NULL);
-    if (getXLinkState(link) != USB_LINK_UP)
+    if (getXLinkState(link) != XLINK_UP)
     {
         return X_LINK_COMMUNICATION_NOT_OPEN;
     }
 
     xLinkEvent_t event = {0};
-    struct timespec start, end;
-
-    event.header.type = USB_READ_REQ;
+    event.header.type = operationTypes[glHandler->protocol];
     event.header.size = 0;
     event.header.streamId = streamId;
     event.xLinkFD = link->fd;
@@ -1060,11 +1226,17 @@ XLinkError_t XLinkReadData(streamId_t streamId, streamPacketDesc_t** packet)
 
 XLinkError_t XLinkReleaseData(streamId_t streamId)
 {
+    /************* PCIE **************/
+    if (glHandler->protocol == PCIE) {
+        XLinkPlatformResetRemote(NULL);
+        return X_LINK_SUCCESS;
+    }/********************************/
+
     linkId_t id;
     EXTRACT_IDS(streamId,id);
     xLinkDesc_t* link = getLinkById(id);
     ASSERT_X_LINK(link != NULL);
-    if (getXLinkState(link) != USB_LINK_UP)
+    if (getXLinkState(link) != XLINK_UP)
     {
         return X_LINK_COMMUNICATION_NOT_OPEN;
     }
@@ -1085,19 +1257,28 @@ XLinkError_t XLinkReleaseData(streamId_t streamId)
 
 XLinkError_t XLinkBootRemote(const char* deviceName, const char* binaryPath)
 {
-    if (UsbLinkPlatformBootRemote(deviceName, binaryPath) == 0)
+    if (XLinkPlatformBootRemote(deviceName, binaryPath) == 0)
         return X_LINK_SUCCESS;
     else
         return X_LINK_COMMUNICATION_FAIL;
 }
 
+XLinkError_t XLinkDisconnect(linkId_t id)
+{
+    xLinkDesc_t* link = getLinkById(id);
+    ASSERT_X_LINK(link != NULL);
+    link->hostClosedFD = 1;
+    XLinkPlatformResetRemote(link->fd);
+    return X_LINK_SUCCESS;
+}
+
 XLinkError_t XLinkResetRemote(linkId_t id)
 {
     xLinkDesc_t* link = getLinkById(id);
     ASSERT_X_LINK(link != NULL);
-    if (getXLinkState(link) != USB_LINK_UP)
+    if (getXLinkState(link) != XLINK_UP)
     {
-        USBLinkPlatformResetRemote(link->fd);
+        XLinkPlatformResetRemote(link->fd);
         return X_LINK_COMMUNICATION_NOT_OPEN;
     }
     xLinkEvent_t event = {0};
@@ -1117,7 +1298,7 @@ XLinkError_t XLinkResetAll()
         if (availableXLinks[i].id != INVALID_LINK_ID) {
             xLinkDesc_t* link = &availableXLinks[i];
             int stream;
-            for (stream = 0; stream < USB_LINK_MAX_STREAMS; stream++) {
+            for (stream = 0; stream < XLINK_MAX_STREAMS; stream++) {
                 if (link->availableStreams[stream].id != INVALID_STREAM_ID) {
                     streamId_t streamId = link->availableStreams[stream].id;
                     mvLog(MVLOG_DEBUG,"%s() Closing stream (stream = %d) %d on link %d\n",
index a521550..9eae9a3 100644 (file)
@@ -1,25 +1,25 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 ///
 /// @file
 /// @brief     Application configuration Leon header
 ///
+
 #ifndef _XLINK_H
 #define _XLINK_H
 #include "XLinkPublicDefines.h"
@@ -35,7 +35,6 @@ XLinkError_t XLinkInitialize(XLinkGlobalHandler_t* handler);
 // Connects to specific device, starts dispatcher and pings remote
 XLinkError_t XLinkConnect(XLinkHandler_t* handler);
 
-
 // Opens a stream in the remote that can be written to by the local
 // Allocates stream_write_size (aligned up to 64 bytes) for that stream
 streamId_t XLinkOpenStream(linkId_t id, const char* name, int stream_write_size);
@@ -48,6 +47,7 @@ XLinkError_t XLinkCloseStream(streamId_t streamId);
 XLinkError_t XLinkGetAvailableStreams(linkId_t id);
 
 XLinkError_t XLinkGetDeviceName(int index, char* name, int nameSize);
+XLinkError_t XLinkGetDeviceNameExtended(int index, char* name, int nameSize, int pid);
 
 // Send a package to initiate the writing of data to a remote stream
 // Note that the actual size of the written data is ALIGN_UP(size, 64)
@@ -73,6 +73,9 @@ XLinkError_t XLinkBootRemote(const char* deviceName, const char* binaryPath);
 // Reset the remote
 XLinkError_t XLinkResetRemote(linkId_t id);
 
+//Closes connection only
+XLinkError_t XLinkDisconnect(linkId_t id);
+
 // Close all and release all memory
 XLinkError_t XLinkResetAll();
 
index 97f3930..997d27c 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 ///
@@ -25,9 +24,9 @@
 #include "stdint.h"
 #include "stdlib.h"
 #include "string.h"
-
 #include <assert.h>
 #include <stdlib.h>
+
 #if (defined(_WIN32) || defined(_WIN64))
 #include "win_pthread.h"
 #include "win_semaphore.h"
@@ -35,6 +34,7 @@
 #include <pthread.h>
 #include <semaphore.h>
 #endif
+
 #include "XLinkDispatcher.h"
 #include "XLinkPrivateDefines.h"
 
@@ -69,7 +69,7 @@ typedef struct{
 
     xLinkEventPriv_t* curProc;
     xLinkEventPriv_t* cur;
-    __attribute__((aligned(8))) xLinkEventPriv_t q[MAX_EVENTS];
+    __attribute__((aligned(64))) xLinkEventPriv_t q[MAX_EVENTS];
 
 }eventQueueHandler_t;
 typedef struct {
@@ -87,6 +87,11 @@ typedef struct {
     localSem_t eventSemaphores[MAXIMUM_SEMAPHORES];
 } xLinkSchedulerState_t;
 
+static xLinkEventPriv_t* getNextElementWithState(xLinkEventPriv_t* base, xLinkEventPriv_t* end,
+                                                        xLinkEventPriv_t* start, xLinkEventState_t state);
+
+static void markEventServed(xLinkEventPriv_t* event);
+
 
 #define CIRCULAR_INCREMENT(x, maxVal, base) \
     { \
@@ -141,7 +146,11 @@ sem_t addSchedulerSem;
 //below workaround for "C2088 '==': illegal for struct" error
 int pthread_t_compare(pthread_t a, pthread_t b)
 {
+#if (defined(_WIN32) || defined(_WIN64) )
+       return ((a.tid == b.tid));
+#else
     return  (a == b);
+#endif
 }
 
 static int unrefSem(sem_t* sem,  xLinkSchedulerState_t* curr) {
@@ -233,15 +242,36 @@ static void* eventReader(void* ctx)
         mvLog(MVLOG_DEBUG,"Reading %s (scheduler Id %d, fd %p)\n", TypeToStr(event.header.type),
             schedulerId, event.xLinkFD);
         int sc = glControlFunc->eventReceive(&event);
+
         if (sc) {
+            // Only run this logic on the host side, the FW does not need this logic
+#ifdef __PC__
+            xLinkSchedulerState_t *curr = &schedulerState[schedulerId];
+            // Same exception that is in eventReceive. Still break out of reading more events
+            if (event.header.type != USB_RESET_RESP)
+            {
+                mvLog(MVLOG_ERROR, "Failed to receive event, the device may have reset\n");
+
+                glControlFunc->closeLink(schedulerState[schedulerId].xLinkFD, 0);
+
+                // Find the next blocked event that the app is waiting on
+                // TODO will there be more than one?
+                xLinkEventPriv_t *e = getNextElementWithState(curr->lQueue.base, curr->lQueue.end, curr->lQueue.cur, EVENT_BLOCKED);
+
+                if (e != NULL)
+                {
+                    e->packet.header.flags.bitField.ack  = 0;
+                    e->packet.header.flags.bitField.nack = 1;
+                    markEventServed(e);
+                }
+            }
+#endif
             break;
         }
     }
     return 0;
 }
 
-
-
 static int isEventTypeRequest(xLinkEventPriv_t* event)
 {
     if (event->packet.header.type < USB_REQUEST_LAST)
@@ -270,7 +300,6 @@ static void markEventServed(xLinkEventPriv_t* event)
     event->isServed = EVENT_SERVED;
 }
 
-
 static int dispatcherRequestServe(xLinkEventPriv_t * event, xLinkSchedulerState_t* curr){
     ASSERT_X_LINK(curr != NULL);
     ASSERT_X_LINK(isEventTypeRequest(event));
@@ -404,7 +433,7 @@ static void dispatcherReset(xLinkSchedulerState_t* curr)
 {
     ASSERT_X_LINK(curr != NULL);
 
-    glControlFunc->closeLink(curr->xLinkFD);
+    glControlFunc->closeLink(curr->xLinkFD, 1);
     if (sem_post(&curr->notifyDispatcherSem)) {
         mvLog(MVLOG_ERROR,"can't post semaphore\n"); //to allow us to get a NULL event
     }
@@ -412,6 +441,7 @@ static void dispatcherReset(xLinkSchedulerState_t* curr)
     while (event != NULL) {
        event = dispatcherGetNextEvent(curr);
     }
+
     event = getNextElementWithState(curr->lQueue.base, curr->lQueue.end, curr->lQueue.base, EVENT_PENDING);
     while (event != NULL) {
         markEventServed(event);
@@ -420,7 +450,7 @@ static void dispatcherReset(xLinkSchedulerState_t* curr)
     glControlFunc->resetDevice(curr->xLinkFD);
     curr->schedulerId = -1;
     numSchedulers--;
-    mvLog(MVLOG_INFO,"Reset Successfully\n");
+    mvLog(MVLOG_DEBUG,"Reset Successfully\n");
 }
 #if (defined(_WIN32) || defined(_WIN64))
 static void* __cdecl eventSchedulerRun(void* ctx)
@@ -458,6 +488,13 @@ static void* eventSchedulerRun(void* ctx)
 
     while (!curr->resetXLink) {
         event = dispatcherGetNextEvent(curr);
+        if(event == NULL)
+        {
+            mvLog(MVLOG_ERROR,"Dispatcher received NULL event!");
+            /// Skip the event instead of asserting, so only
+            /// the particular xlink chan will crash
+            continue;
+        }
         ASSERT_X_LINK(event->packet.xLinkFD == curr->xLinkFD);
         getRespFunction getResp;
         xLinkEvent_t* toSend;
@@ -485,7 +522,7 @@ static void* eventSchedulerRun(void* ctx)
         }
 
         //TODO: dispatcher shouldn't know about this packet. Seems to be easily move-able to protocol
-        if (event->origin == EVENT_REMOTE){
+        if (event->origin == EVENT_REMOTE) {
             if (event->packet.header.type == USB_RESET_REQ) {
                 curr->resetXLink = 1;
             }
@@ -712,4 +749,4 @@ int dispatcherInitialize(struct dispatcherControlFunctions* controlFunc) {
 #endif
 }
 
-/* end of file */
+/* end of file */
\ No newline at end of file
index cac032f..ee81312 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 ///
@@ -23,7 +22,7 @@
 ///
 #ifndef _XLINKDISPATCHER_H
 #define _XLINKDISPATCHER_H
-#define _USBLINK_ENABLE_PRIVATE_INCLUDE_
+#define _XLINK_ENABLE_PRIVATE_INCLUDE_
 #include "XLinkPrivateDefines.h"
 
 #ifdef __cplusplus
@@ -47,7 +46,7 @@ struct dispatcherControlFunctions {
                                 int (*eventReceive) (xLinkEvent_t*);
                                 getRespFunction localGetResponse;
                                 getRespFunction remoteGetResponse;
-                                void (*closeLink) (void* fd);
+                                void (*closeLink) (void* fd, int fullClose);
                                 void (*resetDevice) (void* fd);
                                 };
 
@@ -58,4 +57,4 @@ int dispatcherStart(void* fd);
 }
 #endif
 
-#endif
+#endif
\ No newline at end of file
diff --git a/api/src/common/components/XLink/shared/XLinkPlatform.h b/api/src/common/components/XLink/shared/XLinkPlatform.h
new file mode 100644 (file)
index 0000000..fef5be1
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
+*/
+
+///
+/// @brief     Application configuration Leon header
+///
+
+#ifndef _XLINK_USBLINKPLATFORM_H
+#define _XLINK_USBLINKPLATFORM_H
+#include <stdint.h>
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#define MAX_POOLS_ALLOC 32
+#define PACKET_LENGTH (64*1024)
+//PCIe 
+#define PCIE_MAX_BUFFER_SIZE (255 * 4096)
+#ifdef __PC__
+#define MAX_LINKS 16
+#else
+#define MAX_LINKS 1
+#endif
+
+/*
+heep this struc tduplicate for now. think of a different solution*/
+typedef enum{
+    UsbVSC = 0,
+    UsbCDC,
+    Pcie,
+    Ipc,
+    protocols
+} protocol_t;
+
+int XLinkWrite(void* fd, void* data, int size, unsigned int timeout);
+int XLinkRead(void* fd, void* data, int size, unsigned int timeout);
+int XLinkPlatformConnect(const char* devPathRead,
+                           const char* devPathWrite, void** fd);
+int XLinkPlatformInit(protocol_t protocol, int loglevel);
+
+int XLinkPlatformGetDeviceName(int index,
+                                char* name,
+                                int nameSize);
+int XLinkPlatformGetDeviceNameExtended(int index,
+                                char* name,
+                                int nameSize,
+                                int pid);
+
+int XLinkPlatformBootRemote(const char* deviceName,
+                                                       const char* binaryPath);
+int XLinkPlatformResetRemote(void* fd);
+
+void* allocateData(uint32_t size, uint32_t alignment);
+void deallocateData(void* ptr,uint32_t size, uint32_t alignment);
+
+typedef enum usbLinkPlatformErrorCode {
+    X_LINK_PLATFORM_SUCCESS = 0,
+    X_LINK_PLATFORM_ERROR,
+    X_LINK_PLATFORM_DEVICE_NOT_FOUND,
+    X_LINK_PLATFORM_TIMEOUT
+} usbLinkPlatformErrorCode_t;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+/* end of include file */
index c9e352d..a73d3c5 100644 (file)
@@ -1,21 +1,19 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
-
 ///
 /// @file
 ///
@@ -24,7 +22,7 @@
 #ifndef _XLINKPRIVATEDEFINES_H
 #define _XLINKPRIVATEDEFINES_H
 
-#ifdef _USBLINK_ENABLE_PRIVATE_INCLUDE_
+#ifdef _XLINK_ENABLE_PRIVATE_INCLUDE_
 
 #include <stdint.h>
 #if (defined(_WIN32) || defined(_WIN64))
@@ -32,8 +30,9 @@
 #else
 #include <semaphore.h>
 #endif
+
 #include <XLinkPublicDefines.h>
-#include "UsbLinkPlatform.h"
+#include "XLinkPlatform.h"
 
 #ifdef __cplusplus
 extern "C"
@@ -41,11 +40,7 @@ extern "C"
 #endif
 #define MAX_NAME_LENGTH 16
 
-#ifdef USE_USB_VSC
-#define HEADER_SIZE (64-12 -8)
-#else
 #define HEADER_SIZE (64-12 -8)
-#endif
 
 #define MAXIMUM_SEMAPHORES 32
 #define __CACHE_LINE_SIZE 64
@@ -55,9 +50,9 @@ extern "C"
 typedef int32_t eventId_t;
 
 typedef enum {
-    USB_LINK_NOT_INIT,
-    USB_LINK_UP,
-    USB_LINK_DOWN,
+    XLINK_NOT_INIT,
+    XLINK_UP,
+    XLINK_DOWN,
 }xLinkState_t;
 
 typedef struct{
@@ -86,6 +81,7 @@ typedef struct{
 //events which are coming from remote
 typedef enum
 {
+    /*USB related events*/
     USB_WRITE_REQ,
     USB_READ_REQ,
     USB_READ_REL_REQ,
@@ -94,7 +90,6 @@ typedef enum
     USB_PING_REQ,
     USB_RESET_REQ,
     USB_REQUEST_LAST,
-
     //note that is important to separate request and response
     USB_WRITE_RESP,
     USB_READ_RESP,
@@ -104,8 +99,28 @@ typedef enum
     USB_PING_RESP,
     USB_RESET_RESP,
     USB_RESP_LAST,
-    /*Add PCI-E related events at tail*/
 
+    /*PCI-E related events*/
+    PCIE_WRITE_REQ,
+    PCIE_READ_REQ,
+    PCIE_CREATE_STREAM_REQ,
+    PCIE_CLOSE_STREAM_REQ,
+    //
+    PCIE_WRITE_RESP,
+    PCIE_READ_RESP,
+    PCIE_CREATE_STREAM_RESP,
+    PCIE_CLOSE_STREAM_RESP,
+
+    /*IPC related events*/
+    IPC_WRITE_REQ,
+    IPC_READ_REQ,
+    IPC_CREATE_STREAM_REQ,
+    IPC_CLOSE_STREAM_REQ,
+    //
+    IPC_WRITE_RESP,
+    IPC_READ_RESP,
+    IPC_CREATE_STREAM_RESP,
+    IPC_CLOSE_STREAM_RESP,
 } xLinkEventType_t;
 
 typedef enum
@@ -151,7 +166,7 @@ typedef struct xLinkEvent_t {
 }
 #endif
 
-#endif  /*_USBLINK_ENABLE_PRIVATE_INCLUDE_ end*/
+#endif  /*_XLINK_ENABLE_PRIVATE_INCLUDE_ end*/
 #endif
 
 /* end of include file */
index 19ab13d..5e691b0 100644 (file)
@@ -1,21 +1,19 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
-
 ///
 /// @file
 ///
@@ -29,7 +27,7 @@ extern "C"
 {
 #endif
 
-#define USB_LINK_MAX_STREAMS 32
+#define XLINK_MAX_STREAMS 8
 #define USB_LINK_MAX_PACKETS_PER_STREAM 64
 
 typedef enum{
@@ -43,6 +41,14 @@ typedef enum{
     X_LINK_ERROR
 } XLinkError_t;
 
+typedef enum{
+    USB_VSC = 0,
+    USB_CDC,
+    PCIE,
+    IPC,
+    NMB_OF_PROTOCOLS
+} XLinkProtocol_t;
+
 #define USB_LINK_INVALID_FD  (-314)
 
 #define INVALID_STREAM_ID 0xDEADDEAD
@@ -73,6 +79,7 @@ typedef struct XLinkGlobalHandler_t
 {
     int loglevel;
     int profEnable;
+    int protocol;
     XLinkProf_t profilingData;
 } XLinkGlobalHandler_t;
 
index d6d5a69..abc1f61 100644 (file)
@@ -1,24 +1,22 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 ///
 /// @file
-///
 /// @brief     Application configuration Leon header
 ///
 
index f15cefd..8e46f04 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2017 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 #include <XLink.h>
index b2ae231..70d4dee 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2017 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 /*
index 77db60b..eb87287 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2017 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 /*
index a7e05a1..57c378e 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2017 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 ///
diff --git a/api/src/get_mvcmd.sh b/api/src/get_mvcmd.sh
new file mode 100755 (executable)
index 0000000..fc3ef61
--- /dev/null
@@ -0,0 +1,127 @@
+#! /bin/bash
+#
+# Attempt to download tar file to get firmware.
+# If download fails, restores saved firmware if the NCSDK installed version in /opt/movidius matches NCSDK version of this distribution.
+# If download fails and versions mismatch, then existing firmware isn't restored.
+#
+
+# read in functions shared with installer 
+if [ -f ../../install-utilities.sh ] ; then
+    source ../../install-utilities.sh
+    # function initialize_constants() from install-utilities.sh
+    initialize_constants
+else
+    echo "Warning cannot find file install-utilities.sh.  Will exit."
+    exit 0
+fi
+
+
+mvcmd_dir=./mvnc
+mvcmd_old_dir=./mvnc.old
+
+VERSION_FILE="../../version.txt"
+if [ ! -f ${VERSION_FILE} ] ; then
+    # see if local copy of version.txt
+    if [ -f ./version.txt ] ; then
+        VERSION_FILE="./version.txt"
+    else
+        echo -e "${RED}Error cannot find version file version.txt."
+        echo -e "Error on line $LINENO.  Will exit ${NC}."
+        exit 1
+    fi
+fi
+NCSDK_API_VERSION=$(cat ${VERSION_FILE})
+download_filename="NCSDK-${NCSDK_API_VERSION}.tar.gz"
+
+
+function restore_old_fw()
+{
+    # remove the tar file if downloaded
+    [ -f ./${download_filename} ] && rm -rf ./${download_filename}
+
+    # Require old FW to exist
+    if [ ! -d ${mvcmd_old_dir} ] ; then
+        echo "Error restoring old firmware - directory ${mvcmd_old_dir} doesn't exist.  Will exit"
+        exit 1
+    fi
+    
+    # Remove FW directory if it exists
+    [ -d ${mvcmd_dir} ] && rm -rf ${mvcmd_dir}
+
+    # check version of installed NCSDK vs. version of API
+    NCSDK_installed_version_file="/opt/movidius/version.txt"
+    if [ -f ${NCSDK_installed_version_file} ] ; then
+        NCSDK_INSTALLED_VERSION=$(cat ${NCSDK_installed_version_file} )
+
+        # compare installed version with API
+        if [ "${NCSDK_API_VERSION}" = "${NCSDK_INSTALLED_VERSION}" ] ; then
+            mv -f ${mvcmd_old_dir} ${mvcmd_dir}
+            echo "Warning: Restored old firmware"
+        else
+            echo "Error: Old firmware version=${NCSDK_API_VERSION} doesn't match installed NCSDK version ${NCSDK_INSTALLED_VERSION}."
+            echo "       Not restoring old firmware directory, ${mvcmd_old_dir}.  Will exit"
+            exit 1
+        fi
+        
+    else
+        echo "Warning: Cannot find NCSDK installed version file ${NCSDK_installed_version_file}."
+        mv -f ${mvcmd_old_dir} ${mvcmd_dir}
+        echo "Warning: Restored old firmware and exiting"
+    fi
+
+    exit 0
+}
+
+
+# If exists, rename existing FW 
+[ -d ${mvcmd_old_dir} ] && rm -rf ${mvcmd_old_dir}
+[ -d ${mvcmd_dir} ] && mv -f ${mvcmd_dir} ${mvcmd_old_dir}
+
+
+# download file if not already available
+if [ -f ../../${download_filename} ] ; then
+    [ -f ${download_filename} ] && rm -f ${download_filename}
+    ln -s ../../${download_filename} .
+else
+    # download, ncsdk_download_link set in install-utilities.sh function initialize_constants()
+    wget -q --no-cache -O ${download_filename} ${ncsdk_download_link}
+    if [ $? -ne 0 ]; then
+        echo "Error downloading $ncsdk_download_link.  Will try to restore existing firmware"
+        restore_old_fw
+    fi
+fi
+
+# ncsdk_pkg is the filename without the .tar.gz extension
+ncsdk_pkg=${download_filename%%.tar.gz}
+
+# create mvnc directory 
+mkdir -p ${mvcmd_dir}
+
+# search for FW in tarball
+ARCH=$(uname -m)
+tar -tf ${download_filename} | grep -q "ncsdk-${ARCH}/fw/$"
+if [ $? -ne 0 ] ; then
+    echo "Error firmware, ncsdk-${ARCH}/fw/, not found in tar file ${download_filename}.  Will try to restore existing firmware"
+    restore_old_fw
+fi
+
+
+tar -xf ${download_filename} --strip-components=3 -C ${mvcmd_dir} NCSDK-${NCSDK_API_VERSION}/ncsdk-${ARCH}/fw/
+if [ $? -ne 0 ]; then
+   echo "Error extracting tar file ${download_filename}.  Will try to restore existing firmware"
+   restore_old_fw
+fi
+
+# check for FW
+ls mvnc/*.mvcmd >& /dev/null
+if [ $? -eq 0 ]; then
+    echo "NCSDK FW successfully installed"
+    # remove old FW dir if it exists
+    [ -d ${mvcmd_old_dir} ] && rm -rf ${mvcmd_old_dir}
+else
+    echo "ERROR NCSDK FW not found after downloading.  Will try to restore existing firmware"
+    restore_old_fw
+fi
+
+# remove the tar file
+rm -rf ${download_filename}
index 290e98c..336a989 100644 (file)
@@ -1,19 +1,18 @@
 /*
-* Copyright 2018 Intel Corporation.
-* The source code, information and material ("Material") contained herein is
-* owned by Intel Corporation or its suppliers or licensors, and title to such
-* Material remains with Intel Corporation or its suppliers or licensors.
-* The Material contains proprietary information of Intel or its suppliers and
-* licensors. The Material is protected by worldwide copyright laws and treaty
-* provisions.
-* No part of the Material may be used, copied, reproduced, modified, published,
-* uploaded, posted, transmitted, distributed or disclosed in any way without
-* Intel's prior express written permission. No license under any patent,
-* copyright or other intellectual property rights in the Material is granted to
-* or conferred upon you, either expressly, by implication, inducement, estoppel
-* or otherwise.
-* Any license under such intellectual property rights must be express and
-* approved by Intel in writing.
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
 */
 
 #define _GNU_SOURCE
@@ -293,11 +292,12 @@ static void initialize()
         initialize_loglevel();
 
     initialized = 1;
+    ghandler.protocol = 0;
     int sc = XLinkInitialize(&ghandler);    //need to be called once
     if (sc != X_LINK_SUCCESS) {
         mvLog(MVLOG_ERROR, "Initialization failed\n");
     }
-#ifndef XLINK_NO_BOOT
+#ifndef XLINK_NO_RESET
     resetAll();
 #endif
 }
@@ -320,7 +320,16 @@ ncStatus_t ncDeviceCreate(int index, struct ncDeviceHandle_t **deviceHandle)
     if (!initialized)
         initialize();
 
+#if (defined(_WIN32) || defined(_WIN64))
+    index -= deviceGetNumberOfDevices();
+    if (index < 0) {
+        mvLog(MVLOG_ERROR, "Invalid create index");
+        return NC_INVALID_PARAMETERS;
+    }
+    XLinkError_t rc = XLinkGetDeviceNameExtended(index, name, NC_MAX_NAME_SIZE, -1); //pid== -1 is an indicator to let lower usb layer know how to exclude vsc devices
+#else
     XLinkError_t rc = XLinkGetDeviceName(index, name, NC_MAX_NAME_SIZE);
+#endif
     pthread_mutex_unlock(&globalMutex);
 
     if (rc == X_LINK_SUCCESS) {
@@ -445,6 +454,19 @@ static ncStatus_t deviceGetDeviceMemory(struct _devicePrivate_t *d,
     return NC_OK;
 }
 
+static int deviceGetNumberOfDevices()
+{
+    int num = 0;
+
+    struct _devicePrivate_t *d = devices;
+    while (d) {
+        num++;
+        d = d->next;
+    }
+    return num;
+}
+
+
 static int isDeviceOpened(const char *name)
 {
     struct _devicePrivate_t *d = devices;
@@ -506,6 +528,10 @@ ncStatus_t ncDeviceOpen(struct ncDeviceHandle_t * deviceHandle)
     else
         mvLog(MVLOG_INFO, "%s() XLinkBootRemote returned success %d\n", __func__, rc);
 
+#if (defined(_WIN32) || defined(_WIN64) )
+       usleep(2000000);
+#endif
+
     double waittm = timeInSeconds() + STATUS_WAIT_TIMEOUT;
     while (timeInSeconds() < waittm && rc == 0) {
         XLinkHandler_t *handler = calloc(1, sizeof(XLinkHandler_t));
@@ -520,6 +546,11 @@ ncStatus_t ncDeviceOpen(struct ncDeviceHandle_t * deviceHandle)
                 rc = XLinkGetDeviceName(count, name2, NC_MAX_NAME_SIZE);
                 if (rc != X_LINK_SUCCESS)
                     break;
+                if (isDeviceOpened(name2) == 0)
+                {
+                    count++;
+                    continue;
+                }
                 handler->devicePath = (char *) name2;
                 rc = XLinkConnect(handler);
                 if (isDeviceOpened(name2) < 0 && rc == X_LINK_SUCCESS) {
@@ -551,7 +582,7 @@ ncStatus_t ncDeviceOpen(struct ncDeviceHandle_t * deviceHandle)
         mvLog(MVLOG_INFO, "Booted %s -> %s\n",
               d->dev_addr, d->dev_file ? d->dev_file : "VSC");
         pthread_mutex_unlock(&globalMutex);
-        sleep(1);   //Allow device to initialize the XLink
+        usleep(1000000);   //Allow device to initialize the XLink
         streamId_t streamId = XLinkOpenStream(d->usb_link->linkId, "deviceMonitor",
                                                 CONFIG_STREAM_SIZE);
         if (streamId == INVALID_STREAM_ID) {
@@ -559,8 +590,10 @@ ncStatus_t ncDeviceOpen(struct ncDeviceHandle_t * deviceHandle)
             return NC_ERROR;
         }
         d->device_mon_stream_id = streamId;
-        getDevAttributes(d);
-
+        if (getDevAttributes(d)){
+            mvLog(MVLOG_WARN, "getDevAttributes failed!\n");
+            return NC_ERROR;
+        }
 
         streamId = XLinkOpenStream(d->usb_link->linkId, "graphMonitor",
                                     BLOB_STREAM_SIZE);
@@ -785,9 +818,12 @@ ncStatus_t ncDeviceClose(struct ncDeviceHandle_t * deviceHandle)
         XLinkCloseStream(d->graph_monitor_stream_id);
     d->device_mon_stream_id = INVALID_LINK_ID;
     d->graph_monitor_stream_id = INVALID_LINK_ID;
-
+#ifndef XLINK_NO_RESET
     // Reset
     XLinkResetRemote(d->usb_link->linkId);
+#else
+    XLinkDisconnect(d->usb_link->linkId);
+#endif
 
 //  usblink_resetmyriad(d->usb_link);
 //  usblink_close(d->usb_link);
@@ -932,13 +968,9 @@ ncStatus_t ncGraphAllocate(struct ncDeviceHandle_t * deviceHandle,
     static int graphIdCount = 0;
     struct _graphPrivate_t *g = graphHandle->private_data;
 
-    struct _devicePrivate_t *d = devices;
-    if (graphBufferLength > d->dev_attr.max_memory) {
-        mvLog(MVLOG_ERROR, "The graph file is bigger than the device memory");
-        return NC_OUT_OF_MEMORY;
-    }
-
     pthread_mutex_lock(&globalMutex);
+
+    struct _devicePrivate_t *d = devices;
     while (d) {
         if (d == deviceHandle->private_data)
             break;
@@ -952,6 +984,11 @@ ncStatus_t ncGraphAllocate(struct ncDeviceHandle_t * deviceHandle,
     }
     pthread_mutex_unlock(&globalMutex);
 
+    if (graphBufferLength > d->dev_attr.max_memory) {
+        mvLog(MVLOG_ERROR, "The graph file is bigger than the device memory");
+        return NC_OUT_OF_MEMORY;
+    }
+
     g->id = graphIdCount++;
     streamId_t streamId;
 
@@ -2694,6 +2731,10 @@ ncStatus_t ncFifoReadElem(struct ncFifoHandle_t * fifoHandle, void *outputData,
         }
         XLinkReleaseData(handle->streamId);
     }
+    else{
+        mvLog(MVLOG_ERROR, "Failed to read fifo element\n");
+        return NC_ERROR;
+    }
 
     //As user should see an API read to be the same as Graph read, we need to wirte the element in 2 queues.
     //if we read it here, we will need to remove the element on the device side
index 2e86a85..06e618d 100644 (file)
@@ -1 +1 @@
-2.05.00.02
+2.08.01.02
index 619ffb8..b8c8408 100644 (file)
 
 <p>These instructions can be done in an Ubuntu <a href="vm_config.html">virtual machine</a>.</p>
 
-<h2 id="create-a-docker-container-for-the-ncsdk">Create a Docker container for the NCSDK</h2>
+<h2 id="non-privileged-docker-containers">Non-privileged Docker Containers</h2>
+<p>Versions of the NCSDK prior to 2.08 required that the <em>docker run</em> command was issued with the –privileged flag.  This is due to the way the NCS device boots and loads its firmware.
+If you are OK with running your docker container with the –privileged flag you can skip this section and follow the instructions in the <em>Privileged Docker Containers</em> section below.
+If you want to run as docker in a non-privileged container then follow the instructions in this section.</p>
+
+<p>There are a few concepts to be aware of when using NCS devices in a non-privileged docker container.  In this mode the NCAPI libraries within the docker container must be rebuilt with NO_BOOT=yes NO_RESET=yes flags to prevent the API from rebooting/resetting the NCS devices.  The provide docker_cmd.sh script takes care of this for you.   Also, since the API isn’t booting the devices and loading the firmware this must be done prior to running an application that uses the devices and prior to starting the docker container.  There is a seperate program provided that does this called ncs_boot_devices.
+When starting the docker container the USB device name must be passed to the container with the –device flag.  The device name is not static, it changes over time so the docker_cmd.sh script also handles this.</p>
+
+<p>To make it easier to navigate the concepts above the following instructions can be followed.</p>
+
+<h3 id="1-create-a-docker-image-for-the-ncsdk-to-run-in-non-privileged-mode">1. Create a Docker Image for the NCSDK to run in Non-privileged Mode</h3>
+<p>The provided docker file Dockerfile_NoPreviligeAccess will be used create a docker image named ‘ncsdk’ when you follow the commands below.
+You must have already cloned the ncsdk repository and should be in the top level directory named ncsdk.  Note if you want to use a specific branch of the repository be sure to do git checkout for the desired branch.
+After these commands are successfully executed, the docker image will contain the ncsdk and the NCAPI will have been compiled with the appropriate flags (NO_BOOT=yes and NO_RESET=yes.) within the image.</p>
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">cd</span> &lt;NCSDK installation directory&gt;
+<span class="nv">$ </span>docker build <span class="nt">-t</span> ncsdk <span class="nt">-f</span> ./extras/docker/Dockerfile_NoPreviligeAccess <span class="nb">.</span>
+</code></pre></div></div>
+
+<h3 id="2-prepare-ncs-devices-for-use-within-the-non-privileged-container">2. Prepare NCS Devices for Use Within the Non-privileged Container</h3>
+<p>Run the following commands to build and run the ncs_boot_devices program which loads the device firmware.</p>
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$cd</span> &lt;NCSDK installation path&gt;/extras/docker/ncs_boot_devices
 
-<p>We have provided a Dockerfile to build an Ubuntu-based Docker image that has the NCSDK installed.</p>
+<span class="nv">$ </span><span class="c">#The path to api src directory is typically "../../../api/src"</span>
+<span class="nv">$ </span><span class="nb">export </span><span class="nv">MVNC_API_PATH</span><span class="o">=</span>&lt;path to api src <span class="o">&gt;</span>
 
-<h4 id="1-build-the-docker-image">1. Build the Docker image</h4>
+<span class="nv">$ </span>make ncs_boot_devices
 
-<p>This command will create an image named ‘ncsdk’.</p>
+<span class="nv">$ </span><span class="c">#Make sure all NCS devices are plugged into the host system at this point</span>
+<span class="nv">$ </span><span class="c">#Run the program to boot the devices and load the firmware</span>
+<span class="nv">$ </span>make run
+</code></pre></div></div>
 
-<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker build <span class="nt">-t</span> ncsdk <span class="nt">-f</span> ./extras/docker/Dockerfile https://github.com/movidius/ncsdk.git#ncsdk2
+<h3 id="3-run-the-non-privileged-docker-container">3. Run the Non-privileged Docker Container.</h3>
+<p>The provided docker_cmd.sh script will run the docker container for you with appropriate –device parameters.</p>
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="c">#Now the devices in the system have been booted with correct firmware.</span>
+<span class="nv">$ </span><span class="c">#Start the docker container with correct --device parameters</span>
+<span class="nv">$ </span><span class="nb">cd</span> &lt;NCSDK installation path&gt;/extras/docker
+<span class="nv">$ </span>./docker_cmd.sh
 </code></pre></div></div>
 
-<p>This may take some time as the NCSDK is installed and dependencies are built.</p>
+<h2 id="privileged-docker-containers">Privileged Docker Containers</h2>
+<p>The simplest way to use the NCS within a docker container is to do it from a container thats running with the –privileged flag.  This is not always desirable however, so if you would rather run in a non-privileged container see the <em>Non-privileged Docker Containers</em> section above.</p>
+
+<h3 id="1-create-a-docker-image-for-the-ncsdk-to-run-in-privileged-mode">1. Create a Docker Image for the NCSDK to Run in Privileged Mode</h3>
 
-<p>If you have already cloned the ncsdk repo, you can instead execute this build command from within the ncsdk directory in the ncsdk2 branch:</p>
+<p>We have provided a Dockerfile to build an Ubuntu-based Docker image that has the NCSDK installed.  This command will create an image named ‘ncsdk’.
+You must have already cloned the ncsdk repository and should be in the top level directory named ncsdk.  Note if you want to use a specific branch of the repository be sure to do git checkout for the desired branch.</p>
 
-<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker build <span class="nt">-t</span> ncsdk <span class="nt">-f</span> ./extras/docker/Dockerfile <span class="nb">.</span>
+<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">cd</span> &lt;NCSDK installation directory&gt;
+<span class="nv">$ </span>docker build <span class="nt">-t</span> ncsdk <span class="nt">-f</span> ./extras/docker/Dockerfile <span class="nb">.</span>
 </code></pre></div></div>
 
-<h4 id="2-create-and-run-a-docker-container-from-the-built-image">2. Create and run a Docker container from the built image</h4>
+<h3 id="2-create-and-run-a-privileged-docker-container-from-the-built-image">2. Create and Run a Privileged Docker container from the Built Image</h3>
 
 <p>This command will create a container named ‘ncsdk’.</p>
 
 <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>docker run <span class="nt">--net</span><span class="o">=</span>host <span class="nt">--privileged</span> <span class="nt">-v</span> /dev:/dev <span class="nt">--name</span> ncsdk <span class="nt">-i</span> <span class="nt">-t</span> ncsdk /bin/bash
 </code></pre></div></div>
 
-<p>The elevated permissions are necessary for the USB access required by the neural compute device. Additional <code class="highlighter-rouge">run</code> options can be seen <a href="https://docs.docker.com/engine/reference/run/">here</a>. See the instructions above if you need to configure your Docker container to run behind a proxy.</p>
+<p>The elevated permissions required via –privileged are necessary for the USB access required by the neural compute device unless following the non-privileged instructions above.</p>
+
+<h2 id="use-your-ncsdk-container">Use your NCSDK container</h2>
+
+<h3 id="starting-the-container">Starting the container</h3>
+<p>The Docker <code class="highlighter-rouge">run</code> command creates a new container instance each time that is used. If you want to use your existing container, use the <code class="highlighter-rouge">start</code> command.
+<em>(Note: The container is named ‘ncsdk’ when following both the privileged and non-privileged instructions above.)</em></p>
 
-<h4 id="3-build-examples-optional">3. Build examples (optional)</h4>
+<ul>
+  <li>
+    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker start <span class="nt">-a</span> <span class="nt">-i</span> ncsdk
+</code></pre></div>    </div>
+  </li>
+</ul>
+
+<h3 id="build-ncsdk-examples-optional">Build NCSDK examples (optional)</h3>
 
 <p>You must have a neural compute device connected to a USB port in your host system when running this command. This command is executed inside of your Docker container.</p>
 
 <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>make examples
 </code></pre></div></div>
 
-<h4 id="4-exit-the-container">4. Exit the container</h4>
+<h3 id="exit-the-container">Exit the container</h3>
 
 <p>This command is executed inside of your Docker container.</p>
 
 <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">exit</span>
 </code></pre></div></div>
 
-<h2 id="use-your-ncsdk-container">Use your NCSDK container</h2>
-
-<h2 id="starting-the-container">Starting the container</h2>
-<p>The Docker <code class="highlighter-rouge">run</code> command creates a new container instance each time that is used. If you want to use your existing container, use the <code class="highlighter-rouge">start</code> command.
-<em>(Note: We named the container ‘ncsdk’ in the run command above.)</em></p>
-
-<ul>
-  <li>
-    <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker start <span class="nt">-a</span> <span class="nt">-i</span> ncsdk
-</code></pre></div>    </div>
-  </li>
-</ul>
-
-<h2 id="other-useful-docker-commands">Other useful Docker commands</h2>
+<h3 id="other-useful-docker-commands">Other useful Docker commands</h3>
 
 <p>These commands are executed from your host terminal, not from inside the Docker container.</p>
 
 <div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>docker commit CONTAINER_ID <span class="o">[</span>REPOSITORY_NAME[:TAG]]
 </code></pre></div></div>
 
+<p>Additional <code class="highlighter-rouge">run</code> options can be seen <a href="https://docs.docker.com/engine/reference/run/">here</a>. See the instructions above if you need to configure your Docker container to run behind a proxy.</p>
+
         </div>
     <!-- /.row -->
 </div>
index 9169874..1c42e65 100755 (executable)
Binary files a/docs/images/favicon.ico and b/docs/images/favicon.ico differ
index 70a66e5..0813c0a 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 66c58c9..0671278 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index e4550e8..5bd2aeb 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 5d06784..54181e3 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index c72b412..cf81631 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 280c214..c2705c6 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 195589f..244e41a 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 33f175d..3fbc7bd 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 8c490aa..1b20fdf 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index e73debc..937f24f 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index d6c9d50..86a6ae5 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li class="active"><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 36fe837..89cf5a1 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li class="active"><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 150ee96..b556afa 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 50b0203..3c650f1 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li class="active"><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index c8f265b..f67a3a9 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li class="active"><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 649b614..f326725 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 0bdfa79..bf843de 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index bcba571..69f1d13 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li class="active"><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index ffbc72b..eedc403 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li class="active"><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 3fb3126..f44b826 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li class="active"><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index f6b58f7..ec8b3e8 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index a4c143f..91d93b6 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index dda5f5b..014adf0 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li class="active"><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 52be55f..d922608 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 2519baa..c311d65 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 35256d6..58e232b 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 9e590a0..007a27a 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 96c1c2e..de33e44 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index e680aee..09dd16d 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 2a1622e..a2598b5 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 70b6cab..139eed6 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 6f9e791..852f32a 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index d17efd5..52b98eb 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 74c3005..281f2c4 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index fdfa1f9..e11b45a 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 19293f4..2f8e832 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index a1e2092..f3901f0 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index cdbb2d9..9ec9bd7 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 5d45033..2817799 100755 (executable)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index ffca7db..fb17005 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 519f4b4..42f48de 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 53a1cd8..be90bf0 100644 (file)
         <a href="#">Fifo Functions</a>
         <ul>
             
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoAllocate.html">ncFifoAllocate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoCreate.html">ncFifoCreate()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoDestroy.html">ncFifoDestroy()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoGetOption.html">Fifo.ncFifoGetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoReadElem.html">ncFifoReadElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoRemoveElem.html">ncFifoRemoveElem()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoSetOption.html">ncFifoSetOption()</a></li>
+            
+            
+            
+            
+            
+            
+            <li><a href="../../../ncapi/ncapi2/c_api/ncFifoWriteElem.html">ncFifoWriteElem()</a></li>
+            
+            
+            
+            
         </ul>
     </li>
     
index 381290e..21fb437 100644 (file)
       <td>RO_WRITE_FILL_LEVEL</td>
       <td>int</td>
       <td>Unbounded positive int</td>
-      <td>The number of tensors (Fifo elements0 in the queue for a writable <a href="Fifo.html">Fifo</a>.</td>
+      <td>The number of tensors (Fifo elements) in the queue for a writable <a href="Fifo.html">Fifo</a>.</td>
     </tr>
     <tr>
       <td>RO_GRAPH_TENSOR_DESCRIPTOR</td>
index 6490771..73ac976 100644 (file)
         <div class="col-md-9" id="tg-sb-content">
             <p>============================================================</p>
 <h1 id="movidius-neural-compute-sdk-release-notes">Movidius Neural Compute SDK Release Notes</h1>
-<h1 id="v20500-2018-06-07">V2.05.00 2018-06-07</h1>
+<h1 id="v20801-2018-10-04">V2.08.01 2018-10-04</h1>
 <p>============================================================</p>
 
+<p>This release has been refactored and is now licensed under Apache 2.0 license.</p>
+
 <p>As of V2.05.00, SDK has been refactored and contains many new features and structural changes. It is recommended you read the documentation to familiarize with the new features and contents.</p>
 
 <h2 id="sdk-notes">SDK Notes:</h2>
 
 <h3 id="new-features">New features:</h3>
 <ol>
-  <li>Tensorflow 1.7 supported.  Tensorflow 1.7 is automatically installed on Ubuntu.</li>
+  <li>Tensorflow 1.09 supported.  Tensorflow 1.09 is automatically installed on Ubuntu.</li>
+  <li>The compiler has been refactored for best performance however some networks may still see slight performance degradation.</li>
 </ol>
 
 <h4 id="networks">Networks:</h4>
 <ol>
-  <li>No change</li>
+  <li>No significant changes.</li>
 </ol>
 
 <h4 id="layers">Layers:</h4>
   <li>VGG 16 (Configuration D)</li>
   <li>Resnet 18</li>
   <li>Resnet 50</li>
+  <li>Mobilenet v1</li>
   <li>SSD Mobilenet v1</li>
 </ol>
 
-<h3 id="tensorflow-r16">Tensorflow r1.6</h3>
+<h3 id="tensorflow-r109">Tensorflow r1.09</h3>
 <ol>
   <li>inception-v1</li>
   <li>inception-v2</li>
     </ul>
   </li>
   <li>TinyYolo v2 via Darkflow tranformation</li>
+  <li>facenet based on inception-resnet-v1</li>
 </ol>
 
 <h2 id="firmware-features">Firmware Features:</h2>
 <ol>
   <li>Convolutions
     <ul>
-      <li>NxN Convolution with Stride S.</li>
-      <li>The following cases have been extensively tested: 1x1s1,3x3s1,5x5s1,7x7s1, 7x7s2, 7x7s4</li>
+      <li>The following convolution cases have been extensively tested (for stride s): 1x1s1, 3x3s1, 5x5s1, 7x7s1, 7x7s2, 7x7s4, 1x3, 3x1, 1x7, 7x1</li>
       <li>Group convolution</li>
       <li>Depth Convolution</li>
       <li>Dilated convolution</li>
   <li>Max Pooling Radix NxM with Stride S</li>
   <li>Average Pooling: Radix NxM with Stride S, Global average pooling</li>
   <li>Local Response Normalization</li>
-  <li>Relu, Relu-X, Prelu (see erattum #10)</li>
+  <li>Relu, Relu-X, Prelu (see erratum #09)</li>
   <li>Softmax</li>
   <li>Sigmoid</li>
-  <li>Tanh (see erratum #10)</li>
+  <li>Tanh (see erratum #09)</li>
   <li>Deconvolution</li>
   <li>Slice</li>
   <li>Scale</li>
 
 <h2 id="bug-fixes">Bug Fixes:</h2>
 <ol>
-  <li>Fixed: Facenet and other network regression due to TensorFlow 1.7 changes.</li>
+  <li>Fixed: Various profiler issues.</li>
 </ol>
 
 <h2 id="errata">Errata:</h2>
   <li>Depth-wise convolution may not be supported if channel multiplier &gt; 1.</li>
   <li>If working behind proxy, proper proxy settings must be applied for the installer to succeed.</li>
   <li>Although improved, the installer is known to take a long time on Raspberry Pi. Date/time must be correct for SDK installation to succeed on Raspberry Pi.</li>
-  <li>Default system virtual memory swap file size is too small to compile AlexNet, and VGG networks on Raspberry Pi.</li>
-  <li>Raspberry Pi users will need to upgrade to Raspbian Stretch for releases after 1.09.</li>
+  <li>The Docker Non-privileged mode of operation as described in the documentation has an issue with multiple NCS devices.</li>
+  <li>Inception V1 obtained values are invalid for mvNCCheck.</li>
   <li>Convolution may fail to find a solution for very large inputs.</li>
   <li>Depth-wise convolution is tested for 3x3 kernels.</li>
-  <li>A TanH layer’s “top” &amp; “bottom” blobs must have different names.  This is different from a ReLU layer, whose “top” &amp; “bottom” should be named the same as its previous layer.</li>
-  <li>On upgrade from previous versions of SDK, the installer will detect if openCV 3.3.0 was installed, for example from http://github.com/movidius/ncappzoo/apps/stream_ty_gn/install-opencv-from_source.sh.  For this release, the installer will prompt to uninstall this specific version of openCV. This is required for ssd-caffe to run correctly.  After 2.05 installation is complete, openCV 3.3.0 can be re-installed and the ssd-caffe will continue to function.</li>
-  <li>On upgrade from previous versions of SDK, the installer will detect if openCV 3.3.0 was installed, for example from http://github.com/movidius/ncappzoo/apps/stream_ty_gn/install-opencv-from_source.sh.  For this release, the installer will prompt to uninstall this specific version of openCV. This is required for ssd-caffe to run correctly.  After 2.05 installation is complete, openCV 3.3.0 can be re-installed and the ssd-caffe will continue to function.</li>
-  <li>The MTCNN network in the app zoo is showing unexpected behavior for this release, and is being investigated.  To use MTCNN, please use version 1.12.00 of SDK.</li>
+  <li>A TanH layer’s “top” &amp; “bottom” blobs must have different names.  This is different from a ReLU layer, whose “top” &amp; “bottom” should be named the same as its previous layer.</li>
+  <li>On upgrade from previous versions of SDK, the installer will detect if openCV 3.3.0 was installed, for example from http://github.com/movidius/ncappzoo/apps/stream_ty_gn/install-opencv-from_source.sh.  For this release, the installer will prompt to uninstall this specific version of openCV. This is required for ssd-caffe to run correctly.  After installation is complete, openCV 3.3.0 can be re-installed and the ssd-caffe will continue to function.</li>
+  <li>The MTCNN network in the app zoo is showing unexpected behavior for this release, and is being investigated.  To use MTCNN, please use version 1.12.01 of SDK.</li>
   <li>Although mvNCCheck shows per-pixel error for some metrics for mobilenet_v1_224, classification results are not impacted.</li>
   <li>Only Ubuntu 16.04 LTS is supported as a host OS for this release.  Ubuntu 18.04 is being evaluated.</li>
-  <li>The visualization graph created by mvNCProfile may have an erroneous connection through the data layer.</li>
+  <li>Group Deconvolution with “group” parameter != 1 is not supported on the new parser.</li>
+  <li>For this release, use of Myriad devices connected to some specific hubs can fail.  If you encounter errors, please try direct connect to PC port, or try a different hub.</li>
+  <li>Loading multiple graphs into one Myriad device may show stability issues with this release.</li>
 </ol>
 
+
         </div>
     <!-- /.row -->
 </div>
index fcc38d6..042a501 100755 (executable)
   </thead>
   <tbody>
     <tr>
-      <td><a href="% link tools/compile.html %">mvNCCompile</a></td>
+      <td><a href="compile.html">mvNCCompile</a></td>
       <td>Converts a Caffe/TensorFlow* network and associated weights to an internal Intel® Movidius™ compiled format for use with the <a href="% link ncapi/readme.html %">Intel® Movidius™ Neural Compute API</a>.</td>
     </tr>
     <tr>
-      <td><a href="% link tools/profile.html %">mvNCProfile</a></td>
+      <td><a href="profile.html">mvNCProfile</a></td>
       <td>Provides layer-by-layer statistics to evaluate the performance of Caffe/TensorFlow networks on your neural compute device.</td>
     </tr>
     <tr>
-      <td><a href="% link tools/check.html %">mvNCCheck</a></td>
+      <td><a href="check.html">mvNCCheck</a></td>
       <td>Compares the inference results from running the network on your neural compute device vs. Caffe/TensorFlow for network compilation validation.</td>
     </tr>
   </tbody>
index 853d457..5355c13 100644 (file)
@@ -1,18 +1,16 @@
-// Copyright 2018 Intel Corporation.
-// The source code, information and material ("Material") contained herein is  
-// owned by Intel Corporation or its suppliers or licensors, and title to such  
-// Material remains with Intel Corporation or its suppliers or licensors.  
-// The Material contains proprietary information of Intel or its suppliers and  
-// licensors. The Material is protected by worldwide copyright laws and treaty  
-// provisions.  
-// No part of the Material may be used, copied, reproduced, modified, published,  
-// uploaded, posted, transmitted, distributed or disclosed in any way without  
-// Intel's prior express written permission. No license under any patent,  
-// copyright or other intellectual property rights in the Material is granted to  
-// or conferred upon you, either expressly, by implication, inducement, estoppel  
-// or otherwise.  
-// Any license under such intellectual property rights must be express and  
-// approved by Intel in writing. 
+// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+//
+// 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.
 
 
 
index cd4e1e5..e33aa15 100644 (file)
@@ -3,7 +3,7 @@
 
 .PHONY: all
 all:
-       @echo "nothing to make, use 'make run' to run."
+       @echo "nothing to make or download for this example, use 'make run' to run the examples."
 
 .PHONY: run
 run:
index 1dd013c..9a995a7 100644 (file)
@@ -1,20 +1,18 @@
 #!/usr/bin/python3
 #
-# Copyright 2018 Intel Corporation.
-# The source code, information and material ("Material") contained herein is  
-# owned by Intel Corporation or its suppliers or licensors, and title to such  
-# Material remains with Intel Corporation or its suppliers or licensors.  
-# The Material contains proprietary information of Intel or its suppliers and  
-# licensors. The Material is protected by worldwide copyright laws and treaty  
-# provisions.  
-# No part of the Material may be used, copied, reproduced, modified, published,  
-# uploaded, posted, transmitted, distributed or disclosed in any way without  
-# Intel's prior express written permission. No license under any patent,  
-# copyright or other intellectual property rights in the Material is granted to  
-# or conferred upon you, either expressly, by implication, inducement, estoppel  
-# or otherwise.  
-# Any license under such intellectual property rights must be express and  
-# approved by Intel in writing. 
+# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+#
+# 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.
 
 # Python script to open and close a single NCS device
 
index 0758771..b71fba1 100644 (file)
@@ -1,18 +1,16 @@
-// Copyright 2018 Intel Corporation.
-// The source code, information and material ("Material") contained herein is  
-// owned by Intel Corporation or its suppliers or licensors, and title to such  
-// Material remains with Intel Corporation or its suppliers or licensors.  
-// The Material contains proprietary information of Intel or its suppliers and  
-// licensors. The Material is protected by worldwide copyright laws and treaty  
-// provisions.  
-// No part of the Material may be used, copied, reproduced, modified, published,  
-// uploaded, posted, transmitted, distributed or disclosed in any way without  
-// Intel's prior express written permission. No license under any patent,  
-// copyright or other intellectual property rights in the Material is granted to  
-// or conferred upon you, either expressly, by implication, inducement, estoppel  
-// or otherwise.  
-// Any license under such intellectual property rights must be express and  
-// approved by Intel in writing. 
+// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+//
+// 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.
 
 #include <stdio.h>
 #include <stdlib.h>
index a269f2d..4b3097f 100644 (file)
@@ -1,18 +1,16 @@
-// Copyright 2018 Intel Corporation.
-// The source code, information and material ("Material") contained herein is  
-// owned by Intel Corporation or its suppliers or licensors, and title to such  
-// Material remains with Intel Corporation or its suppliers or licensors.  
-// The Material contains proprietary information of Intel or its suppliers and  
-// licensors. The Material is protected by worldwide copyright laws and treaty  
-// provisions.  
-// No part of the Material may be used, copied, reproduced, modified, published,  
-// uploaded, posted, transmitted, distributed or disclosed in any way without  
-// Intel's prior express written permission. No license under any patent,  
-// copyright or other intellectual property rights in the Material is granted to  
-// or conferred upon you, either expressly, by implication, inducement, estoppel  
-// or otherwise.  
-// Any license under such intellectual property rights must be express and  
-// approved by Intel in writing. 
+// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+//
+// 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.
 
 #include <stdio.h>
 #include <stdlib.h>
index d993c95..a824a25 100755 (executable)
@@ -1,20 +1,18 @@
 #! /usr/bin/env python3
 
-# Copyright 2018 Intel Corporation.
-# The source code, information and material ("Material") contained herein is  
-# owned by Intel Corporation or its suppliers or licensors, and title to such  
-# Material remains with Intel Corporation or its suppliers or licensors.  
-# The Material contains proprietary information of Intel or its suppliers and  
-# licensors. The Material is protected by worldwide copyright laws and treaty  
-# provisions.  
-# No part of the Material may be used, copied, reproduced, modified, published,  
-# uploaded, posted, transmitted, distributed or disclosed in any way without  
-# Intel's prior express written permission. No license under any patent,  
-# copyright or other intellectual property rights in the Material is granted to  
-# or conferred upon you, either expressly, by implication, inducement, estoppel  
-# or otherwise.  
-# Any license under such intellectual property rights must be express and  
-# approved by Intel in writing. 
+# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+#
+# 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.
 
 from mvnc import mvncapi as mvnc 
 import sys
index d864450..d0ee32a 100644 (file)
@@ -1,18 +1,16 @@
-// Copyright 2018 Intel Corporation.
-// The source code, information and material ("Material") contained herein is  
-// owned by Intel Corporation or its suppliers or licensors, and title to such  
-// Material remains with Intel Corporation or its suppliers or licensors.  
-// The Material contains proprietary information of Intel or its suppliers and  
-// licensors. The Material is protected by worldwide copyright laws and treaty  
-// provisions.  
-// No part of the Material may be used, copied, reproduced, modified, published,  
-// uploaded, posted, transmitted, distributed or disclosed in any way without  
-// Intel's prior express written permission. No license under any patent,  
-// copyright or other intellectual property rights in the Material is granted to  
-// or conferred upon you, either expressly, by implication, inducement, estoppel  
-// or otherwise.  
-// Any license under such intellectual property rights must be express and  
-// approved by Intel in writing. 
+// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+//
+// 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.
 
 #include <stdio.h>
 #include <stdlib.h>
index 33387ea..cdfe4a1 100755 (executable)
@@ -1,20 +1,18 @@
 #! /usr/bin/env python3
 
-# Copyright 2018 Intel Corporation.
-# The source code, information and material ("Material") contained herein is  
-# owned by Intel Corporation or its suppliers or licensors, and title to such  
-# Material remains with Intel Corporation or its suppliers or licensors.  
-# The Material contains proprietary information of Intel or its suppliers and  
-# licensors. The Material is protected by worldwide copyright laws and treaty  
-# provisions.  
-# No part of the Material may be used, copied, reproduced, modified, published,  
-# uploaded, posted, transmitted, distributed or disclosed in any way without  
-# Intel's prior express written permission. No license under any patent,  
-# copyright or other intellectual property rights in the Material is granted to  
-# or conferred upon you, either expressly, by implication, inducement, estoppel  
-# or otherwise.  
-# Any license under such intellectual property rights must be express and  
-# approved by Intel in writing.
+# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+#
+# 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.
 
 from mvnc import mvncapi as mvnc
 import sys
index a269f2d..4b3097f 100644 (file)
@@ -1,18 +1,16 @@
-// Copyright 2018 Intel Corporation.
-// The source code, information and material ("Material") contained herein is  
-// owned by Intel Corporation or its suppliers or licensors, and title to such  
-// Material remains with Intel Corporation or its suppliers or licensors.  
-// The Material contains proprietary information of Intel or its suppliers and  
-// licensors. The Material is protected by worldwide copyright laws and treaty  
-// provisions.  
-// No part of the Material may be used, copied, reproduced, modified, published,  
-// uploaded, posted, transmitted, distributed or disclosed in any way without  
-// Intel's prior express written permission. No license under any patent,  
-// copyright or other intellectual property rights in the Material is granted to  
-// or conferred upon you, either expressly, by implication, inducement, estoppel  
-// or otherwise.  
-// Any license under such intellectual property rights must be express and  
-// approved by Intel in writing. 
+// Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+//
+// 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.
 
 #include <stdio.h>
 #include <stdlib.h>
index 37ceac6..56de285 100755 (executable)
@@ -1,20 +1,18 @@
 #! /usr/bin/env python3
 
-# Copyright 2018 Intel Corporation.
-# The source code, information and material ("Material") contained herein is  
-# owned by Intel Corporation or its suppliers or licensors, and title to such  
-# Material remains with Intel Corporation or its suppliers or licensors.  
-# The Material contains proprietary information of Intel or its suppliers and  
-# licensors. The Material is protected by worldwide copyright laws and treaty  
-# provisions.  
-# No part of the Material may be used, copied, reproduced, modified, published,  
-# uploaded, posted, transmitted, distributed or disclosed in any way without  
-# Intel's prior express written permission. No license under any patent,  
-# copyright or other intellectual property rights in the Material is granted to  
-# or conferred upon you, either expressly, by implication, inducement, estoppel  
-# or otherwise.  
-# Any license under such intellectual property rights must be express and  
-# approved by Intel in writing.
+# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+#
+# 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.
 
 from mvnc import mvncapi as mvnc
 import sys
index c7be2fb..4f40b41 100644 (file)
@@ -27,7 +27,7 @@ prereqs:
 
 .PHONY: profile
 profile: weights
-       ${NCPROFILE} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
+       ${NCPROFILE} --new-parser -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
 
 .PHONY: browse_profile
 browse_profile: weights profile
@@ -46,11 +46,11 @@ weights:
 
 .PHONY: compile
 compile: weights
-       test -f graph || ${NCCOMPILE} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
+       test -f graph || ${NCCOMPILE} --new-parser -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
 
 .PHONY: check
 check: weights
-       ${NCCHECK} -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -metric top1 -cs 2,1,0
+       ${NCCHECK} --new-parser -s 12 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -metric top1 -cs 2,1,0
 
 .PHONY: run
 run: compile
index a902f73..1c769c1 100755 (executable)
@@ -1,20 +1,18 @@
 #! /usr/bin/env python3
 
-# Copyright 2018 Intel Corporation.
-# The source code, information and material ("Material") contained herein is  
-# owned by Intel Corporation or its suppliers or licensors, and title to such  
-# Material remains with Intel Corporation or its suppliers or licensors.  
-# The Material contains proprietary information of Intel or its suppliers and  
-# licensors. The Material is protected by worldwide copyright laws and treaty  
-# provisions.  
-# No part of the Material may be used, copied, reproduced, modified, published,  
-# uploaded, posted, transmitted, distributed or disclosed in any way without  
-# Intel's prior express written permission. No license under any patent,  
-# copyright or other intellectual property rights in the Material is granted to  
-# or conferred upon you, either expressly, by implication, inducement, estoppel  
-# or otherwise.  
-# Any license under such intellectual property rights must be express and  
-# approved by Intel in writing.
+# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+#
+# 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.
 
 from mvnc import mvncapi as mvnc
 import sys
index 7c6fce0..440a77d 100644 (file)
@@ -27,11 +27,11 @@ prereqs:
 
 .PHONY: profile
 profile: weights
-       ${NCPROFILE} -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
+       ${NCPROFILE} --new-parser -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
 
 .PHONY: browse_profile
 browse_profile: weights
-       ${NCPROFILE} -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
+       ${NCPROFILE} --new-parser -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
        firefox output_report.html &
 
 .PHONY: weights
@@ -42,11 +42,11 @@ weights:
 
 .PHONY: compile
 compile: weights
-       test -f graph || ${NCCOMPILE} -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
+       test -f graph || ${NCCOMPILE} --new-parser -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG}
 
 .PHONY: check
 check: weights
-       -${NCCHECK} -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -metric top1 -cs 0,1,2
+       -${NCCHECK} --new-parser -s 4 ${MODEL_FILENAME} ${INPUT_NODE_FLAG} ${OUTPUT_NODE_FLAG} -i ../../data/images/cat.jpg -metric top1 -cs 0,1,2
 
 .PHONY: run
 run: compile
index 9a10a48..b5ae0b2 100755 (executable)
@@ -1,20 +1,18 @@
 #! /usr/bin/env python3
 
-# Copyright 2018 Intel Corporation.
-# The source code, information and material ("Material") contained herein is  
-# owned by Intel Corporation or its suppliers or licensors, and title to such  
-# Material remains with Intel Corporation or its suppliers or licensors.  
-# The Material contains proprietary information of Intel or its suppliers and  
-# licensors. The Material is protected by worldwide copyright laws and treaty  
-# provisions.  
-# No part of the Material may be used, copied, reproduced, modified, published,  
-# uploaded, posted, transmitted, distributed or disclosed in any way without  
-# Intel's prior express written permission. No license under any patent,  
-# copyright or other intellectual property rights in the Material is granted to  
-# or conferred upon you, either expressly, by implication, inducement, estoppel  
-# or otherwise.  
-# Any license under such intellectual property rights must be express and  
-# approved by Intel in writing.
+# Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+#
+# 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.
 
 from mvnc import mvncapi as mvnc
 import sys
index e65eadf..eabf79a 100644 (file)
@@ -2,6 +2,7 @@ FROM ubuntu:16.04
 
 # Install necessary packages for the installer
 RUN apt-get update && apt-get install -y \
+    lsb-release \
     build-essential \
     sed \
     sudo \
diff --git a/extras/docker/Dockerfile_NoPreviligeAccess b/extras/docker/Dockerfile_NoPreviligeAccess
new file mode 100644 (file)
index 0000000..39c8197
--- /dev/null
@@ -0,0 +1,25 @@
+FROM ubuntu:16.04
+
+# Install necessary packages for the installer
+RUN apt-get update && apt-get install -y \
+    lsb-release \
+    build-essential \
+    sed \
+    sudo \
+    tar \
+    udev \
+    wget \
+    libusb-1.0-0-dev \
+    && apt-get clean
+
+# Copy over the NCSDK
+COPY ./ ncsdk/
+
+# Set the current working directory to the cloned ncsdk directory
+WORKDIR "/ncsdk"
+
+# Run the installer
+RUN make install
+WORKDIR "api/src"
+RUN sudo make clean && sudo make get_mvcmd && sudo make basicinstall NO_BOOT=yes NO_RESET=yes && sudo make pythoninstall
+WORKDIR "../../"
index 7901c34..65df428 100644 (file)
@@ -18,10 +18,9 @@ This creates an image named "ncsdk".
 
 ## Run the container
 
-After the image is built, execute the following command to run the container that we named "ncsdk":
-
-$ docker run --net=host --privileged -v /dev:/dev --name ncsdk -i -t ncsdk /bin/bash
+1. To boot devices with runtime FW compile and run the app ./ncs_boot_devices/
+2. run the command ./docker_cmd.sh 
 
 ## Additional Information
 
-See the full NCSDK documentation for Docker at https://movidius.github.io/ncsdk/ for more information.
\ No newline at end of file
+See the full NCSDK documentation for Docker at https://movidius.github.io/ncsdk/ for more information.
diff --git a/extras/docker/docker_cmd.sh b/extras/docker/docker_cmd.sh
new file mode 100755 (executable)
index 0000000..81bf832
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+all_devices=$(lsusb -d 03e7:f63b  | cut -d" " -f2,4 | cut -d":" -f1 |  sed 's/ /\//' | sed 's/^/\/dev\/bus\/usb\//')
+devices_number=$(lsusb -d 03e7:f63b  | wc -l)
+if [ ${devices_number} -eq 0 ] ; then
+    echo "No devices connected!"
+    exit 0
+fi
+docker_cmd="docker run --net=host"
+for dev in $all_devices
+do
+    docker_cmd="$docker_cmd --device=$dev"
+done
+
+docker_cmd="$docker_cmd  --name ncsdk -i -t ncsdk /bin/bash"
+echo $docker_cmd
+eval $docker_cmd
diff --git a/extras/docker/ncs_boot_devices/Makefile b/extras/docker/ncs_boot_devices/Makefile
new file mode 100644 (file)
index 0000000..7f8a34f
--- /dev/null
@@ -0,0 +1,75 @@
+MVNC_API_PATH=$(realpath ../../../api/src/)
+ifdef $$MVNC_API_PATH
+MVNC_API_PATH := $$MVNC_API_PATH
+endif
+
+VERSION_NUMBER=`cat $(MVNC_API_PATH)/version.txt`
+
+SRCS := ./ncs_boot_devices.c
+SRCS += \
+       $(MVNC_API_PATH)/mvnc_api.c \
+       $(MVNC_API_PATH)/fp16.c
+
+MV_COMMON_BASE=$(realpath $(MVNC_API_PATH)/common)
+XLINK_BASE=$(MV_COMMON_BASE)/components/XLink
+
+XLINK_SRCS=$(XLINK_BASE)/pc/usb_boot.c
+XLINK_SRCS+=$(XLINK_BASE)/shared/XLink.c
+XLINK_SRCS+=$(XLINK_BASE)/shared/XLinkDispatcher.c
+XLINK_SRCS+=$(XLINK_BASE)/pc/XLinkPlatform.c
+
+XLINK_INCLUDES= -I$(XLINK_BASE)/shared \
+                       -I$(XLINK_BASE)/pc \
+                       -I$(MV_COMMON_BASE)/shared/include/
+
+CFLAGS+=-D__PC__ -DUSE_USB_VSC -DXLINK_NO_RESET -DVERSION_NAME="\"$(VERSION_NUMBER)\""
+CFLAGS+=-DDEVICE_SHELL_ENABLED
+CFLAGS+=-DEXCLUDE_HIGHCLASS
+
+LIBS += -lpthread -lusb-1.0 -ldl
+
+INCLUDES := \
+       -I$(MVNC_API_PATH)/ \
+       -I$(MVNC_API_PATH)/../include \
+       -I$(SYSROOT)/usr/include/libusb-1.0 \
+
+INCLUDES+= $(XLINK_INCLUDES)
+CFLAGS+= -O2 -Wall -pthread -fPIC -MMD -MP $(INCLUDES)
+
+SRCS += $(XLINK_SRCS)
+OBJS := $(SRCS:%.c=%.o)
+
+.PHONY: all
+all: ncs_boot_devices
+
+.PHONY:        ncs_boot_devices
+ncs_boot_devices: $(OBJS)
+ifeq ($(MVNC_API_PATH),)
+       echo "Error: MVNC_API_PATH not defined! Please define and rerun!"
+       exit 1
+endif
+       @echo "\nmaking ncs_boot_devices"
+       @$(CC) -o $@ $^  $(CFLAGS) $(LIBS)
+       if [ ! -e  $(MVNC_API_PATH)/mvnc/*.mvcmd ];then \
+               cd $(MVNC_API_PATH); make get_mvcmd; \
+       fi
+       @ln -fs $(MVNC_API_PATH)/mvnc/
+
+.PHONY: run
+run: ncs_boot_devices
+       @echo "\nmaking run"
+       ./ncs_boot_devices;
+
+.PHONY: help
+help:
+       @echo "possible make targets: ";
+       @echo "  make help - shows this message";
+       @echo "  make all - same as ncs_boot_devices";
+       @echo "  make ncs_boot_devices - builds the ncs_boot_devices executable example";
+       @echo "  make run - runs the ncs_boot_devices executable example program";
+       @echo "  make clean - removes all created content and temporary files";
+
+clean:
+       @echo "\nmaking clean";
+       rm $(OBJS)
+       rm -f ncs_boot_devices;
diff --git a/extras/docker/ncs_boot_devices/ncs_boot_devices.c b/extras/docker/ncs_boot_devices/ncs_boot_devices.c
new file mode 100644 (file)
index 0000000..9405b02
--- /dev/null
@@ -0,0 +1,92 @@
+/*
+*
+* Copyright (c) 2017-2018 Intel Corporation. All Rights Reserved
+*
+* 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.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <mvnc.h>
+
+int help()
+{
+    fprintf(stderr, "./ncs_boot_devices [-l <loglevel>] [-n <count>]\n");
+    fprintf(stderr, "                <loglevel> API log level\n");
+    fprintf(stderr, "                <count> is the number of devices to boot, default is all (0). \n");
+    return 0;
+}
+
+int main(int argc, char** argv)
+{
+    struct ncDeviceHandle_t *deviceHandle;
+    int number_of_devices_to_boot = 0;
+    int loglevel = 2;
+    for(int i = 1; i < argc; i++) {
+        if(argv[i][0] == '-') {
+            if (argc <= i+1) {
+                printf("Error: missing argument for option %s\n", argv[i]);
+                return help();
+            }
+            if (argv[i][1] == 'l') {
+                loglevel = atoi(argv[++i]);
+                continue;
+            }
+            else if (argv[i][1] == 'n') {
+                number_of_devices_to_boot  = atoi(argv[++i]);
+                continue;
+            }
+        } 
+        else {
+            printf("Error: unsupported option %s\n", argv[i]);
+            return help();
+        }
+    }
+
+    ncStatus_t retCode = ncGlobalSetOption(NC_RW_LOG_LEVEL, &loglevel, sizeof(loglevel));
+
+    int idx = 0;
+    int successfully_booted = 0;
+    while (!number_of_devices_to_boot || idx < number_of_devices_to_boot) {
+        retCode = ncDeviceCreate(idx,&deviceHandle);
+        if(retCode != NC_OK) {
+            printf("No more NCS devices found.\n");
+            break;
+        }
+
+        retCode = ncDeviceOpen(deviceHandle);
+        if(retCode != NC_OK) {
+            printf("Warning: ncDeviceOpen of device %d failed (ncStatus %d), skipping\n", retCode, idx);
+            idx++;
+            continue;
+        }
+        printf("Hello NCS! Device %d opened normally.\n", idx);
+    
+        retCode = ncDeviceClose(deviceHandle);
+        deviceHandle = NULL;
+        if (retCode != NC_OK) {
+            printf("Error: ncDeviceClose of device %d failed (ncStatus %d), exiting...\n", retCode, idx);
+            printf("    ncStatus value: %d\n", retCode);
+            exit(-1);
+        }
+        idx++;
+        successfully_booted++;
+    }
+    if (successfully_booted) {
+        printf("Successfully Booted %d devices\n", successfully_booted);
+        if (idx < number_of_devices_to_boot)
+            printf("Warning: Number of devices connected (%d) is smaller than requested (%d)\n", idx, number_of_devices_to_boot);
+    }
+    else
+        printf("Error: Failed to boot any devices!\n");
+}
diff --git a/extras/docker/ncs_boot_devices/readme.md b/extras/docker/ncs_boot_devices/readme.md
new file mode 100644 (file)
index 0000000..b3a479f
--- /dev/null
@@ -0,0 +1,33 @@
+# ncs_boot_devices: Loads and boots devices with runtime FW, without resetting them
+
+Sample can be used as a utility to load runtime FW on devices and boot them without resetting them.
+## Prerequisites
+
+This code example requires that the following components are available:
+1. Movidius Neural Compute Stick
+2. Movidius Neural Compute SDK
+3. MVNC_API_PATH environemnt variable is set to the source of the API
+
+
+## Building the Example
+To run the example code do the following :
+1. Open a terminal and change directory to the ncs_boot_devices base directory
+2. Type the following command in the terminal: "make ncs_boot_devices" or "make ncs_boot_devices MVNC_API_PATH=<path_to_api_src>" where <path_to_api_src> is your local copy of the api sources
+
+
+## Running the Example
+To run the example code do the following :
+1. Open a terminal and change directory to the ncs_boot_devices base directory
+2. Make sure MVNC_API_PATH env variable is set to point to the API src directory
+3. Type the following command in the terminal: make run
+
+When the application runs normally and is able to connect to the NCS device the output will be similar to this:
+
+~~~
+Hello NCS! Device 0 opened normally.
+No more NCS devices found.
+Successfully Booted 1 devices
+~~~
+
+
+
index e07acd7..6d8946c 100644 (file)
@@ -45,6 +45,12 @@ function set_error_handling()
 # initialize_constants - initialize constants
 function initialize_constants()
 {
+    # file
+    ncsdk_download_link="https://downloadmirror.intel.com/28191/eng/NCSDK-2.08.01.02.tar.gz"
+
+    # VERBOSE value can be changed by editing ncsdk.config which will be read in function read_ncsdk_config()
+    VERBOSE=no
+
     # avoid conflicts with PYTHONPATH during install
     export PYTHONPATH=""
     
@@ -102,13 +108,16 @@ function read_ncsdk_config()
     INSTALL_TOOLKIT=yes
     PIP_SYSTEM_INSTALL=yes
     USE_VIRTUALENV=no
-    VERBOSE=no
     # check if nproc is available on the system via 'command'
     RC=0
     command -v nproc > /dev/null || RC=$?
     if [ $RC -eq 0 ] ; then
         #  default to using all processors to invoke make with (make -j $MAKE_NJOBS)
         MAKE_NJOBS=$(nproc)
+        # RPi runs make faster with N-1 cores
+        DISTRO="$(lsb_release -i 2>/dev/null | cut -f 2)"
+        OS_DISTRO="${DISTRO:-INVALID}"
+        [ "${OS_DISTRO,,}" = "raspbian" ] && MAKE_NJOBS=$((MAKE_NJOBS-1))
     else
         # Can't find nproc, default to 1 make process. Can change in ncsdk.conf
         MAKE_NJOBS=1
index 675d7f4..28d9457 100755 (executable)
@@ -119,6 +119,9 @@ function init_installer()
     ### get constants (function is in install-utilities.sh) 
     initialize_constants
     
+    ### make sure system has required prerequisites
+    check_prerequisites
+
     ### check if file exist 
     VERSION_FILE=version.txt
     if [ ! -f ${VERSION_FILE} ] ; then
@@ -156,9 +159,6 @@ function init_installer()
         SYS_INSTALL_DIR=/usr
     fi
 
-    ### make sure system has required prerequisites
-    check_prerequisites
-
     if [ "${VERBOSE}" = "yes" ] ; then
         print_ncsdk_config
     fi
@@ -184,11 +184,11 @@ function make_installer_dirs()
 # download_and_copy_files - download tarball and copy to install dir
 function download_and_copy_files()
 {
-    download_filename="NCSDK-${NCSDK_VERSION}.tar.gz"
+download_filename=NCSDK-2.08.01.02.tar.gz
     if [ ! -f ${download_filename} ] ; then
         echo "Downloading ${download_filename}"
-        ncsdk_link="https://downloadmirror.intel.com/27839/eng/NCSDK-2.05.00.02.tar.gz"
-        exec_and_search_errors "wget --no-cache -O ${download_filename} $ncsdk_link"
+        # ncsdk_download_link set in install-utilities.sh function initialize_constants()
+        exec_and_search_errors "wget --no-cache -O ${download_filename} $ncsdk_download_link"
     fi
     # ncsdk_pkg is the filename without the .tar.gz extension
     ncsdk_pkg=${download_filename%%.tar.gz}
@@ -198,7 +198,7 @@ function download_and_copy_files()
     ${SUDO_PREFIX} cp ./uninstall.sh ${INSTALL_DIR}/
     ${SUDO_PREFIX} cp ./install-utilities.sh ${INSTALL_DIR}/
     ${SUDO_PREFIX} cp ./ncsdk.conf ${INSTALL_DIR}/
-
+    
     # save current dir
     FROM_DIR=$PWD
 
@@ -385,7 +385,9 @@ function install_python_dependencies()
     elif [ "${OS_DISTRO,,}" = "raspbian" ] ; then
         # for Raspian, use apt with python3-* if available
         exec_and_search_errors "$SUDO_PREFIX apt-get $APT_QUIET install -y $(cat "$DIR/requirements_apt_raspbian.txt")"
-        exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org Cython graphviz scikit-image"
+        exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org Cython"
+        exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org graphviz"
+        exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org scikit-image"
         exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org --upgrade numpy==1.13.1"
         exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org pygraphviz Enum34>=1.1.6 networkx>=2.1,<=2.1"
         # Install packages for python 2.x, required for NCSDK python API
@@ -402,7 +404,7 @@ function install_python_dependencies()
 #                   sets FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION=2 when TensorFlow isn't installed
 function find_tensorflow()
 {
-    SUPPORTED_TENSORFLOW_VERSION=1.7.0
+    SUPPORTED_TENSORFLOW_VERSION=1.9.0
     RC=0
     $PIP_PREFIX pip3 show $1 1> /dev/null || RC=$?
     if [ $RC -eq 0 ]; then
@@ -428,54 +430,21 @@ function find_tensorflow()
 # install_tensorflow - install supported version of tensorflow on system
 function install_tensorflow()
 {
-    if [ "${OS_DISTRO,,}" = "raspbian" ] && [ "${INSTALL_TENSORFLOW}" = "yes" ]; then
-        echo -e "${YELLOW}NOTE: TensorFlow is not officially supported on Raspbian Stretch."
-        echo -e "      We are installing a specific nightly TensorFlow build from http://ci.tensorflow.org/view/Nightly/job/nightly-pi-python3/"
-        echo -e "      for code development and testing. ${NC}"
-
-        echo "Checking if tensorflow is installed..."
-        # find_tensorflow sets FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION to 0, 1 or 2 depending if correct version installed, incorrect version installed or not installed, respectively
-        find_tensorflow "tensorflow" 
-        tf=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION}
-        INSTALL_TF="no"
-        [ $tf -eq 0 ] && echo "Installed TensorFlow is the correct version, not re-installing"
-        if [ $tf -eq 1 ] ; then
-            exec_and_search_errors "$PIP_PREFIX pip3 uninstall --quiet -y tensorflow"
-            INSTALL_TF="yes"
-        fi
-        [ $tf -eq 2 ] && INSTALL_TF="yes"
-
-        # install TensorFlow if needed
-        if [ "${INSTALL_TF}" = "yes" ] ; then
-            echo "Couldn't find a supported tensorflow version, downloading TensorFlow $SUPPORTED_TENSORFLOW_VERSION"
-            # rename wheel for python 3.5
-            WHEEL_DOWNLOAD=tensorflow-1.7.0-cp34-none-any.whl
-            WHEEL=tensorflow-1.7.0-cp35-none-any.whl
-            [ -f "${WHEEL_DOWNLOAD}" ] && sudo mv -f ${WHEEL_DOWNLOAD} ${WHEEL_DOWNLOAD}.save
-            $SUDO_PREFIX wget https://storage.googleapis.com/download.tensorflow.org/deps/pi/2018_05_21/${WHEEL_DOWNLOAD}
-            [ -f "${WHEEL}" ] && $SUDO_PREFIX mv -f ${WHEEL} ${WHEEL}.save
-            $SUDO_PREFIX mv ${WHEEL_DOWNLOAD} ${WHEEL}
-            echo "Installing TensorFlow"
-            exec_and_search_errors "$PIP_PREFIX pip3 install --quiet ${WHEEL}"
-            echo "Finished installing TensorFlow"
-        fi              
-        
-    elif [ "${OS_DISTRO,,}" = "ubuntu" ] ; then
-        echo "Checking whether tensorflow CPU version is installed..."
-        # find_tensorflow sets FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION to 0, 1 or 2 depending if correct version installed, incorrect version installed or not installed, respectively
-        find_tensorflow "tensorflow" 
-        tf=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION}
-        if [ $tf -ne 0 ]; then
-            echo "Checking whether tensorflow GPU version is installed..."
-            find_tensorflow tensorflow-gpu 
-            tf_gpu=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION}
-        fi      
-        if [[ $tf -ne 0 && $tf_gpu -ne 0 ]]; then
-            echo "Couldn't find a supported tensorflow version, installing tensorflow $SUPPORTED_TENSORFLOW_VERSION"
-            exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org tensorflow==$SUPPORTED_TENSORFLOW_VERSION"
-        else
-            echo "tensorflow already at latest supported version...skipping."
-        fi
+
+    echo "Checking whether tensorflow CPU version is installed..."
+    # find_tensorflow sets FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION to 0, 1 or 2 depending if correct version installed, incorrect version installed or not installed, respectively
+    find_tensorflow "tensorflow" 
+    tf=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION}
+    if [ $tf -ne 0 ]; then
+        echo "Checking whether tensorflow GPU version is installed..."
+        find_tensorflow tensorflow-gpu 
+        tf_gpu=${FIND_TENSORFLOW__FOUND_SUPPORTED_VERSION}
+    fi      
+    if [[ $tf -ne 0 && $tf_gpu -ne 0 ]]; then
+        echo "Couldn't find a supported tensorflow version, installing tensorflow $SUPPORTED_TENSORFLOW_VERSION"
+        exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --trusted-host files.pythonhosted.org --trusted-host www.piwheels.org tensorflow==$SUPPORTED_TENSORFLOW_VERSION"
+    else
+        echo "tensorflow already at latest supported version...skipping."
     fi
 }
 
@@ -715,14 +684,13 @@ function install_api()
     $SUDO_PREFIX cp $SDK_DIR/fw/MvNCAPI-*.mvcmd $SYS_INSTALL_DIR/lib/mvnc/
 
     # Copy C API to destination
-    $SUDO_PREFIX cp $SDK_DIR/api/c/mvnc.h $SYS_INSTALL_DIR/include/mvnc2
+    $SUDO_PREFIX cp $FROM_DIR/api/include/mvnc.h $SYS_INSTALL_DIR/include/mvnc2    
     $SUDO_PREFIX cp $SDK_DIR/api/c/libmvnc.so.0 $SYS_INSTALL_DIR/lib/mvnc/
 
     if [ -f $SDK_DIR/api/c/libmvnc_highclass.so.0 ] ; then
         $SUDO_PREFIX cp $SDK_DIR/api/c/ncHighClass.h $SYS_INSTALL_DIR/include/mvnc2
         $SUDO_PREFIX cp $SDK_DIR/api/c/libmvnc_highclass.so.0 $SYS_INSTALL_DIR/lib/mvnc/
     fi
-    echo "NCS Include files have been installed in $SYS_INSTALL_DIR/include"
 
     check_and_remove_file $SYS_INSTALL_DIR/include/mvnc.h
     check_and_remove_file $SYS_INSTALL_DIR/include/ncHighClass.h
@@ -737,14 +705,16 @@ function install_api()
         $SUDO_PREFIX ln -s $SYS_INSTALL_DIR/include/mvnc2/ncHighClass.h $SYS_INSTALL_DIR/include/ncHighClass.h
         $SUDO_PREFIX ln -s $SYS_INSTALL_DIR/lib/mvnc/libmvnc_highclass.so.0 $SYS_INSTALL_DIR/lib/libmvnc_highclass.so
     fi
-
+    echo "NCS Include files have been installed in $SYS_INSTALL_DIR/include"
+    
     $SUDO_PREFIX ldconfig
 
-    # Copy other collaterals to destination
     $SUDO_PREFIX cp -r $DIR/version.txt $INSTALL_DIR/
     $SUDO_PREFIX cp -r $SDK_DIR/LICENSE $INSTALL_DIR/
 
     # Install python API
+    $SUDO_PREFIX cp ${FROM_DIR}/api/python/mvnc/mvncapi.py $SDK_DIR/api/python/mvnc
+    $SUDO_PREFIX cp ${FROM_DIR}/api/python/mvnc/__init__.py $SDK_DIR/api/python/mvnc
     exec_and_search_errors "$PIP_PREFIX pip3 install $PIP_QUIET --upgrade --force-reinstall $SDK_DIR/api"
     exec_and_search_errors "$PIP_PREFIX pip2 install $PIP_QUIET --upgrade --force-reinstall $SDK_DIR/api"
     echo "NCS Python API has been installed in $INSTALL_DIR, and PYTHONPATH environment variable updated"
index 69a25b2..aa8a174 100644 (file)
@@ -7,7 +7,7 @@ h5py>=2.5.0,<=2.7.0
 lxml>=3.4.4,<=3.8.0
 matplotlib>=1.5.0,<=2.0.2
 numpy>=1.13.0,<=1.13.3
-protobuf>=3.0.0b2,<=3.4.0
+protobuf>3.4.0,<=3.6.1
 python-dateutil>=2.4.2,<=2.6.1
 scikit-image>=0.11.3,<=0.13.0
 scipy>=0.14.1,<=0.19.1
index f68a825..b6b54c7 100644 (file)
@@ -1 +1 @@
-unzip coreutils curl git python3 libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libatlas-base-dev git python3-dev python3-numpy automake cmake make byacc lsb-release python3-scipy libgflags-dev libgoogle-glog-dev liblmdb-dev swig3.0 graphviz libxslt-dev libxml2-dev gfortran python3-yaml python3-nose python-numpy python3-tk python3-pip python-pip tar wget libgraphviz-dev
+unzip coreutils curl git python3 libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler libatlas-base-dev git python3-dev python3-numpy automake cmake make byacc lsb-release python3-scipy libgflags-dev libgoogle-glog-dev liblmdb-dev swig3.0 graphviz libxslt-dev libxml2-dev gfortran python3-yaml python3-nose python-numpy python3-tk python3-pip python-pip tar wget libgraphviz-dev libusb-1.0-0-dev
index 2e86a85..06e618d 100644 (file)
@@ -1 +1 @@
-2.05.00.02
+2.08.01.02