From 00860c04779d63fd820b4e23f0fc0fc9a5a3e23f Mon Sep 17 00:00:00 2001 From: Chris Veigl Date: Fri, 9 Feb 2024 13:15:41 +0100 Subject: [PATCH 1/5] added myo plugin --- .../LICENSE_MITOrGPLv3WithException.txt | 743 ++++++++++++++++++ ARE/components/sensor.myocontroller/build.xml | 47 ++ .../myocontroller/MyocontrollerInstance.java | 393 +++++++++ .../src/main/resources/META-INF/MANIFEST.MF | 6 + .../src/main/resources/bundle_descriptor.xml | 59 ++ 5 files changed, 1248 insertions(+) create mode 100644 ARE/components/sensor.myocontroller/LICENSE/LICENSE_MITOrGPLv3WithException.txt create mode 100644 ARE/components/sensor.myocontroller/build.xml create mode 100644 ARE/components/sensor.myocontroller/src/main/java/eu/asterics/component/sensor/myocontroller/MyocontrollerInstance.java create mode 100644 ARE/components/sensor.myocontroller/src/main/resources/META-INF/MANIFEST.MF create mode 100644 ARE/components/sensor.myocontroller/src/main/resources/bundle_descriptor.xml diff --git a/ARE/components/sensor.myocontroller/LICENSE/LICENSE_MITOrGPLv3WithException.txt b/ARE/components/sensor.myocontroller/LICENSE/LICENSE_MITOrGPLv3WithException.txt new file mode 100644 index 000000000..ee311d6d4 --- /dev/null +++ b/ARE/components/sensor.myocontroller/LICENSE/LICENSE_MITOrGPLv3WithException.txt @@ -0,0 +1,743 @@ +AsTeRICS framework Licensing + +The AsTeRICS framework offers a dual-licensing concept, using +either the MIT License or the GNU General Public License (GPL) version 3. +See both license texts below. + +You may use this work under the terms of the MIT License, +if your selection of plugins and services does not contain +GPL-licensed code (GNU General Public License). + +If your selection of plugins and services contains source code +which is licensed under the GNU General Public License (GPL) +the whole work must be licensed under GPL. + +To define a selection of plugins and services for a deployment, +use the AsTeRICS Packaging Environment (APE tool). + +Please note the "CLASSPATH" EXCEPTION TO THE GPL at the of the document. + +Please verify the individual licenses of the utilized AsTeRICS plugins and services. +You find the license files in the subfolder LICENSE of every plugin or service. + +--------------------------------------------------------------------------------------------- + +The MIT License (MIT) + +Copyright (c) 2015, The AsTeRICS Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + + +--------------------------------------------------------------------------------------------- + + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. + + +"CLASSPATH" EXCEPTION TO THE GPL + + Linking this library statically or dynamically with other modules is making + a combined work based on this library. Thus, the terms and conditions of + the GNU General Public License cover the whole combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules, + and to copy and distribute the resulting executable under terms of your + choice, provided that you also meet, for each linked independent module, + the terms and conditions of the license of that module. An independent + module is a module which is not derived from or based on this library. If + you modify this library, you may extend this exception to your version of + the library, but you are not obligated to do so. If you do not wish to do + so, delete this exception statement from your version. + + diff --git a/ARE/components/sensor.myocontroller/build.xml b/ARE/components/sensor.myocontroller/build.xml new file mode 100644 index 000000000..d28671196 --- /dev/null +++ b/ARE/components/sensor.myocontroller/build.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ARE/components/sensor.myocontroller/src/main/java/eu/asterics/component/sensor/myocontroller/MyocontrollerInstance.java b/ARE/components/sensor.myocontroller/src/main/java/eu/asterics/component/sensor/myocontroller/MyocontrollerInstance.java new file mode 100644 index 000000000..f297d17da --- /dev/null +++ b/ARE/components/sensor.myocontroller/src/main/java/eu/asterics/component/sensor/myocontroller/MyocontrollerInstance.java @@ -0,0 +1,393 @@ +/* + * AsTeRICS - Assistive Technology Rapid Integration and Construction Set + * + * + * d8888 88888888888 8888888b. 8888888 .d8888b. .d8888b. + * d88888 888 888 Y88b 888 d88P Y88b d88P Y88b + * d88P888 888 888 888 888 888 888 Y88b. + * d88P 888 .d8888b 888 .d88b. 888 d88P 888 888 "Y888b. + * d88P 888 88K 888 d8P Y8b 8888888P" 888 888 "Y88b. + * d88P 888 "Y8888b. 888 88888888 888 T88b 888 888 888 "888 + * d8888888888 X88 888 Y8b. 888 T88b 888 Y88b d88P Y88b d88P + * d88P 888 88888P' 888 "Y8888 888 T88b 8888888 "Y8888P" "Y8888P" + * + * + * homepage: http://www.asterics.org + * + * This project has been funded by the European Commission, + * Grant Agreement Number 247730 + * + * + * Dual License: MIT or GPL v3.0 with "CLASSPATH" exception + * (please refer to the folder LICENSE) + * + */ + +package eu.asterics.component.sensor.myocontroller; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URISyntaxException; + +import eu.asterics.mw.cimcommunication.CIMPortController; +import eu.asterics.mw.cimcommunication.CIMPortManager; +import eu.asterics.mw.data.ConversionUtils; +import eu.asterics.mw.model.runtime.*; +import eu.asterics.mw.model.runtime.impl.DefaultRuntimeOutputPort; +import eu.asterics.mw.services.AstericsErrorHandling; +import eu.asterics.mw.services.ResourceRegistry; + +/** + * Interfaces with the Myocontroller data acquisition device via bluetooth / Com port + * + * @author Chris + */ +public class MyocontrollerInstance extends AbstractRuntimeComponentInstance { + private static final int NUMBER_OF_CHANNELS = 6; + private static final String OP_CH_PREFIX = "Channel"; + private static final IRuntimeOutputPort[] opChannels = new DefaultRuntimeOutputPort[NUMBER_OF_CHANNELS]; + + String propComPort = "COM4"; + int propBaudRate = 57600; + boolean propUseFile = false; + String propFilename = ""; + + // declare member variables here + private InputStream in = null; + private OutputStream out = null; + private Thread readerThread = null; + private boolean running = false; + private CIMPortController portController = null; + private int parseState = 0; + private int parsedChannel = 0; + private int parsedValue = 0; + + + final byte startSequence1[] = new byte[] { + (byte)0x53,(byte)0x54,(byte)0x41,(byte)0x12,(byte)0x00,(byte)0xb8,(byte)0xaa,(byte)0x01,(byte)0x00,(byte)0x00, + (byte)0x00,(byte)0x00,(byte)0x00,(byte)0x33,(byte)0x6a,(byte)0x73,(byte)0x69,(byte)0x71,(byte)0x39,(byte)0x38, + (byte)0x25,(byte)0x24,(byte)0x6c,(byte)0x3f,(byte)0x63 + }; + final byte startSequence2[] = new byte[] { + (byte)0x53,(byte)0x54,(byte)0x41,(byte)0x08,(byte)0x00,(byte)0xa2,(byte)0xaa,(byte)0x01,(byte)0x00,(byte)0x00, + (byte)0x00,(byte)0x01,(byte)0x00,(byte)0x03,(byte)0xd4,(byte)0x53,(byte)0x54,(byte)0x41,(byte)0x21,(byte)0x00, + (byte)0x8b,(byte)0xaa,(byte)0x01,(byte)0x00,(byte)0x00,(byte)0x00,(byte)0x02,(byte)0x00,(byte)0x08,(byte)0x00, + (byte)0x00,(byte)0x01,(byte)0x01,(byte)0x00,(byte)0x01,(byte)0x02,(byte)0x00,(byte)0x01,(byte)0x03,(byte)0x00, + (byte)0x01,(byte)0x04,(byte)0x00,(byte)0x01,(byte)0x05,(byte)0x00,(byte)0x01,(byte)0x06,(byte)0x00,(byte)0x01, + (byte)0x07,(byte)0x00,(byte)0x01,(byte)0x5b,(byte)0x4e + }; + final byte startSequence3[] = new byte[] { + (byte)0x53,(byte)0x54,(byte)0x41,(byte)0x21,(byte)0x00,(byte)0x8b,(byte)0xaa,(byte)0x01,(byte)0x00,(byte)0x00, + (byte)0x00,(byte)0x02,(byte)0x00,(byte)0x08,(byte)0x00,(byte)0x00,(byte)0x01,(byte)0x01,(byte)0x00,(byte)0x01, + (byte)0x02,(byte)0x00,(byte)0x01,(byte)0x03,(byte)0x00,(byte)0x01,(byte)0x04,(byte)0x00,(byte)0x01,(byte)0x05, + (byte)0x00,(byte)0x01,(byte)0x06,(byte)0x00,(byte)0x01,(byte)0x07,(byte)0x00,(byte)0x01,(byte)0x5b,(byte)0x4e + }; + + + + + /** + * The class constructor. + */ + public MyocontrollerInstance() { + for (int i = 0; i < NUMBER_OF_CHANNELS; i++) + opChannels[i] = new DefaultRuntimeOutputPort(); + } + + /** + * returns an Input Port. + * + * @param portID + * the name of the port + * @return the input port or null if not found + */ + @Override + public IRuntimeInputPort getInputPort(String portID) { + + return null; + } + + /** + * returns an Output Port. + * + * @param portID + * the name of the port + * @return the output port or null if not found + */ + @Override + public IRuntimeOutputPort getOutputPort(String portID) { + String s; + for (int i = 0; i < NUMBER_OF_CHANNELS; i++) { + s = OP_CH_PREFIX + (i + 1); + if (s.equalsIgnoreCase(portID)) { + return opChannels[i]; + } + } + return null; + } + + /** + * returns an Event Listener Port. + * + * @param eventPortID + * the name of the port + * @return the EventListener port or null if not found + */ + @Override + public IRuntimeEventListenerPort getEventListenerPort(String eventPortID) { + + return null; + } + + /** + * returns an Event Triggerer Port. + * + * @param eventPortID + * the name of the port + * @return the EventTriggerer port or null if not found + */ + @Override + public IRuntimeEventTriggererPort getEventTriggererPort(String eventPortID) { + + return null; + } + + /** + * returns the value of the given property. + * + * @param propertyName + * the name of the property + * @return the property value or null if not found + */ + @Override + public Object getRuntimePropertyValue(String propertyName) { + if ("comPort".equalsIgnoreCase(propertyName)) { + return propComPort; + } + if ("baudRate".equalsIgnoreCase(propertyName)) { + return propBaudRate; + } + if ("useFile".equalsIgnoreCase(propertyName)) { + return propUseFile; + } + if ("filename".equalsIgnoreCase(propertyName)) { + return propFilename; + } + + return null; + } + + /** + * sets a new value for the given property. + * + * @param propertyName + * the name of the property + * @param newValue + * the desired property value or null if not found + */ + @Override + public Object setRuntimePropertyValue(String propertyName, Object newValue) { + if ("comPort".equalsIgnoreCase(propertyName)) { + final Object oldValue = propComPort; + propComPort = newValue.toString(); + return oldValue; + } + if ("baudRate".equalsIgnoreCase(propertyName)) { + final Object oldValue = propBaudRate; + propBaudRate = Integer.parseInt(newValue.toString()); + return oldValue; + } + if ("useFile".equalsIgnoreCase(propertyName)) { + final Object oldValue = propUseFile; + propUseFile = Boolean.parseBoolean(newValue.toString()); + return oldValue; + } + if ("filename".equalsIgnoreCase(propertyName)) { + final Object oldValue = propFilename; + propFilename = newValue.toString(); + return oldValue; + } + + return null; + } + + /** + * method using to parse the arriving data (either from COM-port or from file) + * + * @param data + * the last received data byte + */ + private void handlePacketReceived(byte data) { + + switch (parseState) { + case 0: + parseState = data == 'S' ? parseState + 1 : 0; + break; + case 1: + parseState = data == 'T' ? parseState + 1 : 0; + break; + case 2: + parseState = data == 'A' ? parseState + 1 : 0; + break; + case 3: + parseState = data == 0x0c ? parseState + 1 : 0; // discard the shorter (8) packages! + break; + case 13: + parsedChannel = (int) data; + parseState++; + break; + case 15: + parsedValue = ((int) data) & 0xff; + parseState++; + break; + case 16: + parsedValue |= ((((int) data) & 0xff) << 8); + if (parsedChannel >= 0 && parsedChannel < NUMBER_OF_CHANNELS) { + opChannels[parsedChannel].sendData(ConversionUtils.intToBytes(parsedValue)); + } + parseState = 0; // done ! look for next packet ! + break; + default: + parseState++; + } + } + + private InputStream getFileInputStream() { + try { + return ResourceRegistry.getInstance().getResourceInputStream(propFilename, ResourceRegistry.RES_TYPE.DATA); + } catch (IOException | URISyntaxException e) { + AstericsErrorHandling.instance.getLogger().info("Error reading archive file " + propFilename); + } + return null; + } + + private InputStream getComportInputStream() { + if (portController == null) { + return null; + } + return portController.getInputStream(); + } + + private OutputStream getComportOutputStream() { + if (portController == null) { + return null; + } + return portController.getOutputStream(); + } + + private void startInternal() { + if (!propUseFile) { + portController = CIMPortManager.getInstance().getRawConnection(propComPort, propBaudRate, true); + if (portController == null) { + AstericsErrorHandling.instance.reportError(this, + "Myocontroller: Could not construct raw port controller, please verify that the COM port is valid."); + } else { + in = getComportInputStream(); + out = getComportOutputStream(); + } + } else { + in = getFileInputStream(); + } + if (in == null) { + return; + } + + readerThread = new Thread(new Runnable() { + + @Override + public void run() { + + if (!propUseFile) { + try { + out.write(startSequence1); + Thread.sleep(200); + out.write(startSequence2); + Thread.sleep(200); + out.write(startSequence3); + } catch (IOException e) { + String msg = String.format("MyoController: Could not write to COM-port"); + AstericsErrorHandling.instance.getLogger().info(msg); + } catch (InterruptedException e) { + } + + } + running = true; + while (running) { + try { + if (!propUseFile) { // COM-port + while (in.available() > 0) { + handlePacketReceived((byte) in.read()); + } + Thread.sleep(10); + } else { // Archive File + for (int z = 0; z < 20; z++) { + handlePacketReceived((byte) in.read()); + } + Thread.sleep(2); // gives about 500 packets / second + } + } catch (IOException e) { + String msg = String.format("MyoController: Could not read from %s.", propUseFile ? "file" : "COM-port"); + AstericsErrorHandling.instance.getLogger().info(msg); + } catch (InterruptedException e) { + } + } + } + }); + readerThread.start(); + super.start(); + } + + private void stopInternal() { + running = false; + if (in != null) { + try { + in.close(); + } catch (IOException e) { + AstericsErrorHandling.instance.reportError(this, "Myocontroller: error closing inputStream"); + } + in = null; + } + if (portController != null) { + CIMPortManager.getInstance().closeRawConnection(propComPort); + portController = null; + AstericsErrorHandling.instance.reportInfo(this, "Myocontroller raw port controller closed"); + } + } + + /** + * called when model is started. + */ + @Override + public void start() { + startInternal(); + super.start(); + } + + /** + * called when model is paused. + */ + @Override + public void pause() { + stopInternal(); + super.pause(); + } + + /** + * called when model is resumed. + */ + @Override + public void resume() { + startInternal(); + super.resume(); + } + + /** + * called when model is stopped. + */ + @Override + public void stop() { + stopInternal(); + super.stop(); + } +} \ No newline at end of file diff --git a/ARE/components/sensor.myocontroller/src/main/resources/META-INF/MANIFEST.MF b/ARE/components/sensor.myocontroller/src/main/resources/META-INF/MANIFEST.MF new file mode 100644 index 000000000..c19b94e74 --- /dev/null +++ b/ARE/components/sensor.myocontroller/src/main/resources/META-INF/MANIFEST.MF @@ -0,0 +1,6 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: asterics-sensors.myocontroller +Bundle-SymbolicName: eu.asterics.component.sensor.myocontroller +Bundle-Version: 0.1.0 +DynamicImport-Package: * diff --git a/ARE/components/sensor.myocontroller/src/main/resources/bundle_descriptor.xml b/ARE/components/sensor.myocontroller/src/main/resources/bundle_descriptor.xml new file mode 100644 index 000000000..cdcf3603f --- /dev/null +++ b/ARE/components/sensor.myocontroller/src/main/resources/bundle_descriptor.xml @@ -0,0 +1,59 @@ + + + + + sensor + false + This plugin receives a packet stream from the Myocontroller device + + + output port for channel1 data + integer + + + output port for channel2 data + integer + + + output port for channel3 data + integer + + + output port for channel4 data + integer + + + output port for channel5 data + integer + + + output port for channel6 data + integer + + + + + + + + + + + + + + \ No newline at end of file From 8239ef85cbc42116188bc8c1213310da82ad4c33 Mon Sep 17 00:00:00 2001 From: Chris Veigl Date: Sat, 10 Feb 2024 13:42:43 +0100 Subject: [PATCH 2/5] added file logging capabilities --- .../myocontroller/MyocontrollerInstance.java | 51 ++++++- .../src/main/resources/bundle_descriptor.xml | 4 + bin/ACS/defaultComponentCollection.abd | 142 +++++++++++++----- 3 files changed, 154 insertions(+), 43 deletions(-) diff --git a/ARE/components/sensor.myocontroller/src/main/java/eu/asterics/component/sensor/myocontroller/MyocontrollerInstance.java b/ARE/components/sensor.myocontroller/src/main/java/eu/asterics/component/sensor/myocontroller/MyocontrollerInstance.java index f297d17da..264446e32 100644 --- a/ARE/components/sensor.myocontroller/src/main/java/eu/asterics/component/sensor/myocontroller/MyocontrollerInstance.java +++ b/ARE/components/sensor.myocontroller/src/main/java/eu/asterics/component/sensor/myocontroller/MyocontrollerInstance.java @@ -29,6 +29,9 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.URISyntaxException; +import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.File; import eu.asterics.mw.cimcommunication.CIMPortController; import eu.asterics.mw.cimcommunication.CIMPortManager; @@ -51,11 +54,13 @@ public class MyocontrollerInstance extends AbstractRuntimeComponentInstance { String propComPort = "COM4"; int propBaudRate = 57600; boolean propUseFile = false; + boolean propWriteToFile = false; String propFilename = ""; // declare member variables here private InputStream in = null; private OutputStream out = null; + private FileOutputStream outLogFile = null; private Thread readerThread = null; private boolean running = false; private CIMPortController portController = null; @@ -170,6 +175,9 @@ public Object getRuntimePropertyValue(String propertyName) { } if ("useFile".equalsIgnoreCase(propertyName)) { return propUseFile; + } + if ("writeToFile".equalsIgnoreCase(propertyName)) { + return propWriteToFile; } if ("filename".equalsIgnoreCase(propertyName)) { return propFilename; @@ -203,6 +211,11 @@ public Object setRuntimePropertyValue(String propertyName, Object newValue) { propUseFile = Boolean.parseBoolean(newValue.toString()); return oldValue; } + if ("writeToFile".equalsIgnoreCase(propertyName)) { + final Object oldValue = propWriteToFile; + propWriteToFile = Boolean.parseBoolean(newValue.toString()); + return oldValue; + } if ("filename".equalsIgnoreCase(propertyName)) { final Object oldValue = propFilename; propFilename = newValue.toString(); @@ -261,7 +274,7 @@ private InputStream getFileInputStream() { } return null; } - + private InputStream getComportInputStream() { if (portController == null) { return null; @@ -276,6 +289,20 @@ private OutputStream getComportOutputStream() { return portController.getOutputStream(); } + private FileOutputStream getFileOutputStream() { + FileOutputStream fos=null; + try { + File file = new File("data/"+propFilename); + fos= new FileOutputStream(file); + } + catch (IOException e) { + String msg = String.format("MyoController: Could not write to log file"); + AstericsErrorHandling.instance.getLogger().info(msg); + } + return fos; + } + + private void startInternal() { if (!propUseFile) { portController = CIMPortManager.getInstance().getRawConnection(propComPort, propBaudRate, true); @@ -285,9 +312,15 @@ private void startInternal() { } else { in = getComportInputStream(); out = getComportOutputStream(); + if (propWriteToFile) { + outLogFile = getFileOutputStream(); + } else { + outLogFile=null; + } } } else { in = getFileInputStream(); + outLogFile=null; } if (in == null) { return; @@ -317,7 +350,11 @@ public void run() { try { if (!propUseFile) { // COM-port while (in.available() > 0) { - handlePacketReceived((byte) in.read()); + byte actByte=(byte) in.read(); + handlePacketReceived(actByte); + if (outLogFile != null) { + outLogFile.write(actByte); + } } Thread.sleep(10); } else { // Archive File @@ -348,6 +385,16 @@ private void stopInternal() { } in = null; } + + if (outLogFile != null) { + try { + outLogFile.close(); + } catch (IOException e) { + AstericsErrorHandling.instance.reportInfo(this, "Error closing log file"); + } + outLogFile=null; + } + if (portController != null) { CIMPortManager.getInstance().closeRawConnection(propComPort); portController = null; diff --git a/ARE/components/sensor.myocontroller/src/main/resources/bundle_descriptor.xml b/ARE/components/sensor.myocontroller/src/main/resources/bundle_descriptor.xml index cdcf3603f..855814f35 100644 --- a/ARE/components/sensor.myocontroller/src/main/resources/bundle_descriptor.xml +++ b/ARE/components/sensor.myocontroller/src/main/resources/bundle_descriptor.xml @@ -48,6 +48,10 @@ type="boolean" value="false" description="If true, instead of the COM-port the given file is used as datasource"/> + + + + + sensor + false + This plugin receives a packet stream from the Myocontroller device + + + output port for channel1 data + integer + + + output port for channel2 data + integer + + + output port for channel3 data + integer + + + output port for channel4 data + integer + + + output port for channel5 data + integer + + + output port for channel6 data + integer + + + + + + + + + + + + + + Interface to TrackIR5 - - yaw angle - double - - - pitch angle - double - - - roll angle - double - - - x position - double - - - y position - double - - - z position - double - + + yaw angle + double + + + pitch angle + double + + + roll angle + double + + + x position + double + + + y position + double + + + z position + double + - - start data transfer - - - stop data transfer - - - center position - + + start data transfer + + + stop data transfer + + + center position + - - + + From 45d65934678a5ba4765da8bd3af6a9404c5ce102 Mon Sep 17 00:00:00 2001 From: Chris Veigl Date: Sun, 11 Feb 2024 16:25:02 +0100 Subject: [PATCH 3/5] handle NaN values --- .../asterics/component/actuator/mouse/MouseInstance.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ARE/components/actuator.mouse/src/main/java/eu/asterics/component/actuator/mouse/MouseInstance.java b/ARE/components/actuator.mouse/src/main/java/eu/asterics/component/actuator/mouse/MouseInstance.java index 65e852be6..7c22c2207 100644 --- a/ARE/components/actuator.mouse/src/main/java/eu/asterics/component/actuator/mouse/MouseInstance.java +++ b/ARE/components/actuator.mouse/src/main/java/eu/asterics/component/actuator/mouse/MouseInstance.java @@ -44,6 +44,7 @@ import eu.asterics.mw.model.runtime.IRuntimeOutputPort; import eu.asterics.mw.model.runtime.impl.DefaultRuntimeInputPort; import eu.asterics.mw.model.runtime.impl.DefaultRuntimeOutputPort; +import eu.asterics.mw.services.AstericsErrorHandling; import eu.asterics.mw.services.AREServices; /** @@ -356,6 +357,8 @@ private void updateMousePosition(boolean doRoundingCorrection) { public void receiveData(byte[] data) { if ((mouseActive == 1) && (propEnableMouse)) { double value = ConversionUtils.doubleFromBytes(data); + if (Double.isNaN(value)) return; + if (value < 3) { mouseLastStableXPos = mouseXPos; } @@ -381,6 +384,11 @@ public void receiveData(byte[] data) { public void receiveData(byte[] data) { if ((mouseActive == 1) && (propEnableMouse)) { double value = ConversionUtils.doubleFromBytes(data); + if (Double.isNaN(value)) return; + + //String msg = String.format("MouseY: %f", value ); + //AstericsErrorHandling.instance.getLogger().info(msg); + if (value < 3) { mouseLastStableYPos = mouseYPos; } From f94dc0fcdeab3ff8672a137a6755878bfaf83dd7 Mon Sep 17 00:00:00 2001 From: Chris Veigl Date: Sun, 11 Feb 2024 16:37:23 +0100 Subject: [PATCH 4/5] added relative mouse version of Teensy HID sketch --- .../EMGInterfaceTeensyRelMouse.ino | 163 ++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 CIMs/EMGInterfaceTeensyRelMouse/EMGInterfaceTeensyRelMouse.ino diff --git a/CIMs/EMGInterfaceTeensyRelMouse/EMGInterfaceTeensyRelMouse.ino b/CIMs/EMGInterfaceTeensyRelMouse/EMGInterfaceTeensyRelMouse.ino new file mode 100644 index 000000000..7fb0a1158 --- /dev/null +++ b/CIMs/EMGInterfaceTeensyRelMouse/EMGInterfaceTeensyRelMouse.ino @@ -0,0 +1,163 @@ +#include +#include + +#define CHANNELS 4 +#define USE_BUFFERED_AVG 1 +#define LED_PIN 13 +#define STARTBUTTON 14 +#define DELAYTIME 50 +#define READ_TIME 5 +#define BLINKTIME 5 +#define MAX_INPUT_LENGTH 100 +#define MODE_ONLYHID 1 +#define MODE_ABSOLUTEMOUSE 0 + +int SENSORS[CHANNELS] = {A3, A0, A2, A1}; +int channel_values[CHANNELS] = {0, 0, 0, 0}; +const int N_AVERAGE = 10; + +int runmode = 1; +char receiveBuffer[MAX_INPUT_LENGTH + 1]; +int lastPosX = -1; +int lastPosY = -1; +unsigned long lastrun = 0; +unsigned long lastread = 0; +int ledCount=0; + +typedef struct { + long sum; + int avg[N_AVERAGE]; + int index; +} avgStruct; + +avgStruct bufAveragers[CHANNELS]; +float movAverage[CHANNELS] = {0}; + +// the setup routine runs once when you press reset: +void setup() { + // initialize the digital pin as an output. + Serial.begin(9600); + Serial.setTimeout(2000); + + pinMode(LED_PIN, OUTPUT); + digitalWrite(LED_PIN, HIGH); + + pinMode(SENSORS[0], INPUT); + pinMode(SENSORS[1], INPUT); + pinMode(SENSORS[2], INPUT); + pinMode(SENSORS[3], INPUT); + //pinMode(STARTBUTTON, INPUT_PULLUP); + Keyboard.begin(); + Mouse.begin(); + if (MODE_ABSOLUTEMOUSE) { + Mouse.screenSize(1920, 1080); + //Mouse.screenSize(3840, 1080); + } + analogReadResolution(12); + delay(2); +} + +// the loop routine runs over and over again forever: +void loop() { + + // handle user button input + if (!runmode && digitalRead(STARTBUTTON) == LOW) { + runmode = !runmode; + delay(50); + while (digitalRead(STARTBUTTON) == LOW); + delay(50); + } + + if (Serial.available() > 0) { + Serial.readBytesUntil(';', receiveBuffer, MAX_INPUT_LENGTH); + //Serial.println("got: "); + //Serial.write(receiveBuffer, strlen(receiveBuffer)); + + if (ledCount++ >= 25) { + ledCount=0; + digitalWrite(LED_PIN,!digitalRead(LED_PIN)); + } + + int posX = 0, posY = 0; + int key1, key2, key3, mouseFunction; + int n = sscanf(receiveBuffer, "%d %d %d %d %d %d", &posX, &posY, &mouseFunction, &key1, &key2, &key3); + memset(receiveBuffer, 0, sizeof(receiveBuffer)); + + if (MODE_ABSOLUTEMOUSE) { + if (posX != lastPosX || posY != lastPosY) { + lastPosX = posX; + lastPosY = posY; + Mouse.moveTo(posX, posY); + } + } else { + if (posX != 0 || posY != 0) { + lastPosX = posX; + lastPosY = posY; + Mouse.move(posX, posY); + } + } + + if (mouseFunction != 0) { + switch (mouseFunction) { + case 1: Mouse.click(MOUSE_LEFT); break; + case 2: Mouse.click(MOUSE_LEFT); Mouse.click(MOUSE_LEFT); break; + case 3: Mouse.click(MOUSE_RIGHT); break; + case 4: Mouse.click(MOUSE_MIDDLE); break; + case 5: Mouse.press(MOUSE_LEFT); break; + case 6: Mouse.release(MOUSE_LEFT); break; + } + if (mouseFunction != 5) { + Mouse.release(MOUSE_LEFT); + } + } + if (key1 != 0) { + Keyboard.press(key1); + } + if (key2 != 0) { + Keyboard.press(key2); + } + if (key3 != 0) { + Keyboard.press(key3); + } + Keyboard.releaseAll(); + } + + if (!MODE_ONLYHID && runmode && millis() - lastread >= READ_TIME) { + lastread = millis(); + for (int i = 0; i < CHANNELS; i++) { +#ifdef USE_BUFFERED_AVG + channel_values[i] = getBufferedAvg(&bufAveragers[i], analogRead(SENSORS[i])); +#else + channel_values[i] = getMovingAvg(&movAverage[i], analogRead(SENSORS[i])); +#endif + } + } + + if (!MODE_ONLYHID && runmode && millis() - lastrun >= DELAYTIME) { + //Serial.print("real delay: "); + //Serial.println(millis() - lastrun); + lastrun = millis(); + + // process up to 4 channels + for (int i = 0; i < CHANNELS; i++) { + Serial.print(channel_values[i] * 1.0 / 4); + Serial.print(","); + } + Serial.println(" "); + } +} + +int getBufferedAvg(avgStruct * averager, int newValue) { + averager->sum -= averager->avg[averager->index]; + averager->avg[averager->index] = newValue; + averager->sum += newValue; + averager->index = (averager->index + 1) % N_AVERAGE; + return (averager->sum / N_AVERAGE); +} + +int getMovingAvg(float * average, int newValue) { + *average -= *average * 1.0 / N_AVERAGE; + *average += newValue * 1.0 / N_AVERAGE; + + return (int) * average; +} From b438e625c41add19d1bc47c704b9dcc9caf8e25b Mon Sep 17 00:00:00 2001 From: Chris Veigl Date: Sun, 11 Feb 2024 16:38:57 +0100 Subject: [PATCH 5/5] added demo models --- .../mouseControl/myo_3chnTooltip.acs | 1548 ++++++++++ .../mouseControl/myo_4chnMouseAccel.acs | 2086 ++++++++++++++ .../mouseControl/myo_4chnMouseAccelTeensy.acs | 2521 +++++++++++++++++ 3 files changed, 6155 insertions(+) create mode 100644 bin/ARE/models/useCaseDemos/mouseControl/myo_3chnTooltip.acs create mode 100644 bin/ARE/models/useCaseDemos/mouseControl/myo_4chnMouseAccel.acs create mode 100644 bin/ARE/models/useCaseDemos/mouseControl/myo_4chnMouseAccelTeensy.acs diff --git a/bin/ARE/models/useCaseDemos/mouseControl/myo_3chnTooltip.acs b/bin/ARE/models/useCaseDemos/mouseControl/myo_3chnTooltip.acs new file mode 100644 index 000000000..0ad3c5860 --- /dev/null +++ b/bin/ARE/models/useCaseDemos/mouseControl/myo_3chnTooltip.acs @@ -0,0 +1,1548 @@ + + + + Difference between two EMG Signals move cursor +Difference is cubed in order to cause small movements for small values +and big movements for bigger values +Timer changes between horizontal/vertical + + + + + + cursor position control via crosshair movement + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1000 + 365 + + + + Translates incoming command strings into events + + + + + + + + + + + + + + + + + + + 1376 + 485 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 708 + 514 + + + + Translates signals from a certain input range to an output range + + + + + + + + + + + + + + + + + + + + + + 456 + 575 + + + + Uses the defined format string and converts the values of the input ports according to that format string. See Java Class Formatter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1382 + 319 + + + + Send text from chosen slot + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1503 + 481 + + + + Send text from chosen slot + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1621 + 490 + + + + Translates signals from a certain input range to an output range + + + + + + + + + + + + + + + + + + + + + + 447 + 411 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 1357 + 74 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 1225 + 63 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 204 + 685 + + + 72 + 343 + 4438 + 3000 + + + + show tooltips next to mouse pointer for triggering various actions + + + + + + + + + + + + + + + + + + + + 1254 + 590 + + + + interfaces a (virtual) COM Port for data send/receive operations + + + + + + + + + + + + + + + + 1878 + 223 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 941 + 167 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 814 + 162 + + + + Translates signals from a certain input range to an output range + + + + + + + + + + + + + + + + + + + + + + 447 + 252 + + + + Translates signals from a certain input range to an output range + + + + + + + + + + + + + + + + + + + + + + 451 + 89 + + + + Uses the defined format string and converts the values of the input ports according to that format string. See Java Class Formatter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1501 + 321 + + + + Uses the defined format string and converts the values of the input ports according to that format string. See Java Class Formatter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1638 + 294 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 712 + 360 + + + + This plugin receives a packet stream from the OttoBock Myocontroller device + + + + + + + + + + + + + + + + + + + + + + + + + + 132 + 81 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 416 + 719 + + + 72 + 6232 + 4438 + 3333 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 642 + 690 + + + 4822 + 343 + 4438 + 3000 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 811 + 707 + + + 4822 + 3343 + 4438 + 2889 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 315 + 687 + + + 72 + 3343 + 4438 + 2889 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 301 + 83 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 1077 + 12 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 1082 + 158 + + + + provides basic Window manipulation for another active window + + + + + + + + + + + + + + + + + + + + 1526 + 644 + + + + Send text when gets event + + + + + + + + + + + + + 1506 + 74 + + + + Passes signal from input ports to the one output port + + + + + + + + + + + + + + + + + + + + 1670 + 83 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + false + true + false + + 35 + 44 + 9965 + 9889 + + + \ No newline at end of file diff --git a/bin/ARE/models/useCaseDemos/mouseControl/myo_4chnMouseAccel.acs b/bin/ARE/models/useCaseDemos/mouseControl/myo_4chnMouseAccel.acs new file mode 100644 index 000000000..7ac4dbe05 --- /dev/null +++ b/bin/ARE/models/useCaseDemos/mouseControl/myo_4chnMouseAccel.acs @@ -0,0 +1,2086 @@ + + + + Difference between two EMG Signals move cursor +Difference is cubed in order to cause small movements for small values +and big movements for bigger values +Timer changes between horizontal/vertical + + + + + + This plugin receives a packet stream from the Myocontroller device + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 181 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 808 + 464 + + + 7697 + 4454 + 812 + 1889 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 813 + 28 + + + 5635 + 2454 + 812 + 1889 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 803 + 175 + + + 7697 + 2454 + 812 + 1889 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 806 + 316 + + + 5635 + 4454 + 812 + 1889 + + + + Bar-display + + + + + + + + + + + + + + + + + + + + + + 905 + 474 + + + 8885 + 4454 + 375 + 1889 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 273 + 477 + + + 8510 + 4454 + 375 + 1889 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 698 + 472 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 380 + 485 + + + 7322 + 4454 + 375 + 1889 + + + + This plugin provides various filter implementations + + + + + + + + + + + + + + + + + + + + + + 156 + 471 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 488 + 472 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 591 + 471 + + + + Bar-display + + + + + + + + + + + + + + + + + + + + + + 905 + 187 + + + 8885 + 2454 + 375 + 1889 + + + + Bar-display + + + + + + + + + + + + + + + + + + + + + + 903 + 323 + + + 6822 + 4454 + 375 + 1889 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 270 + 325 + + + 6447 + 4454 + 375 + 1889 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 696 + 322 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 375 + 326 + + + 5260 + 4454 + 375 + 1889 + + + + This plugin provides various filter implementations + + + + + + + + + + + + + + + + + + + + + + 154 + 321 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 486 + 321 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 588 + 320 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 274 + 177 + + + 8510 + 2454 + 375 + 1889 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 698 + 186 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 376 + 179 + + + 7322 + 2454 + 375 + 1889 + + + + This plugin provides various filter implementations + + + + + + + + + + + + + + + + + + + + + + 156 + 185 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 488 + 185 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 590 + 184 + + + + Bar-display + + + + + + + + + + + + + + + + + + + + + + 910 + 33 + + + 6822 + 2454 + 375 + 1889 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 276 + 30 + + + 6447 + 2454 + 375 + 1889 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 704 + 30 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 386 + 27 + + + 5260 + 2454 + 375 + 1889 + + + + This plugin provides various filter implementations + + + + + + + + + + + + + + + + + + + + + + 161 + 31 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 493 + 31 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 596 + 30 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 1473 + 340 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 1474 + 181 + + + + Local mouse actuator, emulates mouse activity on local system + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1664 + 170 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1304 + 273 + + + 5260 + 6565 + 1688 + 667 + + + + DotMeter + + + + + + + + + + + + + + + + + + + + + + + + + + + 1650 + 357 + + + 7010 + 6454 + 500 + 889 + + + + measures and outputs time in milliseconds and fires events (periodically or once) + + + + + + + + + + + + + + + + + + 1188 + 496 + + + + Defines active/passive Zone for x/y values + + + + + + + + + + + + + + + + + + + + + + + + + 1058 + 497 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1017 + 270 + + + 7572 + 6565 + 1688 + 667 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 1315 + 459 + + + + measures and outputs time in milliseconds and fires events (periodically or once) + + + + + + + + + + + + + + + + + + 1179 + 60 + + + + Defines active/passive Zone for x/y values + + + + + + + + + + + + + + + + + + + + + + + + + 1062 + 55 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 1140 + 279 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 1315 + 93 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + false + false + false + + 5235 + 1978 + 4125 + 5556 + + + \ No newline at end of file diff --git a/bin/ARE/models/useCaseDemos/mouseControl/myo_4chnMouseAccelTeensy.acs b/bin/ARE/models/useCaseDemos/mouseControl/myo_4chnMouseAccelTeensy.acs new file mode 100644 index 000000000..32a1a8846 --- /dev/null +++ b/bin/ARE/models/useCaseDemos/mouseControl/myo_4chnMouseAccelTeensy.acs @@ -0,0 +1,2521 @@ + + + + Difference between two EMG Signals move cursor +GUI lets configure offset and gain for all 4 EMG channels +Mouse acceleration and max. velocity + + + Extern Mouse is implemented via Arduino Sketch "EMGTeenysInterface", HID parameterstring from ARE COM Port to Teensy: + +sscanf(receiveBuffer, "%d %d %d %d %d %d", &posX, &posY, &mouseFunction, &key1, &key2, &key3); + + + + + + This plugin receives a packet stream from the Myocontroller device + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 192 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 144 + 429 + + + 5312 + 7111 + 812 + 1889 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 149 + 8 + + + 3312 + 5111 + 812 + 1889 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 140 + 141 + + + 5312 + 5111 + 812 + 1889 + + + + Oscilloscope display for one signal channel + + + + + + + + + + + + + + + + + + + + + 143 + 282 + + + 3312 + 7111 + 812 + 1889 + + + + Bar-display + + + + + + + + + + + + + + + + + + + + + + 241 + 439 + + + 6500 + 7111 + 375 + 1889 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -388 + 443 + + + 6125 + 7111 + 375 + 1889 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 34 + 438 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -280 + 451 + + + 4938 + 7111 + 375 + 1889 + + + + This plugin provides various filter implementations + + + + + + + + + + + + + + + + + + + + + + -504 + 437 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + -174 + 438 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + -71 + 436 + + + + Bar-display + + + + + + + + + + + + + + + + + + + + + + 242 + 153 + + + 6500 + 5111 + 375 + 1889 + + + + Bar-display + + + + + + + + + + + + + + + + + + + + + + 239 + 289 + + + 4500 + 7111 + 375 + 1889 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -390 + 291 + + + 4125 + 7111 + 375 + 1889 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 32 + 288 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -286 + 291 + + + 2938 + 7111 + 375 + 1889 + + + + This plugin provides various filter implementations + + + + + + + + + + + + + + + + + + + + + + -507 + 287 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + -176 + 287 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + -74 + 286 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -387 + 143 + + + 6125 + 5111 + 375 + 1889 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 35 + 152 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -285 + 144 + + + 4938 + 5111 + 375 + 1889 + + + + This plugin provides various filter implementations + + + + + + + + + + + + + + + + + + + + + + -504 + 151 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + -173 + 151 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + -71 + 150 + + + + Bar-display + + + + + + + + + + + + + + + + + + + + + + 247 + 8 + + + 4500 + 5111 + 375 + 1889 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -384 + 8 + + + 4125 + 5111 + 375 + 1889 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + 40 + 8 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -275 + 8 + + + 2938 + 5111 + 375 + 1889 + + + + This plugin provides various filter implementations + + + + + + + + + + + + + + + + + + + + + + -499 + 8 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + -168 + 8 + + + + Threshold Level Processor + + + + + + + + + + + + + + + + + + -66 + 8 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 820 + 298 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 821 + 139 + + + + Local mouse actuator, emulates mouse activity on local system + + + + + + + + + + + + + + + + + + + + + + + + + + + + 544 + 115 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 650 + 231 + + + 2938 + 4333 + 1688 + 667 + + + + DotMeter + + + + + + + + + + + + + + + + + + + + + + + + + + + 308 + 117 + + + 4688 + 4333 + 438 + 667 + + + + measures and outputs time in milliseconds and fires events (periodically or once) + + + + + + + + + + + + + + + + + + 534 + 454 + + + + Defines active/passive Zone for x/y values + + + + + + + + + + + + + + + + + + + + + + + + + 404 + 455 + + + + a slider GUI element which provides the slider value at an output port + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 353 + 235 + + + 5188 + 4333 + 1688 + 667 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 662 + 417 + + + + measures and outputs time in milliseconds and fires events (periodically or once) + + + + + + + + + + + + + + + + + + 526 + 19 + + + + Defines active/passive Zone for x/y values + + + + + + + + + + + + + + + + + + + + + + + + + 408 + 15 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 486 + 237 + + + + Mathematical expression evaluator + + + + + + + + + + + + + + + + + + + + + + 661 + 53 + + + + interfaces a (virtual) COM Port for data send/receive operations + + + + + + + + + + + + + + + + + 538 + 340 + + + + Uses the defined format string and converts the values of the input ports according to that format string. See Java Class Formatter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 303 + 315 + + + + Keyboard which sends event after button press + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 425 + 238 + + + 2938 + 9111 + 3938 + 333 + + + + captures key presses and releases for a single keyboard key + + + + + + + + + + + 671 + 198 + + + + captures key presses and releases for a single keyboard key + + + + + + + + + + + 772 + 199 + + + + captures key presses and releases for a single keyboard key + + + + + + + + + + + 875 + 198 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + OscilloscopeChn6 + OscilloscopeChn3 + OscilloscopeChn4 + OscilloscopeChn5 + BarDisplayChn6 + SliderGain6 + Threshold.1 + SliderPosChn6 + IIRFilter.1 + MathEvaluator.1 + Threshold.1.1 + BarDisplayChn4 + BarDisplayChn5 + SliderGain5 + Threshold.1.2 + SliderPosChn5 + IIRFilter.1.1 + MathEvaluator.1.1 + Threshold.1.1.1 + SliderGain4 + Threshold.1.2.1 + SliderPosChn4 + IIRFilter.1.1.1 + MathEvaluator.1.1.1 + Threshold.1.1.1.1 + BarDisplayChn3 + SliderGain3 + Threshold.1.2.2 + SliderPosChn3 + IIRFilter Chn3 + MathEvaluator.1.1.2 + Threshold.1.1.1.2 + MathEvaluator.2 + MathEvaluator.2.1 + Slider.1 + Timer.1 + Deadzone.1 + Slider.1.1 + MathEvaluator.3 + Timer.1.1 + Deadzone.1.1 + MathEvaluator.4 + MathEvaluator.3.1 + + + + true + false + false + false + false + + 2900 + 3911 + 4062 + 5667 + + + \ No newline at end of file