@zaber/motion 3.3.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/device.d.ts +14 -0
  3. package/dist/lib/ascii/device.js +24 -0
  4. package/dist/lib/ascii/device.js.map +1 -1
  5. package/dist/lib/ascii/index.d.ts +5 -0
  6. package/dist/lib/ascii/index.js +11 -1
  7. package/dist/lib/ascii/index.js.map +1 -1
  8. package/dist/lib/ascii/pvt_axis_definition.d.ts +17 -0
  9. package/dist/lib/ascii/pvt_axis_definition.js +53 -0
  10. package/dist/lib/ascii/pvt_axis_definition.js.map +1 -0
  11. package/dist/lib/ascii/pvt_axis_type.d.ts +7 -0
  12. package/dist/lib/ascii/pvt_axis_type.js +14 -0
  13. package/dist/lib/ascii/pvt_axis_type.js.map +1 -0
  14. package/dist/lib/ascii/pvt_buffer.d.ts +28 -0
  15. package/dist/lib/ascii/pvt_buffer.js +78 -0
  16. package/dist/lib/ascii/pvt_buffer.js.map +1 -0
  17. package/dist/lib/ascii/pvt_mode.d.ts +8 -0
  18. package/dist/lib/ascii/pvt_mode.js +15 -0
  19. package/dist/lib/ascii/pvt_mode.js.map +1 -0
  20. package/dist/lib/ascii/pvt_sequence.d.ts +178 -0
  21. package/dist/lib/ascii/pvt_sequence.js +407 -0
  22. package/dist/lib/ascii/pvt_sequence.js.map +1 -0
  23. package/dist/lib/ascii/stream.d.ts +13 -5
  24. package/dist/lib/ascii/stream.js +25 -5
  25. package/dist/lib/ascii/stream.js.map +1 -1
  26. package/dist/lib/ascii/stream_buffer.d.ts +1 -1
  27. package/dist/lib/ascii/stream_buffer.js +1 -1
  28. package/dist/lib/ascii/stream_buffer.js.map +1 -1
  29. package/dist/lib/ascii_ns.d.ts +10 -0
  30. package/dist/lib/ascii_ns.js +5 -0
  31. package/dist/lib/ascii_ns.js.map +1 -1
  32. package/dist/lib/exceptions/command_failed_exception_data.d.ts +20 -4
  33. package/dist/lib/exceptions/command_failed_exception_data.js +4 -0
  34. package/dist/lib/exceptions/command_failed_exception_data.js.map +1 -1
  35. package/dist/lib/exceptions/index.d.ts +11 -0
  36. package/dist/lib/exceptions/index.js +24 -2
  37. package/dist/lib/exceptions/index.js.map +1 -1
  38. package/dist/lib/exceptions/invalid_pvt_point.d.ts +16 -0
  39. package/dist/lib/exceptions/invalid_pvt_point.js +18 -0
  40. package/dist/lib/exceptions/invalid_pvt_point.js.map +1 -0
  41. package/dist/lib/exceptions/pvt_discontinuity_exception.d.ts +7 -0
  42. package/dist/lib/exceptions/pvt_discontinuity_exception.js +17 -0
  43. package/dist/lib/exceptions/pvt_discontinuity_exception.js.map +1 -0
  44. package/dist/lib/exceptions/pvt_execution_exception.d.ts +14 -0
  45. package/dist/lib/exceptions/pvt_execution_exception.js +32 -0
  46. package/dist/lib/exceptions/pvt_execution_exception.js.map +1 -0
  47. package/dist/lib/exceptions/pvt_execution_exception_data.d.ts +21 -0
  48. package/dist/lib/exceptions/pvt_execution_exception_data.js +20 -0
  49. package/dist/lib/exceptions/pvt_execution_exception_data.js.map +1 -0
  50. package/dist/lib/exceptions/pvt_mode_exception.d.ts +7 -0
  51. package/dist/lib/exceptions/pvt_mode_exception.js +17 -0
  52. package/dist/lib/exceptions/pvt_mode_exception.js.map +1 -0
  53. package/dist/lib/exceptions/pvt_movement_failed_exception.d.ts +14 -0
  54. package/dist/lib/exceptions/pvt_movement_failed_exception.js +32 -0
  55. package/dist/lib/exceptions/pvt_movement_failed_exception.js.map +1 -0
  56. package/dist/lib/exceptions/pvt_movement_failed_exception_data.d.ts +16 -0
  57. package/dist/lib/exceptions/pvt_movement_failed_exception_data.js +18 -0
  58. package/dist/lib/exceptions/pvt_movement_failed_exception_data.js.map +1 -0
  59. package/dist/lib/exceptions/pvt_movement_interrupted_exception.d.ts +14 -0
  60. package/dist/lib/exceptions/pvt_movement_interrupted_exception.js +32 -0
  61. package/dist/lib/exceptions/pvt_movement_interrupted_exception.js.map +1 -0
  62. package/dist/lib/exceptions/pvt_movement_interrupted_exception_data.d.ts +16 -0
  63. package/dist/lib/exceptions/pvt_movement_interrupted_exception_data.js +18 -0
  64. package/dist/lib/exceptions/pvt_movement_interrupted_exception_data.js.map +1 -0
  65. package/dist/lib/exceptions/pvt_setup_failed_exception.d.ts +7 -0
  66. package/dist/lib/exceptions/pvt_setup_failed_exception.js +17 -0
  67. package/dist/lib/exceptions/pvt_setup_failed_exception.js.map +1 -0
  68. package/dist/lib/exceptions/set_device_state_exception_data.d.ts +4 -0
  69. package/dist/lib/exceptions/set_device_state_exception_data.js +1 -0
  70. package/dist/lib/exceptions/set_device_state_exception_data.js.map +1 -1
  71. package/dist/lib/exceptions/stream_discontinuity_exception.d.ts +7 -0
  72. package/dist/lib/exceptions/stream_discontinuity_exception.js +17 -0
  73. package/dist/lib/exceptions/stream_discontinuity_exception.js.map +1 -0
  74. package/dist/lib/gateway/convert_exceptions.js +7 -0
  75. package/dist/lib/gateway/convert_exceptions.js.map +1 -1
  76. package/dist/lib/protobufs/main_pb.d.ts +326 -0
  77. package/dist/lib/protobufs/main_pb.js +3696 -1245
  78. package/dist/lib/protobufs/main_pb.js.map +1 -1
  79. package/package.json +31 -1
