@zaber/motion 4.5.0 → 4.6.0

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 (90) hide show
  1. package/dist/binding/wasm/zaber-motion-lib.wasm +0 -0
  2. package/dist/lib/ascii/axis.js +1 -1
  3. package/dist/lib/ascii/axis.js.map +1 -1
  4. package/dist/lib/ascii/axis_group.d.ts +62 -0
  5. package/dist/lib/ascii/axis_group.js +154 -0
  6. package/dist/lib/ascii/axis_group.js.map +1 -0
  7. package/dist/lib/ascii/axis_settings.d.ts +15 -0
  8. package/dist/lib/ascii/axis_settings.js +31 -0
  9. package/dist/lib/ascii/axis_settings.js.map +1 -1
  10. package/dist/lib/ascii/device.js +1 -1
  11. package/dist/lib/ascii/device.js.map +1 -1
  12. package/dist/lib/ascii/device_settings.d.ts +15 -0
  13. package/dist/lib/ascii/device_settings.js +29 -0
  14. package/dist/lib/ascii/device_settings.js.map +1 -1
  15. package/dist/lib/ascii/get_axis_setting.d.ts +17 -0
  16. package/dist/lib/ascii/get_axis_setting.js +45 -0
  17. package/dist/lib/ascii/get_axis_setting.js.map +1 -0
  18. package/dist/lib/ascii/get_axis_setting_result.d.ts +21 -0
  19. package/dist/lib/ascii/get_axis_setting_result.js +19 -0
  20. package/dist/lib/ascii/get_axis_setting_result.js.map +1 -0
  21. package/dist/lib/ascii/get_setting.d.ts +21 -0
  22. package/dist/lib/ascii/get_setting.js +47 -0
  23. package/dist/lib/ascii/get_setting.js.map +1 -0
  24. package/dist/lib/ascii/get_setting_result.d.ts +21 -0
  25. package/dist/lib/ascii/get_setting_result.js +19 -0
  26. package/dist/lib/ascii/get_setting_result.js.map +1 -0
  27. package/dist/lib/ascii/index.d.ts +5 -0
  28. package/dist/lib/ascii/index.js +12 -1
  29. package/dist/lib/ascii/index.js.map +1 -1
  30. package/dist/lib/ascii/setting_constants.d.ts +116 -0
  31. package/dist/lib/ascii/setting_constants.js +116 -0
  32. package/dist/lib/ascii/setting_constants.js.map +1 -1
  33. package/dist/lib/ascii_ns.d.ts +10 -0
  34. package/dist/lib/ascii_ns.js +5 -0
  35. package/dist/lib/ascii_ns.js.map +1 -1
  36. package/dist/lib/axis_address.d.ts +16 -0
  37. package/dist/lib/axis_address.js +53 -0
  38. package/dist/lib/axis_address.js.map +1 -0
  39. package/dist/lib/exceptions/index.d.ts +2 -0
  40. package/dist/lib/exceptions/index.js +6 -2
  41. package/dist/lib/exceptions/index.js.map +1 -1
  42. package/dist/lib/exceptions/operation_failed_exception.d.ts +14 -0
  43. package/dist/lib/exceptions/operation_failed_exception.js +32 -0
  44. package/dist/lib/exceptions/operation_failed_exception.js.map +1 -0
  45. package/dist/lib/exceptions/operation_failed_exception_data.d.ts +24 -0
  46. package/dist/lib/exceptions/operation_failed_exception_data.js +20 -0
  47. package/dist/lib/exceptions/operation_failed_exception_data.js.map +1 -0
  48. package/dist/lib/gateway/convert_exceptions.js +1 -0
  49. package/dist/lib/gateway/convert_exceptions.js.map +1 -1
  50. package/dist/lib/gcode/axis_transformation.js +1 -0
  51. package/dist/lib/gcode/axis_transformation.js.map +1 -1
  52. package/dist/lib/gcode/device_definition.js +1 -0
  53. package/dist/lib/gcode/device_definition.js.map +1 -1
  54. package/dist/lib/index.d.ts +1 -0
  55. package/dist/lib/index.js +3 -1
  56. package/dist/lib/index.js.map +1 -1
  57. package/dist/lib/microscopy/filter_changer.d.ts +36 -0
  58. package/dist/lib/microscopy/filter_changer.js +98 -0
  59. package/dist/lib/microscopy/filter_changer.js.map +1 -0
  60. package/dist/lib/microscopy/illuminator.d.ts +56 -0
  61. package/dist/lib/microscopy/illuminator.js +109 -0
  62. package/dist/lib/microscopy/illuminator.js.map +1 -0
  63. package/dist/lib/microscopy/illuminator_channel.d.ts +128 -0
  64. package/dist/lib/microscopy/illuminator_channel.js +260 -0
  65. package/dist/lib/microscopy/illuminator_channel.js.map +1 -0
  66. package/dist/lib/microscopy/index.d.ts +5 -0
  67. package/dist/lib/microscopy/index.js +11 -1
  68. package/dist/lib/microscopy/index.js.map +1 -1
  69. package/dist/lib/microscopy/microscope.d.ts +77 -0
  70. package/dist/lib/microscopy/microscope.js +142 -0
  71. package/dist/lib/microscopy/microscope.js.map +1 -0
  72. package/dist/lib/microscopy/microscope_config.d.ts +34 -0
  73. package/dist/lib/microscopy/microscope_config.js +65 -0
  74. package/dist/lib/microscopy/microscope_config.js.map +1 -0
  75. package/dist/lib/microscopy/objective_changer.d.ts +23 -14
  76. package/dist/lib/microscopy/objective_changer.js +58 -31
  77. package/dist/lib/microscopy/objective_changer.js.map +1 -1
  78. package/dist/lib/microscopy_ns.d.ts +8 -0
  79. package/dist/lib/microscopy_ns.js +4 -0
  80. package/dist/lib/microscopy_ns.js.map +1 -1
  81. package/dist/lib/product/process.d.ts +6 -3
  82. package/dist/lib/product/process.js +14 -3
  83. package/dist/lib/product/process.js.map +1 -1
  84. package/dist/lib/product/process_controller.d.ts +7 -4
  85. package/dist/lib/product/process_controller.js +13 -4
  86. package/dist/lib/product/process_controller.js.map +1 -1
  87. package/dist/lib/protobufs/main_pb.d.ts +520 -3
  88. package/dist/lib/protobufs/main_pb.js +10314 -6233
  89. package/dist/lib/protobufs/main_pb.js.map +1 -1
  90. package/package.json +1 -1
@@ -2,8 +2,8 @@
2
2
  // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
