Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/.gitignore
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/.gitignore b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/.gitignore
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/.gitignore (revision 173)
@@ -0,0 +1,4 @@
+.DS_Store
+.pioenvs
+.clang_complete
+.gcc-flags.json
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/.travis.yml
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/.travis.yml b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/.travis.yml
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/.travis.yml (revision 173)
@@ -0,0 +1,39 @@
+# Created by Sander van Woensel on 29-01-16.
+# Copyright (c) 2016 Sander van Woensel. All rights reserved.
+#
+# Continuous Integration (CI) is the practice, in software
+# engineering, of merging all developer working copies with a shared mainline
+# several times a day < http://docs.platformio.org/en/latest/ci/index.html >
+#
+# Documentation:
+#
+# * Travis CI Embedded Builds with PlatformIO
+# < https://docs.travis-ci.com/user/integration/platformio/ >
+#
+# * PlatformIO integration with Travis CI
+# < http://docs.platformio.org/en/latest/ci/travis.html >
+#
+# * User Guide for `platformio ci` command
+# < http://docs.platformio.org/en/latest/userguide/cmd_ci.html >
+#
+#
+
+language: python
+python:
+ - "2.7"
+
+sudo: false
+cache:
+ directories:
+ - "~/.platformio"
+
+env:
+ # TODO: - PLATFORMIO_CI_SRC=path/to/test/file.c
+ - PLATFORMIO_CI_SRC=examples/HelloHttp/HelloHttp.ino
+ #- PLATFORMIO_CI_SRC=examples/SerialHttp/SerialHttp.ino
+
+install:
+ - pip install -U platformio
+
+script:
+ - platformio ci --lib="." --board=esp01 --board=uno
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/LICENSE
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/LICENSE b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/LICENSE
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/LICENSE (revision 173)
@@ -0,0 +1,674 @@
+ 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.
+
+ {one line to give the program's name and a brief idea of what it does.}
+ Copyright (C) {year} {name of author}
+
+ 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:
+
+ {project} Copyright (C) {year} {fullname}
+ 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
+.
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/README.md
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/README.md b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/README.md
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/README.md (revision 173)
@@ -0,0 +1,53 @@
+# ArduinoHttpServer
+
+[](https://travis-ci.org/QuickSander/ArduinoHttpServer)
+[](https://codeclimate.com/github/QuickSander/ArduinoHttpServer)
+[](https://codeclimate.com/github/QuickSander/ArduinoHttpServer/coverage)
+
+
+
+
+*Server side minimalistic Object Oriented HTTP protocol implementation for the Arduino platform.*
+
+ArduinoHttpServer is a simple HTTP request and reply implementation targeted for the embedded Arduino framework. The implementation parses an HTTP request/reply reading/printing from/to any Stream (either Serial or Wifi/Ethernet).
+
+What you do with the request or what you reply is entirely up to your imagination. Very little implicit behaviour.
+
+Quick start
+-----------
+
+### Reading an HTTP request from some Stream instance
+```c++
+// This example uses the Stream instance Serial, might also be a WifiClient object.
+// Reserve 511 bytes for body content storage.
+ArduinoHttpServer::StreamHttpRequest<511> httpRequest(Serial);
+bool success(httpRequest.readRequest())
+if (success) // If no HTTP parsing error or read timeout occurred.
+{
+ // See interface api for other methods.
+ const char *body( httpRequest.getBody() );
+ // Retrieve 4th part (index is zero based) of the resource URL.
+ // E.g. state from: "/api/sensors/1/state"
+ const String& restFunction( httpRequest.getResource()[3] );
+}
+```
+
+
+### Writing an HTTP reply to some Stream
+```c++
+ArduinoHttpServer::StreamHttpReply httpReply(Serial, "application/json");
+httpReply.send("{\"All your base are belong to us!\"}");
+```
+
+Documentation
+-------------
+
+Documentation available in the [ArduinoHttpServer Github wiki](https://github.com/QuickSander/ArduinoHttpServer/wiki)
+
+Characteristics
+---------------
+* HTTP parser with protocol validation.
+* Puts you in control on how to react on a HTTP request; no implicit behaviour.
+* Customizable memory footprint for caching returned body data.
+* No external dependencies outside of the standard Arduino framework.
+* Object oriented implementation.
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/examples/HelloHttp/HelloHttp.ino
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/examples/HelloHttp/HelloHttp.ino b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/examples/HelloHttp/HelloHttp.ino
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/examples/HelloHttp/HelloHttp.ino (revision 173)
@@ -0,0 +1,73 @@
+#include
+
+#ifdef ESP8266 // This example is compatible with both, ATMega and ESP8266
+ #include
+#else
+ #include //! \todo Temporary see fix: https://github.com/platformio/platformio/issues/48
+ #include
+#endif
+
+const char* ssid = "";
+const char* password = "";
+
+WiFiServer wifiServer(80);
+
+void setup()
+{
+ Serial.begin(115200);
+ Serial.println("Starting Wifi Connection...");
+
+ WiFi.begin(const_cast(ssid), password);
+ while (WiFi.status() != WL_CONNECTED)
+ {
+ delay(500);
+ }
+
+ wifiServer.begin();
+}
+
+void loop()
+{
+ WiFiClient client( wifiServer.available() );
+ if (client.connected())
+ {
+ // Connected to client. Allocate and initialize StreamHttpRequest object.
+ ArduinoHttpServer::StreamHttpRequest<1023> httpRequest(client);
+
+ // Parse the request.
+ if (httpRequest.readRequest())
+ {
+ // Use the information you like they way you like.
+
+ // Retrieve HTTP resource / URL requested
+ Serial.println( httpRequest.getResource().toString() );
+
+ // Retrieve 2nd part of HTTP resource.
+ // E.g.: "on" from "/api/sensors/on"
+ Serial.println( httpRequest.getResource()[2] );
+
+ // Retrieve HTTP method.
+ // E.g.: GET / PUT / HEAD / DELETE / POST
+ ArduinoHttpServer::MethodEnum method( ArduinoHttpServer::MethodInvalid );
+ method = httpRequest.getMethod();
+
+ if( method == ArduinoHttpServer::MethodGet )
+ {
+ Serial.println("Nothing to get here.");
+ }
+ else if( method == ArduinoHttpServer::MethodPut )
+ {
+ digitalWrite(13, HIGH);
+ }
+
+ }
+ else
+ {
+ // HTTP parsing failed. Client did not provide correct HTTP data or
+ // client requested an unsupported feature.
+ ArduinoHttpServer::StreamHttpErrorReply httpReply(client, httpRequest.getContentType());
+ httpReply.send(httpRequest.getErrorDescrition());
+ }
+ }
+
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/keywords.txt
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/keywords.txt b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/keywords.txt
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/keywords.txt (revision 173)
@@ -0,0 +1,13 @@
+StreamHttpRequest KEYWORD1
+readRequest KEYWORD2
+getResource KEYWORD2
+getMethod KEYWORD2
+getContentType KEYWORD2
+getContentLength KEYWORD2
+getBody KEYWORD2
+getErrorDescription KEYWORD2
+getStream KEYWORD2
+StreamHttpReply KEYWORD1
+StreamHttpErrorReply KEYWORD1
+send KEYWORD2
+getCode KEYWORD2
\ No newline at end of file
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/library.json
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/library.json b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/library.json
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/library.json (revision 173)
@@ -0,0 +1,16 @@
+{
+ "name": "ArduinoHttpServer",
+ "keywords": "http, get, post, delete, request, reply, protocol, web",
+ "description": "Server side minimalistic HTTP protocol implementation that leaves you in control",
+ "authors": {
+ "name": "Sander van Woensel",
+ "url": "http://quicksander.net"
+ },
+ "repository":
+ {
+ "type": "git",
+ "url": "https://github.com/QuickSander/ArduinoHttpServer.git"
+ },
+ "frameworks": "arduino",
+ "platforms": "*"
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/library.properties
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/library.properties b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/library.properties
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/library.properties (revision 173)
@@ -0,0 +1,9 @@
+name=ArduinoHttpServer
+version=0.1.1
+author=Sander van Woensel
+maintainer=Sander van Woensel
+sentence=Server side minimalistic HTTP protocol implementation.
+paragraph=Just the raw HTTP server protocol for the Arduino platform, the rest is left to your imagination.
+category=Communication
+url=https://github.com/QuickSander/ArduinoHttpServer
+architectures=*
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/platformio.ini
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/platformio.ini b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/platformio.ini
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/platformio.ini (revision 173)
@@ -0,0 +1,30 @@
+# Created by Sander van Woensel on 29-01-16.
+# Copyright (c) 2016 Sander van Woensel. All rights reserved.
+#
+# Project Configuration File
+#
+# A detailed documentation with the EXAMPLES is located here:
+# http://docs.platformio.org/en/latest/projectconf.html
+#
+
+[platformio]
+# Since we desire to integrate with Arduino (and the way it likes its directory
+# structure), point source directory to the directory containing an example with
+# loop() and setup() and the lib directory to the directory Arduino stores its
+# libraries in. This way, PlatformIO will find this very library via the Arduino
+# library directory.
+src_dir = examples/HelloHttp
+lib_dir = ../
+
+[env:esp01]
+platform = espressif
+framework = arduino
+board = esp01
+# Custom upload tool to force use of esptool.py instead of default esptool.
+# See: http://arduino.stackexchange.com/questions/20219/upload-with-esptool-fails-with-espcomm-send-command-cant-receive-slip-payload
+extra_script = ../../Tools/platformio_esptool.py
+
+[env:uno]
+platform = atmelavr
+framework = arduino
+board = uno
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/ArduinoHttpServer.h
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/ArduinoHttpServer.h b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/ArduinoHttpServer.h
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/ArduinoHttpServer.h (revision 173)
@@ -0,0 +1,12 @@
+//
+// ArduinoHttpServer.h
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 23-01-16.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+//! The sole interface for the Arduino platform.
+
+
+#include "internals/StreamHttpRequest.hpp"
+#include "internals/StreamHttpReply.hpp"
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/ArduinoHttpServerDebug.h
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/ArduinoHttpServerDebug.h b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/ArduinoHttpServerDebug.h
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/ArduinoHttpServerDebug.h (revision 173)
@@ -0,0 +1,18 @@
+//
+//! \file
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 20-01-16.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+//! Debug support
+
+//#define ARDUINO_HTTP_SERVER_DEBUG
+
+#ifdef ARDUINO_HTTP_SERVER_DEBUG
+ #define DEBUG_ARDUINO_HTTP_SERVER_PRINT(...) Serial.print(__VA_ARGS__)
+ #define DEBUG_ARDUINO_HTTP_SERVER_PRINTLN(...) Serial.println(__VA_ARGS__)
+#else
+ #define DEBUG_ARDUINO_HTTP_SERVER_PRINT(...)
+ #define DEBUG_ARDUINO_HTTP_SERVER_PRINTLN(...)
+#endif
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpField.cpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpField.cpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpField.cpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpField.cpp (revision 173)
@@ -0,0 +1,81 @@
+//
+//! \file
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 20-01-16.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+//! A single header field.
+
+#include "HttpField.hpp"
+#include "ArduinoHttpServerDebug.h"
+
+const char* ArduinoHttpServer::HttpField::SEPERATOR = ": ";
+const char* ArduinoHttpServer::HttpField::CONTENT_TYPE_STR = "Content-Type";
+const char* ArduinoHttpServer::HttpField::CONTENT_LENGTH_TYPE_STR = "Content-Length";
+const char* ArduinoHttpServer::HttpField::USER_AGENT_TYPE_STR = "User-Agent";
+
+
+ArduinoHttpServer::HttpField::HttpField(const char* fieldLine) :
+ m_type(TYPE_NOT_SUPPORTED),
+ m_value()
+{
+
+ DEBUG_ARDUINO_HTTP_SERVER_PRINT("Parsing HTTP field: ");
+ DEBUG_ARDUINO_HTTP_SERVER_PRINTLN(fieldLine);
+
+ String fieldStr(fieldLine);
+ int fieldSepIndex( fieldStr.indexOf(SEPERATOR) );
+
+ if( fieldSepIndex < 1 )
+ {
+ m_type = TYPE_NOT_SUPPORTED;
+ }
+ else
+ {
+ m_value = fieldStr.substring(fieldSepIndex + strlen(SEPERATOR));
+ String typeStr = fieldStr.substring(0, fieldSepIndex);
+ determineType(typeStr);
+
+ }
+}
+
+ArduinoHttpServer::HttpField::HttpField() :
+ m_type(TYPE_NOT_SUPPORTED),
+ m_value()
+{
+}
+
+ArduinoHttpServer::HttpField::~HttpField()
+{
+
+}
+
+void ArduinoHttpServer::HttpField::determineType(const String& typeStr)
+{
+ if (typeStr.equalsIgnoreCase(CONTENT_TYPE_STR))
+ {
+ m_type = TYPE_CONTENT_TYPE;
+ }
+ else if (typeStr.equalsIgnoreCase(CONTENT_LENGTH_TYPE_STR))
+ {
+ m_type = TYPE_CONTENT_LENGTH;
+ }
+ else if (typeStr.equalsIgnoreCase(USER_AGENT_TYPE_STR))
+ {
+ m_type = TYPE_USER_AGENT;
+ }
+}
+
+ArduinoHttpServer::HttpField& ArduinoHttpServer::HttpField::operator=(const ArduinoHttpServer::HttpField& other)
+{
+ m_type = other.m_type;
+ m_value = other.m_value;
+
+ return *this;
+}
+
+const ArduinoHttpServer::HttpField::TypeEnum ArduinoHttpServer::HttpField::getType() const
+{
+ return m_type;
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpField.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpField.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpField.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpField.hpp (revision 173)
@@ -0,0 +1,59 @@
+//
+//! \file
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 20-01-16.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+//! A single header field.
+
+#ifndef __ArduinoHttpServer__HttpField__
+#define __ArduinoHttpServer__HttpField__
+
+#include "Arduino.h"
+
+namespace ArduinoHttpServer
+{
+
+//! A single HTTP field.
+class HttpField
+{
+
+public:
+
+ enum TypeEnum
+ {
+ TYPE_NOT_SUPPORTED,
+ TYPE_CONTENT_TYPE,
+ TYPE_CONTENT_LENGTH,
+ TYPE_USER_AGENT
+
+ };
+
+ HttpField(const char* fieldLine);
+ HttpField();
+ virtual ~HttpField();
+
+ HttpField& operator=(const HttpField& other);
+
+ const TypeEnum getType() const;
+
+ inline const String& getValueAsString() const {return m_value; };
+ inline const int getValueAsInt() const {return m_value.toInt(); };
+
+private:
+ void determineType(const String& typeStr);
+
+ static const char *SEPERATOR;
+ static const char* CONTENT_TYPE_STR;
+ static const char* CONTENT_LENGTH_TYPE_STR;
+ static const char* USER_AGENT_TYPE_STR;
+
+ TypeEnum m_type;
+ String m_value;
+
+};
+
+}
+
+#endif // defined(__ArduinoHttpServer__HttpField__)
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpResource.cpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpResource.cpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpResource.cpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpResource.cpp (revision 173)
@@ -0,0 +1,63 @@
+//
+//! \file
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 23-01-16.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+//! The URL/path provided after the HTTP method.
+
+#include "HttpResource.hpp"
+
+#include
+
+ArduinoHttpServer::HttpResource::HttpResource(const String& resource) :
+ m_resource(resource)
+{
+}
+
+ArduinoHttpServer::HttpResource::HttpResource() :
+ m_resource()
+{
+}
+
+ArduinoHttpServer::HttpResource& ArduinoHttpServer::HttpResource::operator=(const ArduinoHttpServer::HttpResource& other)
+{
+ m_resource = other.m_resource;
+
+ return *this;
+}
+
+
+bool ArduinoHttpServer::HttpResource::isValid()
+{
+ return m_resource.length() > 0;
+}
+
+//! Retrieve resource part at the specified index.
+//! \details E.g. HttpResource("/api/sensors/1/state")[1]
+//! returns "sensors"
+String ArduinoHttpServer::HttpResource::operator[](const unsigned int index) const
+{
+ int fromOffset(0);
+
+ // Forward till we reach desired index.
+ for (unsigned int currentIndex=0; currentIndex <= index; ++currentIndex)
+ {
+ fromOffset = m_resource.indexOf(RESOURCE_SEPERATOR, fromOffset);
+ ++fromOffset; // Seek past '/'.
+ }
+
+ // Find next possible '/' or end.
+ int toOffset( m_resource.indexOf(RESOURCE_SEPERATOR, fromOffset) );
+ toOffset == -1 ? m_resource.length() - 1 : toOffset;
+
+ return m_resource.substring(fromOffset, toOffset);
+
+}
+
+
+const String& ArduinoHttpServer::HttpResource::toString() const
+{
+ return m_resource;
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpResource.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpResource.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpResource.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpResource.hpp (revision 173)
@@ -0,0 +1,40 @@
+//
+//! \file
+// WifiESP8266SmartSwitch
+//
+// Created by Sander van Woensel on 24-02-15.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+
+#ifndef __ArduinoHttpServer__HttpResource__
+#define __ArduinoHttpServer__HttpResource__
+
+#include
+
+namespace ArduinoHttpServer
+{
+
+//! The resource requested by a client.
+class HttpResource
+{
+
+public:
+ HttpResource(const String& resource);
+ HttpResource();
+
+ HttpResource& operator=(const HttpResource& other);
+
+ bool isValid();
+ String operator[](const unsigned int index) const;
+ const String& toString() const;
+
+private:
+ static const char RESOURCE_SEPERATOR = '/';
+
+ String m_resource;
+
+};
+
+}
+
+#endif // defined(__ArduinoHttpServer__HttpResource__)
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpVersion.cpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpVersion.cpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpVersion.cpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpVersion.cpp (revision 173)
@@ -0,0 +1,47 @@
+//
+//! \file
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 20-01-16.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+//! HTTP version
+
+#include "HttpVersion.hpp"
+#include "ArduinoHttpServerDebug.h"
+
+const char ArduinoHttpServer::HttpVersion::SEPARATOR = '.';
+
+ArduinoHttpServer::HttpVersion::HttpVersion() :
+ m_major(0),
+ m_minor(0)
+{
+}
+
+ArduinoHttpServer::HttpVersion::HttpVersion(const String& version) :
+ m_major(0),
+ m_minor(0)
+{
+ int dotIndex(version.lastIndexOf(SEPARATOR));
+
+ // Cast might possibly invalidate version data when versions become bigger then 255.
+ m_major = static_cast( version.substring(0, dotIndex).toInt() );
+ m_minor = static_cast( version.substring(dotIndex+1, version.length()).toInt() );
+}
+
+ArduinoHttpServer::HttpVersion& ArduinoHttpServer::HttpVersion::operator=(const HttpVersion& rhs)
+{
+ m_major = rhs.m_major;
+ m_minor = rhs.m_minor;
+
+ return *this;
+}
+
+String ArduinoHttpServer::HttpVersion::toString()
+{
+ String version(m_major);
+ version += SEPARATOR;
+ version += m_minor;
+
+ return version;
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpVersion.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpVersion.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpVersion.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/HttpVersion.hpp (revision 173)
@@ -0,0 +1,42 @@
+//
+//! \file
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 20-01-16.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+//! An HTTP version
+
+#ifndef __ArduinoHttpServer__HttpVersion__
+#define __ArduinoHttpServer__HttpVersion__
+
+#include "Arduino.h"
+
+namespace ArduinoHttpServer
+{
+
+//! A single HTTP field.
+class HttpVersion
+{
+
+public:
+ HttpVersion(const String& version);
+ HttpVersion();
+
+ HttpVersion& operator=(const HttpVersion& rhs);
+
+ String toString();
+ inline unsigned char getMajor() const { return m_major; }
+ inline unsigned char getMinor() const { return m_minor; }
+
+private:
+ static const char SEPARATOR;
+
+ unsigned char m_major;
+ unsigned char m_minor;
+
+};
+
+}
+
+#endif
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpReply.cpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpReply.cpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpReply.cpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpReply.cpp (revision 173)
@@ -0,0 +1,134 @@
+#include "StreamHttpReply.hpp"
+
+#include
+
+#include "ArduinoHttpServerDebug.h"
+
+//------------------------------------------------------------------------------
+// Class Definition
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+//! \brief Constructor.
+const String ArduinoHttpServer::AbstractStreamHttpReply::DEFAULT_CONTENT_TYPE = "text/html";
+
+ArduinoHttpServer::AbstractStreamHttpReply::AbstractStreamHttpReply(Stream& stream, const String& contentType, const String& code) :
+ m_stream(stream),
+ m_contentType(contentType),
+ m_code(code)
+{
+
+}
+
+//------------------------------------------------------------------------------
+//! \brief Send this reply / print this reply to stream.
+void ArduinoHttpServer::AbstractStreamHttpReply::send(const String& data, const String& title)
+{
+ // Read away remaining bytes.
+ while(getStream().read()>=0);
+
+ String httpErrorReply("HTTP/1.1 ");
+ httpErrorReply += getCode() + " ";
+ httpErrorReply += title + "\r\n";
+ httpErrorReply += "Connection: close\r\n";
+ httpErrorReply += "Content-Length: ";
+ httpErrorReply += data.length(); httpErrorReply += "\r\n";
+ httpErrorReply += "Content-Type: "; httpErrorReply += m_contentType; httpErrorReply+= "\r\n";
+ httpErrorReply += "\r\n";
+ httpErrorReply += data;
+ httpErrorReply += "\r\n";
+
+ DEBUG_ARDUINO_HTTP_SERVER_PRINT("Printing Reply ... ");
+ getStream().print(httpErrorReply);
+ DEBUG_ARDUINO_HTTP_SERVER_PRINTLN("done.");
+}
+
+
+Stream& ArduinoHttpServer::AbstractStreamHttpReply::getStream()
+{
+ return m_stream;
+}
+
+const String& ArduinoHttpServer::AbstractStreamHttpReply::getCode()
+{
+ return m_code;
+}
+
+const String& ArduinoHttpServer::AbstractStreamHttpReply::getContentType()
+{
+ if(m_contentType.length()<=0)
+ {
+ m_contentType = DEFAULT_CONTENT_TYPE;
+ }
+ return m_contentType;
+}
+
+//------------------------------------------------------------------------------
+// Class Definition
+//------------------------------------------------------------------------------
+
+ArduinoHttpServer::StreamHttpReply::StreamHttpReply(Stream& stream, const String& contentType) :
+ AbstractStreamHttpReply(stream, contentType, "200")
+{
+
+}
+
+
+//------------------------------------------------------------------------------
+// Class Definition
+//------------------------------------------------------------------------------
+
+ArduinoHttpServer::StreamHttpErrorReply::StreamHttpErrorReply(Stream& stream, const String& contentType, const String& code) :
+ AbstractStreamHttpReply(stream, contentType, code)
+{
+
+}
+
+void ArduinoHttpServer::StreamHttpErrorReply::send(const String& data)
+{
+ String body;
+
+ if(getContentType() == "text/plain")
+ {
+ body = data;
+ }
+ else if(getContentType() == "application/json")
+ {
+ body = getJsonBody(data);
+ }
+ else
+ {
+ body = getHtmlBody(data);
+ }
+
+ AbstractStreamHttpReply::send(body, data);
+}
+
+
+String ArduinoHttpServer::StreamHttpErrorReply::getHtmlBody(const String& data)
+{
+ String body;
+ body += "Error: ";
+ body += getCode();
+ body += "Error ";
+ body += getCode();
+ body += ": ";
+ body += data;
+ body += "
";
+
+ return body;
+}
+
+String ArduinoHttpServer::StreamHttpErrorReply::getJsonBody(const String& data)
+{
+ // Copy string since replace modifies original.
+ String dataCopy(data);
+ dataCopy.replace("\"", "\\\"");
+
+ String body;
+ body += "{\"Error\": \"";
+ body +=dataCopy;
+ body += "\"}";
+
+ return body;
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpReply.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpReply.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpReply.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpReply.hpp (revision 173)
@@ -0,0 +1,72 @@
+//
+//! \file
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 23-01-16.
+// Copyright (c) 2016 Sander van Woensel. All rights reserved.
+//
+//! HTTP reply printed to Stream.
+
+#ifndef __ArduinoHttpServer__StreamHttpReply__
+#define __ArduinoHttpServer__StreamHttpReply__
+
+#include
+
+namespace ArduinoHttpServer
+{
+
+//------------------------------------------------------------------------------
+// Class Declaration
+//------------------------------------------------------------------------------
+//! Shared Reply functionality
+class AbstractStreamHttpReply
+{
+
+public:
+ virtual void send(const String& data, const String& title);
+
+protected:
+ AbstractStreamHttpReply(Stream& stream, const String& contentType, const String& code);
+ virtual Stream& getStream();
+ virtual const String& getCode();
+ virtual const String& getContentType();
+
+private:
+ static const String DEFAULT_CONTENT_TYPE;
+
+ Stream& m_stream;
+ String m_contentType; //!< Needs to be overridden to default when required. Therefore not const.
+ const String m_code;
+
+};
+
+//------------------------------------------------------------------------------
+// Class Declaration
+//------------------------------------------------------------------------------
+//! Error reply
+class StreamHttpErrorReply: public AbstractStreamHttpReply
+{
+public:
+ StreamHttpErrorReply(Stream& stream, const String& contentType, const String& code = "400");
+ virtual void send(const String& data);
+
+protected:
+ virtual String getHtmlBody(const String& data);
+ virtual String getJsonBody(const String& data);
+};
+
+//------------------------------------------------------------------------------
+// Class Declaration
+//------------------------------------------------------------------------------
+//! Normal reply.
+class StreamHttpReply: public AbstractStreamHttpReply
+{
+public:
+ StreamHttpReply(Stream& stream, const String& contentType);
+ virtual void send(const String& data) { AbstractStreamHttpReply::send(data, "OK"); };
+};
+
+
+}
+
+#endif // __ArduinoHttpServer__StreamHttpReply__
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpRequest.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpRequest.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpRequest.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoHttpServer-master/src/internals/StreamHttpRequest.hpp (revision 173)
@@ -0,0 +1,321 @@
+//
+//! \file
+// ArduinoHttpServer
+//
+// Created by Sander van Woensel on 24-02-15.
+// Copyright (c) 2015 Sander van Woensel. All rights reserved.
+//
+//! HTTP Request read from a Stream.
+
+#ifndef __ArduinoHttpServer__StreamHttpRequest__
+#define __ArduinoHttpServer__StreamHttpRequest__
+
+#include "HttpResource.hpp"
+#include "HttpField.hpp"
+#include "HttpVersion.hpp"
+#include "ArduinoHttpServerDebug.h"
+
+#include
+
+#include
+
+namespace ArduinoHttpServer
+{
+
+enum MethodEnum
+{
+ MethodInvalid, MethodGet, MethodPut, MethodPost, MethodHead
+};
+
+
+//------------------------------------------------------------------------------
+// Class Declaration
+//------------------------------------------------------------------------------
+//! HTTP request read from a _Stream_.
+template
+class StreamHttpRequest
+{
+
+public:
+ StreamHttpRequest(Stream& stream);
+
+ ~StreamHttpRequest() { };
+
+ bool readRequest();
+
+ // Header retrieval methods.
+ inline const ArduinoHttpServer::HttpResource& getResource() const { return m_resource; };
+ inline const MethodEnum getMethod() const { return m_method; };
+ inline const ArduinoHttpServer::HttpVersion& getVersion() const { return m_version; };
+
+ // Field retrieval methods.
+ inline const String& getContentType() const { return m_contentTypeField.getValueAsString(); };
+ inline const int getContentLength() const { return m_contentLengthField.getValueAsInt(); };
+
+ // Body retrieval methods.
+ inline const char* const getBody() const { return m_body; };
+
+ // State retrieval
+ const String& getErrorDescrition() { return m_errorDescription; };
+ Stream& getStream() { return m_stream; };
+
+private:
+
+ enum ResultEnum {ResultError, ResultOk};
+
+ //! \todo To reduce program memory size reduce these to the proper types: char and int.
+ //! Or better yet, make these Template variables.
+ static const int MAX_LINE_SIZE = 255+1;
+ static const int MAX_BODY_SIZE = MAX_BODY_LENGTH+1; //!< Byte size of array. Leaves space for terminating \0.
+ static const long LINE_READ_TIMEOUT_MS = 10000L; //!< [ms] Wait 10s for reception of a complete line.
+ static const int MAX_RETRIES_WAIT_DATA_AVAILABLE = 255;
+
+ void parseRequest(char lineBuffer[MAX_LINE_SIZE]);
+ void parseMethod(char lineBuffer[MAX_LINE_SIZE]);
+ void parseResource();
+ void parseVersion();
+ void parseField(char lineBuffer[MAX_LINE_SIZE]);
+
+ void neglectToken();
+
+ bool readLine(char lineBuffer[MAX_LINE_SIZE]);
+
+ void setError(const String& errorMessage);
+
+ Stream& m_stream;
+ char m_body[MAX_BODY_SIZE];
+ MethodEnum m_method;
+ ArduinoHttpServer::HttpResource m_resource;
+ ArduinoHttpServer::HttpVersion m_version;
+ ArduinoHttpServer::HttpField m_contentTypeField;
+ ArduinoHttpServer::HttpField m_contentLengthField;
+
+ ResultEnum m_result;
+ String m_errorDescription;
+
+ char *m_lineBufferStrTokContext;
+};
+
+}
+
+//------------------------------------------------------------------------------
+// Class Definition
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+//! \brief Constructor. sets Stream timeout for reading data.
+template
+ArduinoHttpServer::StreamHttpRequest::StreamHttpRequest(Stream& stream) :
+ m_stream(stream),
+ m_body{0},
+ m_method(MethodInvalid),
+ m_resource(),
+ m_version(),
+ m_contentTypeField(),
+ m_contentLengthField(),
+ m_result(ResultOk),
+ m_errorDescription(),
+ m_lineBufferStrTokContext(0)
+{
+ static_assert(MAX_BODY_LENGTH >= 0, "HTTP body length less then zero specified.");
+ m_stream.setTimeout(LINE_READ_TIMEOUT_MS);
+}
+
+//------------------------------------------------------------------------------
+//! \brief Wait for data to become available on Stream and parses the request.
+template
+bool ArduinoHttpServer::StreamHttpRequest::readRequest()
+{
+
+ char lineBuffer[MAX_LINE_SIZE] = {0};
+
+ int attempts(0);
+ while(!m_stream.available())
+ {
+ // Quit when failed to retrieve data after n retries.
+ if(attempts >= MAX_RETRIES_WAIT_DATA_AVAILABLE)
+ {
+ setError("Time out while waiting for data to become available.");
+ break;
+ }
+
+ delay(10);
+ ++attempts;
+ }
+
+ // Read complete line.
+ if(readLine(lineBuffer))
+ {
+ // Parse the request header (first line).
+ parseRequest(lineBuffer);
+
+ // Keep parsing fields until an empty line has been found (with only new line / carriage return).
+ while (readLine(lineBuffer))
+ {
+ parseField(lineBuffer);
+ }
+
+ DEBUG_ARDUINO_HTTP_SERVER_PRINTLN("HTTP field parsing complete.");
+
+ // Parse body.
+ int contentLength(getContentLength());
+ if (contentLength > MAX_BODY_LENGTH)
+ {
+ DEBUG_ARDUINO_HTTP_SERVER_PRINTLN("Content-Length larger then the maximum content we can consume. Trunkating body.");
+ contentLength = MAX_BODY_LENGTH;
+ }
+
+ DEBUG_ARDUINO_HTTP_SERVER_PRINT("Content-Length: ");
+ DEBUG_ARDUINO_HTTP_SERVER_PRINTLN(contentLength);
+
+ if(contentLength > 0)
+ {
+ DEBUG_ARDUINO_HTTP_SERVER_PRINT("Parsing body .... ");
+ m_stream.readBytes(m_body, contentLength);
+ DEBUG_ARDUINO_HTTP_SERVER_PRINTLN("done");
+ }
+ }
+
+ return m_result == ResultOk;
+}
+
+
+//------------------------------------------------------------------------------
+//! \brief Read a single line from Stream into _linebuffer_
+template
+bool ArduinoHttpServer::StreamHttpRequest::readLine(char linebuffer[])
+{
+ if(m_result!=ResultOk) { return false; }
+
+ int bytesRead(0);
+
+ memset(linebuffer, 0, MAX_LINE_SIZE);
+ bytesRead = m_stream.readBytesUntil('\r', linebuffer, MAX_LINE_SIZE);
+
+ // Read away remaining new-line and carriage returns
+ for (int i=0; i<2 && m_stream.read() != '\n'; i++)
+ {
+ // Allow SoftwareSerial to process incomming data.
+ delay(2);
+ }
+
+ return bytesRead > 0 ;
+}
+
+//------------------------------------------------------------------------------
+//! \brief Parse first line of HTTP request.
+template
+void ArduinoHttpServer::StreamHttpRequest::parseRequest(char lineBuffer[])
+{
+ parseMethod(lineBuffer);
+ parseResource();
+ parseVersion();
+}
+
+//------------------------------------------------------------------------------
+//! \brief Parse method: GET, PUT, HEAD, etc.
+template
+void ArduinoHttpServer::StreamHttpRequest::parseMethod(char lineBuffer[])
+{
+ if(m_result!=ResultOk) { return; }
+
+ // First strtok call, initialize with cached line buffer.
+ String token(strtok_r(lineBuffer, " ", &m_lineBufferStrTokContext));
+
+ if(token == "GET")
+ {
+ m_method = MethodGet;
+ }
+ else if (token == "PUT")
+ {
+ m_method = MethodPut;
+ }
+ else if (token == "POST")
+ {
+ m_method = MethodPost;
+ }
+ else if (token == "HEAD")
+ {
+ m_method = MethodHead;
+ }
+ else
+ {
+ m_method = MethodInvalid;
+ setError(String("Cannot handle HTTP method: \"")+token+"\".");
+ }
+}
+
+//! Parse "HTTP/1.1" (or any other version).
+template
+void ArduinoHttpServer::StreamHttpRequest::parseVersion()
+{
+ if(m_result!=ResultOk) { return; }
+
+ String version(strtok_r(0, " ", &m_lineBufferStrTokContext));
+ int slashPosition = version.lastIndexOf('/');
+
+ // String returns unsigned int for length.
+ if (static_cast(slashPosition) < version.length() && slashPosition > 0)
+ {
+ m_version = HttpVersion(version.substring(slashPosition));
+ }
+ else
+ {
+ String message("Parse error. Invalid HTTP version: \"");
+ message += version;
+ message += "\".";
+ setError(message);
+
+ }
+
+}
+
+template
+void ArduinoHttpServer::StreamHttpRequest::parseResource()
+{
+ if(m_result!=ResultOk) { return; }
+
+ String resource( strtok_r(0, " ", &m_lineBufferStrTokContext) );
+ m_resource = ArduinoHttpServer::HttpResource(resource);
+
+ if (!m_resource.isValid())
+ {
+ setError("Parse error. No resource specified.");
+ }
+}
+
+template
+void ArduinoHttpServer::StreamHttpRequest::neglectToken()
+{
+ strtok_r(0, " ", &m_lineBufferStrTokContext);
+}
+
+template
+void ArduinoHttpServer::StreamHttpRequest::parseField(char lineBuffer[])
+{
+ if(m_result!=ResultOk) { return; }
+
+ ArduinoHttpServer::HttpField httpField(lineBuffer);
+
+ if(httpField.getType() == ArduinoHttpServer::HttpField::TYPE_CONTENT_TYPE)
+ {
+ m_contentTypeField = httpField;
+ }
+ else if(httpField.getType() == ArduinoHttpServer::HttpField::TYPE_CONTENT_LENGTH)
+ {
+ m_contentLengthField = httpField;
+ }
+ else
+ {
+ // Ignore other fields for now.
+ }
+}
+
+template
+void ArduinoHttpServer::StreamHttpRequest::setError(const String& errorMessage)
+{
+ m_result = ResultError;
+ m_errorDescription = errorMessage;
+}
+
+#endif // __ArduinoHttpServer__StreamHttpRequest__
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.clang-format
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.clang-format b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.clang-format
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.clang-format (revision 173)
@@ -0,0 +1,5 @@
+# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
+
+BasedOnStyle: Google
+Standard: Cpp03
+AllowShortFunctionsOnASingleLine: Empty
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.gitattributes
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.gitattributes b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.gitattributes
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.gitattributes (revision 173)
@@ -0,0 +1 @@
+*.sh text eol=lf
\ No newline at end of file
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.github/ISSUE_TEMPLATE.md
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.github/ISSUE_TEMPLATE.md b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.github/ISSUE_TEMPLATE.md
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.github/ISSUE_TEMPLATE.md (revision 173)
@@ -0,0 +1,11 @@
+
\ No newline at end of file
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.gitignore
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.gitignore b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.gitignore
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.gitignore (revision 173)
@@ -0,0 +1,8 @@
+.DS_Store
+/.idea
+/build
+/bin
+/lib
+/sftp-config.json
+.tags
+.tags_sorted_by_file
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.mbedignore
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.mbedignore b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.mbedignore
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.mbedignore (revision 173)
@@ -0,0 +1,5 @@
+.github/
+examples/
+scripts/
+test/
+third-party/
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.travis.yml
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.travis.yml b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.travis.yml
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/.travis.yml (revision 173)
@@ -0,0 +1,118 @@
+sudo: false
+language: cpp
+matrix:
+ include:
+ - compiler: gcc
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test']
+ packages: ['g++-4.4']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.4
+ - compiler: gcc
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test']
+ packages: ['g++-4.5']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.5
+ - compiler: gcc
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test']
+ packages: ['g++-4.6']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.6
+ - compiler: gcc
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test']
+ packages: ['g++-4.7']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.7
+ - compiler: gcc
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test']
+ packages: ['g++-4.8']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.8
+ - compiler: gcc
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test']
+ packages: ['g++-4.9']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.9
+ - compiler: gcc
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test']
+ packages: ['g++-5']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-5
+ - compiler: clang
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++
+ - compiler: clang
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5']
+ packages: ['clang-3.5']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.5
+ - compiler: clang
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.6']
+ packages: ['clang-3.6']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.6
+ - compiler: clang
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.7']
+ packages: ['clang-3.7']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.7
+ - compiler: clang
+ addons:
+ apt:
+ sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.8']
+ packages: ['clang-3.8']
+ env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.8
+ - compiler: gcc
+ env: SCRIPT=coverage
+ - os: osx
+ osx_image: beta-xcode6.1
+ compiler: clang
+ env: SCRIPT=cmake-osx
+ - os: osx
+ osx_image: beta-xcode6.2
+ compiler: clang
+ env: SCRIPT=cmake-osx
+ - os: osx
+ osx_image: beta-xcode6.3
+ compiler: clang
+ env: SCRIPT=cmake-osx
+ - os: osx
+ osx_image: xcode6.4
+ compiler: clang
+ env: SCRIPT=cmake-osx
+ - os: osx
+ osx_image: xcode7
+ compiler: clang
+ env: SCRIPT=cmake-osx
+ - os: osx
+ osx_image: xcode7.1
+ compiler: clang
+ env: SCRIPT=cmake-osx
+ - os: osx
+ osx_image: xcode7.2
+ compiler: clang
+ env: SCRIPT=cmake-osx
+ - os: osx
+ osx_image: xcode7.3
+ compiler: clang
+ env: SCRIPT=cmake-osx
+ - env: SCRIPT=arduino VERSION=1.5.8 BOARD=arduino:avr:uno
+ - env: SCRIPT=arduino VERSION=1.6.7 BOARD=arduino:avr:uno
+ - env: SCRIPT=arduino VERSION=1.6.8 BOARD=arduino:avr:uno
+ - env: SCRIPT=arduino VERSION=1.6.9 BOARD=arduino:avr:uno
+ - env: SCRIPT=platformio BOARD=uno
+ - env: SCRIPT=platformio BOARD=due
+ - env: SCRIPT=platformio BOARD=esp01
+ - env: SCRIPT=platformio BOARD=teensy31
+cache:
+ directories:
+ - "~/.platformio"
+script: scripts/travis/$SCRIPT.sh
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/ArduinoJson.h
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/ArduinoJson.h b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/ArduinoJson.h
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/ArduinoJson.h (revision 173)
@@ -0,0 +1,8 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#include "include/ArduinoJson.h"
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/CHANGELOG.md
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/CHANGELOG.md b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/CHANGELOG.md
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/CHANGELOG.md (revision 173)
@@ -0,0 +1,320 @@
+ArduinoJson: change log
+=======================
+
+HEAD
+----
+
+* Fixed `array[idx].as()` and `object[key].as()`
+
+v5.6.6
+------
+
+* Fixed `-Wparentheses` warning introduced in v5.6.5 (PR #335 by @nuket)
+* Added `.mbedignore` for ARM mbdeb (PR #334 by @nuket)
+* Fixed `JsonVariant::success()` which didn't propagate `JsonArray::success()` nor `JsonObject::success()` (issue #342).
+
+v5.6.5
+------
+
+* `as()` now returns `true` when input is `null` (issue #330)
+
+v5.6.4
+------
+
+* Fixed error in float serialization (issue #324)
+
+v5.6.3
+------
+
+* Improved speed of float serialization (about twice faster)
+* Added `as()` as a synonym for `as()`... (issue #291)
+* Fixed `call of overloaded isinf(double&) is ambiguous` (issue #284)
+
+v5.6.2
+------
+
+* Fixed build when another lib does `#undef isnan` (issue #284)
+
+v5.6.1
+------
+
+* Added missing `#pragma once` (issue #310)
+
+v5.6.0
+------
+
+* ArduinoJson is now a header-only library (issue #199)
+
+v5.5.1
+------
+
+* Fixed compilation error with Intel Galileo (issue #299)
+
+v5.5.0
+------
+
+* Added `JsonVariant::success()` (issue #279)
+* Renamed `JsonVariant::invalid()` to `JsonVariant::defaultValue()`
+
+v5.4.0
+------
+
+* Changed `::String` to `ArduinoJson::String` (issue #275)
+* Changed `::Print` to `ArduinoJson::Print` too
+
+v5.3.0
+------
+
+* Added custom implementation of `ftoa` (issues #266, #267, #269 and #270)
+* Added `JsonVariant JsonBuffer::parse()` (issue #265)
+* Fixed `unsigned long` printed as `signed long` (issue #170)
+
+v5.2.0
+------
+
+* Added `JsonVariant::as()` as a synonym for `JsonVariant::as()` (issue #257)
+* Added example `JsonHttpClient` (issue #256)
+* Added `JsonArray::copyTo()` and `JsonArray::copyFrom()` (issue #254)
+* Added `RawJson()` to insert pregenerated JSON portions (issue #259)
+
+v5.1.1
+------
+
+* Removed `String` duplication when one replaces a value in a `JsonObject` (PR #232 by @ulion)
+
+v5.1.0
+------
+
+* Added support of `long long` (issue #171)
+* Moved all build settings to `ArduinoJson/Configuration.hpp`
+
+**BREAKING CHANGE**:
+If you defined `ARDUINOJSON_ENABLE_STD_STREAM`, you now need to define it to `1`.
+
+v5.0.8
+------
+
+* Made the library compatible with [PlatformIO](http://platformio.org/) (issue #181)
+* Fixed `JsonVariant::is()` that was incorrectly returning false (issue #214)
+
+v5.0.7
+------
+
+* Made library easier to use from a CMake project: simply `add_subdirectory(ArduinoJson/src)`
+* Changed `String` to be a `typedef` of `std::string` (issues #142 and #161)
+
+**BREAKING CHANGES**:
+- `JsonVariant(true).as()` now returns `"true"` instead of `"1"`
+- `JsonVariant(false).as()` now returns `"false"` instead of `"0"`
+
+v5.0.6
+------
+
+* Added parameter to `DynamicJsonBuffer` constructor to set initial size (issue #152)
+* Fixed warning about library category in Arduino 1.6.6 (issue #147)
+* Examples: Added a loop to wait for serial port to be ready (issue #156)
+
+v5.0.5
+------
+
+* Added overload `JsonObjectSuscript::set(value, decimals)` (issue #143)
+* Use `float` instead of `double` to reduce the size of `JsonVariant` (issue #134)
+
+v5.0.4
+------
+
+* Fixed ambiguous overload with `JsonArraySubscript` and `JsonObjectSubscript` (issue #122)
+
+v5.0.3
+------
+
+* Fixed `printTo(String)` which wrote numbers instead of strings (issue #120)
+* Fixed return type of `JsonArray::is()` and some others (issue #121)
+
+v5.0.2
+------
+
+* Fixed segmentation fault in `parseObject(String)` and `parseArray(String)`, when the
+ `StaticJsonBuffer` is too small to hold a copy of the string
+* Fixed Clang warning "register specifier is deprecated" (issue #102)
+* Fixed GCC warning "declaration shadows a member" (issue #103)
+* Fixed memory alignment, which made ESP8266 crash (issue #104)
+* Fixed compilation on Visual Studio 2010 and 2012 (issue #107)
+
+v5.0.1
+------
+
+* Fixed compilation with Arduino 1.0.6 (issue #99)
+
+v5.0.0
+------
+
+* Added support of `String` class (issues #55, #56, #70, #77)
+* Added `JsonBuffer::strdup()` to make a copy of a string (issues #10, #57)
+* Implicitly call `strdup()` for `String` but not for `char*` (issues #84, #87)
+* Added support of non standard JSON input (issue #44)
+* Added support of comments in JSON input (issue #88)
+* Added implicit cast between numerical types (issues #64, #69, #93)
+* Added ability to read number values as string (issue #90)
+* Redesigned `JsonVariant` to leverage converting constructors instead of assignment operators (issue #66)
+* Switched to new the library layout (requires Arduino 1.0.6 or above)
+
+**BREAKING CHANGES**:
+- `JsonObject::add()` was renamed to `set()`
+- `JsonArray::at()` and `JsonObject::at()` were renamed to `get()`
+- Number of digits of floating point value are now set with `double_with_n_digits()`
+
+**Personal note about the `String` class**:
+Support of the `String` class has been added to the library because many people use it in their programs.
+However, you should not see this as an invitation to use the `String` class.
+The `String` class is **bad** because it uses dynamic memory allocation.
+Compared to static allocation, it compiles to a bigger, slower program, and is less predictable.
+You certainly don't want that in an embedded environment!
+
+v4.6
+----
+
+* Fixed segmentation fault in `DynamicJsonBuffer` when memory allocation fails (issue #92)
+
+v4.5
+----
+
+* Fixed buffer overflow when input contains a backslash followed by a terminator (issue #81)
+
+**Upgrading is recommended** since previous versions contain a potential security risk.
+
+Special thanks to [Giancarlo Canales Barreto](https://github.com/gcanalesb) for finding this nasty bug.
+
+v4.4
+----
+
+* Added `JsonArray::measureLength()` and `JsonObject::measureLength()` (issue #75)
+
+v4.3
+----
+
+* Added `JsonArray::removeAt()` to remove an element of an array (issue #58)
+* Fixed stack-overflow in `DynamicJsonBuffer` when parsing huge JSON files (issue #65)
+* Fixed wrong return value of `parseArray()` and `parseObject()` when allocation fails (issue #68)
+
+v4.2
+----
+
+* Switched back to old library layout (issues #39, #43 and #45)
+* Removed global new operator overload (issue #40, #45 and #46)
+* Added an example with EthernetServer
+
+v4.1
+----
+
+* Added DynamicJsonBuffer (issue #19)
+
+v4.0
+----
+
+* Unified parser and generator API (issue #23)
+* Updated library layout, now requires Arduino 1.0.6 or newer
+
+**BREAKING CHANGE**: API changed significantly, see [Migrating code to the new API](https://github.com/bblanchon/ArduinoJson/wiki/Migrating-code-to-the-new-API).
+
+
+v3.4
+----
+
+* Fixed escaped char parsing (issue #16)
+
+
+v3.3
+----
+
+* Added indented output for the JSON generator (issue #11), see example bellow.
+* Added `IndentedPrint`, a decorator for `Print` to allow indented output
+
+Example:
+
+ JsonOject<2> json;
+ json["key"] = "value";
+ json.prettyPrintTo(Serial);
+
+v3.2
+----
+
+* Fixed a bug when adding nested object in `JsonArray` (bug introduced in v3.1).
+
+v3.1
+----
+
+* Calling `Generator::JsonObject::add()` twice with the same `key` now replaces the `value`
+* Added `Generator::JsonObject::operator[]`, see bellow the new API
+* Added `Generator::JsonObject::remove()` (issue #9)
+
+Old generator API:
+
+ JsonObject<3> root;
+ root.add("sensor", "gps");
+ root.add("time", 1351824120);
+ root.add("data", array);
+
+New generator API:
+
+ JsonObject<3> root;
+ root["sensor"] = "gps";
+ root["time"] = 1351824120;
+ root["data"] = array;
+
+v3.0
+----
+
+* New parser API, see bellow
+* Renamed `JsonHashTable` into `JsonObject`
+* Added iterators for `JsonArray` and `JsonObject` (issue #4)
+
+Old parser API:
+
+ JsonHashTable root = parser.parseHashTable(json);
+
+ char* sensor = root.getString("sensor");
+ long time = root.getLong("time");
+ double latitude = root.getArray("data").getDouble(0);
+ double longitude = root.getArray("data").getDouble(1);
+
+New parser API:
+
+ JsonObject root = parser.parse(json);
+
+ char* sensor = root["sensor"];
+ long time = root["time"];
+ double latitude = root["data"][0];
+ double longitude = root["data"][1];
+
+v2.1
+----
+
+* Fixed case `#include "jsmn.cpp"` which caused an error in Linux (issue #6)
+* Fixed a buffer overrun in JSON Parser (issue #5)
+
+v2.0
+----
+
+* Added JSON encoding (issue #2)
+* Renamed the library `ArduinoJsonParser` becomes `ArduinoJson`
+
+**Breaking change**: you need to add the following line at the top of your program.
+
+ using namespace ArduinoJson::Parser;
+
+v1.2
+----
+
+* Fixed error in JSON parser example (issue #1)
+
+v1.1
+----
+
+* Example: changed `char* json` into `char[] json` so that the bytes are not write protected
+* Fixed parsing bug when the JSON contains multi-dimensional arrays
+
+v1.0
+----
+
+Initial release
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/CMakeLists.txt
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/CMakeLists.txt b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/CMakeLists.txt
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/CMakeLists.txt (revision 173)
@@ -0,0 +1,21 @@
+# Copyright Benoit Blanchon 2014-2016
+# MIT License
+#
+# Arduino JSON library
+# https://github.com/bblanchon/ArduinoJson
+# If you like this project, please add a star!
+
+cmake_minimum_required(VERSION 3.0)
+project(ArduinoJson)
+
+enable_testing()
+
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
+
+if(${COVERAGE})
+ set(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
+endif()
+
+add_subdirectory(test)
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/LICENSE.md
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/LICENSE.md b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/LICENSE.md
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/LICENSE.md (revision 173)
@@ -0,0 +1,10 @@
+The MIT License (MIT)
+---------------------
+
+Copyright © 2014-2016 Benoit BLANCHON
+
+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.
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/README.md
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/README.md b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/README.md
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/README.md (revision 173)
@@ -0,0 +1,128 @@
+Arduino JSON library
+====================
+
+[](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/master) [](https://travis-ci.org/bblanchon/ArduinoJson) [](https://coveralls.io/r/bblanchon/ArduinoJson?branch=master) [](https://github.com/bblanchon/ArduinoJson)
+
+*An elegant and efficient JSON library for embedded systems.*
+
+It's designed to have the most intuitive API, the smallest footprint and works without any allocation on the heap (no malloc).
+
+It has been written with Arduino in mind, but it isn't linked to Arduino libraries so you can use this library in any other C++ project.
+
+Features
+--------
+
+* JSON decoding (comments are supported)
+* JSON encoding (with optional indentation)
+* Elegant API, very easy to use
+* Fixed memory allocation (zero malloc)
+* No data duplication (zero copy)
+* Portable (written in C++98)
+* Self-contained (no external dependency)
+* Small footprint
+* Header-only library
+* MIT License
+
+Works on
+--------
+
+* All Arduino boards (Uno, Due, Mini, Micro, Yun...)
+* ESP8266
+* Teensy
+* Intel Edison and Galileo
+* PlatformIO
+* Energia
+* RedBearLab boards (BLE Nano...)
+* Computers (Windows, Linux, OSX...)
+
+See [FAQ: Compatibility issues](https://github.com/bblanchon/ArduinoJson/wiki/Compatibility-issues)
+
+Quick start
+-----------
+
+#### Decoding / Parsing
+
+```c++
+char json[] = "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
+
+StaticJsonBuffer<200> jsonBuffer;
+
+JsonObject& root = jsonBuffer.parseObject(json);
+
+const char* sensor = root["sensor"];
+long time = root["time"];
+double latitude = root["data"][0];
+double longitude = root["data"][1];
+```
+
+#### Encoding / Generating
+
+```c++
+StaticJsonBuffer<200> jsonBuffer;
+
+JsonObject& root = jsonBuffer.createObject();
+root["sensor"] = "gps";
+root["time"] = 1351824120;
+
+JsonArray& data = root.createNestedArray("data");
+data.add(48.756080, 6); // 6 is the number of decimals to print
+data.add(2.302038, 6); // if not specified, 2 digits are printed
+
+root.printTo(Serial);
+// This prints:
+// {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
+```
+
+
+Documentation
+-------------
+
+The documentation is available online in the [Arduino JSON wiki](https://github.com/bblanchon/ArduinoJson/wiki)
+
+Testimonials
+------------
+
+From Arduino's Forum user `jflaplante`:
+> I tried aJson json-arduino before trying your library. I always ran into memory problem after a while.
+> I have no such problem so far with your library. It is working perfectly with my web services.
+
+From StackOverflow user `thegreendroid`:
+> It has a really elegant, simple API and it works like a charm on embedded and Windows/Linux platforms. We recently started using this on an embedded project and I can vouch for its quality.
+
+From GitHub user `zacsketches`:
+> Thanks for a great library!!!
+> I've been watching you consistently develop this library over the past six months, and I used it today for a publish and subscribe architecture designed to help hobbyists move into more advanced robotics. Your library allowed me to implement remote subscription in order to facilitate multi-processor robots.
+> ArduinoJson saved me a week's worth of time!!
+
+[From Reddit user `erm_what_`](https://www.reddit.com/r/arduino/comments/3jj6ep/announcing_arduinojson_50/cusjk8c):
+> This is a great library and I wouldn't be able to do the project I'm doing without it. I completely recommend it.
+
+[From Reddit user `makerhacks`](https://www.reddit.com/r/arduino/comments/3jj6ep/announcing_arduinojson_50/cusqg7b):
+> I am just starting an ESP8266 clock project and now I can output JSON from my server script and interpret it painlessly.
+
+[From Twitter user `@hemalchevli`](https://twitter.com/hemalchevli/status/715788439397011456):
+> ArduinoJson library should be used as a benchmark/reference for making libraries. Truly elegant.
+
+Donators
+--------
+
+Special thanks to the following persons and companies who made generous donations to the library author:
+
+* Robert Murphy
+* Surge Communications
+* Alex Scott
+* Firepick Services LLC
+* A B Doodkorte
+* Scott Smith
+* Johann Stieger
+* Gustavo Donizeti Gini
+* Charles-Henri Hallard
+* Martijn van den Burg
+* Nick Koumaris
+* Jon Williams
+* Kestutis Liaugminas
+* Darlington Adibe
+
+---
+
+Found this library useful? Please star this project or [help me back with a donation!](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donate%40benoitblanchon%2efr&lc=GB&item_name=Benoit%20Blanchon&item_number=Arduino%20JSON¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted) :smile:
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/appveyor.yml
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/appveyor.yml b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/appveyor.yml
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/appveyor.yml (revision 173)
@@ -0,0 +1,18 @@
+version: 5.6.6.{build}
+environment:
+ matrix:
+ - CMAKE_GENERATOR: Visual Studio 14 2015
+ - CMAKE_GENERATOR: Visual Studio 12 2013
+ - CMAKE_GENERATOR: Visual Studio 11 2012
+ - CMAKE_GENERATOR: Visual Studio 10 2010
+# - CMAKE_GENERATOR: MinGW Makefiles
+# Note: Disabled because of unexplicated error -1073741511
+# This used to work fine with GCC 4.8.2 then failed after they upgraded to GCC 4.9.3
+configuration: Debug
+before_build:
+- set PATH=C:\MinGW\bin;%PATH:C:\Program Files\Git\usr\bin;=% # Workaround for CMake not wanting sh.exe on PATH for MinGW
+- cmake -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "%CMAKE_GENERATOR%" .
+build_script:
+- cmake --build . --config %CONFIGURATION%
+test_script:
+- ctest -V .
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/IndentedPrintExample/IndentedPrintExample.ino
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/IndentedPrintExample/IndentedPrintExample.ino b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/IndentedPrintExample/IndentedPrintExample.ino
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/IndentedPrintExample/IndentedPrintExample.ino (revision 173)
@@ -0,0 +1,35 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#include
+
+using namespace ArduinoJson::Internals;
+
+void setup() {
+ Serial.begin(9600);
+ while (!Serial) {
+ // wait serial port initialization
+ }
+
+ IndentedPrint serial(Serial);
+ serial.setTabSize(4);
+
+ serial.println("This is at indentation 0");
+ serial.indent();
+ serial.println("This is at indentation 1");
+ serial.println("This is also at indentation 1");
+ serial.indent();
+ serial.println("This is at indentation 2");
+
+ serial.unindent();
+ serial.unindent();
+ serial.println("This is back at indentation 0");
+}
+
+void loop() {
+ // not used in this example
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonGeneratorExample/JsonGeneratorExample.ino
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonGeneratorExample/JsonGeneratorExample.ino b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonGeneratorExample/JsonGeneratorExample.ino
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonGeneratorExample/JsonGeneratorExample.ino (revision 173)
@@ -0,0 +1,70 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#include
+
+void setup() {
+ Serial.begin(9600);
+ while (!Serial) {
+ // wait serial port initialization
+ }
+
+ // Memory pool for JSON object tree.
+ //
+ // Inside the brackets, 200 is the size of the pool in bytes.
+ // If the JSON object is more complex, you need to increase that value.
+ StaticJsonBuffer<200> jsonBuffer;
+
+ // StaticJsonBuffer allocates memory on the stack, it can be
+ // replaced by DynamicJsonBuffer which allocates in the heap.
+ // It's simpler but less efficient.
+ //
+ // DynamicJsonBuffer jsonBuffer;
+
+ // Create the root of the object tree.
+ //
+ // It's a reference to the JsonObject, the actual bytes are inside the
+ // JsonBuffer with all the other nodes of the object tree.
+ // Memory is freed when jsonBuffer goes out of scope.
+ JsonObject& root = jsonBuffer.createObject();
+
+ // Add values in the object
+ //
+ // Most of the time, you can rely on the implicit casts.
+ // In other case, you can do root.set("time", 1351824120);
+ root["sensor"] = "gps";
+ root["time"] = 1351824120;
+
+ // Add a nested array.
+ //
+ // It's also possible to create the array separately and add it to the
+ // JsonObject but it's less efficient.
+ JsonArray& data = root.createNestedArray("data");
+ data.add(double_with_n_digits(48.756080, 6));
+ data.add(double_with_n_digits(2.302038, 6));
+
+ root.printTo(Serial);
+ // This prints:
+ // {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
+
+ Serial.println();
+
+ root.prettyPrintTo(Serial);
+ // This prints:
+ // {
+ // "sensor": "gps",
+ // "time": 1351824120,
+ // "data": [
+ // 48.756080,
+ // 2.302038
+ // ]
+ // }
+}
+
+void loop() {
+ // not used in this example
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonHttpClient/JsonHttpClient.ino
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonHttpClient/JsonHttpClient.ino b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonHttpClient/JsonHttpClient.ino
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonHttpClient/JsonHttpClient.ino (revision 173)
@@ -0,0 +1,195 @@
+// Sample Arduino Json Web Client
+// Downloads and parse http://jsonplaceholder.typicode.com/users/1
+//
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#include
+#include
+#include
+
+EthernetClient client;
+
+const char* server = "jsonplaceholder.typicode.com"; // server's address
+const char* resource = "/users/1"; // http resource
+const unsigned long BAUD_RATE = 9600; // serial connection speed
+const unsigned long HTTP_TIMEOUT = 10000; // max respone time from server
+const size_t MAX_CONTENT_SIZE = 512; // max size of the HTTP response
+
+// The type of data that we want to extract from the page
+struct UserData {
+ char name[32];
+ char company[32];
+};
+
+// ARDUINO entry point #1: runs once when you press reset or power the board
+void setup() {
+ initSerial();
+ initEthernet();
+}
+
+// ARDUINO entry point #2: runs over and over again forever
+void loop() {
+ if (connect(server)) {
+ if (sendRequest(server, resource) && skipResponseHeaders()) {
+ char response[MAX_CONTENT_SIZE];
+ readReponseContent(response, sizeof(response));
+
+ UserData userData;
+ if (parseUserData(response, &userData)) {
+ printUserData(&userData);
+ }
+ }
+ disconnect();
+ }
+ wait();
+}
+
+// Initialize Serial port
+void initSerial() {
+ Serial.begin(BAUD_RATE);
+ while (!Serial) {
+ ; // wait for serial port to initialize
+ }
+ Serial.println("Serial ready");
+}
+
+// Initialize Ethernet library
+void initEthernet() {
+ byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
+ if (!Ethernet.begin(mac)) {
+ Serial.println("Failed to configure Ethernet");
+ return;
+ }
+ Serial.println("Ethernet ready");
+ delay(1000);
+}
+
+// Open connection to the HTTP server
+bool connect(const char* hostName) {
+ Serial.print("Connect to ");
+ Serial.println(hostName);
+
+ bool ok = client.connect(hostName, 80);
+
+ Serial.println(ok ? "Connected" : "Connection Failed!");
+ return ok;
+}
+
+// Send the HTTP GET request to the server
+bool sendRequest(const char* host, const char* resource) {
+ Serial.print("GET ");
+ Serial.println(resource);
+
+ client.print("GET ");
+ client.print(resource);
+ client.println(" HTTP/1.1");
+ client.print("Host: ");
+ client.println(server);
+ client.println("Connection: close");
+ client.println();
+
+ return true;
+}
+
+// Skip HTTP headers so that we are at the beginning of the response's body
+bool skipResponseHeaders() {
+ // HTTP headers end with an empty line
+ char endOfHeaders[] = "\r\n\r\n";
+
+ client.setTimeout(HTTP_TIMEOUT);
+ bool ok = client.find(endOfHeaders);
+
+ if (!ok) {
+ Serial.println("No response or invalid response!");
+ }
+
+ return ok;
+}
+
+// Read the body of the response from the HTTP server
+void readReponseContent(char* content, size_t maxSize) {
+ size_t length = client.readBytes(content, maxSize);
+ content[length] = 0;
+ Serial.println(content);
+}
+
+// Parse the JSON from the input string and extract the interesting values
+// Here is the JSON we need to parse
+// {
+// "id": 1,
+// "name": "Leanne Graham",
+// "username": "Bret",
+// "email": "Sincere@april.biz",
+// "address": {
+// "street": "Kulas Light",
+// "suite": "Apt. 556",
+// "city": "Gwenborough",
+// "zipcode": "92998-3874",
+// "geo": {
+// "lat": "-37.3159",
+// "lng": "81.1496"
+// }
+// },
+// "phone": "1-770-736-8031 x56442",
+// "website": "hildegard.org",
+// "company": {
+// "name": "Romaguera-Crona",
+// "catchPhrase": "Multi-layered client-server neural-net",
+// "bs": "harness real-time e-markets"
+// }
+// }
+bool parseUserData(char* content, struct UserData* userData) {
+ // Compute optimal size of the JSON buffer according to what we need to parse.
+ // This is only required if you use StaticJsonBuffer.
+ const size_t BUFFER_SIZE =
+ JSON_OBJECT_SIZE(8) // the root object has 8 elements
+ + JSON_OBJECT_SIZE(5) // the "address" object has 5 elements
+ + JSON_OBJECT_SIZE(2) // the "geo" object has 2 elements
+ + JSON_OBJECT_SIZE(3); // the "company" object has 3 elements
+
+ // Allocate a temporary memory pool on the stack
+ StaticJsonBuffer jsonBuffer;
+ // If the memory pool is too big for the stack, use this instead:
+ // DynamicJsonBuffer jsonBuffer;
+
+ JsonObject& root = jsonBuffer.parseObject(content);
+
+ if (!root.success()) {
+ Serial.println("JSON parsing failed!");
+ return false;
+ }
+
+ // Here were copy the strings we're interested in
+ strcpy(userData->name, root["name"]);
+ strcpy(userData->company, root["company"]["name"]);
+ // It's not mandatory to make a copy, you could just use the pointers
+ // Since, they are pointing inside the "content" buffer, so you need to make
+ // sure it's still in memory when you read the string
+
+ return true;
+}
+
+// Print the data extracted from the JSON
+void printUserData(const struct UserData* userData) {
+ Serial.print("Name = ");
+ Serial.println(userData->name);
+ Serial.print("Company = ");
+ Serial.println(userData->company);
+}
+
+// Close the connection with the HTTP server
+void disconnect() {
+ Serial.println("Disconnect");
+ client.stop();
+}
+
+// Pause for a 1 minute
+void wait() {
+ Serial.println("Wait 60 seconds");
+ delay(60000);
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonParserExample/JsonParserExample.ino
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonParserExample/JsonParserExample.ino b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonParserExample/JsonParserExample.ino
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonParserExample/JsonParserExample.ino (revision 173)
@@ -0,0 +1,67 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#include
+
+void setup() {
+ Serial.begin(9600);
+ while (!Serial) {
+ // wait serial port initialization
+ }
+
+ // Memory pool for JSON object tree.
+ //
+ // Inside the brackets, 200 is the size of the pool in bytes,
+ // If the JSON object is more complex, you need to increase that value.
+ StaticJsonBuffer<200> jsonBuffer;
+
+ // StaticJsonBuffer allocates memory on the stack, it can be
+ // replaced by DynamicJsonBuffer which allocates in the heap.
+ // It's simpler but less efficient.
+ //
+ // DynamicJsonBuffer jsonBuffer;
+
+ // JSON input string.
+ //
+ // It's better to use a char[] as shown here.
+ // If you use a const char* or a String, ArduinoJson will
+ // have to make a copy of the input in the JsonBuffer.
+ char json[] =
+ "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
+
+ // Root of the object tree.
+ //
+ // It's a reference to the JsonObject, the actual bytes are inside the
+ // JsonBuffer with all the other nodes of the object tree.
+ // Memory is freed when jsonBuffer goes out of scope.
+ JsonObject& root = jsonBuffer.parseObject(json);
+
+ // Test if parsing succeeds.
+ if (!root.success()) {
+ Serial.println("parseObject() failed");
+ return;
+ }
+
+ // Fetch values.
+ //
+ // Most of the time, you can rely on the implicit casts.
+ // In other case, you can do root["time"].as();
+ const char* sensor = root["sensor"];
+ long time = root["time"];
+ double latitude = root["data"][0];
+ double longitude = root["data"][1];
+
+ // Print values.
+ Serial.println(sensor);
+ Serial.println(time);
+ Serial.println(latitude, 6);
+ Serial.println(longitude, 6);
+}
+
+void loop() {
+ // not used in this example
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonServer/JsonServer.ino
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonServer/JsonServer.ino b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonServer/JsonServer.ino
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonServer/JsonServer.ino (revision 173)
@@ -0,0 +1,74 @@
+// Sample Arduino Json Web Server
+// Created by Benoit Blanchon.
+// Heavily inspired by "Web Server" from David A. Mellis and Tom Igoe
+
+#include
+#include
+#include
+
+byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
+IPAddress ip(192, 168, 0, 177);
+EthernetServer server(80);
+
+bool readRequest(EthernetClient& client) {
+ bool currentLineIsBlank = true;
+ while (client.connected()) {
+ if (client.available()) {
+ char c = client.read();
+ if (c == '\n' && currentLineIsBlank) {
+ return true;
+ } else if (c == '\n') {
+ currentLineIsBlank = true;
+ } else if (c != '\r') {
+ currentLineIsBlank = false;
+ }
+ }
+ }
+ return false;
+}
+
+JsonObject& prepareResponse(JsonBuffer& jsonBuffer) {
+ JsonObject& root = jsonBuffer.createObject();
+
+ JsonArray& analogValues = root.createNestedArray("analog");
+ for (int pin = 0; pin < 6; pin++) {
+ int value = analogRead(pin);
+ analogValues.add(value);
+ }
+
+ JsonArray& digitalValues = root.createNestedArray("digital");
+ for (int pin = 0; pin < 14; pin++) {
+ int value = digitalRead(pin);
+ digitalValues.add(value);
+ }
+
+ return root;
+}
+
+void writeResponse(EthernetClient& client, JsonObject& json) {
+ client.println("HTTP/1.1 200 OK");
+ client.println("Content-Type: application/json");
+ client.println("Connection: close");
+ client.println();
+
+ json.prettyPrintTo(client);
+}
+
+void setup() {
+ Ethernet.begin(mac, ip);
+ server.begin();
+}
+
+void loop() {
+ EthernetClient client = server.available();
+ if (client) {
+ bool success = readRequest(client);
+ if (success) {
+ StaticJsonBuffer<500> jsonBuffer;
+ JsonObject& json = prepareResponse(jsonBuffer);
+ writeResponse(client, json);
+ }
+ delay(1);
+ client.stop();
+ }
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonUdpBeacon/JsonUdpBeacon.ino
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonUdpBeacon/JsonUdpBeacon.ino b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonUdpBeacon/JsonUdpBeacon.ino
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/examples/JsonUdpBeacon/JsonUdpBeacon.ino (revision 173)
@@ -0,0 +1,55 @@
+// Send a JSON object on UDP at regular interval
+//
+// You can easily test this program with netcat:
+// $ nc -ulp 8888
+//
+// by Benoit Blanchon, MIT License 2015-2016
+
+#include
+#include
+#include
+
+byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
+IPAddress localIp(192, 168, 0, 177);
+IPAddress remoteIp(192, 168, 0, 109);
+unsigned int remotePort = 8888;
+unsigned localPort = 8888;
+EthernetUDP udp;
+
+JsonObject& buildJson(JsonBuffer& jsonBuffer) {
+ JsonObject& root = jsonBuffer.createObject();
+
+ JsonArray& analogValues = root.createNestedArray("analog");
+ for (int pin = 0; pin < 6; pin++) {
+ int value = analogRead(pin);
+ analogValues.add(value);
+ }
+
+ JsonArray& digitalValues = root.createNestedArray("digital");
+ for (int pin = 0; pin < 14; pin++) {
+ int value = digitalRead(pin);
+ digitalValues.add(value);
+ }
+
+ return root;
+}
+
+void sendJson(JsonObject& json) {
+ udp.beginPacket(remoteIp, remotePort);
+ json.printTo(udp);
+ udp.println();
+ udp.endPacket();
+}
+
+void setup() {
+ Ethernet.begin(mac, localIp);
+ udp.begin(localPort);
+}
+
+void loop() {
+ delay(1000);
+
+ StaticJsonBuffer<300> jsonBuffer;
+ JsonObject& json = buildJson(jsonBuffer);
+ sendJson(json);
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson.h
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson.h b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson.h
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson.h (revision 173)
@@ -0,0 +1,9 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#include "ArduinoJson.hpp"
+using namespace ArduinoJson;
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson.hpp (revision 173)
@@ -0,0 +1,22 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "ArduinoJson/DynamicJsonBuffer.hpp"
+#include "ArduinoJson/JsonArray.hpp"
+#include "ArduinoJson/JsonObject.hpp"
+#include "ArduinoJson/StaticJsonBuffer.hpp"
+
+#include "ArduinoJson/Internals/JsonParser.ipp"
+#include "ArduinoJson/Internals/JsonSerializer.ipp"
+#include "ArduinoJson/JsonArray.ipp"
+#include "ArduinoJson/JsonBuffer.ipp"
+#include "ArduinoJson/JsonObject.ipp"
+#include "ArduinoJson/JsonVariant.ipp"
+
+using namespace ArduinoJson;
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Configuration.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Configuration.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Configuration.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Configuration.hpp (revision 173)
@@ -0,0 +1,89 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#ifdef ARDUINO // assume this is an embedded platform
+
+// store using float instead of double to reduce the memory usage (issue #134)
+#ifndef ARDUINOJSON_USE_DOUBLE
+#define ARDUINOJSON_USE_DOUBLE 0
+#endif
+
+// store using a long because it usually match the size of a float.
+#ifndef ARDUINOJSON_USE_LONG_LONG
+#define ARDUINOJSON_USE_LONG_LONG 0
+#endif
+#ifndef ARDUINOJSON_USE_INT64
+#define ARDUINOJSON_USE_INT64 0
+#endif
+
+// arduino has its own implementation of String to replace std::string
+#ifndef ARDUINOJSON_USE_ARDUINO_STRING
+#define ARDUINOJSON_USE_ARDUINO_STRING 1
+#endif
+
+// arduino doesn't support STL stream
+#ifndef ARDUINOJSON_ENABLE_STD_STREAM
+#define ARDUINOJSON_ENABLE_STD_STREAM 0
+#endif
+
+#ifndef ARDUINOJSON_ENABLE_ALIGNMENT
+#ifdef ARDUINO_ARCH_AVR
+// alignment isn't needed for 8-bit AVR
+#define ARDUINOJSON_ENABLE_ALIGNMENT 0
+#else
+// but must processor needs pointer to be align on word size
+#define ARDUINOJSON_ENABLE_ALIGNMENT 1
+#endif
+#endif
+
+#else // assume this is a computer
+
+// on a computer we have plenty of memory so we can use doubles
+#ifndef ARDUINOJSON_USE_DOUBLE
+#define ARDUINOJSON_USE_DOUBLE 1
+#endif
+
+// use long long when available
+#ifndef ARDUINOJSON_USE_LONG_LONG
+#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
+#define ARDUINOJSON_USE_LONG_LONG 1
+#else
+#define ARDUINOJSON_USE_LONG_LONG 0
+#endif
+#endif
+
+// use _int64 on old versions of Visual Studio
+#ifndef ARDUINOJSON_USE_INT64
+#if defined(_MSC_VER) && _MSC_VER <= 1700
+#define ARDUINOJSON_USE_INT64 1
+#else
+#define ARDUINOJSON_USE_INT64 0
+#endif
+#endif
+
+// on a computer, we can use std::string
+#ifndef ARDUINOJSON_USE_ARDUINO_STRING
+#define ARDUINOJSON_USE_ARDUINO_STRING 0
+#endif
+
+// on a computer, we can assume that the STL is there
+#ifndef ARDUINOJSON_ENABLE_STD_STREAM
+#define ARDUINOJSON_ENABLE_STD_STREAM 1
+#endif
+
+#ifndef ARDUINOJSON_ENABLE_ALIGNMENT
+// even if not required, most cpu's are faster with aligned pointers
+#define ARDUINOJSON_ENABLE_ALIGNMENT 1
+#endif
+
+#endif
+
+#if ARDUINOJSON_USE_LONG_LONG && ARDUINOJSON_USE_INT64
+#error ARDUINOJSON_USE_LONG_LONG and ARDUINOJSON_USE_INT64 cannot be set together
+#endif
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/DynamicJsonBuffer.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/DynamicJsonBuffer.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/DynamicJsonBuffer.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/DynamicJsonBuffer.hpp (revision 173)
@@ -0,0 +1,18 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "Internals/BlockJsonBuffer.hpp"
+
+namespace ArduinoJson {
+// Implements a JsonBuffer with dynamic memory allocation.
+// You are strongly encouraged to consider using StaticJsonBuffer which is much
+// more suitable for embedded systems.
+typedef Internals::BlockJsonBuffer
+ DynamicJsonBuffer;
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/BlockJsonBuffer.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/BlockJsonBuffer.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/BlockJsonBuffer.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/BlockJsonBuffer.hpp (revision 173)
@@ -0,0 +1,115 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../JsonBuffer.hpp"
+
+#include
+
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#elif defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#pragma GCC diagnostic push
+#endif
+#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+
+namespace ArduinoJson {
+namespace Internals {
+class DefaultAllocator {
+ public:
+ void* allocate(size_t size) {
+ return malloc(size);
+ }
+ void deallocate(void* pointer) {
+ free(pointer);
+ }
+};
+
+template
+class BlockJsonBuffer : public JsonBuffer {
+ struct Block;
+ struct EmptyBlock {
+ Block* next;
+ size_t capacity;
+ size_t size;
+ };
+ struct Block : EmptyBlock {
+ uint8_t data[1];
+ };
+
+ public:
+ BlockJsonBuffer(size_t initialSize = 256)
+ : _head(NULL), _nextBlockSize(initialSize) {}
+
+ ~BlockJsonBuffer() {
+ Block* currentBlock = _head;
+
+ while (currentBlock != NULL) {
+ Block* nextBlock = currentBlock->next;
+ _allocator.deallocate(currentBlock);
+ currentBlock = nextBlock;
+ }
+ }
+
+ size_t size() const {
+ size_t total = 0;
+ for (const Block* b = _head; b; b = b->next) total += b->size;
+ return total;
+ }
+
+ virtual void* alloc(size_t bytes) {
+ return canAllocInHead(bytes) ? allocInHead(bytes) : allocInNewBlock(bytes);
+ }
+
+ private:
+ bool canAllocInHead(size_t bytes) const {
+ return _head != NULL && _head->size + bytes <= _head->capacity;
+ }
+
+ void* allocInHead(size_t bytes) {
+ void* p = _head->data + _head->size;
+ _head->size += round_size_up(bytes);
+ return p;
+ }
+
+ void* allocInNewBlock(size_t bytes) {
+ size_t capacity = _nextBlockSize;
+ if (bytes > capacity) capacity = bytes;
+ if (!addNewBlock(capacity)) return NULL;
+ _nextBlockSize *= 2;
+ return allocInHead(bytes);
+ }
+
+ bool addNewBlock(size_t capacity) {
+ size_t bytes = sizeof(EmptyBlock) + capacity;
+ Block* block = static_cast(_allocator.allocate(bytes));
+ if (block == NULL) return false;
+ block->capacity = capacity;
+ block->size = 0;
+ block->next = _head;
+ _head = block;
+ return true;
+ }
+
+ TAllocator _allocator;
+ Block* _head;
+ size_t _nextBlockSize;
+};
+}
+}
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#elif defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#pragma GCC diagnostic pop
+#endif
+#endif
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Comments.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Comments.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Comments.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Comments.hpp (revision 173)
@@ -0,0 +1,56 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+namespace ArduinoJson {
+namespace Internals {
+inline const char *skipCStyleComment(const char *ptr) {
+ ptr += 2;
+ for (;;) {
+ if (ptr[0] == '\0') return ptr;
+ if (ptr[0] == '*' && ptr[1] == '/') return ptr + 2;
+ ptr++;
+ }
+}
+
+inline const char *skipCppStyleComment(const char *ptr) {
+ ptr += 2;
+ for (;;) {
+ if (ptr[0] == '\0' || ptr[0] == '\n') return ptr;
+ ptr++;
+ }
+}
+
+inline const char *skipSpacesAndComments(const char *ptr) {
+ for (;;) {
+ switch (ptr[0]) {
+ case ' ':
+ case '\t':
+ case '\r':
+ case '\n':
+ ptr++;
+ continue;
+ case '/':
+ switch (ptr[1]) {
+ case '*':
+ ptr = skipCStyleComment(ptr);
+ break;
+ case '/':
+ ptr = skipCppStyleComment(ptr);
+ break;
+ default:
+ return ptr;
+ }
+ break;
+ default:
+ return ptr;
+ }
+ }
+}
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/DummyPrint.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/DummyPrint.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/DummyPrint.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/DummyPrint.hpp (revision 173)
@@ -0,0 +1,21 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Print.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A dummy Print implementation used in JsonPrintable::measureLength()
+class DummyPrint : public Print {
+ public:
+ virtual size_t write(uint8_t) { return 1; }
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/DynamicStringBuilder.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/DynamicStringBuilder.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/DynamicStringBuilder.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/DynamicStringBuilder.hpp (revision 173)
@@ -0,0 +1,33 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Print.hpp"
+#include "../String.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A Print implementation that allows to write in a String
+class DynamicStringBuilder : public Print {
+ public:
+ DynamicStringBuilder(String &str) : _str(str) {}
+
+ virtual size_t write(uint8_t c) {
+ // Need to cast to char, otherwise String will print a number (issue #120)
+ _str += static_cast(c);
+ return 1;
+ }
+
+ private:
+ DynamicStringBuilder &operator=(const DynamicStringBuilder &);
+
+ String &_str;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Encoding.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Encoding.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Encoding.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Encoding.hpp (revision 173)
@@ -0,0 +1,42 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Print.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+class Encoding {
+ public:
+ // Optimized for code size on a 8-bit AVR
+ static char escapeChar(char c) {
+ const char *p = escapeTable(false);
+ while (p[0] && p[1] != c) {
+ p += 2;
+ }
+ return p[0];
+ }
+
+ // Optimized for code size on a 8-bit AVR
+ static char unescapeChar(char c) {
+ const char *p = escapeTable(true);
+ for (;;) {
+ if (p[0] == '\0') return c;
+ if (p[0] == c) return p[1];
+ p += 2;
+ }
+ }
+
+ private:
+ static const char *escapeTable(bool excludeIdenticals) {
+ return &"\"\"\\\\b\bf\fn\nr\rt\t"[excludeIdenticals ? 4 : 0];
+ }
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/IndentedPrint.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/IndentedPrint.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/IndentedPrint.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/IndentedPrint.hpp (revision 173)
@@ -0,0 +1,65 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Print.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// Decorator on top of Print to allow indented output.
+// This class is used by JsonPrintable::prettyPrintTo() but can also be used
+// for your own purpose, like logging.
+class IndentedPrint : public Print {
+ public:
+ explicit IndentedPrint(Print &p) : sink(&p) {
+ level = 0;
+ tabSize = 2;
+ isNewLine = true;
+ }
+
+ virtual size_t write(uint8_t c) {
+ size_t n = 0;
+ if (isNewLine) n += writeTabs();
+ n += sink->write(c);
+ isNewLine = c == '\n';
+ return n;
+ }
+
+ // Adds one level of indentation
+ void indent() {
+ if (level < MAX_LEVEL) level++;
+ }
+
+ // Removes one level of indentation
+ void unindent() {
+ if (level > 0) level--;
+ }
+
+ // Set the number of space printed for each level of indentation
+ void setTabSize(uint8_t n) {
+ if (n < MAX_TAB_SIZE) tabSize = n & MAX_TAB_SIZE;
+ }
+
+ private:
+ Print *sink;
+ uint8_t level : 4;
+ uint8_t tabSize : 3;
+ bool isNewLine : 1;
+
+ size_t writeTabs() {
+ size_t n = 0;
+ for (int i = 0; i < level * tabSize; i++) n += sink->write(' ');
+ return n;
+ }
+
+ static const int MAX_LEVEL = 15; // because it's only 4 bits
+ static const int MAX_TAB_SIZE = 7; // because it's only 3 bits
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonBufferAllocated.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonBufferAllocated.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonBufferAllocated.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonBufferAllocated.hpp (revision 173)
@@ -0,0 +1,25 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../JsonBuffer.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+class JsonBufferAllocated {
+ public:
+ void *operator new(size_t n, JsonBuffer *jsonBuffer) throw() {
+ if (!jsonBuffer) return NULL;
+ return jsonBuffer->alloc(n);
+ }
+
+ void operator delete(void *, JsonBuffer *) throw() {}
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonFloat.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonFloat.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonFloat.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonFloat.hpp (revision 173)
@@ -0,0 +1,21 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Configuration.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+#if ARDUINOJSON_USE_DOUBLE
+typedef double JsonFloat;
+#else
+typedef float JsonFloat;
+#endif
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonInteger.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonInteger.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonInteger.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonInteger.hpp (revision 173)
@@ -0,0 +1,26 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Configuration.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+#if ARDUINOJSON_USE_LONG_LONG
+typedef long long JsonInteger;
+typedef unsigned long long JsonUInt;
+#elif ARDUINOJSON_USE_INT64
+typedef __int64 JsonInteger;
+typedef unsigned _int64 JsonUInt;
+#else
+typedef long JsonInteger;
+typedef unsigned long JsonUInt;
+#endif
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonParser.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonParser.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonParser.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonParser.hpp (revision 173)
@@ -0,0 +1,66 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../JsonBuffer.hpp"
+#include "../JsonVariant.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// Parse JSON string to create JsonArrays and JsonObjects
+// This internal class is not indended to be used directly.
+// Instead, use JsonBuffer.parseArray() or .parseObject()
+class JsonParser {
+ public:
+ JsonParser(JsonBuffer *buffer, char *json, uint8_t nestingLimit)
+ : _buffer(buffer),
+ _readPtr(json ? json : ""),
+ _writePtr(json),
+ _nestingLimit(nestingLimit) {}
+
+ JsonArray &parseArray();
+ JsonObject &parseObject();
+
+ JsonVariant parseVariant() {
+ JsonVariant result;
+ parseAnythingTo(&result);
+ return result;
+ }
+
+ private:
+ bool skip(char charToSkip);
+
+ const char *parseString();
+ bool parseAnythingTo(JsonVariant *destination);
+ FORCE_INLINE bool parseAnythingToUnsafe(JsonVariant *destination);
+
+ inline bool parseArrayTo(JsonVariant *destination);
+ inline bool parseObjectTo(JsonVariant *destination);
+ inline bool parseStringTo(JsonVariant *destination);
+
+ static inline bool isInRange(char c, char min, char max) {
+ return min <= c && c <= max;
+ }
+
+ static inline bool isLetterOrNumber(char c) {
+ return isInRange(c, '0', '9') || isInRange(c, 'a', 'z') ||
+ isInRange(c, 'A', 'Z') || c == '-' || c == '.';
+ }
+
+ static inline bool isQuote(char c) {
+ return c == '\'' || c == '\"';
+ }
+
+ JsonBuffer *_buffer;
+ const char *_readPtr;
+ char *_writePtr;
+ uint8_t _nestingLimit;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonParser.ipp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonParser.ipp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonParser.ipp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonParser.ipp (revision 173)
@@ -0,0 +1,191 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "Comments.hpp"
+#include "JsonParser.hpp"
+
+inline bool ArduinoJson::Internals::JsonParser::skip(char charToSkip) {
+ const char *ptr = skipSpacesAndComments(_readPtr);
+ if (*ptr != charToSkip) return false;
+ ptr++;
+ _readPtr = skipSpacesAndComments(ptr);
+ return true;
+}
+
+inline bool ArduinoJson::Internals::JsonParser::parseAnythingTo(
+ JsonVariant *destination) {
+ if (_nestingLimit == 0) return false;
+ _nestingLimit--;
+ bool success = parseAnythingToUnsafe(destination);
+ _nestingLimit++;
+ return success;
+}
+
+inline bool ArduinoJson::Internals::JsonParser::parseAnythingToUnsafe(
+ JsonVariant *destination) {
+ _readPtr = skipSpacesAndComments(_readPtr);
+
+ switch (*_readPtr) {
+ case '[':
+ return parseArrayTo(destination);
+
+ case '{':
+ return parseObjectTo(destination);
+
+ default:
+ return parseStringTo(destination);
+ }
+}
+
+inline ArduinoJson::JsonArray &
+ArduinoJson::Internals::JsonParser::parseArray() {
+ // Create an empty array
+ JsonArray &array = _buffer->createArray();
+
+ // Check opening braket
+ if (!skip('[')) goto ERROR_MISSING_BRACKET;
+ if (skip(']')) goto SUCCESS_EMPTY_ARRAY;
+
+ // Read each value
+ for (;;) {
+ // 1 - Parse value
+ JsonVariant value;
+ if (!parseAnythingTo(&value)) goto ERROR_INVALID_VALUE;
+ if (!array.add(value)) goto ERROR_NO_MEMORY;
+
+ // 2 - More values?
+ if (skip(']')) goto SUCCES_NON_EMPTY_ARRAY;
+ if (!skip(',')) goto ERROR_MISSING_COMMA;
+ }
+
+SUCCESS_EMPTY_ARRAY:
+SUCCES_NON_EMPTY_ARRAY:
+ return array;
+
+ERROR_INVALID_VALUE:
+ERROR_MISSING_BRACKET:
+ERROR_MISSING_COMMA:
+ERROR_NO_MEMORY:
+ return JsonArray::invalid();
+}
+
+inline bool ArduinoJson::Internals::JsonParser::parseArrayTo(
+ JsonVariant *destination) {
+ JsonArray &array = parseArray();
+ if (!array.success()) return false;
+
+ *destination = array;
+ return true;
+}
+
+inline ArduinoJson::JsonObject &
+ArduinoJson::Internals::JsonParser::parseObject() {
+ // Create an empty object
+ JsonObject &object = _buffer->createObject();
+
+ // Check opening brace
+ if (!skip('{')) goto ERROR_MISSING_BRACE;
+ if (skip('}')) goto SUCCESS_EMPTY_OBJECT;
+
+ // Read each key value pair
+ for (;;) {
+ // 1 - Parse key
+ const char *key = parseString();
+ if (!key) goto ERROR_INVALID_KEY;
+ if (!skip(':')) goto ERROR_MISSING_COLON;
+
+ // 2 - Parse value
+ JsonVariant value;
+ if (!parseAnythingTo(&value)) goto ERROR_INVALID_VALUE;
+ if (!object.set(key, value)) goto ERROR_NO_MEMORY;
+
+ // 3 - More keys/values?
+ if (skip('}')) goto SUCCESS_NON_EMPTY_OBJECT;
+ if (!skip(',')) goto ERROR_MISSING_COMMA;
+ }
+
+SUCCESS_EMPTY_OBJECT:
+SUCCESS_NON_EMPTY_OBJECT:
+ return object;
+
+ERROR_INVALID_KEY:
+ERROR_INVALID_VALUE:
+ERROR_MISSING_BRACE:
+ERROR_MISSING_COLON:
+ERROR_MISSING_COMMA:
+ERROR_NO_MEMORY:
+ return JsonObject::invalid();
+}
+
+inline bool ArduinoJson::Internals::JsonParser::parseObjectTo(
+ JsonVariant *destination) {
+ JsonObject &object = parseObject();
+ if (!object.success()) return false;
+
+ *destination = object;
+ return true;
+}
+
+inline const char *ArduinoJson::Internals::JsonParser::parseString() {
+ const char *readPtr = _readPtr;
+ char *writePtr = _writePtr;
+
+ char c = *readPtr;
+
+ if (isQuote(c)) { // quotes
+ char stopChar = c;
+ for (;;) {
+ c = *++readPtr;
+ if (c == '\0') break;
+
+ if (c == stopChar) {
+ readPtr++;
+ break;
+ }
+
+ if (c == '\\') {
+ // replace char
+ c = Encoding::unescapeChar(*++readPtr);
+ if (c == '\0') break;
+ }
+
+ *writePtr++ = c;
+ }
+ } else { // no quotes
+ for (;;) {
+ if (!isLetterOrNumber(c)) break;
+ *writePtr++ = c;
+ c = *++readPtr;
+ }
+ }
+ // end the string here
+ *writePtr++ = '\0';
+
+ const char *startPtr = _writePtr;
+
+ // update end ptr
+ _readPtr = readPtr;
+ _writePtr = writePtr;
+
+ // return pointer to unquoted string
+ return startPtr;
+}
+
+inline bool ArduinoJson::Internals::JsonParser::parseStringTo(
+ JsonVariant *destination) {
+ bool hasQuotes = isQuote(_readPtr[0]);
+ const char *value = parseString();
+ if (value == NULL) return false;
+ if (hasQuotes) {
+ *destination = value;
+ } else {
+ *destination = RawJson(value);
+ }
+ return true;
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonPrintable.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonPrintable.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonPrintable.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonPrintable.hpp (revision 173)
@@ -0,0 +1,100 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Configuration.hpp"
+#include "DummyPrint.hpp"
+#include "DynamicStringBuilder.hpp"
+#include "IndentedPrint.hpp"
+#include "JsonSerializer.hpp"
+#include "JsonWriter.hpp"
+#include "Prettyfier.hpp"
+#include "StaticStringBuilder.hpp"
+
+#if ARDUINOJSON_ENABLE_STD_STREAM
+#include "StreamPrintAdapter.hpp"
+#endif
+
+namespace ArduinoJson {
+namespace Internals {
+
+// Implements all the overloads of printTo() and prettyPrintTo()
+// Caution: this class use a template parameter to avoid virtual methods.
+// This is a bit curious but allows to reduce the size of JsonVariant, JsonArray
+// and JsonObject.
+template
+class JsonPrintable {
+ public:
+ size_t printTo(Print &print) const {
+ JsonWriter writer(print);
+ JsonSerializer::serialize(downcast(), writer);
+ return writer.bytesWritten();
+ }
+
+#if ARDUINOJSON_ENABLE_STD_STREAM
+ std::ostream &printTo(std::ostream &os) const {
+ StreamPrintAdapter adapter(os);
+ printTo(adapter);
+ return os;
+ }
+#endif
+
+ size_t printTo(char *buffer, size_t bufferSize) const {
+ StaticStringBuilder sb(buffer, bufferSize);
+ return printTo(sb);
+ }
+
+ size_t printTo(String &str) const {
+ DynamicStringBuilder sb(str);
+ return printTo(sb);
+ }
+
+ size_t prettyPrintTo(IndentedPrint &print) const {
+ Prettyfier p(print);
+ return printTo(p);
+ }
+
+ size_t prettyPrintTo(char *buffer, size_t bufferSize) const {
+ StaticStringBuilder sb(buffer, bufferSize);
+ return prettyPrintTo(sb);
+ }
+
+ size_t prettyPrintTo(Print &print) const {
+ IndentedPrint indentedPrint = IndentedPrint(print);
+ return prettyPrintTo(indentedPrint);
+ }
+
+ size_t prettyPrintTo(String &str) const {
+ DynamicStringBuilder sb(str);
+ return prettyPrintTo(sb);
+ }
+
+ size_t measureLength() const {
+ DummyPrint dp;
+ return printTo(dp);
+ }
+
+ size_t measurePrettyLength() const {
+ DummyPrint dp;
+ return prettyPrintTo(dp);
+ }
+
+ private:
+ const T &downcast() const {
+ return *static_cast(this);
+ }
+};
+
+#if ARDUINOJSON_ENABLE_STD_STREAM
+template
+inline std::ostream &operator<<(std::ostream &os, const JsonPrintable &v) {
+ return v.printTo(os);
+}
+#endif
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonSerializer.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonSerializer.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonSerializer.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonSerializer.hpp (revision 173)
@@ -0,0 +1,33 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "JsonWriter.hpp"
+
+namespace ArduinoJson {
+
+class JsonArray;
+class JsonArraySubscript;
+class JsonObject;
+template
+class JsonObjectSubscript;
+class JsonVariant;
+
+namespace Internals {
+
+class JsonSerializer {
+ public:
+ static void serialize(const JsonArray &, JsonWriter &);
+ static void serialize(const JsonArraySubscript &, JsonWriter &);
+ static void serialize(const JsonObject &, JsonWriter &);
+ template
+ static void serialize(const JsonObjectSubscript &, JsonWriter &);
+ static void serialize(const JsonVariant &, JsonWriter &);
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonSerializer.ipp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonSerializer.ipp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonSerializer.ipp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonSerializer.ipp (revision 173)
@@ -0,0 +1,101 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../JsonArray.hpp"
+#include "../JsonArraySubscript.hpp"
+#include "../JsonObject.hpp"
+#include "../JsonObjectSubscript.hpp"
+#include "../JsonVariant.hpp"
+#include "JsonSerializer.hpp"
+
+inline void ArduinoJson::Internals::JsonSerializer::serialize(
+ const JsonArray& array, JsonWriter& writer) {
+ writer.beginArray();
+
+ JsonArray::const_iterator it = array.begin();
+ while (it != array.end()) {
+ serialize(*it, writer);
+
+ ++it;
+ if (it == array.end()) break;
+
+ writer.writeComma();
+ }
+
+ writer.endArray();
+}
+
+inline void ArduinoJson::Internals::JsonSerializer::serialize(
+ const JsonArraySubscript& arraySubscript, JsonWriter& writer) {
+ serialize(arraySubscript.as(), writer);
+}
+
+inline void ArduinoJson::Internals::JsonSerializer::serialize(
+ const JsonObject& object, JsonWriter& writer) {
+ writer.beginObject();
+
+ JsonObject::const_iterator it = object.begin();
+ while (it != object.end()) {
+ writer.writeString(it->key);
+ writer.writeColon();
+ serialize(it->value, writer);
+
+ ++it;
+ if (it == object.end()) break;
+
+ writer.writeComma();
+ }
+
+ writer.endObject();
+}
+
+template
+inline void ArduinoJson::Internals::JsonSerializer::serialize(
+ const JsonObjectSubscript& objectSubscript, JsonWriter& writer) {
+ serialize(objectSubscript.template as(), writer);
+}
+
+inline void ArduinoJson::Internals::JsonSerializer::serialize(
+ const JsonVariant& variant, JsonWriter& writer) {
+ switch (variant._type) {
+ case JSON_UNDEFINED:
+ return;
+
+ case JSON_ARRAY:
+ serialize(*variant._content.asArray, writer);
+ return;
+
+ case JSON_OBJECT:
+ serialize(*variant._content.asObject, writer);
+ return;
+
+ case JSON_STRING:
+ writer.writeString(variant._content.asString);
+ return;
+
+ case JSON_UNPARSED:
+ writer.writeRaw(variant._content.asString);
+ return;
+
+ case JSON_NEGATIVE_INTEGER:
+ writer.writeRaw('-');
+ case JSON_POSITIVE_INTEGER:
+ writer.writeInteger(variant._content.asInteger);
+ return;
+
+ case JSON_BOOLEAN:
+ writer.writeBoolean(variant._content.asInteger != 0);
+ return;
+
+ default:
+ uint8_t decimals =
+ static_cast(variant._type - JSON_FLOAT_0_DECIMALS);
+ writer.writeFloat(variant._content.asFloat, decimals);
+ }
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantAs.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantAs.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantAs.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantAs.hpp (revision 173)
@@ -0,0 +1,45 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A metafunction that returns the type of the value returned by
+// JsonVariant::as()
+template
+struct JsonVariantAs {
+ typedef T type;
+};
+
+template <>
+struct JsonVariantAs {
+ typedef const char* type;
+};
+
+template <>
+struct JsonVariantAs {
+ typedef JsonArray& type;
+};
+
+template <>
+struct JsonVariantAs {
+ typedef const JsonArray& type;
+};
+
+template <>
+struct JsonVariantAs {
+ typedef JsonObject& type;
+};
+
+template <>
+struct JsonVariantAs {
+ typedef const JsonObject& type;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantContent.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantContent.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantContent.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantContent.hpp (revision 173)
@@ -0,0 +1,30 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "JsonFloat.hpp"
+#include "JsonInteger.hpp"
+
+namespace ArduinoJson {
+
+// Forward declarations
+class JsonArray;
+class JsonObject;
+
+namespace Internals {
+// A union that defines the actual content of a JsonVariant.
+// The enum JsonVariantType determines which member is in use.
+union JsonVariantContent {
+ JsonFloat asFloat; // used for double and float
+ JsonUInt asInteger; // used for bool, char, short, int and longs
+ const char* asString; // asString can be null
+ JsonArray* asArray; // asArray cannot be null
+ JsonObject* asObject; // asObject cannot be null
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantType.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantType.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantType.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonVariantType.hpp (revision 173)
@@ -0,0 +1,39 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+namespace ArduinoJson {
+class JsonArray;
+class JsonObject;
+
+namespace Internals {
+
+// Enumerated type to know the current type of a JsonVariant.
+// The value determines which member of JsonVariantContent is used.
+enum JsonVariantType {
+ JSON_UNDEFINED, // JsonVariant has not been initialized
+ JSON_UNPARSED, // JsonVariant contains an unparsed string
+ JSON_STRING, // JsonVariant stores a const char*
+ JSON_BOOLEAN, // JsonVariant stores a bool
+ JSON_POSITIVE_INTEGER, // JsonVariant stores an unsigned long
+ JSON_NEGATIVE_INTEGER, // JsonVariant stores an unsigned long that must be
+ // negated
+ JSON_ARRAY, // JsonVariant stores a pointer to a JsonArray
+ JSON_OBJECT, // JsonVariant stores a pointer to a JsonObject
+
+ // The following values are reserved for float values
+ // Multiple values are used for double, depending on the number of decimal
+ // digits that must be printed in the JSON output.
+ // This little trick allow to save one extra member in JsonVariant
+ JSON_FLOAT_0_DECIMALS
+ // JSON_FLOAT_1_DECIMAL
+ // JSON_FLOAT_2_DECIMALS
+ // ...
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonWriter.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonWriter.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonWriter.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/JsonWriter.hpp (revision 173)
@@ -0,0 +1,184 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Polyfills/attributes.hpp"
+#include "../Polyfills/math.hpp"
+#include "../Polyfills/normalize.hpp"
+#include "../Print.hpp"
+#include "Encoding.hpp"
+#include "JsonFloat.hpp"
+#include "JsonInteger.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// Writes the JSON tokens to a Print implementation
+// This class is used by:
+// - JsonArray::writeTo()
+// - JsonObject::writeTo()
+// - JsonVariant::writeTo()
+// Its derived by PrettyJsonWriter that overrides some members to add
+// indentation.
+class JsonWriter {
+ public:
+ explicit JsonWriter(Print &sink) : _sink(sink), _length(0) {}
+
+ // Returns the number of bytes sent to the Print implementation.
+ // This is very handy for implementations of printTo() that must return the
+ // number of bytes written.
+ size_t bytesWritten() const {
+ return _length;
+ }
+
+ void beginArray() {
+ writeRaw('[');
+ }
+ void endArray() {
+ writeRaw(']');
+ }
+
+ void beginObject() {
+ writeRaw('{');
+ }
+ void endObject() {
+ writeRaw('}');
+ }
+
+ void writeColon() {
+ writeRaw(':');
+ }
+ void writeComma() {
+ writeRaw(',');
+ }
+
+ void writeBoolean(bool value) {
+ writeRaw(value ? "true" : "false");
+ }
+
+ void writeString(const char *value) {
+ if (!value) {
+ writeRaw("null");
+ } else {
+ writeRaw('\"');
+ while (*value) writeChar(*value++);
+ writeRaw('\"');
+ }
+ }
+
+ void writeChar(char c) {
+ char specialChar = Encoding::escapeChar(c);
+ if (specialChar) {
+ writeRaw('\\');
+ writeRaw(specialChar);
+ } else {
+ writeRaw(c);
+ }
+ }
+
+ void writeFloat(JsonFloat value, uint8_t digits = 2) {
+ if (Polyfills::isNaN(value)) return writeRaw("NaN");
+
+ if (value < 0.0) {
+ writeRaw('-');
+ value = -value;
+ }
+
+ if (Polyfills::isInfinity(value)) return writeRaw("Infinity");
+
+ short powersOf10;
+ if (value > 1000 || value < 0.001) {
+ powersOf10 = Polyfills::normalize(value);
+ } else {
+ powersOf10 = 0;
+ }
+
+ // Round up last digit (so that print(1.999, 2) prints as "2.00")
+ value += getRoundingBias(digits);
+
+ // Extract the integer part of the value and print it
+ JsonUInt int_part = static_cast(value);
+ JsonFloat remainder = value - static_cast(int_part);
+ writeInteger(int_part);
+
+ // Print the decimal point, but only if there are digits beyond
+ if (digits > 0) {
+ writeRaw('.');
+ }
+
+ // Extract digits from the remainder one at a time
+ while (digits-- > 0) {
+ // Extract digit
+ remainder *= 10.0;
+ char currentDigit = char(remainder);
+ remainder -= static_cast(currentDigit);
+
+ // Print
+ writeRaw(char('0' + currentDigit));
+ }
+
+ if (powersOf10 < 0) {
+ writeRaw("e-");
+ writeInteger(-powersOf10);
+ }
+
+ if (powersOf10 > 0) {
+ writeRaw('e');
+ writeInteger(powersOf10);
+ }
+ }
+
+ void writeInteger(JsonUInt value) {
+ char buffer[22];
+ char *ptr = buffer + sizeof(buffer) - 1;
+
+ *ptr = 0;
+ do {
+ *--ptr = static_cast(value % 10 + '0');
+ value /= 10;
+ } while (value);
+
+ writeRaw(ptr);
+ }
+
+ void writeRaw(const char *s) {
+ _length += _sink.print(s);
+ }
+ void writeRaw(char c) {
+ _length += _sink.write(c);
+ }
+
+ protected:
+ Print &_sink;
+ size_t _length;
+
+ private:
+ JsonWriter &operator=(const JsonWriter &); // cannot be assigned
+
+ static JsonFloat getLastDigit(uint8_t digits) {
+ // Designed as a compromise between code size and speed
+ switch (digits) {
+ case 0:
+ return 1e-0;
+ case 1:
+ return 1e-1;
+ case 2:
+ return 1e-2;
+ case 3:
+ return 1e-3;
+ default:
+ return getLastDigit(uint8_t(digits - 4)) * 1e-4;
+ }
+ }
+
+ FORCE_INLINE static JsonFloat getRoundingBias(uint8_t digits) {
+ return 0.5 * getLastDigit(digits);
+ }
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/List.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/List.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/List.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/List.hpp (revision 173)
@@ -0,0 +1,94 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../JsonBuffer.hpp"
+#include "ListConstIterator.hpp"
+#include "ListIterator.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A singly linked list of T.
+// The linked list is composed of ListNode.
+// It is derived by JsonArray and JsonObject
+template
+class List {
+ public:
+ typedef T value_type;
+ typedef ListNode node_type;
+ typedef ListIterator iterator;
+ typedef ListConstIterator const_iterator;
+
+ // Creates an empty List attached to a JsonBuffer.
+ // The JsonBuffer allows to allocate new nodes.
+ // When buffer is NULL, the List is not able to grow and success() returns
+ // false. This is used to identify bad memory allocations and parsing
+ // failures.
+ explicit List(JsonBuffer *buffer) : _buffer(buffer), _firstNode(NULL) {}
+
+ // Returns true if the object is valid
+ // Would return false in the following situation:
+ // - the memory allocation failed (StaticJsonBuffer was too small)
+ // - the JSON parsing failed
+ bool success() const {
+ return _buffer != NULL;
+ }
+
+ // Returns the numbers of elements in the list.
+ // For a JsonObject, it would return the number of key-value pairs
+ size_t size() const {
+ size_t nodeCount = 0;
+ for (node_type *node = _firstNode; node; node = node->next) nodeCount++;
+ return nodeCount;
+ }
+
+ iterator begin() {
+ return iterator(_firstNode);
+ }
+ iterator end() {
+ return iterator(NULL);
+ }
+
+ const_iterator begin() const {
+ return const_iterator(_firstNode);
+ }
+ const_iterator end() const {
+ return const_iterator(NULL);
+ }
+
+ protected:
+ node_type *addNewNode() {
+ node_type *newNode = new (_buffer) node_type();
+
+ if (_firstNode) {
+ node_type *lastNode = _firstNode;
+ while (lastNode->next) lastNode = lastNode->next;
+ lastNode->next = newNode;
+ } else {
+ _firstNode = newNode;
+ }
+
+ return newNode;
+ }
+
+ void removeNode(node_type *nodeToRemove) {
+ if (!nodeToRemove) return;
+ if (nodeToRemove == _firstNode) {
+ _firstNode = nodeToRemove->next;
+ } else {
+ for (node_type *node = _firstNode; node; node = node->next)
+ if (node->next == nodeToRemove) node->next = nodeToRemove->next;
+ }
+ }
+
+ JsonBuffer *_buffer;
+ node_type *_firstNode;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListConstIterator.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListConstIterator.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListConstIterator.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListConstIterator.hpp (revision 173)
@@ -0,0 +1,41 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "ListNode.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A read-only forward itertor for List
+template
+class ListConstIterator {
+ public:
+ explicit ListConstIterator(const ListNode *node = NULL) : _node(node) {}
+
+ const T &operator*() const { return _node->content; }
+ const T *operator->() { return &_node->content; }
+
+ bool operator==(const ListConstIterator &other) const {
+ return _node == other._node;
+ }
+
+ bool operator!=(const ListConstIterator &other) const {
+ return _node != other._node;
+ }
+
+ ListConstIterator &operator++() {
+ if (_node) _node = _node->next;
+ return *this;
+ }
+
+ private:
+ const ListNode *_node;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListIterator.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListIterator.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListIterator.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListIterator.hpp (revision 173)
@@ -0,0 +1,44 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "ListNode.hpp"
+#include "ListConstIterator.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A read-write forward iterator for List
+template
+class ListIterator {
+ public:
+ explicit ListIterator(ListNode *node = NULL) : _node(node) {}
+
+ T &operator*() const { return _node->content; }
+ T *operator->() { return &_node->content; }
+
+ bool operator==(const ListIterator &other) const {
+ return _node == other._node;
+ }
+
+ bool operator!=(const ListIterator &other) const {
+ return _node != other._node;
+ }
+
+ ListIterator &operator++() {
+ if (_node) _node = _node->next;
+ return *this;
+ }
+
+ operator ListConstIterator() const { return ListConstIterator(_node); }
+
+ private:
+ ListNode *_node;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListNode.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListNode.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListNode.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ListNode.hpp (revision 173)
@@ -0,0 +1,27 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include // for NULL
+
+#include "JsonBufferAllocated.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A node for a singly-linked list.
+// Used by List and its iterators.
+template
+struct ListNode : public Internals::JsonBufferAllocated {
+ ListNode() : next(NULL) {}
+
+ ListNode *next;
+ T content;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Parse.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Parse.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Parse.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Parse.hpp (revision 173)
@@ -0,0 +1,66 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include
+
+namespace ArduinoJson {
+namespace Internals {
+template
+TFloat parse(const char *);
+
+template <>
+inline float parse(const char *s) {
+ return static_cast(strtod(s, NULL));
+}
+
+template <>
+inline double parse(const char *s) {
+ return strtod(s, NULL);
+}
+
+template <>
+inline long parse(const char *s) {
+ return strtol(s, NULL, 10);
+}
+
+template <>
+inline unsigned long parse(const char *s) {
+ return strtoul(s, NULL, 10);
+}
+
+template <>
+inline int parse(const char *s) {
+ return atoi(s);
+}
+
+#if ARDUINOJSON_USE_LONG_LONG
+template <>
+inline long long parse(const char *s) {
+ return strtoll(s, NULL, 10);
+}
+
+template <>
+inline unsigned long long parse(const char *s) {
+ return strtoull(s, NULL, 10);
+}
+#endif
+
+#if ARDUINOJSON_USE_INT64
+template <>
+inline __int64 parse<__int64>(const char *s) {
+ return _strtoi64(s, NULL, 10);
+}
+
+template <>
+inline unsigned __int64 parse(const char *s) {
+ return _strtoui64(s, NULL, 10);
+}
+#endif
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Prettyfier.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Prettyfier.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Prettyfier.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/Prettyfier.hpp (revision 173)
@@ -0,0 +1,112 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "IndentedPrint.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// Converts a compact JSON string into an indented one.
+class Prettyfier : public Print {
+ public:
+ explicit Prettyfier(IndentedPrint& p) : _sink(p) {
+ _previousChar = 0;
+ _inString = false;
+ }
+
+ virtual size_t write(uint8_t c) {
+ size_t n = _inString ? handleStringChar(c) : handleMarkupChar(c);
+ _previousChar = c;
+ return n;
+ }
+
+ private:
+ Prettyfier& operator=(const Prettyfier&); // cannot be assigned
+
+ bool inEmptyBlock() {
+ return _previousChar == '{' || _previousChar == '[';
+ }
+
+ size_t handleStringChar(uint8_t c) {
+ bool isQuote = c == '"' && _previousChar != '\\';
+
+ if (isQuote) _inString = false;
+
+ return _sink.write(c);
+ }
+
+ size_t handleMarkupChar(uint8_t c) {
+ switch (c) {
+ case '{':
+ case '[':
+ return writeBlockOpen(c);
+
+ case '}':
+ case ']':
+ return writeBlockClose(c);
+
+ case ':':
+ return writeColon();
+
+ case ',':
+ return writeComma();
+
+ case '"':
+ return writeQuoteOpen();
+
+ default:
+ return writeNormalChar(c);
+ }
+ }
+
+ size_t writeBlockClose(uint8_t c) {
+ return unindentIfNeeded() + _sink.write(c);
+ }
+
+ size_t writeBlockOpen(uint8_t c) {
+ return indentIfNeeded() + _sink.write(c);
+ }
+
+ size_t writeColon() {
+ return _sink.write(':') + _sink.write(' ');
+ }
+
+ size_t writeComma() {
+ return _sink.write(',') + _sink.println();
+ }
+
+ size_t writeQuoteOpen() {
+ _inString = true;
+ return indentIfNeeded() + _sink.write('"');
+ }
+
+ size_t writeNormalChar(uint8_t c) {
+ return indentIfNeeded() + _sink.write(c);
+ }
+
+ size_t indentIfNeeded() {
+ if (!inEmptyBlock()) return 0;
+
+ _sink.indent();
+ return _sink.println();
+ }
+
+ size_t unindentIfNeeded() {
+ if (inEmptyBlock()) return 0;
+
+ _sink.unindent();
+ return _sink.println();
+ }
+
+ uint8_t _previousChar;
+ IndentedPrint& _sink;
+ bool _inString;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ReferenceType.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ReferenceType.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ReferenceType.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/ReferenceType.hpp (revision 173)
@@ -0,0 +1,35 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A type that is meant to be used by reference only (JsonArray and JsonObject)
+class ReferenceType {
+ public:
+ bool operator==(const ReferenceType& other) const {
+ // two JsonArray are equal if they are the same instance
+ // (we don't compare the content)
+ return this == &other;
+ }
+
+ bool operator!=(const ReferenceType& other) const { return this != &other; }
+
+ protected:
+ ReferenceType() {}
+
+ private:
+ // copy constructor is private
+ ReferenceType(const ReferenceType&);
+
+ // copy operator is private
+ ReferenceType& operator=(const ReferenceType&);
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/StaticStringBuilder.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/StaticStringBuilder.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/StaticStringBuilder.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/StaticStringBuilder.hpp (revision 173)
@@ -0,0 +1,37 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Print.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+// A Print implementation that allows to write in a char[]
+class StaticStringBuilder : public Print {
+ public:
+ StaticStringBuilder(char *buf, size_t size)
+ : buffer(buf), capacity(size - 1), length(0) {
+ buffer[0] = '\0';
+ }
+
+ virtual size_t write(uint8_t c) {
+ if (length >= capacity) return 0;
+
+ buffer[length++] = c;
+ buffer[length] = '\0';
+ return 1;
+ }
+
+ private:
+ char *buffer;
+ size_t capacity;
+ size_t length;
+};
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/StreamPrintAdapter.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/StreamPrintAdapter.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/StreamPrintAdapter.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/Internals/StreamPrintAdapter.hpp (revision 173)
@@ -0,0 +1,39 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "../Configuration.hpp"
+
+#if ARDUINOJSON_ENABLE_STD_STREAM
+
+#include "../Print.hpp"
+
+#include
+
+namespace ArduinoJson {
+namespace Internals {
+
+class StreamPrintAdapter : public Print {
+ public:
+ explicit StreamPrintAdapter(std::ostream& os) : _os(os) {}
+
+ virtual size_t write(uint8_t c) {
+ _os << static_cast(c);
+ return 1;
+ }
+
+ private:
+ // cannot be assigned
+ StreamPrintAdapter& operator=(const StreamPrintAdapter&);
+
+ std::ostream& _os;
+};
+}
+}
+
+#endif // ARDUINOJSON_ENABLE_STD_STREAM
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArray.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArray.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArray.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArray.hpp (revision 173)
@@ -0,0 +1,251 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "Internals/JsonBufferAllocated.hpp"
+#include "Internals/JsonPrintable.hpp"
+#include "Internals/List.hpp"
+#include "Internals/ReferenceType.hpp"
+#include "JsonVariant.hpp"
+#include "TypeTraits/EnableIf.hpp"
+#include "TypeTraits/IsFloatingPoint.hpp"
+#include "TypeTraits/IsReference.hpp"
+#include "TypeTraits/IsSame.hpp"
+
+// Returns the size (in bytes) of an array with n elements.
+// Can be very handy to determine the size of a StaticJsonBuffer.
+#define JSON_ARRAY_SIZE(NUMBER_OF_ELEMENTS) \
+ (sizeof(JsonArray) + (NUMBER_OF_ELEMENTS) * sizeof(JsonArray::node_type))
+
+namespace ArduinoJson {
+
+// Forward declarations
+class JsonObject;
+class JsonBuffer;
+class JsonArraySubscript;
+
+// An array of JsonVariant.
+//
+// The constructor is private, instances must be created via
+// JsonBuffer::createArray() or JsonBuffer::parseArray().
+// A JsonArray can be serialized to a JSON string via JsonArray::printTo().
+// It can also be deserialized from a JSON string via JsonBuffer::parseArray().
+class JsonArray : public Internals::JsonPrintable,
+ public Internals::ReferenceType,
+ public Internals::List,
+ public Internals::JsonBufferAllocated {
+ public:
+ // A meta-function that returns true if type T can be used in
+ // JsonArray::set()
+ template
+ struct CanSet {
+ static const bool value = JsonVariant::IsConstructibleFrom::value ||
+ TypeTraits::IsSame::value ||
+ TypeTraits::IsSame::value;
+ };
+
+ // Create an empty JsonArray attached to the specified JsonBuffer.
+ // You should not call this constructor directly.
+ // Instead, use JsonBuffer::createArray() or JsonBuffer::parseArray().
+ explicit JsonArray(JsonBuffer *buffer)
+ : Internals::List(buffer) {}
+
+ // Gets the value at the specified index
+ JsonVariant operator[](size_t index) const {
+ return get(index);
+ }
+
+ // Gets or sets the value at specified index
+ JsonArraySubscript operator[](size_t index);
+
+ // Adds the specified value at the end of the array.
+ //
+ // bool add(bool);
+ // bool add(char);
+ // bool add(long);
+ // bool add(int);
+ // bool add(short);
+ // bool add(float value);
+ // bool add(double value);
+ // bool add(const char*);
+ template
+ bool add(
+ T value,
+ typename TypeTraits::EnableIf<
+ CanSet::value && !TypeTraits::IsReference::value>::type * = 0) {
+ return addNode(value);
+ }
+ // bool add(const String&)
+ // bool add(const JsonVariant&);
+ // bool add(JsonArray&);
+ // bool add(JsonObject&);
+ template
+ bool add(const T &value,
+ typename TypeTraits::EnableIf::value>::type * = 0) {
+ return addNode(const_cast(value));
+ }
+ // bool add(float value, uint8_t decimals);
+ // bool add(double value, uint8_t decimals);
+ template
+ bool add(T value, uint8_t decimals,
+ typename TypeTraits::EnableIf<
+ TypeTraits::IsFloatingPoint::value>::type * = 0) {
+ return addNode(JsonVariant(value, decimals));
+ }
+
+ // Sets the value at specified index.
+ //
+ // bool set(size_t index, bool value);
+ // bool set(size_t index, long value);
+ // bool set(size_t index, int value);
+ // bool set(size_t index, short value);
+ template
+ bool set(
+ size_t index, T value,
+ typename TypeTraits::EnableIf<
+ CanSet::value && !TypeTraits::IsReference::value>::type * = 0) {
+ return setNodeAt(index, value);
+ }
+ // bool set(size_t index, const String&)
+ // bool set(size_t index, const JsonVariant&);
+ // bool set(size_t index, JsonArray&);
+ // bool set(size_t index, JsonObject&);
+ template
+ bool set(size_t index, const T &value,
+ typename TypeTraits::EnableIf::value>::type * = 0) {
+ return setNodeAt(index, const_cast(value));
+ }
+ // bool set(size_t index, float value, uint8_t decimals = 2);
+ // bool set(size_t index, double value, uint8_t decimals = 2);
+ template
+ bool set(size_t index, T value, uint8_t decimals,
+ typename TypeTraits::EnableIf<
+ TypeTraits::IsFloatingPoint::value>::type * = 0) {
+ return setNodeAt(index, JsonVariant(value, decimals));
+ }
+
+ // Gets the value at the specified index.
+ JsonVariant get(size_t index) const {
+ node_type *node = getNodeAt(index);
+ return node ? node->content : JsonVariant();
+ }
+
+ // Gets the value at the specified index.
+ template
+ typename Internals::JsonVariantAs::type get(size_t index) const {
+ node_type *node = getNodeAt(index);
+ return node ? node->content.as() : JsonVariant::defaultValue();
+ }
+
+ // Check the type of the value at specified index.
+ template
+ bool is(size_t index) const {
+ node_type *node = getNodeAt(index);
+ return node ? node->content.is() : false;
+ }
+
+ // Creates a JsonArray and adds a reference at the end of the array.
+ // It's a shortcut for JsonBuffer::createArray() and JsonArray::add()
+ JsonArray &createNestedArray();
+
+ // Creates a JsonObject and adds a reference at the end of the array.
+ // It's a shortcut for JsonBuffer::createObject() and JsonArray::add()
+ JsonObject &createNestedObject();
+
+ // Removes element at specified index.
+ void removeAt(size_t index) {
+ removeNode(getNodeAt(index));
+ }
+
+ // Returns a reference an invalid JsonArray.
+ // This object is meant to replace a NULL pointer.
+ // This is used when memory allocation or JSON parsing fail.
+ static JsonArray &invalid() {
+ static JsonArray instance(NULL);
+ return instance;
+ }
+
+ // Imports a 1D array
+ template
+ bool copyFrom(T(&array)[N]) {
+ return copyFrom(array, N);
+ }
+
+ // Imports a 1D array
+ template
+ bool copyFrom(T *array, size_t len) {
+ bool ok = true;
+ for (size_t i = 0; i < len; i++) {
+ ok &= add(array[i]);
+ }
+ return ok;
+ }
+
+ // Imports a 2D array
+ template
+ bool copyFrom(T(&array)[N1][N2]) {
+ bool ok = true;
+ for (size_t i = 0; i < N1; i++) {
+ JsonArray &nestedArray = createNestedArray();
+ for (size_t j = 0; j < N2; j++) {
+ ok &= nestedArray.add(array[i][j]);
+ }
+ }
+ return ok;
+ }
+
+ // Exports a 1D array
+ template
+ size_t copyTo(T(&array)[N]) const {
+ return copyTo(array, N);
+ }
+
+ // Exports a 1D array
+ template
+ size_t copyTo(T *array, size_t len) const {
+ size_t i = 0;
+ for (const_iterator it = begin(); it != end() && i < len; ++it)
+ array[i++] = *it;
+ return i;
+ }
+
+ // Exports a 2D array
+ template
+ void copyTo(T(&array)[N1][N2]) const {
+ size_t i = 0;
+ for (const_iterator it = begin(); it != end() && i < N1; ++it) {
+ it->asArray().copyTo(array[i++]);
+ }
+ }
+
+ private:
+ node_type *getNodeAt(size_t index) const {
+ node_type *node = _firstNode;
+ while (node && index--) node = node->next;
+ return node;
+ }
+
+ template
+ bool setNodeAt(size_t index, TValue value) {
+ node_type *node = getNodeAt(index);
+ return node != NULL && setNodeValue(node, value);
+ }
+
+ template
+ bool addNode(TValue value) {
+ node_type *node = addNewNode();
+ return node != NULL && setNodeValue(node, value);
+ }
+
+ template
+ bool setNodeValue(node_type *node, T value) {
+ node->content = value;
+ return true;
+ }
+};
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArray.ipp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArray.ipp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArray.ipp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArray.ipp (revision 173)
@@ -0,0 +1,80 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "JsonArray.hpp"
+#include "JsonArraySubscript.hpp"
+#include "JsonObject.hpp"
+
+namespace ArduinoJson {
+
+inline JsonVariant::JsonVariant(JsonArray &array) {
+ if (array.success()) {
+ _type = Internals::JSON_ARRAY;
+ _content.asArray = &array;
+ } else {
+ _type = Internals::JSON_UNDEFINED;
+ }
+}
+
+inline JsonVariant::JsonVariant(JsonObject &object) {
+ if (object.success()) {
+ _type = Internals::JSON_OBJECT;
+ _content.asObject = &object;
+ } else {
+ _type = Internals::JSON_UNDEFINED;
+ }
+}
+
+template <>
+inline bool JsonArray::setNodeValue(node_type *node, String &value) {
+ const char *copy = _buffer->strdup(value);
+ if (!copy) return false;
+ node->content = copy;
+ return true;
+}
+
+template <>
+inline JsonArray &JsonVariant::defaultValue() {
+ return JsonArray::invalid();
+}
+
+template <>
+inline JsonArray &JsonVariant::defaultValue() {
+ return JsonArray::invalid();
+}
+
+template <>
+inline const JsonArray &JsonVariant::defaultValue() {
+ return JsonArray::invalid();
+}
+
+template <>
+inline const JsonArray &JsonVariant::defaultValue() {
+ return JsonArray::invalid();
+}
+
+inline JsonArray &JsonVariant::asArray() const {
+ if (_type == Internals::JSON_ARRAY) return *_content.asArray;
+ return JsonArray::invalid();
+}
+
+inline JsonArray &JsonArray::createNestedArray() {
+ if (!_buffer) return JsonArray::invalid();
+ JsonArray &array = _buffer->createArray();
+ add(array);
+ return array;
+}
+
+inline JsonArray &JsonObject::createNestedArray(JsonObjectKey key) {
+ if (!_buffer) return JsonArray::invalid();
+ JsonArray &array = _buffer->createArray();
+ setNodeAt(key, array);
+ return array;
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArraySubscript.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArraySubscript.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArraySubscript.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonArraySubscript.hpp (revision 173)
@@ -0,0 +1,94 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "Configuration.hpp"
+#include "JsonVariantBase.hpp"
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4522)
+#endif
+
+namespace ArduinoJson {
+class JsonArraySubscript : public JsonVariantBase {
+ public:
+ FORCE_INLINE JsonArraySubscript(JsonArray& array, size_t index)
+ : _array(array), _index(index) {}
+
+ JsonArraySubscript& operator=(const JsonArraySubscript& src) {
+ _array.set(_index, src);
+ return *this;
+ }
+
+ template
+ typename TypeTraits::EnableIf::value,
+ JsonArraySubscript>::type&
+ operator=(const T& src) {
+ _array.set(_index, const_cast(src));
+ return *this;
+ }
+
+ template
+ typename TypeTraits::EnableIf::value,
+ JsonArraySubscript>::type&
+ operator=(T src) {
+ _array.set(_index, src);
+ return *this;
+ }
+
+ FORCE_INLINE bool success() const {
+ return _index < _array.size();
+ }
+
+ FORCE_INLINE operator JsonVariant() const {
+ return _array.get(_index);
+ }
+
+ template
+ FORCE_INLINE typename Internals::JsonVariantAs::type as() const {
+ return _array.get(_index);
+ }
+
+ template
+ FORCE_INLINE bool is() const {
+ return _array.is(_index);
+ }
+
+ template
+ void set(TValue value) {
+ _array.set(_index, value);
+ }
+
+ private:
+ JsonArray& _array;
+ const size_t _index;
+};
+
+#if ARDUINOJSON_ENABLE_STD_STREAM
+inline std::ostream& operator<<(std::ostream& os,
+ const JsonArraySubscript& source) {
+ return source.printTo(os);
+}
+#endif
+
+inline JsonArraySubscript JsonArray::operator[](size_t index) {
+ return JsonArraySubscript(*this, index);
+}
+
+template
+inline const JsonArraySubscript JsonVariantBase::operator[](
+ int index) const {
+ return asArray()[index];
+}
+
+} // namespace ArduinoJson
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonBuffer.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonBuffer.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonBuffer.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonBuffer.hpp (revision 173)
@@ -0,0 +1,163 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include // for size_t
+#include // for uint8_t
+#include
+
+#include "JsonVariant.hpp"
+#include "String.hpp"
+
+#if defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
+#elif defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#pragma GCC diagnostic push
+#endif
+#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+#endif
+
+namespace ArduinoJson {
+class JsonArray;
+class JsonObject;
+
+// Entry point for using the library.
+//
+// Handle the memory management (done in derived classes) and calls the parser.
+// This abstract class is implemented by StaticJsonBuffer which implements a
+// fixed memory allocation.
+class JsonBuffer {
+ public:
+ // CAUTION: NO VIRTUAL DESTRUCTOR!
+ // If we add a virtual constructor the Arduino compiler will add malloc() and
+ // free() to the binary, adding 706 useless bytes.
+ // virtual ~JsonBuffer() {}
+
+ // Allocates an empty JsonArray.
+ //
+ // Returns a reference to the new JsonArray or JsonArray::invalid() if the
+ // allocation fails.
+ JsonArray &createArray();
+
+ // Allocates an empty JsonObject.
+ //
+ // Returns a reference to the new JsonObject or JsonObject::invalid() if the
+ // allocation fails.
+ JsonObject &createObject();
+
+ // Allocates and populate a JsonArray from a JSON string.
+ //
+ // The First argument is a pointer to the JSON string, the memory must be
+ // writable
+ // because the parser will insert null-terminators and replace escaped chars.
+ //
+ // The second argument set the nesting limit (see comment on DEFAULT_LIMIT)
+ //
+ // Returns a reference to the new JsonObject or JsonObject::invalid() if the
+ // allocation fails.
+ JsonArray &parseArray(char *json, uint8_t nestingLimit = DEFAULT_LIMIT);
+
+ // Same with a const char*.
+ // With this overload, the JsonBuffer will make a copy of the string
+ JsonArray &parseArray(const char *json, uint8_t nesting = DEFAULT_LIMIT) {
+ return parseArray(strdup(json), nesting);
+ }
+
+ // Same as above with a String class
+ JsonArray &parseArray(const String &json, uint8_t nesting = DEFAULT_LIMIT) {
+ return parseArray(json.c_str(), nesting);
+ }
+
+ // Allocates and populate a JsonObject from a JSON string.
+ //
+ // The First argument is a pointer to the JSON string, the memory must be
+ // writable
+ // because the parser will insert null-terminators and replace escaped chars.
+ //
+ // The second argument set the nesting limit (see comment on DEFAULT_LIMIT)
+ //
+ // Returns a reference to the new JsonObject or JsonObject::invalid() if the
+ // allocation fails.
+ JsonObject &parseObject(char *json, uint8_t nestingLimit = DEFAULT_LIMIT);
+
+ // Same with a const char*.
+ // With this overload, the JsonBuffer will make a copy of the string
+ JsonObject &parseObject(const char *json, uint8_t nesting = DEFAULT_LIMIT) {
+ return parseObject(strdup(json), nesting);
+ }
+
+ // Same as above with a String class
+ JsonObject &parseObject(const String &json, uint8_t nesting = DEFAULT_LIMIT) {
+ return parseObject(json.c_str(), nesting);
+ }
+
+ // Generalized version of parseArray() and parseObject(), also works for
+ // integral types.
+ JsonVariant parse(char *json, uint8_t nestingLimit = DEFAULT_LIMIT);
+
+ // Same with a const char*.
+ // With this overload, the JsonBuffer will make a copy of the string
+ JsonVariant parse(const char *json, uint8_t nesting = DEFAULT_LIMIT) {
+ return parse(strdup(json), nesting);
+ }
+
+ // Same as above with a String class
+ JsonVariant parse(const String &json, uint8_t nesting = DEFAULT_LIMIT) {
+ return parse(json.c_str(), nesting);
+ }
+
+ // Duplicate a string
+ char *strdup(const char *src) {
+ return src ? strdup(src, strlen(src)) : NULL;
+ }
+ char *strdup(const String &src) { return strdup(src.c_str(), src.length()); }
+
+ // Allocates n bytes in the JsonBuffer.
+ // Return a pointer to the allocated memory or NULL if allocation fails.
+ virtual void *alloc(size_t size) = 0;
+
+ protected:
+ // Preserve aligment if nessary
+ static FORCE_INLINE size_t round_size_up(size_t bytes) {
+#if ARDUINOJSON_ENABLE_ALIGNMENT
+ const size_t x = sizeof(void *) - 1;
+ return (bytes + x) & ~x;
+#else
+ return bytes;
+#endif
+ }
+
+ private:
+ char *strdup(const char *, size_t);
+
+ // Default value of nesting limit of parseArray() and parseObject().
+ //
+ // The nesting limit is a contain on the level of nesting allowed in the
+ // JSON
+ // string.
+ // If set to 0, only a flat array or objects can be parsed.
+ // If set to 1, the object can contain nested arrays or objects but only 1
+ // level deep.
+ // And bigger values will allow more level of nesting.
+ //
+ // The purpose of this feature is to prevent stack overflow that could
+ // lead to
+ // a security risk.
+ static const uint8_t DEFAULT_LIMIT = 10;
+};
+}
+
+#if defined(__clang__)
+#pragma clang diagnostic pop
+#elif defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#pragma GCC diagnostic pop
+#endif
+#endif
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonBuffer.ipp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonBuffer.ipp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonBuffer.ipp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonBuffer.ipp (revision 173)
@@ -0,0 +1,46 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "Internals/JsonParser.hpp"
+
+inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::createArray() {
+ JsonArray *ptr = new (this) JsonArray(this);
+ return ptr ? *ptr : JsonArray::invalid();
+}
+
+inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::createObject() {
+ JsonObject *ptr = new (this) JsonObject(this);
+ return ptr ? *ptr : JsonObject::invalid();
+}
+
+inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::parseArray(
+ char *json, uint8_t nestingLimit) {
+ Internals::JsonParser parser(this, json, nestingLimit);
+ return parser.parseArray();
+}
+
+inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::parseObject(
+ char *json, uint8_t nestingLimit) {
+ Internals::JsonParser parser(this, json, nestingLimit);
+ return parser.parseObject();
+}
+
+inline ArduinoJson::JsonVariant ArduinoJson::JsonBuffer::parse(
+ char *json, uint8_t nestingLimit) {
+ Internals::JsonParser parser(this, json, nestingLimit);
+ return parser.parseVariant();
+}
+
+inline char *ArduinoJson::JsonBuffer::strdup(const char *source,
+ size_t length) {
+ size_t size = length + 1;
+ char *dest = static_cast(alloc(size));
+ if (dest != NULL) memcpy(dest, source, size);
+ return dest;
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObject.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObject.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObject.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObject.hpp (revision 173)
@@ -0,0 +1,182 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "String.hpp"
+#include "Internals/JsonBufferAllocated.hpp"
+#include "Internals/JsonPrintable.hpp"
+#include "Internals/List.hpp"
+#include "Internals/ReferenceType.hpp"
+#include "JsonPair.hpp"
+#include "TypeTraits/EnableIf.hpp"
+#include "TypeTraits/IsFloatingPoint.hpp"
+#include "TypeTraits/IsReference.hpp"
+#include "TypeTraits/IsSame.hpp"
+
+// Returns the size (in bytes) of an object with n elements.
+// Can be very handy to determine the size of a StaticJsonBuffer.
+#define JSON_OBJECT_SIZE(NUMBER_OF_ELEMENTS) \
+ (sizeof(JsonObject) + (NUMBER_OF_ELEMENTS) * sizeof(JsonObject::node_type))
+
+namespace ArduinoJson {
+
+// Forward declarations
+class JsonArray;
+class JsonBuffer;
+
+// A dictionary of JsonVariant indexed by string (char*)
+//
+// The constructor is private, instances must be created via
+// JsonBuffer::createObject() or JsonBuffer::parseObject().
+// A JsonObject can be serialized to a JSON string via JsonObject::printTo().
+// It can also be deserialized from a JSON string via JsonBuffer::parseObject().
+class JsonObject : public Internals::JsonPrintable,
+ public Internals::ReferenceType,
+ public Internals::List,
+ public Internals::JsonBufferAllocated {
+ public:
+ // A meta-function that returns true if type T can be used in
+ // JsonObject::set()
+ template
+ struct CanSet {
+ static const bool value = JsonVariant::IsConstructibleFrom::value ||
+ TypeTraits::IsSame::value ||
+ TypeTraits::IsSame::value;
+ };
+
+ // Create an empty JsonArray attached to the specified JsonBuffer.
+ // You should not use this constructor directly.
+ // Instead, use JsonBuffer::createObject() or JsonBuffer.parseObject().
+ explicit JsonObject(JsonBuffer* buffer) : Internals::List(buffer) {}
+
+ // Gets or sets the value associated with the specified key.
+ JsonObjectSubscript operator[](const char* key);
+ JsonObjectSubscript operator[](const String& key);
+
+ // Gets the value associated with the specified key.
+ JsonVariant operator[](JsonObjectKey key) const {
+ return get(key);
+ }
+
+ // Sets the specified key with the specified value.
+ // bool set(TKey key, bool value);
+ // bool set(TKey key, char value);
+ // bool set(TKey key, long value);
+ // bool set(TKey key, int value);
+ // bool set(TKey key, short value);
+ // bool set(TKey key, float value);
+ // bool set(TKey key, double value);
+ // bool set(TKey key, const char* value);
+ // bool set(TKey key, RawJson value);
+ template
+ bool set(
+ JsonObjectKey key, T value,
+ typename TypeTraits::EnableIf<
+ CanSet::value && !TypeTraits::IsReference::value>::type* = 0) {
+ return setNodeAt(key, value);
+ }
+ // bool set(Key, String&);
+ // bool set(Key, JsonArray&);
+ // bool set(Key, JsonObject&);
+ // bool set(Key, JsonVariant&);
+ template
+ bool set(JsonObjectKey key, const T& value,
+ typename TypeTraits::EnableIf::value>::type* = 0) {
+ return setNodeAt(key, const_cast(value));
+ }
+ // bool set(Key, float value, uint8_t decimals);
+ // bool set(Key, double value, uint8_t decimals);
+ template
+ bool set(JsonObjectKey key, TValue value, uint8_t decimals,
+ typename TypeTraits::EnableIf<
+ TypeTraits::IsFloatingPoint::value>::type* = 0) {
+ return setNodeAt(key, JsonVariant(value, decimals));
+ }
+
+ // Gets the value associated with the specified key.
+ JsonVariant get(JsonObjectKey key) const {
+ node_type* node = getNodeAt(key.c_str());
+ return node ? node->content.value : JsonVariant();
+ }
+
+ // Gets the value associated with the specified key.
+ template
+ typename Internals::JsonVariantAs::type get(JsonObjectKey key) const {
+ node_type* node = getNodeAt(key.c_str());
+ return node ? node->content.value.as() : JsonVariant::defaultValue();
+ }
+
+ // Checks the type of the value associated with the specified key.
+ template
+ bool is(JsonObjectKey key) const {
+ node_type* node = getNodeAt(key.c_str());
+ return node ? node->content.value.is() : false;
+ }
+
+ // Creates and adds a JsonArray.
+ // This is a shortcut for JsonBuffer::createArray() and JsonObject::add().
+ JsonArray& createNestedArray(JsonObjectKey key);
+
+ // Creates and adds a JsonObject.
+ // This is a shortcut for JsonBuffer::createObject() and JsonObject::add().
+ JsonObject& createNestedObject(JsonObjectKey key);
+
+ // Tells weither the specified key is present and associated with a value.
+ bool containsKey(JsonObjectKey key) const {
+ return getNodeAt(key.c_str()) != NULL;
+ }
+
+ // Removes the specified key and the associated value.
+ void remove(JsonObjectKey key) {
+ removeNode(getNodeAt(key.c_str()));
+ }
+
+ // Returns a reference an invalid JsonObject.
+ // This object is meant to replace a NULL pointer.
+ // This is used when memory allocation or JSON parsing fail.
+ static JsonObject& invalid() {
+ static JsonObject instance(NULL);
+ return instance;
+ }
+
+ private:
+ // Returns the list node that matches the specified key.
+ node_type* getNodeAt(const char* key) const {
+ for (node_type* node = _firstNode; node; node = node->next) {
+ if (!strcmp(node->content.key, key)) return node;
+ }
+ return NULL;
+ }
+
+ template
+ bool setNodeAt(JsonObjectKey key, T value) {
+ node_type* node = getNodeAt(key.c_str());
+ if (!node) {
+ node = addNewNode();
+ if (!node || !setNodeKey(node, key)) return false;
+ }
+ return setNodeValue(node, value);
+ }
+
+ bool setNodeKey(node_type* node, JsonObjectKey key) {
+ if (key.needs_copy()) {
+ node->content.key = _buffer->strdup(key.c_str());
+ if (node->content.key == NULL) return false;
+ } else {
+ node->content.key = key.c_str();
+ }
+ return true;
+ }
+
+ template
+ bool setNodeValue(node_type* node, T value) {
+ node->content.value = value;
+ return true;
+ }
+};
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObject.ipp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObject.ipp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObject.ipp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObject.ipp (revision 173)
@@ -0,0 +1,66 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "JsonArray.hpp"
+#include "JsonObject.hpp"
+#include "JsonObjectSubscript.hpp"
+
+namespace ArduinoJson {
+
+template <>
+inline bool JsonObject::setNodeValue(node_type *node, String &value) {
+ node->content.value = _buffer->strdup(value);
+ return node->content.value;
+}
+
+template <>
+inline bool JsonObject::setNodeValue(node_type *node, const String &value) {
+ node->content.value = _buffer->strdup(value);
+ return node->content.value;
+}
+
+template <>
+inline const JsonObject &JsonVariant::defaultValue() {
+ return JsonObject::invalid();
+}
+
+template <>
+inline const JsonObject &JsonVariant::defaultValue() {
+ return JsonObject::invalid();
+}
+
+template <>
+inline JsonObject &JsonVariant::defaultValue() {
+ return JsonObject::invalid();
+}
+
+template <>
+inline JsonObject &JsonVariant::defaultValue() {
+ return JsonObject::invalid();
+}
+
+inline JsonObject &JsonVariant::asObject() const {
+ if (_type == Internals::JSON_OBJECT) return *_content.asObject;
+ return JsonObject::invalid();
+}
+
+inline JsonObject &JsonObject::createNestedObject(JsonObjectKey key) {
+ if (!_buffer) return JsonObject::invalid();
+ JsonObject &array = _buffer->createObject();
+ setNodeAt(key, array);
+ return array;
+}
+
+inline JsonObject &JsonArray::createNestedObject() {
+ if (!_buffer) return JsonObject::invalid();
+ JsonObject &object = _buffer->createObject();
+ add(object);
+ return object;
+}
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObjectKey.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObjectKey.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObjectKey.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObjectKey.hpp (revision 173)
@@ -0,0 +1,27 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "String.hpp"
+
+namespace ArduinoJson {
+
+// Represents a key in a JsonObject
+class JsonObjectKey {
+ public:
+ JsonObjectKey(const char* key) : _value(key), _needs_copy(false) {}
+ JsonObjectKey(const String& key) : _value(key.c_str()), _needs_copy(true) {}
+
+ const char* c_str() const { return _value; }
+ bool needs_copy() const { return _needs_copy; }
+
+ private:
+ const char* _value;
+ bool _needs_copy;
+};
+}
Index: projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObjectSubscript.hpp
===================================================================
diff --git a/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObjectSubscript.hpp b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObjectSubscript.hpp
new file mode 10644
--- /dev/null (revision 0)
+++ b/projects/interfaz_de_programacion_para_divisor_de_pps/lib/ArduinoJson-master/include/ArduinoJson/JsonObjectSubscript.hpp (revision 173)
@@ -0,0 +1,123 @@
+// Copyright Benoit Blanchon 2014-2016
+// MIT License
+//
+// Arduino JSON library
+// https://github.com/bblanchon/ArduinoJson
+// If you like this project, please add a star!
+
+#pragma once
+
+#include "Configuration.hpp"
+#include "JsonVariantBase.hpp"
+#include "TypeTraits/EnableIf.hpp"
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4522)
+#endif
+
+namespace ArduinoJson {
+
+template
+class JsonObjectSubscript : public JsonVariantBase > {
+ public:
+ FORCE_INLINE JsonObjectSubscript(JsonObject& object, TKey key)
+ : _object(object), _key(key) {}
+
+ JsonObjectSubscript& operator=(const JsonObjectSubscript& src) {
+ _object.set(_key, src);
+ return *this;
+ }
+
+ template
+ typename TypeTraits::EnableIf::value,
+ JsonObjectSubscript >::type&
+ operator=(const T& src) {
+ _object.set(_key, const_cast(src));
+ return *this;
+ }
+
+ template
+ typename TypeTraits::EnableIf::value,
+ JsonObjectSubscript >::type&
+ operator=(T src) {
+ _object.set(_key, src);
+ return *this;
+ }
+
+ FORCE_INLINE bool success() const {
+ return _object.containsKey(_key);
+ }
+
+ FORCE_INLINE operator JsonVariant() const {
+ return _object.get(_key);
+ }
+
+ template
+ FORCE_INLINE typename Internals::JsonVariantAs