UNPKG

smppjs

Version:
27 lines 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.bindTransmitterDTO = void 0; const helpers_1 = require("../helpers"); const MAX_LENGTH = { system_id: 16, password: 9, system_type: 13, address_range: 41, }; const bindTransmitterDTO = ({ systemId, password, interfaceVersion, systemType, addressRange, addrNpi, addrTon, }) => { const dto = { command: { system_id: { type: 'Cstring', value: systemId }, password: { type: 'Cstring', value: password }, system_type: { type: 'Cstring', value: systemType || '' }, interface_version: { type: 'Int8', value: interfaceVersion || 80 }, addr_ton: { type: 'Int8', value: addrTon || 0 }, addr_npi: { type: 'Int8', value: addrNpi || 0 }, address_range: { type: 'Cstring', value: addressRange || '' }, }, }; (0, helpers_1.dtoValidation)({ dto, MAX_LENGTH }); return dto; }; exports.bindTransmitterDTO = bindTransmitterDTO; //# sourceMappingURL=bind_transmitter.js.map