{ "info": { "author": "Thomas Watteyne, Keoma Brun, Sami Malek, Ziran Zhang", "author_email": "keoma.brun@inria.fr", "bugtrack_url": null, "classifiers": [], "description": "All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of sol nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nDescription: | Master branch | Develop branch |\n | -------------- | ------------- |\n | [![Build Status](https://travis-ci.org/realms-team/sol.svg?branch=master)](https://travis-ci.org/realms-team/sol) | [![Build Status](https://travis-ci.org/realms-team/sol.svg?branch=develop)](https://travis-ci.org/realms-team/sol) |\n | [![Code Health](https://landscape.io/github/realms-team/sol/master/landscape.svg?style=flat)](https://landscape.io/github/realms-team/sol/master) | [![Code Health](https://landscape.io/github/realms-team/sol/develop/landscape.svg?style=flat)](https://landscape.io/github/realms-team/sol/develop) |\n \n This repo contains a set of libraries to manipulate sensor Objects.\n \n An sensor Object contains the following _conceptual_ fields:\n * `M`: MAC address of the device creating the Object\n * `T`: timestamp of when the Object was created\n * `t`: type of Object, a number\n * `L`: the length of the value\n * `V`: Object value, a opaque string of bytes\n \n We refer to this format as the MTtlv format. It is a generalization of the well-known \"Type-Length-Value\" (TLV) format.\n \n # Installation\n Download source:\n `git clone https://github.com/realms-team/sol.git`\n \n # Code documentation\n http://realms-sol.readthedocs.io\n \n # Registry\n \n ## Objects' \"types\" registry\n \n See [registry](registry.md).\n \n # Representations\n \n The SOL Objects are manipulated in groups.\n Each group of Objects can be represented in [binary](#binary-representation), [JSON](#json-representation) or [HTTP](#http-representation) format.\n \n ## Binary representation\n \n This representation is used for:\n * sending data in packets\n * writing data to a file\n \n Each group of Objects consists of the following fields:\n \n ```\n | SOL header | Objects list |\n ```\n \n Some rules:\n * all multi-byte value are encoded \"big endian\" (a.k.a \"network order\")\n * when saving Objects in a binary file, each Object MUST be framed using HDLC.\n \n #### SOL Header\n \n ```\n 0 1 2 3 4 5 6 7\n +-+-+-+-+-+-+-+-+\n | V |T|M|S|Y| L |\n +-+-+-+-+-+-+-+-+\n ```\n * `V`: Version of the Object:\n * Only value `b00` is defined in this document. Other values for the 2 first bits are reserved and may be defined in later revisions of this document.\n * `T`: Type of MTtlv Object:\n * `0`: single-MTtlv Object\n * `1`: multi-MTtlv Object (MTNtlv) this implies the 1st byte next to timestamp is N: number of Objects\n * `M`: MAC address encoding:\n * `0`: no MAC address present\n * `1`: 8-byte MAC address present\n * `S`: timestamp encoding\n * `0`: timestamp is a 4-byte Linux epoch in UTC (1-second granularity)\n * `1`: timestamp is elided, and recovered from the timestamp field present in the SmartMesh IP header\n * `Y`: type encoding\n * `0`: 1-byte type field\n * `1`: 2-byte type field\n * `L`: length encoding\n * `b00`: use well-known value. No length field present\n * `b01`: 1-byte length field present\n * `b10`: 2-byte length field present\n * `b11`: elided. The length is recovered from the length of the packet or HDLC frame.\n \n #### Object List\n \n According to the header flags, the Object list structure can vary.\n \n * If the T flag is `0` then the message will have the following structure: \n ```|| SOL Header || MT | tlv |```\n * If the T flag is `1` then the message will have the following structure: \n ```|| SOL Header || MT | N | tlv | tlv | ... ```\n \n #### Example transmission use cases\n \n **Example 1**. transmitting a single 2-byte temperature sensor reading, taken in the past:\n \n * `[1B]` SOL Header\n * `V`=`00` (version 0)\n * `T`=`0` (Type of MTtlv Object)\n * `M`=`0` (no MAC address)\n * `S`=`0` (epoch)\n * `Y`=`0` (1-byte type)\n * `L`=`b00` (well-known value, no length field)\n * `[--]` MAC: _elided_\n * `[4B]` Timestamp: `0x........`\n * `[1B]` type=`b..` (temperature)\n * `[--]` length: _elided_\n * `[2B]` value: `0x....`\n \n Total 8 bytes.\n \n **Example 2**. transmitting a single 2-byte temperature sensor reading, taken just now:\n \n * `[1B]` SOL Header\n * `V`=`00` (version 0)\n * `T`=`0` (Type of MTtlv Object)\n * `M`=`0` (no MAC address)\n * `S`=`1` (elided)\n * `Y`=`0` (1-byte type)\n * `L`=`b00` (well-known value, no length field)\n * `[3B]` sensor reading 1\n * `[--]` MAC: _elided_\n * `[--]` Timestamp: _elided_\n * `[1B]` type=`b..` (temperature)\n * `[--]` length: _elided_\n * `[2B]` value: `0x....`\n \n Total: 4 bytes.\n \n \n **Example 3**. Transmitting 3 sensor readings from 3 different sensors with well-known length, taken at the same time in the past:\n \n * `[1B]` SOL Header\n * `V`=`00` (version 0)\n * `T`=`1` (Type of MTtlv Object)\n * `M`=`0` (no MAC address)\n * `S`=`0` (epoch)\n * `Y`=`0` (1-byte type)\n * `L`=`b00` (well-known value, no length field)\n * `[--]` MAC: _elided_\n * `[4B]` Timestamp: `0x........`\n * `[1B]` Number of Objects = 3\n * `[3B]` sensor reading 1\n * `[--]` MAC: _elided_\n * `[--]` Timestamp: _elided_\n * `[1B]` type=`b..` (temperature)\n * `[--]` length: _elided_\n * `[2B]` value: `0x....`\n * `[3B]` sensor reading 2\n * `[--]` MAC: _elided_\n * `[--]` Timestamp: _elided_\n * `[1B]` type=`b..` (RH)\n * `[--]` length: _elided_\n * `[2B]` value: `0x....`\n * `[3B]` sensor reading 3\n * `[--]` MAC: _elided_\n * `[--]` Timestamp: _elided_\n * `[1B]` type=`b..` (solar)\n * `[--]` length: _elided_\n * `[2B]` value: `0x....`\n \n Total: 15 bytes.\n \n \n ### Rules for saving to a binary file\n \n The assumption is that a binary file is stored on some hard/flash drive with orders of magnitude more space than a packet. The driving design choice are hence made to allow:\n * simple parsing\n * recoverable file in case parts of it get corrupted.\n \n The following rules hence apply when saving to a binary file:\n * sensor Object chaining is NOT allowed (except on Neomote SD card level)\n * each sensor Object MUST be framed using HDLC framing ([RFC1662](https://tools.ietf.org/html/rfc1662))\n * the length field MUST be elided, and the `L` bit in the start header set to `b11`\n \n \n ## JSON representation\n \n A [JSON](http://json.org/) representation is used:\n * when the Objects are stored in a database\n * when manipulating Objects\n \n We use clean indentation for easier readability in these examples. An efficient implementation SHOULD represent the entire JSON string on a single line.\n \n The following is the general format of a JSON representation of sensor Objects:\n \n ```\n {\n \"mac\": \"00-17-0d-00-00-12-34-56\",\n \"timestamp\": 12345678890,\n \"type\": 39,\n \"value\": {\n 'temperature': 0x0a33,\n },\n }\n ```\n \n * \"mac\"\n * represented exactly like in the example above, lowercase hex bytes (exactly 2 characters per byte), separated by `-`.\n * \"timestamp\"\n * an integer representing the epoch\n * \"type\"\n * an integer, per the registry above\n * \"value\"\n * a dictionary of values\n \n \n ## HTTP representation\n \n This representation is used for minimal communication overhead (when data transists).\n \n ```\n {\n \"v\": 0,\n \"o\": [\n ew0KICAgIm1hYyI6ICAg,\n ICAgICIwMC0xNy0wZC0w,\n ...\n 1NiIsDQogICAidGltZXw,\n ]\n }\n ```\n \n * `v`: the version of the representation. Only version `0` is defined in this specification. Other values SHOULD NOT be used. Future revisions of this document MIGHT define further versions.\n * `o`: an array of representations. Each representation is a string representing the binary representation of one or more sensor Objects.\n * the string MUST be a [Base64](https://en.wikipedia.org/wiki/Base64) encoding of the binary representation of exactly one sensor Objects.\n \n \nKeywords: wireless,sensor,network\nPlatform: UNKNOWN\nDescription-Content-Type: text/markdown\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/realms-team/sol", "keywords": "", "license": "Copyright (c) 2018, Inria and Regent of the University of California.", "maintainer": "", "maintainer_email": "", "name": "sensorobjectlibrary", "package_url": "https://pypi.org/project/sensorobjectlibrary/", "platform": "", "project_url": "https://pypi.org/project/sensorobjectlibrary/", "project_urls": { "Homepage": "https://github.com/realms-team/sol" }, "release_url": "https://pypi.org/project/sensorobjectlibrary/1.8.0.0/", "requires_dist": [ "pyserial (>=3.4)" ], "requires_python": "", "summary": "The Sensor Object Library", "version": "1.8.0.0" }, "last_serial": 5099728, "releases": { "1.7.0.0": [ { "comment_text": "", "digests": { "md5": "71719677bf5ff74c5143dd9218da0fd0", "sha256": "ec91000ca081f8548878ecc8444d6f0e5de8a2f84c56207608dbf58ffe7121e5" }, "downloads": -1, "filename": "sensorobjectlibrary-1.7.0.0.tar.gz", "has_sig": false, "md5_digest": "71719677bf5ff74c5143dd9218da0fd0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20680, "upload_time": "2018-05-03T13:24:45", "url": "https://files.pythonhosted.org/packages/90/f7/f1db93be463699702f9edb36bc13f1fe7568b9610d8399fe579a892f0e3b/sensorobjectlibrary-1.7.0.0.tar.gz" } ], "1.7.1.0": [ { "comment_text": "", "digests": { "md5": "5b5dd3c5bb6e7884a0acba6d1911af94", "sha256": "8d6821ed59cc744b01da81de624ceebd6b86ca04de35489b9a451f294a65de83" }, "downloads": -1, "filename": "sensorobjectlibrary-1.7.1.0.tar.gz", "has_sig": false, "md5_digest": "5b5dd3c5bb6e7884a0acba6d1911af94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20727, "upload_time": "2018-05-03T13:40:08", "url": "https://files.pythonhosted.org/packages/ed/cd/73a13ebedb9aa542b634132c4ae7ccbbf5c0201685137e687e51c16f6441/sensorobjectlibrary-1.7.1.0.tar.gz" } ], "1.7.2.0": [ { "comment_text": "", "digests": { "md5": "8d72d044495fab7f2b6422285bb0bb49", "sha256": "e4f4e197bfffaa0e91f999133a2e0b972525ae2f27fc6ba79e7631aaf34038e9" }, "downloads": -1, "filename": "sensorobjectlibrary-1.7.2.0.tar.gz", "has_sig": false, "md5_digest": "8d72d044495fab7f2b6422285bb0bb49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25266, "upload_time": "2018-05-03T13:57:28", "url": "https://files.pythonhosted.org/packages/ec/b8/ae079ea39113950b52d68327ad55684ac29fc31a18b5ec80fc0c12976fe5/sensorobjectlibrary-1.7.2.0.tar.gz" } ], "1.7.3.0": [ { "comment_text": "", "digests": { "md5": "9eef5b60f587b5f4a8f8cda3b596ef7e", "sha256": "86b2240394cea973907ebcee9864a173708a0dde05bdae680fa02641dcb96d16" }, "downloads": -1, "filename": "sensorobjectlibrary-1.7.3.0.tar.gz", "has_sig": false, "md5_digest": "9eef5b60f587b5f4a8f8cda3b596ef7e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28686, "upload_time": "2018-05-03T14:05:36", "url": "https://files.pythonhosted.org/packages/b4/ae/d71d24bc195f0f101cc1d233192fa9054edcefc667d89f77b36e87896539/sensorobjectlibrary-1.7.3.0.tar.gz" } ], "1.7.4.0": [ { "comment_text": "", "digests": { "md5": "60141154232ca1465c1a37d51bbbe961", "sha256": "0efee2889c15826d2d50a16a3c0f7c57cac6c684a31f5e73c4dfa177ca3c651a" }, "downloads": -1, "filename": "sensorobjectlibrary-1.7.4.0.tar.gz", "has_sig": false, "md5_digest": "60141154232ca1465c1a37d51bbbe961", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28861, "upload_time": "2018-05-07T16:29:36", "url": "https://files.pythonhosted.org/packages/0c/88/c661d0e75aa688a535fd34c561000612690f0a6043e6e45ac7a5ea74513a/sensorobjectlibrary-1.7.4.0.tar.gz" } ], "1.7.5.0": [ { "comment_text": "", "digests": { "md5": "128656be310219f3354a4241566254d9", "sha256": "c4b44e2b2fdd95104df7f13b8e21066b7ba66f5978e471fc7f55309c018d3079" }, "downloads": -1, "filename": "sensorobjectlibrary-1.7.5.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "128656be310219f3354a4241566254d9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 29445, "upload_time": "2018-05-07T20:46:20", "url": "https://files.pythonhosted.org/packages/a2/1d/a4e6496da1d54d69d0491e09d3a403a120ca95c8f69c680faef6a6e09e05/sensorobjectlibrary-1.7.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ddd3fb4b95ed4a9e2b66a62f464cfaa4", "sha256": "0da326c633ca4feedb80919bf7c8f440fa84d553085d2e86521ccc9c6b5c6b19" }, "downloads": -1, "filename": "sensorobjectlibrary-1.7.5.0.tar.gz", "has_sig": false, "md5_digest": "ddd3fb4b95ed4a9e2b66a62f464cfaa4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28996, "upload_time": "2018-05-07T20:46:21", "url": "https://files.pythonhosted.org/packages/fa/9e/2921e543b9bcf37a7a0e44f12bd9b1b64590f56604f6d687633ac4af77c4/sensorobjectlibrary-1.7.5.0.tar.gz" } ], "1.8.0.0": [ { "comment_text": "", "digests": { "md5": "8d51172f5925d0ee3a1d7413812b2805", "sha256": "14a09990f41c26c89a5fbccb0b5be045494df0230c30cf4db85271397fe4b4bc" }, "downloads": -1, "filename": "sensorobjectlibrary-1.8.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8d51172f5925d0ee3a1d7413812b2805", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20916, "upload_time": "2019-04-04T16:07:20", "url": "https://files.pythonhosted.org/packages/6c/9e/1f9b8eb01217f521aed7aef27e12bdd936653dd82573d1f517f865a092c7/sensorobjectlibrary-1.8.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a150079394a5394ec37a1e16334b9436", "sha256": "c55332fa819e5def4b9abc0bff52eb53aa71a4d520fcfdc027f455be9efeb9fa" }, "downloads": -1, "filename": "sensorobjectlibrary-1.8.0.0.tar.gz", "has_sig": false, "md5_digest": "a150079394a5394ec37a1e16334b9436", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21023, "upload_time": "2019-04-04T16:07:22", "url": "https://files.pythonhosted.org/packages/d6/9d/d069607a3ba75eb367665e8254674e0a724c52bd791aee21305c7aaca5d5/sensorobjectlibrary-1.8.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8d51172f5925d0ee3a1d7413812b2805", "sha256": "14a09990f41c26c89a5fbccb0b5be045494df0230c30cf4db85271397fe4b4bc" }, "downloads": -1, "filename": "sensorobjectlibrary-1.8.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8d51172f5925d0ee3a1d7413812b2805", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 20916, "upload_time": "2019-04-04T16:07:20", "url": "https://files.pythonhosted.org/packages/6c/9e/1f9b8eb01217f521aed7aef27e12bdd936653dd82573d1f517f865a092c7/sensorobjectlibrary-1.8.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a150079394a5394ec37a1e16334b9436", "sha256": "c55332fa819e5def4b9abc0bff52eb53aa71a4d520fcfdc027f455be9efeb9fa" }, "downloads": -1, "filename": "sensorobjectlibrary-1.8.0.0.tar.gz", "has_sig": false, "md5_digest": "a150079394a5394ec37a1e16334b9436", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21023, "upload_time": "2019-04-04T16:07:22", "url": "https://files.pythonhosted.org/packages/d6/9d/d069607a3ba75eb367665e8254674e0a724c52bd791aee21305c7aaca5d5/sensorobjectlibrary-1.8.0.0.tar.gz" } ] }