modelOfMatterModel.ts 1.19 KB
import {
  DataTypeEnum,
  FunctionType,
} from '/@/views/device/profiles/step/cpns/physical/cpns/config';

export interface Specs {
  min: string;
  max: string;
  unit: string;
  unitName: string;
  step: string;
  length: string;
  boolOpen: string;
  boolClose: string;
  valueRange?: {
    min: string;
    max: string;
  };
}

export interface DataType {
  type: DataTypeEnum;
  specs?: Partial<Specs> | StructJSON[];
}

export interface StructJSON {
  functionName?: string;
  identifier?: string;
  remark?: string;
  dataType?: DataType;
  serviceCommand?: string;
}

export interface FunctionJson {
  dataType?: DataType | DataType[];
  inputData?: StructJSON[];
  outputData?: StructJSON[];
  serviceCommand?: string;
}

export interface ModelOfMatterParams {
  deviceProfileId: string;
  functionJson: FunctionJson;
  functionName: string;
  functionType: FunctionType;
  identifier: string;
  remark: string;
  id?: string;
  callType?: string;
  eventType?: string;
  accessMode?: string;
}

export interface GetModelTslParams {
  functionType: FunctionType;
  deviceProfileId: string;
}

export interface ImportModelOfMatterType {
  data: Recordable;
  functionType: string;
  tkDeviceProfileId: string;
}