{"id":20617174,"url":"https://github.com/yiweisong/node-ace-msg-parser","last_synced_at":"2025-07-01T23:07:05.739Z","repository":{"id":70083131,"uuid":"446821190","full_name":"yiweisong/node-ace-msg-parser","owner":"yiweisong","description":"A node add-on for Aceinna device message parser","archived":false,"fork":false,"pushed_at":"2025-03-05T10:09:46.000Z","size":263,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-05T10:40:57.978Z","etag":null,"topics":["aceinna","parser"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yiweisong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-11T12:56:07.000Z","updated_at":"2025-03-05T10:09:49.000Z","dependencies_parsed_at":"2024-07-16T05:44:02.547Z","dependency_job_id":null,"html_url":"https://github.com/yiweisong/node-ace-msg-parser","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/yiweisong/node-ace-msg-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiweisong%2Fnode-ace-msg-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiweisong%2Fnode-ace-msg-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiweisong%2Fnode-ace-msg-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiweisong%2Fnode-ace-msg-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yiweisong","download_url":"https://codeload.github.com/yiweisong/node-ace-msg-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yiweisong%2Fnode-ace-msg-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263047676,"owners_count":23405280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aceinna","parser"],"created_at":"2024-11-16T11:22:28.297Z","updated_at":"2025-07-01T23:07:05.713Z","avatar_url":"https://github.com/yiweisong.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Aceinna Message Parser\n\nThis is a native addon to parse Aceinna device message. It helps you to split the binary data to payload by packet type. Do some decode work based on the user manual if you want to know the actual value from Aceinna device.\n\n\u003e You need to have Node 10.5.0 or later installed. \n\n## Usage\n```javascript\nconst parsers = require(\"ace-msg-parser\");\n\nconst allowedNMEATypes = [\n    \"$GPGGA\", \"$GNGGA\", \"$GPRMC\", \"$GNRMC\", \"$GPGSV\",\n    \"$GLGSV\", \"$GAGSV\", \"$BDGSV\", \"$GPGSA\", \"$GLGSA\",\n    \"$GAGSA\", \"$BDGSA\", \"$GPZDA\", \"$GNZDA\", \"$GPVTG\",\n    \"$PASHR\", \"$GNINS\",\n];\n\nconst uartParser = new parsers.MessageParser({\n    key: 'uart-parser-key',\n    user: {\n        allows: [\n            0x7331, //s1, \n            0x7332, //s2, \n            0x674e, //gN,\n            0x694e, //iN,\n            0x6431, //d1,\n            0x6432, //d2,\n            0x7354, //sT,\n            0x6f31, //o1,\n            0x664d, //fM,\n            0x7274, //rt,\n            0x7350, //sP\n        ],\n        packetLengthType: 'uint8',\n    },\n    nmea: {\n        allows: allowedNMEATypes\n    }\n});\n```\n\n## API\n### MessageParser\n\n`constructor(options:Options)`\n\nAccept a options to initialize the parser.\n\n`receive(data: Buffer): ResultList`\n\nReceive some buffer data, and parse the result\n\n### Options\n| Name | Data Type | Optional | Description |\n| - | - | - | - |\n| key | string | No | A unique key|\n| user | `UserOptions` | Yes| The options to parse user packet |\n| nmea | `NMEAOptions` | Yes | The options to parse NMEA packet |\n\n### UserOptions\n| Name | Data Type | Optional | Description |\n| - | - | - | - |\n| allows | number[] | No | Only data with packet type in the list could be pared |\n| packetLengthType | string | No | The packet length type of user packet, `uint8` or `uint32` |\n\n### NMEAOptions\n| Name | Data Type | Optional | Description |\n| - | - | - | - |\n| allows | string[] | No | Only data with NMEA type in the list could be pared |\n\n### ResultList\nA list of parsed result\n| Name | Data Type | Optional | Description |\n| - | - | - | - |\n| packetType | number | No | The packet type. `0x6e4d` is for NMEA packet |\n| payload | string or Buffer | No | The content of parsed packet. User packet is Buffer, and NMEA is string |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiweisong%2Fnode-ace-msg-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyiweisong%2Fnode-ace-msg-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyiweisong%2Fnode-ace-msg-parser/lists"}