Skip to main content

Aceinna Navigation System API

Project description

A library to decode and encode data packet for Aceinna Devices

Usage

from acenav_api import create_parser

parser = create_parser('IN502')
decode_payload = parser.decode('S2', bytes([0x0,0x1,0x2])) # return a dict object
binary_bytes = parser.encode('S2', [1,2,3]) # return as bytes

It also supports to pass a configuration file to the parser, the configuration file contains payload definition and the parser will generate the parser based on the configuration file.

from acenav_api import create_parser

parser = create_parser('IN502-custom', 'path/to/config.json')
# support custom packet type
decode_payload = parser.decode('S2', bytes([0x0,0x1,0x2])) # return a dict object
binary_bytes = parser.encode('S2',[0,1,2]) # return as bytes

How it work

The libary predefined configurations for each device, the configuration file is a json file that contains the payload definition for each packet type. It will decode or encode the data based on the configuration file.

User also could pass a custom configuration file to the parser to generate the parser. It is allowed to update the payload definition in the configuration file. It could be useful if the output format is modified or the payload is changed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

acenav_api-1.0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

acenav_api-1.0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file acenav_api-1.0.1.tar.gz.

File metadata

  • Download URL: acenav_api-1.0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.0

File hashes

Hashes for acenav_api-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8ee1a4be71ebf227ba45627c60c5e43da0b84c97f24d325e054c096559d841b5
MD5 99c1bb3eb28d36753cfbf587d931df32
BLAKE2b-256 a31fadcdc60269c5d11e8998297f51b432ffb47f86fd4e223ce2f27f6190cd8c

See more details on using hashes here.

File details

Details for the file acenav_api-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: acenav_api-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.0

File hashes

Hashes for acenav_api-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79b27b759658a9a18b0d35b00fb5c1d688f15c59e6bfdb1eddf5c5813ec97046
MD5 47923b88f20d049aa8898ef5c092521a
BLAKE2b-256 d335cc056d2fbea627576c2090c273867803156c37acad092696dc125e7a3ea6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page