@@ -1 +1 @@
1
- {"version":3,"file":"set_device_state_exception_data.js","sourceRoot":"","sources":["../../../src/exceptions/set_device_state_exception_data.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAGtD,+FAAwF;AA2CxF,IAAiB,2BAA2B,CAe3C;AAfD,WAAiB,2BAA2B;IAC7B,kCAAM,GAAG,6BAA6B,CAAC;IAEpD,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAoD;QAC/E,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,YAAY;YAC7B,aAAa,EAAE,MAAM,CAAC,iBAAiB;YACvC,QAAQ,EAAE,MAAM,CAAC,YAAY;YAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,eAAe,EAAE,MAAM,CAAC,mBAAmB;YAC3C,OAAO,EAAE,MAAM,CAAC,WAAW;YAC3B,WAAW,EAAE,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,qEAA+B,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SACpG,CAAC;IACJ,CAAC;IAVe,wCAAY,eAU3B,CAAA;AACH,CAAC,EAfgB,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAe3C","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { SetPeripheralStateExceptionData } from './set_peripheral_state_exception_data';\n\n/**\n * Contains additional data for a SetDeviceStateFailedException.\n */\nexport interface SetDeviceStateExceptionData {\n /**\n * A list of settings which could not be set.\n */\n settings: string[];\n\n /**\n * The reason the stream buffers could not be set.\n */\n streamBuffers: string[];\n\n /**\n * The reason the triggers could not be set.\n */\n triggers: string[];\n\n /**\n * The reason servo tuning could not be set.\n */\n servoTuning: string;\n\n /**\n * The reasons stored positions could not be set.\n */\n storedPositions: string[];\n\n /**\n * The reasons storage could not be set.\n */\n storage: string[];\n\n /**\n * Errors for any peripherals that could not be set.\n */\n peripherals: SetPeripheralStateExceptionData[];\n\n}\n\nexport namespace SetDeviceStateExceptionData {\n export const __type = 'SetDeviceStateExceptionData';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.SetDeviceStateExceptionData.AsObject): SetDeviceStateExceptionData {\n return {\n settings: pbData.settingsList,\n streamBuffers: pbData.streamBuffersList,\n triggers: pbData.triggersList,\n servoTuning: pbData.servoTuning,\n storedPositions: pbData.storedPositionsList,\n storage: pbData.storageList,\n peripherals: pbData.peripheralsList.map(item => SetPeripheralStateExceptionData.fromProtobuf(item)),\n };\n }\n}\n"]}
1
+ {"version":3,"file":"set_device_state_exception_data.js","sourceRoot":"","sources":["../../../src/exceptions/set_device_state_exception_data.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAGtD,+FAAwF;AAgDxF,IAAiB,2BAA2B,CAgB3C;AAhBD,WAAiB,2BAA2B;IAC7B,kCAAM,GAAG,6BAA6B,CAAC;IAEpD,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAoD;QAC/E,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,YAAY;YAC7B,aAAa,EAAE,MAAM,CAAC,iBAAiB;YACvC,UAAU,EAAE,MAAM,CAAC,cAAc;YACjC,QAAQ,EAAE,MAAM,CAAC,YAAY;YAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,eAAe,EAAE,MAAM,CAAC,mBAAmB;YAC3C,OAAO,EAAE,MAAM,CAAC,WAAW;YAC3B,WAAW,EAAE,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,qEAA+B,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;SACpG,CAAC;IACJ,CAAC;IAXe,wCAAY,eAW3B,CAAA;AACH,CAAC,EAhBgB,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAgB3C","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { SetPeripheralStateExceptionData } from './set_peripheral_state_exception_data';\n\n/**\n * Contains additional data for a SetDeviceStateFailedException.\n */\nexport interface SetDeviceStateExceptionData {\n /**\n * A list of settings which could not be set.\n */\n settings: string[];\n\n /**\n * The reason the stream buffers could not be set.\n */\n streamBuffers: string[];\n\n /**\n * The reason the pvt buffers could not be set.\n */\n pvtBuffers: string[];\n\n /**\n * The reason the triggers could not be set.\n */\n triggers: string[];\n\n /**\n * The reason servo tuning could not be set.\n */\n servoTuning: string;\n\n /**\n * The reasons stored positions could not be set.\n */\n storedPositions: string[];\n\n /**\n * The reasons storage could not be set.\n */\n storage: string[];\n\n /**\n * Errors for any peripherals that could not be set.\n */\n peripherals: SetPeripheralStateExceptionData[];\n\n}\n\nexport namespace SetDeviceStateExceptionData {\n export const __type = 'SetDeviceStateExceptionData';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.SetDeviceStateExceptionData.AsObject): SetDeviceStateExceptionData {\n return {\n settings: pbData.settingsList,\n streamBuffers: pbData.streamBuffersList,\n pvtBuffers: pbData.pvtBuffersList,\n triggers: pbData.triggersList,\n servoTuning: pbData.servoTuning,\n storedPositions: pbData.storedPositionsList,\n storage: pbData.storageList,\n peripherals: pbData.peripheralsList.map(item => SetPeripheralStateExceptionData.fromProtobuf(item)),\n };\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { MotionLibException } from './motion_lib_exception';
2
+ /**
3
+ * Thrown when a stream encounters discontinuity and interrupts the movement.
4
+ */
5
+ export declare class StreamDiscontinuityException extends MotionLibException {
6
+ constructor(message: string);
7
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
+ // ============= DO NOT EDIT DIRECTLY ============= //
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.StreamDiscontinuityException = void 0;
6
+ const motion_lib_exception_1 = require("./motion_lib_exception");
7
+ /**
8
+ * Thrown when a stream encounters discontinuity and interrupts the movement.
9
+ */
10
+ class StreamDiscontinuityException extends motion_lib_exception_1.MotionLibException {
11
+ constructor(message) {
12
+ super(message);
13
+ Object.setPrototypeOf(this, StreamDiscontinuityException.prototype);
14
+ }
15
+ }
16
+ exports.StreamDiscontinuityException = StreamDiscontinuityException;
17
+ //# sourceMappingURL=stream_discontinuity_exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stream_discontinuity_exception.js","sourceRoot":"","sources":["../../../src/exceptions/stream_discontinuity_exception.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD,iEAA4D;AAE5D;;GAEG;AACH,MAAa,4BAA6B,SAAQ,yCAAkB;IAClE,YACE,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;IACtE,CAAC;CACF;AAPD,oEAOC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { MotionLibException } from './motion_lib_exception';\n\n/**\n * Thrown when a stream encounters discontinuity and interrupts the movement.\n */\nexport class StreamDiscontinuityException extends MotionLibException {\n constructor(\n message: string\n ) {\n super(message);\n Object.setPrototypeOf(this, StreamDiscontinuityException.prototype);\n }\n}\n"]}
@@ -62,11 +62,18 @@ errorMapping.set(main_pb_1.Errors.NO_VALUE_FOR_KEY, exceptions.NoValueForKeyExce
62
62
  errorMapping.set(main_pb_1.Errors.NOT_SUPPORTED, exceptions.NotSupportedException);
63
63
  errorMapping.set(main_pb_1.Errors.OS_FAILED, exceptions.OsFailedException);
64
64
  errorMapping.set(main_pb_1.Errors.OUT_OF_REQUEST_IDS, exceptions.OutOfRequestIdsException);
65
+ errorMapping.set(main_pb_1.Errors.PVT_DISCONTINUITY, exceptions.PvtDiscontinuityException);
66
+ errorMapping.set(main_pb_1.Errors.PVT_EXECUTION, exceptions.PvtExecutionException);
67
+ errorMapping.set(main_pb_1.Errors.PVT_MODE, exceptions.PvtModeException);
68
+ errorMapping.set(main_pb_1.Errors.PVT_MOVEMENT_FAILED, exceptions.PvtMovementFailedException);
69
+ errorMapping.set(main_pb_1.Errors.PVT_MOVEMENT_INTERRUPTED, exceptions.PvtMovementInterruptedException);
70
+ errorMapping.set(main_pb_1.Errors.PVT_SETUP_FAILED, exceptions.PvtSetupFailedException);
65
71
  errorMapping.set(main_pb_1.Errors.REQUEST_TIMEOUT, exceptions.RequestTimeoutException);
66
72
  errorMapping.set(main_pb_1.Errors.SERIAL_PORT_BUSY, exceptions.SerialPortBusyException);
67
73
  errorMapping.set(main_pb_1.Errors.SET_DEVICE_STATE_FAILED, exceptions.SetDeviceStateFailedException);
68
74
  errorMapping.set(main_pb_1.Errors.SET_PERIPHERAL_STATE_FAILED, exceptions.SetPeripheralStateFailedException);
69
75
  errorMapping.set(main_pb_1.Errors.SETTING_NOT_FOUND, exceptions.SettingNotFoundException);
76
+ errorMapping.set(main_pb_1.Errors.STREAM_DISCONTINUITY, exceptions.StreamDiscontinuityException);
70
77
  errorMapping.set(main_pb_1.Errors.STREAM_EXECUTION, exceptions.StreamExecutionException);
71
78
  errorMapping.set(main_pb_1.Errors.STREAM_MODE, exceptions.StreamModeException);
72
79
  errorMapping.set(main_pb_1.Errors.STREAM_MOVEMENT_FAILED, exceptions.StreamMovementFailedException);
@@ -1 +1 @@
1
- {"version":3,"file":"convert_exceptions.js","sourceRoot":"","sources":["../../../src/gateway/convert_exceptions.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,kDAA0D;AAC1D,0DAA4C;AAE5C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAwF,CAAC;AACrH,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAC1F,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAC7E,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,gBAAgB,EAAE,UAAU,CAAC,uBAAuB,CAAC,CAAC;AAChF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC,yBAAyB,CAAC,CAAC;AACnF,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBA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B,kBAAkB,CAAC,KAAe,EAAE,OAAe,EAAE,UAAmB;IACtF,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAElD,wBAAwB;IACxB,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,IAAI,UAAU,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;KACnD;IAED,OAAO,IAAI,iBAAiB,CAAC,OAAO,EAAE,UAAW,CAAC,CAAC;AACrD,CAAC;AATD,gDASC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Errors as PbErrors } from '../protobufs/main_pb';\nimport * as exceptions from '../exceptions';\n\nconst errorMapping = new Map<PbErrors, new (message: string, customData: Buffer) => exceptions.MotionLibException>();\nerrorMapping.set(PbErrors.BINARY_COMMAND_FAILED, exceptions.BinaryCommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_FAILED, exceptions.CommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_PREEMPTED, exceptions.CommandPreemptedException);\nerrorMapping.set(PbErrors.COMMAND_TOO_LONG, exceptions.CommandTooLongException);\nerrorMapping.set(PbErrors.CONNECTION_CLOSED, exceptions.ConnectionClosedException);\nerrorMapping.set(PbErrors.CONNECTION_FAILED, exceptions.ConnectionFailedException);\nerrorMapping.set(PbErrors.CONVERSION_FAILED, exceptions.ConversionFailedException);\nerrorMapping.set(PbErrors.DEVICE_ADDRESS_CONFLICT, exceptions.DeviceAddressConflictException);\nerrorMapping.set(PbErrors.DEVICE_BUSY, exceptions.DeviceBusyException);\nerrorMapping.set(PbErrors.DEVICE_DB_FAILED, exceptions.DeviceDbFailedException);\nerrorMapping.set(PbErrors.DEVICE_DETECTION_FAILED, exceptions.DeviceDetectionFailedException);\nerrorMapping.set(PbErrors.DEVICE_FAILED, exceptions.DeviceFailedException);\nerrorMapping.set(PbErrors.DEVICE_NOT_IDENTIFIED, exceptions.DeviceNotIdentifiedException);\nerrorMapping.set(PbErrors.G_CODE_EXECUTION, exceptions.GCodeExecutionException);\nerrorMapping.set(PbErrors.G_CODE_SYNTAX, exceptions.GCodeSyntaxException);\nerrorMapping.set(PbErrors.INTERNAL_ERROR, exceptions.InternalErrorException);\nerrorMapping.set(PbErrors.INVALID_ARGUMENT, exceptions.InvalidArgumentException);\nerrorMapping.set(PbErrors.INVALID_DATA, exceptions.InvalidDataException);\nerrorMapping.set(PbErrors.INVALID_OPERATION, exceptions.InvalidOperationException);\nerrorMapping.set(PbErrors.INVALID_PACKET, exceptions.InvalidPacketException);\nerrorMapping.set(PbErrors.INVALID_PARK_STATE, exceptions.InvalidParkStateException);\nerrorMapping.set(PbErrors.INVALID_RESPONSE, exceptions.InvalidResponseException);\nerrorMapping.set(PbErrors.IO_CHANNEL_OUT_OF_RANGE, exceptions.IoChannelOutOfRangeException);\nerrorMapping.set(PbErrors.IO_FAILED, exceptions.IoFailedException);\nerrorMapping.set(PbErrors.LOCKSTEP_ENABLED, exceptions.LockstepEnabledException);\nerrorMapping.set(PbErrors.LOCKSTEP_NOT_ENABLED, exceptions.LockstepNotEnabledException);\nerrorMapping.set(PbErrors.MOVEMENT_FAILED, exceptions.MovementFailedException);\nerrorMapping.set(PbErrors.MOVEMENT_INTERRUPTED, exceptions.MovementInterruptedException);\nerrorMapping.set(PbErrors.NO_DEVICE_FOUND, exceptions.NoDeviceFoundException);\nerrorMapping.set(PbErrors.NO_VALUE_FOR_KEY, exceptions.NoValueForKeyException);\nerrorMapping.set(PbErrors.NOT_SUPPORTED, exceptions.NotSupportedException);\nerrorMapping.set(PbErrors.OS_FAILED, exceptions.OsFailedException);\nerrorMapping.set(PbErrors.OUT_OF_REQUEST_IDS, exceptions.OutOfRequestIdsException);\nerrorMapping.set(PbErrors.REQUEST_TIMEOUT, exceptions.RequestTimeoutException);\nerrorMapping.set(PbErrors.SERIAL_PORT_BUSY, exceptions.SerialPortBusyException);\nerrorMapping.set(PbErrors.SET_DEVICE_STATE_FAILED, exceptions.SetDeviceStateFailedException);\nerrorMapping.set(PbErrors.SET_PERIPHERAL_STATE_FAILED, exceptions.SetPeripheralStateFailedException);\nerrorMapping.set(PbErrors.SETTING_NOT_FOUND, exceptions.SettingNotFoundException);\nerrorMapping.set(PbErrors.STREAM_EXECUTION, exceptions.StreamExecutionException);\nerrorMapping.set(PbErrors.STREAM_MODE, exceptions.StreamModeException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_FAILED, exceptions.StreamMovementFailedException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_INTERRUPTED, exceptions.StreamMovementInterruptedException);\nerrorMapping.set(PbErrors.STREAM_SETUP_FAILED, exceptions.StreamSetupFailedException);\nerrorMapping.set(PbErrors.TIMEOUT, exceptions.TimeoutException);\nerrorMapping.set(PbErrors.TRANSPORT_ALREADY_USED, exceptions.TransportAlreadyUsedException);\nerrorMapping.set(PbErrors.UNKNOWN_REQUEST, exceptions.UnknownRequestException);\n\nexport function convertToException(error: PbErrors, message: string, customData?: Buffer): exceptions.MotionLibException {\n const SpecificException = errorMapping.get(error);\n\n /* istanbul ignore if */\n if (!SpecificException) {\n return new exceptions.MotionLibException(message);\n }\n\n return new SpecificException(message, customData!);\n}\n"]}
1
+ {"version":3,"file":"convert_exceptions.js","sourceRoot":"","sources":["../../../src/gateway/convert_exceptions.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,kDAA0D;AAC1D,0DAA4C;AAE5C,MAAM,YAAY,GAAG,IAAI,GAAG,EAAwF,CAAC;AACrH,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAC1F,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,cAAc,EAAE,UAAU,CAAC,sBAAsB,CAAC,CAAC;AAC7E,YAAY,CAAC,GAAG,CAAC,gBAAQ,CAAC,iBAAi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ent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { Errors as PbErrors } from '../protobufs/main_pb';\nimport * as exceptions from '../exceptions';\n\nconst errorMapping = new Map<PbErrors, new (message: string, customData: Buffer) => exceptions.MotionLibException>();\nerrorMapping.set(PbErrors.BINARY_COMMAND_FAILED, exceptions.BinaryCommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_FAILED, exceptions.CommandFailedException);\nerrorMapping.set(PbErrors.COMMAND_PREEMPTED, exceptions.CommandPreemptedException);\nerrorMapping.set(PbErrors.COMMAND_TOO_LONG, exceptions.CommandTooLongException);\nerrorMapping.set(PbErrors.CONNECTION_CLOSED, exceptions.ConnectionClosedException);\nerrorMapping.set(PbErrors.CONNECTION_FAILED, exceptions.ConnectionFailedException);\nerrorMapping.set(PbErrors.CONVERSION_FAILED, exceptions.ConversionFailedException);\nerrorMapping.set(PbErrors.DEVICE_ADDRESS_CONFLICT, exceptions.DeviceAddressConflictException);\nerrorMapping.set(PbErrors.DEVICE_BUSY, exceptions.DeviceBusyException);\nerrorMapping.set(PbErrors.DEVICE_DB_FAILED, exceptions.DeviceDbFailedException);\nerrorMapping.set(PbErrors.DEVICE_DETECTION_FAILED, exceptions.DeviceDetectionFailedException);\nerrorMapping.set(PbErrors.DEVICE_FAILED, exceptions.DeviceFailedException);\nerrorMapping.set(PbErrors.DEVICE_NOT_IDENTIFIED, exceptions.DeviceNotIdentifiedException);\nerrorMapping.set(PbErrors.G_CODE_EXECUTION, exceptions.GCodeExecutionException);\nerrorMapping.set(PbErrors.G_CODE_SYNTAX, exceptions.GCodeSyntaxException);\nerrorMapping.set(PbErrors.INTERNAL_ERROR, exceptions.InternalErrorException);\nerrorMapping.set(PbErrors.INVALID_ARGUMENT, exceptions.InvalidArgumentException);\nerrorMapping.set(PbErrors.INVALID_DATA, exceptions.InvalidDataException);\nerrorMapping.set(PbErrors.INVALID_OPERATION, exceptions.InvalidOperationException);\nerrorMapping.set(PbErrors.INVALID_PACKET, exceptions.InvalidPacketException);\nerrorMapping.set(PbErrors.INVALID_PARK_STATE, exceptions.InvalidParkStateException);\nerrorMapping.set(PbErrors.INVALID_RESPONSE, exceptions.InvalidResponseException);\nerrorMapping.set(PbErrors.IO_CHANNEL_OUT_OF_RANGE, exceptions.IoChannelOutOfRangeException);\nerrorMapping.set(PbErrors.IO_FAILED, exceptions.IoFailedException);\nerrorMapping.set(PbErrors.LOCKSTEP_ENABLED, exceptions.LockstepEnabledException);\nerrorMapping.set(PbErrors.LOCKSTEP_NOT_ENABLED, exceptions.LockstepNotEnabledException);\nerrorMapping.set(PbErrors.MOVEMENT_FAILED, exceptions.MovementFailedException);\nerrorMapping.set(PbErrors.MOVEMENT_INTERRUPTED, exceptions.MovementInterruptedException);\nerrorMapping.set(PbErrors.NO_DEVICE_FOUND, exceptions.NoDeviceFoundException);\nerrorMapping.set(PbErrors.NO_VALUE_FOR_KEY, exceptions.NoValueForKeyException);\nerrorMapping.set(PbErrors.NOT_SUPPORTED, exceptions.NotSupportedException);\nerrorMapping.set(PbErrors.OS_FAILED, exceptions.OsFailedException);\nerrorMapping.set(PbErrors.OUT_OF_REQUEST_IDS, exceptions.OutOfRequestIdsException);\nerrorMapping.set(PbErrors.PVT_DISCONTINUITY, exceptions.PvtDiscontinuityException);\nerrorMapping.set(PbErrors.PVT_EXECUTION, exceptions.PvtExecutionException);\nerrorMapping.set(PbErrors.PVT_MODE, exceptions.PvtModeException);\nerrorMapping.set(PbErrors.PVT_MOVEMENT_FAILED, exceptions.PvtMovementFailedException);\nerrorMapping.set(PbErrors.PVT_MOVEMENT_INTERRUPTED, exceptions.PvtMovementInterruptedException);\nerrorMapping.set(PbErrors.PVT_SETUP_FAILED, exceptions.PvtSetupFailedException);\nerrorMapping.set(PbErrors.REQUEST_TIMEOUT, exceptions.RequestTimeoutException);\nerrorMapping.set(PbErrors.SERIAL_PORT_BUSY, exceptions.SerialPortBusyException);\nerrorMapping.set(PbErrors.SET_DEVICE_STATE_FAILED, exceptions.SetDeviceStateFailedException);\nerrorMapping.set(PbErrors.SET_PERIPHERAL_STATE_FAILED, exceptions.SetPeripheralStateFailedException);\nerrorMapping.set(PbErrors.SETTING_NOT_FOUND, exceptions.SettingNotFoundException);\nerrorMapping.set(PbErrors.STREAM_DISCONTINUITY, exceptions.StreamDiscontinuityException);\nerrorMapping.set(PbErrors.STREAM_EXECUTION, exceptions.StreamExecutionException);\nerrorMapping.set(PbErrors.STREAM_MODE, exceptions.StreamModeException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_FAILED, exceptions.StreamMovementFailedException);\nerrorMapping.set(PbErrors.STREAM_MOVEMENT_INTERRUPTED, exceptions.StreamMovementInterruptedException);\nerrorMapping.set(PbErrors.STREAM_SETUP_FAILED, exceptions.StreamSetupFailedException);\nerrorMapping.set(PbErrors.TIMEOUT, exceptions.TimeoutException);\nerrorMapping.set(PbErrors.TRANSPORT_ALREADY_USED, exceptions.TransportAlreadyUsedException);\nerrorMapping.set(PbErrors.UNKNOWN_REQUEST, exceptions.UnknownRequestException);\n\nexport function convertToException(error: PbErrors, message: string, customData?: Buffer): exceptions.MotionLibException {\n const SpecificException = errorMapping.get(error);\n\n /* istanbul ignore if */\n if (!SpecificException) {\n return new exceptions.MotionLibException(message);\n }\n\n return new SpecificException(message, customData!);\n}\n"]}