nimcodec
Version:
Encoder/decoder for satellite IoT using Non-IP Messages
433 lines (296 loc) • 14.2 kB
HTML
<html>
<head>
<meta charset="utf-8">
<title>Index</title>
<script src="scripts/prettify/prettify.js"></script>
<script src="scripts/prettify/lang-css.js"></script>
<script src="scripts/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
<link type="text/css" rel="stylesheet" href="styles/jaguar.css">
<script>
var config = {"monospaceLinks":false,"cleverLinks":true,"default":{}};
</script>
</head>
<body>
<div id="wrap" class="clearfix">
<div class="navigation">
<h3 class="applicationName"><a href="index.html"></a></h3>
<div class="search">
<input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations">
</div>
<ul class="list">
<li class="item" data-name="field">
<span class="title">
<a href="field.html">field</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="field.array">
<span class="title">
<a href="field.array.html">field.array</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="field.bitkeylist">
<span class="title">
<a href="field.bitkeylist.html">field.bitkeylist</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="field.bool">
<span class="title">
<a href="field.bool.html">field.bool</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="field.data">
<span class="title">
<a href="field.data.html">field.data</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="field.enum">
<span class="title">
<a href="field.enum.html">field.enum</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="field.int">
<span class="title">
<a href="field.int.html">field.int</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="field.string">
<span class="title">
<a href="field.string.html">field.string</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="field.uint">
<span class="title">
<a href="field.uint.html">field.uint</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="nimo">
<span class="title">
<a href="nimo.html">nimo</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
<span class="subtitle">Methods</span>
<li data-name="nimo.decodeMessage"><a href="nimo.html#.decodeMessage">decodeMessage</a></li>
<li data-name="nimo.encodeMessage"><a href="nimo.html#.encodeMessage">encodeMessage</a></li>
<li data-name="nimo.exportJson"><a href="nimo.html#.exportJson">exportJson</a></li>
<li data-name="nimo.exportXml"><a href="nimo.html#.exportXml">exportXml</a></li>
<li data-name="nimo.importCodec"><a href="nimo.html#.importCodec">importCodec</a></li>
</ul>
<ul class="events itemMembers">
</ul>
</li>
<li class="item" data-name="types">
<span class="title">
<a href="types.html">types</a>
<span class="static">static</span>
</span>
<ul class="members itemMembers">
</ul>
<ul class="typedefs itemMembers">
<span class="subtitle">Typedefs</span>
<li data-name="types.Field"><a href="types.html#.Field">Field</a></li>
<li data-name="types.FieldType"><a href="types.html#.FieldType">FieldType</a></li>
<li data-name="types.Message"><a href="types.html#.Message">Message</a></li>
<li data-name="types.NimoCodec"><a href="types.html#.NimoCodec">NimoCodec</a></li>
<li data-name="types.Service"><a href="types.html#.Service">Service</a></li>
</ul>
<ul class="typedefs itemMembers">
</ul>
<ul class="methods itemMembers">
</ul>
<ul class="events itemMembers">
</ul>
</li>
</ul>
</div>
<div class="main">
<h1 class="page-title" data-filename="index.html">Index</h1>
<h3> </h3>
<section>
<article class="readme"><h1>Non-IP Modem Codecs for Node.JS</h1>
<p>A Node.JS library for decoding and encoding efficient binary blob messages
for Non-IP Modem data transport over constrained satellite networks.</p>
<h2>NIMO</h2>
<p>Non-IP Modem for ORBCOMM protocols is derived from a proprietary codec key file
described by XML or JSON. The principle is the first 2 payload bytes comprise
a message key describing <em>services</em> (aka SIN) made up of <em>messages</em> (aka MIN).
Messages are defined for both <em>uplink</em> (aka Mobile-Originated) and <em>downlink</em>
(aka Mobile-Terminated) operations.</p>
<p>Using this approach we can define up to 256 <strong>Service</strong>(s) each with up to
256 <strong>Message</strong>(s) in each direction of communication. The intent is that each
micro-service encapsulates a set of related remote operations, and the messages
represent the individual downlink (command/query) or uplink (response/report)
operations.</p>
<blockquote>
<p>[!NOTE]
When using actual ORBCOMM-protocol based modems (IDP/OGx service) SIN 0-15 are
reserved for system use, and SIN 16-127 are pseudo-reserved for ORBCOMM Lua apps.</p>
</blockquote>
<blockquote>
<p>[!TIP]
The key feature of <em>NIMO</em> messages is that data field boundaries do not need to
align with byte boundaries.</p>
</blockquote>
<p>Each <strong><code>message</code></strong> is defined by a set of attributes:</p>
<ul>
<li><strong><code>name</code></strong> should be unique to the direction in the service</li>
<li><strong><code>messageKey</code></strong> (aka <code>MIN</code>) <em>must</em> be unique to the direction in the service</li>
<li><strong><code>description</code></strong> is optional</li>
<li><strong><code>fields</code></strong> Defines a set of ordered data types in the message payload,
where each field includes attributes:
<ul>
<li><strong><code>name</code></strong> must be unique within <code>fields</code></li>
<li><strong><code>description</code></strong> is optional to provide additional context</li>
<li><strong><code>type</code></strong> must be one of the supported data types:
<ul>
<li><code>bool</code> are 1-bit values</li>
<li><code>enum</code> define a set number of bits to index discrete <em>string</em> values</li>
<li><code>int</code> define a set number of bits for signed integer (MSB sign)</li>
<li><code>uint</code> define a set number of bits for unsigned integer</li>
<li><code>string</code> define a set or maximum number of ASCII character bytes</li>
<li><code>data</code> define a set or maximum number of bytes</li>
<li><code>array</code> define a set or maximum number of nested child <em>fields</em></li>
<li><code>bitmasklist</code> define a set number of bits to index array <em>fields</em></li>
</ul>
</li>
<li><strong><code>size</code></strong> is used for types: <code>enum</code>, <code>int</code>, <code>uint</code> to represent the
number of bits of payload used. It repesents the maximum number of bytes
of payload used for <code>string</code> or <code>data</code>. It represents the maximum number
of fields used for <code>array</code> or <code>bitmasklist</code>. It is not used for <code>bool</code>.</li>
<li><strong><code>items</code></strong> is a list required for <code>enum</code> or <code>bitmasklist</code> types.</li>
<li><strong><code>fields</code></strong> is a list required for <code>array</code> and <code>bitmasklist</code> types,
defining nested fields.</li>
<li><strong><code>optional</code></strong> is <em>optional</em> for any type; flags the field as being
present or not, and consumes 1 bit of payload to indicate presence.</li>
<li><strong><code>fixed</code></strong> is <em>optional</em> for variable length fields <code>string</code>, <code>data</code>,
<code>array</code> to reserve/pad the maximum data length to a specific payload size.</li>
</ul>
</li>
</ul>
<p>The XML format was historically uploaded to the Viasat/Inmarsat or
ORBCOMM/SkyWave web service API gateways, typically with extension <code>*.idpmsg</code>.
Some field types may not be supported on some gateways.</p>
<p>The JSON format provides a condensed version and supports an extended set of
field types. The codec library is intended to prefer JSON representation for
processing external to the service provider API gateways.</p></article>
</section>
<footer>
Documentation generated by <a target="_blank" href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.2</a> on Mon Feb 05 2024 16:52:36 GMT-0500 (Eastern Standard Time)
</footer>
</div>
</div>
<script>prettyPrint();</script>
<script src="scripts/jaguar.js"></script>
</body>
</html>