3
  // ============= DO NOT EDIT DIRECTLY ============= //
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.StreamSetupFailedException = exports.StreamMovementInterruptedException = exports.StreamMovementFailedException = exports.StreamModeException = exports.StreamExecutionException = exports.StreamDiscontinuityException = exports.SettingNotFoundException = exports.SetPeripheralStateFailedException = exports.SetDeviceStateFailedException = exports.SerialPortBusyException = exports.RequestTimeoutException = exports.PvtSetupFailedException = exports.PvtMovementInterruptedException = exports.PvtMovementFailedException = exports.PvtModeException = exports.PvtExecutionException = exports.PvtDiscontinuityException = exports.OutOfRequestIdsException = exports.OsFailedException = exports.NotSupportedException = exports.NoValueForKeyException = exports.NoDeviceFoundException = exports.MovementInterruptedException = exports.MovementFailedException = exports.LockstepNotEnabledException = exports.LockstepEnabledException = exports.IoFailedException = exports.IoChannelOutOfRangeException = exports.InvalidResponseException = exports.InvalidParkStateException = exports.InvalidPacketException = exports.InvalidOperationException = exports.InvalidDataException = exports.InvalidArgumentException = exports.InternalErrorException = exports.GCodeSyntaxException = exports.GCodeExecutionException = exports.DeviceNotIdentifiedException = exports.DeviceFailedException = exports.DeviceDetectionFailedException = exports.DeviceDbFailedException = exports.DeviceBusyException = exports.DeviceAddressConflictException = exports.ConversionFailedException = exports.ConnectionFailedException = exports.ConnectionClosedException = exports.CommandTooLongException = exports.CommandPreemptedException = exports.CommandFailedException = exports.BinaryCommandFailedException = void 0;
6
- exports.StreamMovementInterruptedExceptionData = exports.StreamMovementFailedExceptionData = exports.StreamExecutionExceptionData = exports.SetPeripheralStateExceptionData = exports.SetDeviceStateExceptionData = exports.PvtMovementInterruptedExceptionData = exports.PvtMovementFailedExceptionData = exports.PvtExecutionExceptionData = exports.MovementInterruptedExceptionData = exports.MovementFailedExceptionData = exports.InvalidResponseExceptionData = exports.InvalidPvtPoint = exports.InvalidPacketExceptionData = exports.GCodeSyntaxExceptionData = exports.GCodeExecutionExceptionData = exports.DeviceDbFailedExceptionData = exports.DeviceAddressConflictExceptionData = exports.CommandTooLongExceptionData = exports.CommandFailedExceptionData = exports.BinaryCommandFailedExceptionData = exports.MotionLibException = exports.UnknownRequestException = exports.TransportAlreadyUsedException = exports.TimeoutException = void 0;
5
+ exports.StreamMovementInterruptedException = exports.StreamMovementFailedException = exports.StreamModeException = exports.StreamExecutionException = exports.StreamDiscontinuityException = exports.SettingNotFoundException = exports.SetPeripheralStateFailedException = exports.SetDeviceStateFailedException = exports.SerialPortBusyException = exports.RequestTimeoutException = exports.PvtSetupFailedException = exports.PvtMovementInterruptedException = exports.PvtMovementFailedException = exports.PvtModeException = exports.PvtExecutionException = exports.PvtDiscontinuityException = exports.OutOfRequestIdsException = exports.OsFailedException = exports.OperationFailedException = exports.NotSupportedException = exports.NoValueForKeyException = exports.NoDeviceFoundException = exports.MovementInterruptedException = exports.MovementFailedException = exports.LockstepNotEnabledException = exports.LockstepEnabledException = exports.IoFailedException = exports.IoChannelOutOfRangeException = exports.InvalidResponseException = exports.InvalidParkStateException = exports.InvalidPacketException = exports.InvalidOperationException = exports.InvalidDataException = exports.InvalidArgumentException = exports.InternalErrorException = exports.GCodeSyntaxException = exports.GCodeExecutionException = exports.DeviceNotIdentifiedException = exports.DeviceFailedException = exports.DeviceDetectionFailedException = exports.DeviceDbFailedException = exports.DeviceBusyException = exports.DeviceAddressConflictException = exports.ConversionFailedException = exports.ConnectionFailedException = exports.ConnectionClosedException = exports.CommandTooLongException = exports.CommandPreemptedException = exports.CommandFailedException = exports.BinaryCommandFailedException = void 0;
6
+ exports.StreamMovementInterruptedExceptionData = exports.StreamMovementFailedExceptionData = exports.StreamExecutionExceptionData = exports.SetPeripheralStateExceptionData = exports.SetDeviceStateExceptionData = exports.PvtMovementInterruptedExceptionData = exports.PvtMovementFailedExceptionData = exports.PvtExecutionExceptionData = exports.OperationFailedExceptionData = exports.MovementInterruptedExceptionData = exports.MovementFailedExceptionData = exports.InvalidResponseExceptionData = exports.InvalidPvtPoint = exports.InvalidPacketExceptionData = exports.GCodeSyntaxExceptionData = exports.GCodeExecutionExceptionData = exports.DeviceDbFailedExceptionData = exports.DeviceAddressConflictExceptionData = exports.CommandTooLongExceptionData = exports.CommandFailedExceptionData = exports.BinaryCommandFailedExceptionData = exports.MotionLibException = exports.UnknownRequestException = exports.TransportAlreadyUsedException = exports.TimeoutException = exports.StreamSetupFailedException = void 0;
7
7
  var binary_command_failed_exception_1 = require("./binary_command_failed_exception");
8
8
  Object.defineProperty(exports, "BinaryCommandFailedException", { enumerable: true, get: function () { return binary_command_failed_exception_1.BinaryCommandFailedException; } });
9
9
  var command_failed_exception_1 = require("./command_failed_exception");
@@ -66,6 +66,8 @@ var no_value_for_key_exception_1 = require("./no_value_for_key_exception");
66
66
  Object.defineProperty(exports, "NoValueForKeyException", { enumerable: true, get: function () { return no_value_for_key_exception_1.NoValueForKeyException; } });
67
67
  var not_supported_exception_1 = require("./not_supported_exception");
68
68
  Object.defineProperty(exports, "NotSupportedException", { enumerable: true, get: function () { return not_supported_exception_1.NotSupportedException; } });
69
+ var operation_failed_exception_1 = require("./operation_failed_exception");
70
+ Object.defineProperty(exports, "OperationFailedException", { enumerable: true, get: function () { return operation_failed_exception_1.OperationFailedException; } });
69
71
  var os_failed_exception_1 = require("./os_failed_exception");
70
72
  Object.defineProperty(exports, "OsFailedException", { enumerable: true, get: function () { return os_failed_exception_1.OsFailedException; } });
71
73
  var out_of_request_ids_exception_1 = require("./out_of_request_ids_exception");
