"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.XmlLabelType = exports.IoInternal = void 0;
const domain_1 = require("@aubo/wcaps/lib/backend/domain");
class IoInternal {
  constructor(name, defaultName, interfaceType, type, hasInput, index = 0) {
    this.name = name;
    this.defaultName = defaultName;
    this.interfaceType = interfaceType;
    this.type = type;
    this.hasInput = hasInput;
    this.index = index;
    this.resolvable = true;
  }
  getDisplayName() {
    return this.name;
  }
  getDefaultName() {
    return this.defaultName;
  }
  getValueStr() {
    return this.name;
  }
  getType() {
    return this.type;
  }
  getInterfaceType() {
    return this.interfaceType;
  }
  isInput() {
    return this.hasInput;
  }
  isResolvable() {
    return this.resolvable;
  }
  setResolvable(resolvable) {
    this.resolvable = resolvable;
  }
  getIndex() {
    return this.index;
  }
  generateWriteScript(value) {
    if (this.interfaceType === domain_1.InterfaceType.TOOL) {
      return `setToolDigitalOutput(${this.index}, ${value})`;
    }
    return `setStandardDigitalOutput(${this.index}, ${value})`;
  }
}
exports.IoInternal = IoInternal;
var XmlLabelType;
(function (XmlLabelType) {
  XmlLabelType["INT32"] = "Int32";
  XmlLabelType["INT64"] = "Int64";
  XmlLabelType["FLOAT32"] = "Float32";
  XmlLabelType["FLOAT64"] = "Float64";
  XmlLabelType["BOOL"] = "Bool";
  XmlLabelType["STRING"] = "String";
  XmlLabelType["VECTOR_INT"] = "VectorInt";
  XmlLabelType["VECTOR_FLOAT"] = "VectorFloat";
  XmlLabelType["VECTOR_DOUBLE"] = "VectorDouble";
  XmlLabelType["VECTOR_BOOL"] = "VectorBool";
  XmlLabelType["VECTOR_STRING"] = "VectorString";
  XmlLabelType["VARIABLE"] = "Variable";
  XmlLabelType["IO"] = "Io";
  XmlLabelType["TCP"] = "TCP";
  XmlLabelType["DIGITAL_IO"] = "DigitalIo";
  XmlLabelType["FEATURE"] = "Feature";
  XmlLabelType["WAYPOINT"] = "Waypoint";
  XmlLabelType["EXPRESSION"] = "Expression";
  XmlLabelType["TIMER"] = "Timer";
  XmlLabelType["SUB_PROGRAM"] = "SubProgram";
  XmlLabelType["PAYLOAD"] = "Payload";
  XmlLabelType["MODBUS_UNIT"] = "ModbusUnit";
  XmlLabelType["MODBUS_SIGNAL"] = "ModbusSignal";
  XmlLabelType["ETHERNET_IP"] = "EIPSignal";
  XmlLabelType["PROFINET_SIGNAL"] = "ProfinetSignal";
  XmlLabelType["SAFETY_PLANES"] = "SafetyPlanes";
  XmlLabelType["TOOL_POSITION"] = "ToolPositionParams";
  XmlLabelType["OBSTACLE_MARKERS"] = "ObstacleMarkers";
  XmlLabelType["CAMERAS"] = "Cameras";
  XmlLabelType["CONVEYORBELTS"] = "ConveyorBelts";
  XmlLabelType["GRIPPERS"] = "Grippers";
  XmlLabelType["EXTERNAL_AXES"] = "ExternalAxes";
  XmlLabelType["EXTERNAL_AXIS_GROUPS"] = "ExternalAxisGroups";
})(XmlLabelType || (exports.XmlLabelType = XmlLabelType = {}));
//# sourceMappingURL=domain.js.map