UNPKG

isoxml-angular

Version:

JavaScript library to parse and generate ISOXML (ISO11783-10) files

79 lines (78 loc) 2.24 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ControlAssignment = void 0; const classRegistry_1 = require("../classRegistry"); const utils_1 = require("../utils"); const ATTRIBUTES = { A: { name: 'SourceClientNAME', type: 'xs:hexBinary', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, }, B: { name: 'UserClientNAME', type: 'xs:hexBinary', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, }, C: { name: 'SourceDeviceStructureLabel', type: 'xs:hexBinary', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, }, D: { name: 'UserDeviceStructureLabel', type: 'xs:hexBinary', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, }, E: { name: 'SourceDeviceElementNumber', type: 'xs:unsignedShort', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, minValue: 0, maxValue: 4095, }, F: { name: 'UserDeviceElementNumber', type: 'xs:unsignedShort', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, minValue: 0, maxValue: 4095, }, G: { name: 'ProcessDataDDI', type: 'xs:hexBinary', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, }, }; const CHILD_TAGS = { ASP: { name: 'AllocationStamp', isOnlyV4: undefined }, }; class ControlAssignment { constructor(attributes, isoxmlManager) { this.attributes = attributes; this.isoxmlManager = isoxmlManager; this.tag = "CAT" /* TAGS.ControlAssignment */; } static fromXML(xml, isoxmlManager, internalId, targetClass = ControlAssignment) { return (0, utils_1.fromXML)(xml, isoxmlManager, targetClass, ATTRIBUTES, CHILD_TAGS, internalId); } toXML() { return (0, utils_1.toXML)(this, ATTRIBUTES, CHILD_TAGS); } } exports.ControlAssignment = ControlAssignment; (0, classRegistry_1.registerEntityClass)('main', "CAT" /* TAGS.ControlAssignment */, ControlAssignment);