import { UnitConverters } from './units'; /** * Configuration interface for unit formatting of a single data point in the monitoring data. */ export interface MonitoringConfigUnitFormatter { /** * The ID of the converter to use for formatting the data point. */ converterId: keyof UnitConverters; /** * The target unit for the formatted value. */ unit: string; /** * Optional additional data required for formatting. * This varies depending on the converter type (e.g., an object with resolution and feed for a position converter). */ data?: any; } /** * Configuration interface for monitoring settings. */ export interface MonitoringConfig { /** * Specifies the size of the buffer for monitoring messages from Motion Master before emitting them. * This is useful, for example, for collecting a certain number of data points over time in a worker thread * before emitting them to the main thread for plotting purposes. */ readonly bufferSize?: number; /** * Enables the collection of all monitoring data in {@link DataMonitoring}. * The collected monitoring data can then be exported to a CSV file, or some statistical analysis can be performed on it. * * @deprecated Use the {@link DataMonitoring#collect} property instead. */ readonly collect?: boolean; /** * Controls whether to emit only when the monitored data values change. * This is useful for monitoring values like temperature or operation modes, which don't change frequently but need to be displayed continuously. * If the monitored data doesn't change, no data will be emitted to the main thread. */ readonly distinct?: boolean; /** * Optional message ID. */ readonly messageId?: string; /** * Specifies the topic on the master to which to subscribe. * It should be prefixed with the client ID and context to ensure a unique topic. */ readonly topic: string; /** * Optional unit formatters for the monitoring data. * The length of this array must match the length of the monitoring data array. * Each element corresponds to a unit formatter for the respective monitoring data point. * If a formatter is not required for a particular data point, the element can be `undefined` or `null`. */ readonly unitFormatters?: Array; }