@@ -136,6 +138,8 @@ var movement_failed_exception_data_1 = require("./movement_failed_exception_data
136
138
  Object.defineProperty(exports, "MovementFailedExceptionData", { enumerable: true, get: function () { return movement_failed_exception_data_1.MovementFailedExceptionData; } });
137
139
  var movement_interrupted_exception_data_1 = require("./movement_interrupted_exception_data");
138
140
  Object.defineProperty(exports, "MovementInterruptedExceptionData", { enumerable: true, get: function () { return movement_interrupted_exception_data_1.MovementInterruptedExceptionData; } });
141
+ var operation_failed_exception_data_1 = require("./operation_failed_exception_data");
142
+ Object.defineProperty(exports, "OperationFailedExceptionData", { enumerable: true, get: function () { return operation_failed_exception_data_1.OperationFailedExceptionData; } });
139
143
  var pvt_execution_exception_data_1 = require("./pvt_execution_exception_data");
140
144
  Object.defineProperty(exports, "PvtExecutionExceptionData", { enumerable: true, get: function () { return pvt_execution_exception_data_1.PvtExecutionExceptionData; } });
141
145
  var pvt_movement_failed_exception_data_1 = require("./pvt_movement_failed_exception_data");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;AAEtD,qFAAiF;AAAxE,+IAAA,4B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;AAArF,4JAAA,kCAAkC,OAAA;AAC3C,qFAAgF;AAAvE,8IAAA,2BAA2B,OAAA;AACpC,qFAAgF;AAAvE,8IAAA,2BAA2B,OAAA;AACpC,+EAA0E;AAAjE,wIAAA,wBAAwB,OAAA;AACjC,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA;AACnC,yDAAsD;AAA7C,oHAAA,eAAe,OAAA;AACxB,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,6FAAyF;AAAhF,uJAAA,gCAAgC,OAAA;AACzC,+EAA2E;AAAlE,yIAAA,yBAAyB,OAAA;AAClC,2FAAsF;AAA7E,oJAAA,8BAA8B,OAAA;AACvC,qGAAgG;AAAvF,8JAAA,mCAAmC,OAAA;AAC5C,qFAAgF;AAAvE,8IAAA,2BAA2B,OAAA;AACpC,6FAAwF;AAA/E,sJAAA,+BAA+B,OAAA;AACxC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,iGAA4F;AAAnF,0JAAA,iCAAiC,OAAA;AAC1C,2GAAsG;AAA7F,oKAAA,sCAAsC,OAAA","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nexport { BinaryCommandFailedException } from './binary_command_failed_exception';\nexport { CommandFailedException } from './command_failed_exception';\nexport { CommandPreemptedException } from './command_preempted_exception';\nexport { CommandTooLongException } from './command_too_long_exception';\nexport { ConnectionClosedException } from './connection_closed_exception';\nexport { ConnectionFailedException } from './connection_failed_exception';\nexport { ConversionFailedException } from './conversion_failed_exception';\nexport { DeviceAddressConflictException } from './device_address_conflict_exception';\nexport { DeviceBusyException } from './device_busy_exception';\nexport { DeviceDbFailedException } from './device_db_failed_exception';\nexport { DeviceDetectionFailedException } from './device_detection_failed_exception';\nexport { DeviceFailedException } from './device_failed_exception';\nexport { DeviceNotIdentifiedException } from './device_not_identified_exception';\nexport { GCodeExecutionException } from './g_code_execution_exception';\nexport { GCodeSyntaxException } from './g_code_syntax_exception';\nexport { InternalErrorException } from './internal_error_exception';\nexport { InvalidArgumentException } from './invalid_argument_exception';\nexport { InvalidDataException } from './invalid_data_exception';\nexport { InvalidOperationException } from './invalid_operation_exception';\nexport { InvalidPacketException } from './invalid_packet_exception';\nexport { InvalidParkStateException } from './invalid_park_state_exception';\nexport { InvalidResponseException } from './invalid_response_exception';\nexport { IoChannelOutOfRangeException } from './io_channel_out_of_range_exception';\nexport { IoFailedException } from './io_failed_exception';\nexport { LockstepEnabledException } from './lockstep_enabled_exception';\nexport { LockstepNotEnabledException } from './lockstep_not_enabled_exception';\nexport { MovementFailedException } from './movement_failed_exception';\nexport { MovementInterruptedException } from './movement_interrupted_exception';\nexport { NoDeviceFoundException } from './no_device_found_exception';\nexport { NoValueForKeyException } from './no_value_for_key_exception';\nexport { NotSupportedException } from './not_supported_exception';\nexport { OsFailedException } from './os_failed_exception';\nexport { OutOfRequestIdsException } from './out_of_request_ids_exception';\nexport { PvtDiscontinuityException } from './pvt_discontinuity_exception';\nexport { PvtExecutionException } from './pvt_execution_exception';\nexport { PvtModeException } from './pvt_mode_exception';\nexport { PvtMovementFailedException } from './pvt_movement_failed_exception';\nexport { PvtMovementInterruptedException } from './pvt_movement_interrupted_exception';\nexport { PvtSetupFailedException } from './pvt_setup_failed_exception';\nexport { RequestTimeoutException } from './request_timeout_exception';\nexport { SerialPortBusyException } from './serial_port_busy_exception';\nexport { SetDeviceStateFailedException } from './set_device_state_failed_exception';\nexport { SetPeripheralStateFailedException } from './set_peripheral_state_failed_exception';\nexport { SettingNotFoundException } from './setting_not_found_exception';\nexport { StreamDiscontinuityException } from './stream_discontinuity_exception';\nexport { StreamExecutionException } from './stream_execution_exception';\nexport { StreamModeException } from './stream_mode_exception';\nexport { StreamMovementFailedException } from './stream_movement_failed_exception';\nexport { StreamMovementInterruptedException } from './stream_movement_interrupted_exception';\nexport { StreamSetupFailedException } from './stream_setup_failed_exception';\nexport { TimeoutException } from './timeout_exception';\nexport { TransportAlreadyUsedException } from './transport_already_used_exception';\nexport { UnknownRequestException } from './unknown_request_exception';\nexport { MotionLibException } from './motion_lib_exception';\n\nexport { BinaryCommandFailedExceptionData } from './binary_command_failed_exception_data';\nexport { CommandFailedExceptionData } from './command_failed_exception_data';\nexport { CommandTooLongExceptionData } from './command_too_long_exception_data';\nexport { DeviceAddressConflictExceptionData } from './device_address_conflict_exception_data';\nexport { DeviceDbFailedExceptionData } from './device_db_failed_exception_data';\nexport { GCodeExecutionExceptionData } from './g_code_execution_exception_data';\nexport { GCodeSyntaxExceptionData } from './g_code_syntax_exception_data';\nexport { InvalidPacketExceptionData } from './invalid_packet_exception_data';\nexport { InvalidPvtPoint } from './invalid_pvt_point';\nexport { InvalidResponseExceptionData } from './invalid_response_exception_data';\nexport { MovementFailedExceptionData } from './movement_failed_exception_data';\nexport { MovementInterruptedExceptionData } from './movement_interrupted_exception_data';\nexport { PvtExecutionExceptionData } from './pvt_execution_exception_data';\nexport { PvtMovementFailedExceptionData } from './pvt_movement_failed_exception_data';\nexport { PvtMovementInterruptedExceptionData } from './pvt_movement_interrupted_exception_data';\nexport { SetDeviceStateExceptionData } from './set_device_state_exception_data';\nexport { SetPeripheralStateExceptionData } from './set_peripheral_state_exception_data';\nexport { StreamExecutionExceptionData } from './stream_execution_exception_data';\nexport { StreamMovementFailedExceptionData } from './stream_movement_failed_exception_data';\nexport { StreamMovementInterruptedExceptionData } from './stream_movement_interrupted_exception_data';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/exceptions/index.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;AAEtD,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,uEAAoE;AAA3D,kIAAA,sBAAsB,OAAA;AAC/B,6EAA0E;AAAjE,wIAAA,yBAAyB,OAAA;AAClC,2EAAuE;AAA9D,qIAAA,uBAAuB,OAAA;AAChC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AA2B,OAAA;AACpC,+EAA0E;AAAjE,wIAAA,wBAAwB,OAAA;AACjC,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA;AACnC,yDAAsD;AAA7C,oHAAA,eAAe,OAAA;AACxB,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,6FAAyF;AAAhF,uJAAA,gCAAgC,OAAA;AACzC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,+EAA2E;AAAlE,yIAAA,yBAAyB,OAAA;AAClC,2FAAsF;AAA7E,oJAAA,8BAA8B,OAAA;AACvC,qGAAgG;AAAvF,8JAAA,mCAAmC,OAAA;AAC5C,qFAAgF;AAAvE,8IAAA,2BAA2B,OAAA;AACpC,6FAAwF;AAA/E,sJAAA,+BAA+B,OAAA;AACxC,qFAAiF;AAAxE,+IAAA,4BAA4B,OAAA;AACrC,iGAA4F;AAAnF,0JAAA,iCAAiC,OAAA;AAC1C,2GAAsG;AAA7F,oKAAA,sCAAsC,OAAA","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nexport { BinaryCommandFailedException } from './binary_command_failed_exception';\nexport { CommandFailedException } from './command_failed_exception';\nexport { CommandPreemptedException } from './command_preempted_exception';\nexport { CommandTooLongException } from './command_too_long_exception';\nexport { ConnectionClosedException } from './connection_closed_exception';\nexport { ConnectionFailedException } from './connection_failed_exception';\nexport { ConversionFailedException } from './conversion_failed_exception';\nexport { DeviceAddressConflictException } from './device_address_conflict_exception';\nexport { DeviceBusyException } from './device_busy_exception';\nexport { DeviceDbFailedException } from './device_db_failed_exception';\nexport { DeviceDetectionFailedException } from './device_detection_failed_exception';\nexport { DeviceFailedException } from './device_failed_exception';\nexport { DeviceNotIdentifiedException } from './device_not_identified_exception';\nexport { GCodeExecutionException } from './g_code_execution_exception';\nexport { GCodeSyntaxException } from './g_code_syntax_exception';\nexport { InternalErrorException } from './internal_error_exception';\nexport { InvalidArgumentException } from './invalid_argument_exception';\nexport { InvalidDataException } from './invalid_data_exception';\nexport { InvalidOperationException } from './invalid_operation_exception';\nexport { InvalidPacketException } from './invalid_packet_exception';\nexport { InvalidParkStateException } from './invalid_park_state_exception';\nexport { InvalidResponseException } from './invalid_response_exception';\nexport { IoChannelOutOfRangeException } from './io_channel_out_of_range_exception';\nexport { IoFailedException } from './io_failed_exception';\nexport { LockstepEnabledException } from './lockstep_enabled_exception';\nexport { LockstepNotEnabledException } from './lockstep_not_enabled_exception';\nexport { MovementFailedException } from './movement_failed_exception';\nexport { MovementInterruptedException } from './movement_interrupted_exception';\nexport { NoDeviceFoundException } from './no_device_found_exception';\nexport { NoValueForKeyException } from './no_value_for_key_exception';\nexport { NotSupportedException } from './not_supported_exception';\nexport { OperationFailedException } from './operation_failed_exception';\nexport { OsFailedException } from './os_failed_exception';\nexport { OutOfRequestIdsException } from './out_of_request_ids_exception';\nexport { PvtDiscontinuityException } from './pvt_discontinuity_exception';\nexport { PvtExecutionException } from './pvt_execution_exception';\nexport { PvtModeException } from './pvt_mode_exception';\nexport { PvtMovementFailedException } from './pvt_movement_failed_exception';\nexport { PvtMovementInterruptedException } from './pvt_movement_interrupted_exception';\nexport { PvtSetupFailedException } from './pvt_setup_failed_exception';\nexport { RequestTimeoutException } from './request_timeout_exception';\nexport { SerialPortBusyException } from './serial_port_busy_exception';\nexport { SetDeviceStateFailedException } from './set_device_state_failed_exception';\nexport { SetPeripheralStateFailedException } from './set_peripheral_state_failed_exception';\nexport { SettingNotFoundException } from './setting_not_found_exception';\nexport { StreamDiscontinuityException } from './stream_discontinuity_exception';\nexport { StreamExecutionException } from './stream_execution_exception';\nexport { StreamModeException } from './stream_mode_exception';\nexport { StreamMovementFailedException } from './stream_movement_failed_exception';\nexport { StreamMovementInterruptedException } from './stream_movement_interrupted_exception';\nexport { StreamSetupFailedException } from './stream_setup_failed_exception';\nexport { TimeoutException } from './timeout_exception';\nexport { TransportAlreadyUsedException } from './transport_already_used_exception';\nexport { UnknownRequestException } from './unknown_request_exception';\nexport { MotionLibException } from './motion_lib_exception';\n\nexport { BinaryCommandFailedExceptionData } from './binary_command_failed_exception_data';\nexport { CommandFailedExceptionData } from './command_failed_exception_data';\nexport { CommandTooLongExceptionData } from './command_too_long_exception_data';\nexport { DeviceAddressConflictExceptionData } from './device_address_conflict_exception_data';\nexport { DeviceDbFailedExceptionData } from './device_db_failed_exception_data';\nexport { GCodeExecutionExceptionData } from './g_code_execution_exception_data';\nexport { GCodeSyntaxExceptionData } from './g_code_syntax_exception_data';\nexport { InvalidPacketExceptionData } from './invalid_packet_exception_data';\nexport { InvalidPvtPoint } from './invalid_pvt_point';\nexport { InvalidResponseExceptionData } from './invalid_response_exception_data';\nexport { MovementFailedExceptionData } from './movement_failed_exception_data';\nexport { MovementInterruptedExceptionData } from './movement_interrupted_exception_data';\nexport { OperationFailedExceptionData } from './operation_failed_exception_data';\nexport { PvtExecutionExceptionData } from './pvt_execution_exception_data';\nexport { PvtMovementFailedExceptionData } from './pvt_movement_failed_exception_data';\nexport { PvtMovementInterruptedExceptionData } from './pvt_movement_interrupted_exception_data';\nexport { SetDeviceStateExceptionData } from './set_device_state_exception_data';\nexport { SetPeripheralStateExceptionData } from './set_peripheral_state_exception_data';\nexport { StreamExecutionExceptionData } from './stream_execution_exception_data';\nexport { StreamMovementFailedExceptionData } from './stream_movement_failed_exception_data';\nexport { StreamMovementInterruptedExceptionData } from './stream_movement_interrupted_exception_data';\n"]}
@@ -0,0 +1,14 @@
1
+ /// <reference types="node" />
2
+ import { MotionLibException } from './motion_lib_exception';
3
+ import { OperationFailedExceptionData } from './operation_failed_exception_data';
4
+ /**
5
+ * Thrown when a non-motion device fails to perform a requested operation.
6
+ */
7
+ export declare class OperationFailedException extends MotionLibException {
8
+ /**
9
+ * Additional data for OperationFailedException
10
+ */
11
+ get details(): OperationFailedExceptionData;
12
+ private _details;
13
+ constructor(message: string, customData: Buffer | OperationFailedExceptionData);
14
+ }
@@ -0,0 +1,32 @@
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.OperationFailedException = void 0;
6
+ const motion_lib_exception_1 = require("./motion_lib_exception");
7
+ const main_pb_1 = require("../protobufs/main_pb");
8
+ const operation_failed_exception_data_1 = require("./operation_failed_exception_data");
9
+ /**
10
+ * Thrown when a non-motion device fails to perform a requested operation.
11
+ */
12
+ class OperationFailedException extends motion_lib_exception_1.MotionLibException {
13
+ /**
14
+ * Additional data for OperationFailedException
15
+ */
16
+ get details() {
17
+ return this._details;
18
+ }
19
+ constructor(message, customData) {
20
+ super(message);
21
+ Object.setPrototypeOf(this, OperationFailedException.prototype);
22
+ if (Buffer.isBuffer(customData)) {
23
+ const protobufObj = main_pb_1.OperationFailedExceptionData.deserializeBinary(customData);
24
+ this._details = operation_failed_exception_data_1.OperationFailedExceptionData.fromProtobuf(protobufObj.toObject());
25
+ }
26
+ else {
27
+ this._details = customData;
28
+ }
29
+ }
30
+ }
31
+ exports.OperationFailedException = OperationFailedException;
32
+ //# sourceMappingURL=operation_failed_exception.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation_failed_exception.js","sourceRoot":"","sources":["../../../src/exceptions/operation_failed_exception.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AAEtD,iEAA4D;AAC5D,kDAA0F;AAC1F,uFAAiF;AAEjF;;GAEG;AACH,MAAa,wBAAyB,SAAQ,yCAAkB;IAC9D;;OAEG;IACH,IAAW,OAAO;QAChB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,YACE,OAAe,EACf,UAAiD;QAEjD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;QAEhE,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE;YAC/B,MAAM,WAAW,GAAG,sCAAkB,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;YACrE,IAAI,CAAC,QAAQ,GAAG,8DAA4B,CAAC,YAAY,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC;SACnF;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC;SAC5B;IACH,CAAC;CACF;AAtBD,4DAsBC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport { MotionLibException } from './motion_lib_exception';\nimport { OperationFailedExceptionData as CustomDataProtobuf } from '../protobufs/main_pb';\nimport { OperationFailedExceptionData } from './operation_failed_exception_data';\n\n/**\n * Thrown when a non-motion device fails to perform a requested operation.\n */\nexport class OperationFailedException extends MotionLibException {\n /**\n * Additional data for OperationFailedException\n */\n public get details(): OperationFailedExceptionData {\n return this._details;\n }\n private _details: OperationFailedExceptionData;\n constructor(\n message: string,\n customData: Buffer | OperationFailedExceptionData\n ) {\n super(message);\n Object.setPrototypeOf(this, OperationFailedException.prototype);\n\n if (Buffer.isBuffer(customData)) {\n const protobufObj = CustomDataProtobuf.deserializeBinary(customData);\n this._details = OperationFailedExceptionData.fromProtobuf(protobufObj.toObject());\n } else {\n this._details = customData;\n }\n }\n}\n"]}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Contains additional data for OperationFailedException.
3
+ */
4
+ export interface OperationFailedExceptionData {
5
+ /**
6
+ * The full list of warnings.
7
+ */
8
+ warnings: string[];
9
+ /**
10
+ * The reason for the Exception.
11
+ */
12
+ reason: string;
13
+ /**
14
+ * The address of the device that attempted the failed operation.
15
+ */
16
+ device: number;
17
+ /**
18
+ * The number of the axis that attempted the failed operation.
19
+ */
20
+ axis: number;
21
+ }
22
+ export declare namespace OperationFailedExceptionData {
23
+ const __type = "OperationFailedExceptionData";
24
+ }
@@ -0,0 +1,20 @@
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.OperationFailedExceptionData = void 0;
6
+ var OperationFailedExceptionData;
7
+ (function (OperationFailedExceptionData) {
8
+ OperationFailedExceptionData.__type = 'OperationFailedExceptionData';
9
+ /** @internal */
10
+ function fromProtobuf(pbData) {
11
+ return {
12
+ warnings: pbData.warningsList,
13
+ reason: pbData.reason,
14
+ device: pbData.device,
15
+ axis: pbData.axis,
16
+ };
17
+ }
18
+ OperationFailedExceptionData.fromProtobuf = fromProtobuf;
19
+ })(OperationFailedExceptionData = exports.OperationFailedExceptionData || (exports.OperationFailedExceptionData = {}));
20
+ //# sourceMappingURL=operation_failed_exception_data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operation_failed_exception_data.js","sourceRoot":"","sources":["../../../src/exceptions/operation_failed_exception_data.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;AA8BtD,IAAiB,4BAA4B,CAY5C;AAZD,WAAiB,4BAA4B;IAC9B,mCAAM,GAAG,8BAA8B,CAAC;IAErD,gBAAgB;IAChB,SAAgB,YAAY,CAAC,MAAqD;QAChF,OAAO;YACL,QAAQ,EAAE,MAAM,CAAC,YAAY;YAC7B,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;SAClB,CAAC;IACJ,CAAC;IAPe,yCAAY,eAO3B,CAAA;AACH,CAAC,EAZgB,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAY5C","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\n\n/**\n * Contains additional data for OperationFailedException.\n */\nexport interface OperationFailedExceptionData {\n /**\n * The full list of warnings.\n */\n warnings: string[];\n\n /**\n * The reason for the Exception.\n */\n reason: string;\n\n /**\n * The address of the device that attempted the failed operation.\n */\n device: number;\n\n /**\n * The number of the axis that attempted the failed operation.\n */\n axis: number;\n\n}\n\nexport namespace OperationFailedExceptionData {\n export const __type = 'OperationFailedExceptionData';\n\n /** @internal */\n export function fromProtobuf(pbData: gateway.OperationFailedExceptionData.AsObject): OperationFailedExceptionData {\n return {\n warnings: pbData.warningsList,\n reason: pbData.reason,\n device: pbData.device,\n axis: pbData.axis,\n };\n }\n}\n"]}
@@ -60,6 +60,7 @@ errorMapping.set(main_pb_1.Errors.MOVEMENT_INTERRUPTED, exceptions.MovementInter
60
60
  errorMapping.set(main_pb_1.Errors.NO_DEVICE_FOUND, exceptions.NoDeviceFoundException);
61
61
  errorMapping.set(main_pb_1.Errors.NO_VALUE_FOR_KEY, exceptions.NoValueForKeyException);
62
62
  errorMapping.set(main_pb_1.Errors.NOT_SUPPORTED, exceptions.NotSupportedException);
63
+ errorMapping.set(main_pb_1.Errors.OPERATION_FAILED, exceptions.OperationFailedException);
63
64
  errorMapping.set(main_pb_1.Errors.OS_FAILED, exceptions.OsFailedException);
64
65
  errorMapping.set(main_pb_1.Errors.OUT_OF_REQUEST_IDS, exceptions.OutOfRequestIdsException);
65
66
  errorMapping.set(main_pb_1.Errors.PVT_DISCONTINUITY, exceptions.PvtDiscontinuityException);
@@ -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,C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BAAkB,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.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"]}
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,gB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AAe,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.OPERATION_FAILED, exceptions.OperationFailedException);\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"]}
@@ -35,6 +35,7 @@ var AxisTransformation;
35
35
  function toProtobuf(source) {
36
36
  const pbData = new gateway.TranslatorAxisTransformation();
37
37
  if (source == null) {
38
+ pbData.setTranslation(measurement_1.Measurement.toProtobuf(null));
38
39
  return pbData;
39
40
  }
40
41
  pbData.setAxisLetter(source.axisLetter);
@@ -1 +1 @@
1
- {"version":3,"file":"axis_transformation.js","sourceRoot":"","sources":["../../../src/gcode/axis_transformation.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AACtC,gDAA6C;AAuB7C,IAAiB,kBAAkB,CAelC;AAfD,WAAiB,kBAAkB;IACpB,yBAAM,GAAG,oBAAoB,CAAC;IAE3C,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAA6C;QACtE,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC1D,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,OAAQ,CAAC,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,yBAAW,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC;IAChB,CAAC;IAVe,6BAAU,aAUzB,CAAA;AACH,CAAC,EAfgB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAelC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Measurement } from '../measurement';\n\n/**\n * Represents a transformation of a translator axis.\n */\nexport interface AxisTransformation {\n /**\n * Letter of the translator axis (X,Y,Z,A,B,C,E).\n */\n axisLetter: string;\n\n /**\n * Scaling factor.\n */\n scaling?: number;\n\n /**\n * Translation distance.\n */\n translation?: Measurement;\n\n}\n\nexport namespace AxisTransformation {\n export const __type = 'AxisTransformation';\n\n /** @internal */\n export function toProtobuf(source: AxisTransformation | null | undefined): gateway.TranslatorAxisTransformation {\n const pbData = new gateway.TranslatorAxisTransformation();\n if (source == null) {\n return pbData;\n }\n\n pbData.setAxisLetter(source.axisLetter);\n pbData.setScaling(source.scaling!);\n pbData.setTranslation(Measurement.toProtobuf(source.translation));\n return pbData;\n }\n}\n"]}
1
+ {"version":3,"file":"axis_transformation.js","sourceRoot":"","sources":["../../../src/gcode/axis_transformation.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AACtC,gDAA6C;AAuB7C,IAAiB,kBAAkB,CAgBlC;AAhBD,WAAiB,kBAAkB;IACpB,yBAAM,GAAG,oBAAoB,CAAC;IAE3C,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAA6C;QACtE,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,4BAA4B,EAAE,CAAC;QAC1D,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,MAAM,CAAC,cAAc,CAAC,yBAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;YACpD,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QACxC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,OAAQ,CAAC,CAAC;QACnC,MAAM,CAAC,cAAc,CAAC,yBAAW,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;QAClE,OAAO,MAAM,CAAC;IAChB,CAAC;IAXe,6BAAU,aAWzB,CAAA;AACH,CAAC,EAhBgB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAgBlC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Measurement } from '../measurement';\n\n/**\n * Represents a transformation of a translator axis.\n */\nexport interface AxisTransformation {\n /**\n * Letter of the translator axis (X,Y,Z,A,B,C,E).\n */\n axisLetter: string;\n\n /**\n * Scaling factor.\n */\n scaling?: number;\n\n /**\n * Translation distance.\n */\n translation?: Measurement;\n\n}\n\nexport namespace AxisTransformation {\n export const __type = 'AxisTransformation';\n\n /** @internal */\n export function toProtobuf(source: AxisTransformation | null | undefined): gateway.TranslatorAxisTransformation {\n const pbData = new gateway.TranslatorAxisTransformation();\n if (source == null) {\n pbData.setTranslation(Measurement.toProtobuf(null));\n return pbData;\n }\n\n pbData.setAxisLetter(source.axisLetter);\n pbData.setScaling(source.scaling!);\n pbData.setTranslation(Measurement.toProtobuf(source.translation));\n return pbData;\n }\n}\n"]}
@@ -36,6 +36,7 @@ var DeviceDefinition;
36
36
  function toProtobuf(source) {
37
37
  const pbData = new gateway.TranslatorDefinition();
38
38
  if (source == null) {
39
+ pbData.setMaxSpeed(measurement_1.Measurement.toProtobuf(null));
39
40
  return pbData;
40
41
  }
41
42
  pbData.setDeviceId(source.deviceId);
@@ -1 +1 @@
1
- {"version":3,"file":"device_definition.js","sourceRoot":"","sources":["../../../src/gcode/device_definition.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AACtC,uDAAmD;AACnD,gDAA6C;AAyB7C,IAAiB,gBAAgB,CAehC;AAfD,WAAiB,gBAAgB;IAClB,uBAAM,GAAG,kBAAkB,CAAC;IAEzC,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAA2C;QACpE,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAClD,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACpC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,gCAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,CAAC,WAAW,CAAC,yBAAW,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5D,OAAO,MAAM,CAAC;IAChB,CAAC;IAVe,2BAAU,aAUzB,CAAA;AACH,CAAC,EAfgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAehC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { AxisDefinition } from './axis_definition';\nimport { Measurement } from '../measurement';\n\n/**\n * Holds information about device and its axes for purpose of a translator.\n */\nexport interface DeviceDefinition {\n /**\n * Device ID of the controller.\n * Can be obtained from device settings.\n */\n deviceId: number;\n\n /**\n * Applicable axes of the device.\n */\n axes: AxisDefinition[];\n\n /**\n * The smallest of each axis' maxspeed setting value.\n * This value becomes the traverse rate of the translator.\n */\n maxSpeed: Measurement;\n\n}\n\nexport namespace DeviceDefinition {\n export const __type = 'DeviceDefinition';\n\n /** @internal */\n export function toProtobuf(source: DeviceDefinition | null | undefined): gateway.TranslatorDefinition {\n const pbData = new gateway.TranslatorDefinition();\n if (source == null) {\n return pbData;\n }\n\n pbData.setDeviceId(source.deviceId);\n pbData.setAxesList(source.axes.map(item => AxisDefinition.toProtobuf(item)));\n pbData.setMaxSpeed(Measurement.toProtobuf(source.maxSpeed));\n return pbData;\n }\n}\n"]}
1
+ {"version":3,"file":"device_definition.js","sourceRoot":"","sources":["../../../src/gcode/device_definition.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AACtC,uDAAmD;AACnD,gDAA6C;AAyB7C,IAAiB,gBAAgB,CAgBhC;AAhBD,WAAiB,gBAAgB;IAClB,uBAAM,GAAG,kBAAkB,CAAC;IAEzC,gBAAgB;IAChB,SAAgB,UAAU,CAAC,MAA2C;QACpE,MAAM,MAAM,GAAG,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAClD,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,MAAM,CAAC,WAAW,CAAC,yBAAW,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;YACjD,OAAO,MAAM,CAAC;SACf;QAED,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACpC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,gCAAc,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7E,MAAM,CAAC,WAAW,CAAC,yBAAW,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC5D,OAAO,MAAM,CAAC;IAChB,CAAC;IAXe,2BAAU,aAWzB,CAAA;AACH,CAAC,EAhBgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAgBhC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { AxisDefinition } from './axis_definition';\nimport { Measurement } from '../measurement';\n\n/**\n * Holds information about device and its axes for purpose of a translator.\n */\nexport interface DeviceDefinition {\n /**\n * Device ID of the controller.\n * Can be obtained from device settings.\n */\n deviceId: number;\n\n /**\n * Applicable axes of the device.\n */\n axes: AxisDefinition[];\n\n /**\n * The smallest of each axis' maxspeed setting value.\n * This value becomes the traverse rate of the translator.\n */\n maxSpeed: Measurement;\n\n}\n\nexport namespace DeviceDefinition {\n export const __type = 'DeviceDefinition';\n\n /** @internal */\n export function toProtobuf(source: DeviceDefinition | null | undefined): gateway.TranslatorDefinition {\n const pbData = new gateway.TranslatorDefinition();\n if (source == null) {\n pbData.setMaxSpeed(Measurement.toProtobuf(null));\n return pbData;\n }\n\n pbData.setDeviceId(source.deviceId);\n pbData.setAxesList(source.axes.map(item => AxisDefinition.toProtobuf(item)));\n pbData.setMaxSpeed(Measurement.toProtobuf(source.maxSpeed));\n return pbData;\n }\n}\n"]}
@@ -5,6 +5,7 @@ export * from './microscopy_ns';
5
5
  export * from './product_ns';
6
6
  export * from './exceptions';
7
7
  export { DeviceDbSourceType } from './device_db_source_type';
8
+ export { AxisAddress } from './axis_address';
8
9
  export { FirmwareVersion } from './firmware_version';
9
10
  export { Library } from './library';
10
11
  export { LogOutputMode } from './log_output_mode';
package/dist/lib/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.UnitTable = exports.Tools = exports.RotationDirection = exports.Measurement = exports.LogOutputMode = exports.Library = exports.FirmwareVersion = exports.DeviceDbSourceType = void 0;
17
+ exports.UnitTable = exports.Tools = exports.RotationDirection = exports.Measurement = exports.LogOutputMode = exports.Library = exports.FirmwareVersion = exports.AxisAddress = exports.DeviceDbSourceType = void 0;
18
18
  __exportStar(require("./ascii_ns"), exports);
19
19
  __exportStar(require("./binary_ns"), exports);
20
20
  __exportStar(require("./gcode_ns"), exports);
@@ -23,6 +23,8 @@ __exportStar(require("./product_ns"), exports);
23
23
  __exportStar(require("./exceptions"), exports);
24
24
  var device_db_source_type_1 = require("./device_db_source_type");
25
25
  Object.defineProperty(exports, "DeviceDbSourceType", { enumerable: true, get: function () { return device_db_source_type_1.DeviceDbSourceType; } });
26
+ var axis_address_1 = require("./axis_address");
27
+ Object.defineProperty(exports, "AxisAddress", { enumerable: true, get: function () { return axis_address_1.AxisAddress; } });
26
28
  var firmware_version_1 = require("./firmware_version");
27
29
  Object.defineProperty(exports, "FirmwareVersion", { enumerable: true, get: function () { return firmware_version_1.FirmwareVersion; } });
28
30
  var library_1 = require("./library");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,6CAA2B;AAC3B,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAC1B,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,0CAAwB","sourcesContent":["export * from './ascii_ns';\nexport * from './binary_ns';\nexport * from './gcode_ns';\nexport * from './microscopy_ns';\nexport * from './product_ns';\nexport * from './exceptions';\nexport { DeviceDbSourceType } from './device_db_source_type';\nexport { FirmwareVersion } from './firmware_version';\nexport { Library } from './library';\nexport { LogOutputMode } from './log_output_mode';\nexport { Measurement } from './measurement';\nexport { RotationDirection } from './rotation_direction';\nexport { Tools } from './tools';\nexport { UnitTable } from './unit_table';\nexport * from './units';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,8CAA4B;AAC5B,6CAA2B;AAC3B,kDAAgC;AAChC,+CAA6B;AAC7B,+CAA6B;AAC7B,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,qDAAkD;AAAzC,gHAAA,aAAa,OAAA;AACtB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAC1B,iCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,2CAAyC;AAAhC,uGAAA,SAAS,OAAA;AAClB,0CAAwB","sourcesContent":["export * from './ascii_ns';\nexport * from './binary_ns';\nexport * from './gcode_ns';\nexport * from './microscopy_ns';\nexport * from './product_ns';\nexport * from './exceptions';\nexport { DeviceDbSourceType } from './device_db_source_type';\nexport { AxisAddress } from './axis_address';\nexport { FirmwareVersion } from './firmware_version';\nexport { Library } from './library';\nexport { LogOutputMode } from './log_output_mode';\nexport { Measurement } from './measurement';\nexport { RotationDirection } from './rotation_direction';\nexport { Tools } from './tools';\nexport { UnitTable } from './unit_table';\nexport * from './units';\n"]}
@@ -0,0 +1,36 @@
1
+ import { Device } from '../ascii/device';
2
+ /**
3
+ * A generic turret device.
4
+ */
5
+ export declare class FilterChanger {
6
+ /**
7
+ * The base device of this turret.
8
+ */
9
+ get device(): Device;
10
+ private _device;
11
+ /**
12
+ * Creates instance of `FilterChanger` based on the given device.
13
+ */
14
+ constructor(device: Device);
15
+ /**
16
+ * Gets number of filters of the changer.
17
+ * @returns Number of positions.
18
+ */
19
+ getNumberOfFilters(): Promise<number>;
20
+ /**
21
+ * Returns the current filter number starting from 1.
22
+ * The value of 0 indicates that the position is either unknown or between two filters.
23
+ * @returns Filter number starting from 1 or 0 if the position cannot be determined.
24
+ */
25
+ getCurrentFilter(): Promise<number>;
26
+ /**
27
+ * Changes to the specified filter.
28
+ * @param filter Filter number starting from 1.
29
+ */
30
+ change(filter: number): Promise<void>;
31
+ /**
32
+ * Returns a string that represents the device.
33
+ * @returns A string that represents the device.
34
+ */
35
+ toString(): string;
36
+ }
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ // ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //
3
+ // ============= DO NOT EDIT DIRECTLY ============= //
4
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
+ if (k2 === undefined) k2 = k;
6
+ var desc = Object.getOwnPropertyDescriptor(m, k);
7
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
+ desc = { enumerable: true, get: function() { return m[k]; } };
9
+ }
10
+ Object.defineProperty(o, k2, desc);
11
+ }) : (function(o, m, k, k2) {
12
+ if (k2 === undefined) k2 = k;
13
+ o[k2] = m[k];
14
+ }));
15
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
16
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
17
+ }) : function(o, v) {
18
+ o["default"] = v;
19
+ });
20
+ var __importStar = (this && this.__importStar) || function (mod) {
21
+ if (mod && mod.__esModule) return mod;
22
+ var result = {};
23
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
24
+ __setModuleDefault(result, mod);
25
+ return result;
26
+ };
27
+ Object.defineProperty(exports, "__esModule", { value: true });
28
+ exports.FilterChanger = void 0;
29
+ const gateway = __importStar(require("../gateway"));
30
+ /**
31
+ * A generic turret device.
32
+ */
33
+ class FilterChanger {
34
+ /**
35
+ * The base device of this turret.
36
+ */
37
+ get device() {
38
+ return this._device;
39
+ }
40
+ /**
41
+ * Creates instance of `FilterChanger` based on the given device.
42
+ */
43
+ constructor(device) {
44
+ this._device = device;
45
+ }
46
+ /**
47
+ * Gets number of filters of the changer.
48
+ * @returns Number of positions.
49
+ */
50
+ async getNumberOfFilters() {
51
+ const request = new gateway.AxisEmptyRequest();
52
+ request.setInterfaceId(this.device.connection.interfaceId);
53
+ request.setDevice(this.device.deviceAddress);
54
+ request.setAxis(1);
55
+ const response = await gateway.callAsync('device/get_index_count', request, gateway.IntResponse);
56
+ return response.getValue();
57
+ }
58
+ /**
59
+ * Returns the current filter number starting from 1.
60
+ * The value of 0 indicates that the position is either unknown or between two filters.
61
+ * @returns Filter number starting from 1 or 0 if the position cannot be determined.
62
+ */
63
+ async getCurrentFilter() {
64
+ const request = new gateway.AxisEmptyRequest();
65
+ request.setInterfaceId(this.device.connection.interfaceId);
66
+ request.setDevice(this.device.deviceAddress);
67
+ request.setAxis(1);
68
+ const response = await gateway.callAsync('device/get_index_position', request, gateway.IntResponse);
69
+ return response.getValue();
70
+ }
71
+ /**
72
+ * Changes to the specified filter.
73
+ * @param filter Filter number starting from 1.
74
+ */
75
+ async change(filter) {
76
+ const request = new gateway.DeviceMoveRequest();
77
+ request.setInterfaceId(this.device.connection.interfaceId);
78
+ request.setDevice(this.device.deviceAddress);
79
+ request.setAxis(1);
80
+ request.setType(gateway.DeviceMoveRequest.MoveType.INDEX);
81
+ request.setWaitUntilIdle(true);
82
+ request.setArgInt(filter);
83
+ await gateway.callAsync('device/move', request);
84
+ }
85
+ /**
86
+ * Returns a string that represents the device.
87
+ * @returns A string that represents the device.
88
+ */
89
+ toString() {
90
+ const request = new gateway.AxisToStringRequest();
91
+ request.setInterfaceId(this.device.connection.interfaceId);
92
+ request.setDevice(this.device.deviceAddress);
93
+ const response = gateway.callSync('device/device_to_string', request, gateway.StringResponse);
94
+ return response.getValue();
95
+ }
96
+ }
97
+ exports.FilterChanger = FilterChanger;
98
+ //# sourceMappingURL=filter_changer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter_changer.js","sourceRoot":"","sources":["../../../src/microscopy/filter_changer.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD,oDAAsC;AAGtC;;GAEG;AACH,MAAa,aAAa;IACxB;;OAEG;IACH,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAGD;;OAEG;IACH,YAAY,MAAc;QACxB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB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CAAC;QAC7C,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QACnB,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1D,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC/B,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAE1B,MAAM,OAAO,CAAC,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,QAAQ;QACb,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;QAClD,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3D,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAE7C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAC/B,yBAAyB,EACzB,OAAO,EACP,OAAO,CAAC,cAAc,CAAC,CAAC;QAC1B,OAAO,QAAQ,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;CACF;AApFD,sCAoFC","sourcesContent":["// ==== THIS FILE IS GENERATED FROM A TEMPLATE ==== //\n// ============= DO NOT EDIT DIRECTLY ============= //\n\nimport * as gateway from '../gateway';\nimport { Device } from '../ascii/device';\n\n/**\n * A generic turret device.\n */\nexport class FilterChanger {\n /**\n * The base device of this turret.\n */\n public get device(): Device {\n return this._device;\n }\n private _device: Device;\n\n /**\n * Creates instance of `FilterChanger` based on the given device.\n */\n constructor(device: Device) {\n this._device = device;\n }\n\n /**\n * Gets number of filters of the changer.\n * @returns Number of positions.\n */\n public async getNumberOfFilters(): Promise<number> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(1);\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'device/get_index_count',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Returns the current filter number starting from 1.\n * The value of 0 indicates that the position is either unknown or between two filters.\n * @returns Filter number starting from 1 or 0 if the position cannot be determined.\n */\n public async getCurrentFilter(): Promise<number> {\n const request = new gateway.AxisEmptyRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(1);\n\n const response = await gateway.callAsync<gateway.IntResponse>(\n 'device/get_index_position',\n request,\n gateway.IntResponse);\n return response.getValue();\n }\n\n /**\n * Changes to the specified filter.\n * @param filter Filter number starting from 1.\n */\n public async change(\n filter: number\n ): Promise<void> {\n const request = new gateway.DeviceMoveRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n request.setAxis(1);\n request.setType(gateway.DeviceMoveRequest.MoveType.INDEX);\n request.setWaitUntilIdle(true);\n request.setArgInt(filter);\n\n await gateway.callAsync('device/move', request);\n }\n\n /**\n * Returns a string that represents the device.\n * @returns A string that represents the device.\n */\n public toString(): string {\n const request = new gateway.AxisToStringRequest();\n request.setInterfaceId(this.device.connection.interfaceId);\n request.setDevice(this.device.deviceAddress);\n\n const response = gateway.callSync<gateway.StringResponse>(\n 'device/device_to_string',\n request,\n gateway.StringResponse);\n return response.getValue();\n }\n}\n\nnamespace FilterChanger {\n}\n"]}
@@ -0,0 +1,56 @@
1
+ import { Device } from '../ascii/device';
2
+ import { DeviceIO } from '../ascii/device_io';
3
+ import { Connection } from '../ascii/connection';
4
+ import { IlluminatorChannel } from './illuminator_channel';
5
+ /**
6
+ * Use to manage an LED controller.
7
+ * It is subject to breaking changes without warning until further notice.
8
+ * Requires at least Firmware 7.09.
9
+ */
10
+ export declare class Illuminator {
11
+ /**
12
+ * The base device of this illuminator.
13
+ */
14
+ get device(): Device;
15
+ private _device;
16
+ /**
17
+ * I/O channels of this device.
18
+ */
19
+ get io(): DeviceIO;
20
+ private _io;
21
+ /**
22
+ * Creates instance of `Illuminator` based on the given device.
23
+ * If the device is identified, this constructor will ensure it is an illuminator.
24
+ */
25
+ constructor(device: Device);
26
+ /**
27
+ * Gets an IlluminatorChannel class instance that allows control of a particular channel.
28
+ * Channels are numbered from 1.
29
+ * @param channelNumber Number of channel to control.
30
+ * @returns Illuminator channel instance.
31
+ */
32
+ getChannel(channelNumber: number): IlluminatorChannel;
33
+ /**
34
+ * Checks if this is an illuminator or some other type of device and throws an error if it is not.
35
+ */
36
+ private _verifyIsIlluminator;
37
+ /**
38
+ * Finds an illuminator on a connection.
39
+ * In case of conflict, specify the optional device address.
40
+ * @param connection Connection on which to detect the illuminator.
41
+ * @param [options.deviceAddress=0] Optional device address of the illuminator.
42
+ * @returns New instance of illuminator.
43
+ */
44
+ static find(connection: Connection, options?: Illuminator.FindOptions): Promise<Illuminator>;
45
+ /**
46
+ * Returns a string that represents the device.
47
+ * @returns A string that represents the device.
48
+ */
49
+ toString(): string;
50
+ }
51
+ declare namespace Illuminator {
52
+ interface FindOptions {
53
+ deviceAddress?: number;
54
+ }
55
+ }
56
+ export {};