mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 15:17:41 +00:00
33 lines
746 B
TypeScript
33 lines
746 B
TypeScript
import {
|
|
ControlCur2AccurateCalibrationCommand,
|
|
ControlCur2Command,
|
|
ControlCur2PercentCommand,
|
|
ControlCur2QuickCalibrationCommand,
|
|
ControlCur2TDirectionConCommand,
|
|
} from 'src/device/commands/cur2-commands';
|
|
|
|
export enum ScheduleProductType {
|
|
CUR_2 = 'CUR_2',
|
|
}
|
|
export const DeviceFunctionMap: {
|
|
[T in ScheduleProductType]: (body: DeviceFunction[T]) => any;
|
|
} = {
|
|
[ScheduleProductType.CUR_2]: ({ code, value }) => {
|
|
return [
|
|
{
|
|
code,
|
|
value,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
type DeviceFunction = {
|
|
[ScheduleProductType.CUR_2]:
|
|
| ControlCur2Command
|
|
| ControlCur2PercentCommand
|
|
| ControlCur2AccurateCalibrationCommand
|
|
| ControlCur2TDirectionConCommand
|
|
| ControlCur2QuickCalibrationCommand;
|
|
};
|