map27
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

map27 0.1.2

MAP27 message decoder/encoder

pipeline status map27 on NPM license developtment time contributor covenant support development

!Currently only contains an decoder!

A decoder and encoder for the MPT1327 mobile access protocol (MAP) MAP27. It includes coders for standard MAP27 messages, as well as additional [Tait Communications][tait] radio messages.

Example

import { createMap27Coder, createTaitCoder, createTaitAsciiCoder } from 'map27';

let coder = createTaitCoder();
let message = new Uint8Array([0x84, 0x04, 0x05, 0xa8, 0x21, 0xa5, 0x05]);

console.log(coder.decode(message));

/*
Output will be:
  {
    decodedMessage: {
      messageType: { value: 132, label: 'DMR Poll' },
      gatewayDmrId: 263592,
      dmrGatewayIdDetect: 0,
      dmrId: 34216,
      PFIX1: 4,
      IDENT1: 1448,
      ADESC: { value: 2, label: 'Spare' },
      LENGTH: 1,
      address: Uint8Array(1) [ 165 ],
      pollFormat: { value: 5, label: 'NMEA' }
    },
    nextByte: 7
  }
*/

Development

Feel free to post errors or feature requests to the project issue tracker or email them to us. Please submit security concerns as a confidential issue

The source is hosted on Gitlab and uses eslint, prettier, lint-staged and husky to keep things pretty. As such, when you first clone the repository, as well as installing the npm dependencies, you will also need to install husky.

# Install NPM dependencies
npm install
# Set up husky Git hooks stored in .husky
npx husky install

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.1.2 - 2023-03-04

Added

  • Decoding of 0xd0 (ACK queue) messages

Changed

  • Updated dependencies

0.1.1 - 2022-08-08

Fixed

  • Fixed enums for NMEA message format
  • Changed 0xb0 radio interrogation (D2R) for radio personality (R2D) message as prefer dealing with R2D messages at the moment

0.1.0 - 2022-06-15

Initial version with common message decoder only

Package Sidebar

Install

npm i map27

Weekly Downloads

1

Version

0.1.2

License

AGPL-3.0

Unpacked Size

26.3 kB

Total Files

8

Last publish

Collaborators

  • bytesnz