isoxml-angular
Version:
JavaScript library to parse and generate ISOXML (ISO11783-10) files
126 lines (125 loc) • 3.25 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataLogTrigger = void 0;
const classRegistry_1 = require("../classRegistry");
const utils_1 = require("../utils");
const ATTRIBUTES = {
A: {
name: 'DataLogDDI',
type: 'xs:hexBinary',
isPrimaryId: false,
isOptional: false,
isOnlyV4: false,
},
B: {
name: 'DataLogMethod',
type: 'xs:unsignedByte',
isPrimaryId: false,
isOptional: false,
isOnlyV4: false,
minValue: 1,
maxValue: 31,
},
C: {
name: 'DataLogDistanceInterval',
type: 'xs:long',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
minValue: 0,
maxValue: 1000000,
},
D: {
name: 'DataLogTimeInterval',
type: 'xs:long',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
minValue: 0,
maxValue: 60000,
},
E: {
name: 'DataLogThresholdMinimum',
type: 'xs:long',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
minValue: -2147483647,
maxValue: 2147483647,
},
F: {
name: 'DataLogThresholdMaximum',
type: 'xs:long',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
minValue: -2147483647,
maxValue: 2147483647,
},
G: {
name: 'DataLogThresholdChange',
type: 'xs:long',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
minValue: -2147483647,
maxValue: 2147483647,
},
H: {
name: 'DeviceElementIdRef',
type: 'xs:IDREF',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
},
I: {
name: 'ValuePresentationIdRef',
type: 'xs:IDREF',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
},
J: {
name: 'DataLogPGN',
type: 'xs:unsignedLong',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
minValue: 0,
maxValue: 262143,
},
K: {
name: 'DataLogPGNStartBit',
type: 'xs:unsignedByte',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
minValue: 0,
maxValue: 63,
},
L: {
name: 'DataLogPGNStopBit',
type: 'xs:unsignedByte',
isPrimaryId: false,
isOptional: true,
isOnlyV4: false,
minValue: 0,
maxValue: 63,
},
};
const CHILD_TAGS = {};
class DataLogTrigger {
constructor(attributes, isoxmlManager) {
this.attributes = attributes;
this.isoxmlManager = isoxmlManager;
this.tag = "DLT" /* TAGS.DataLogTrigger */;
}
static fromXML(xml, isoxmlManager, internalId, targetClass = DataLogTrigger) {
return (0, utils_1.fromXML)(xml, isoxmlManager, targetClass, ATTRIBUTES, CHILD_TAGS, internalId);
}
toXML() {
return (0, utils_1.toXML)(this, ATTRIBUTES, CHILD_TAGS);
}
}
exports.DataLogTrigger = DataLogTrigger;
(0, classRegistry_1.registerEntityClass)('main', "DLT" /* TAGS.DataLogTrigger */, DataLogTrigger);