UNPKG

aes70

Version:

A controller library for the AES70 protocol.

19 lines (17 loc) 448 B
import { createType } from './createType.js'; export const OcaFloat64 = createType({ isConstantLength: true, canEncode: function (value) { return typeof value === 'number'; }, encodedLength: function (value) { return 8; }, encodeTo: function (dataView, pos, value) { dataView.setFloat64(pos, +value, false); return pos + 8; }, decode: function (dataView, pos) { return dataView.getFloat64(pos, false); }, });