初始化CRICS
This commit is contained in:
63
Service/IHostModalManager.cs
Normal file
63
Service/IHostModalManager.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Domain;
|
||||
|
||||
namespace Service
|
||||
{
|
||||
public interface IHostModalManager : IGenericManager<HostModal>
|
||||
{
|
||||
HostModal Get(int hostID, int roomTypeModalId);
|
||||
|
||||
HostModal GetByModalAddress(int hostID, string modalAddress);
|
||||
|
||||
HostModal GetByModalName(int hostID, string name);
|
||||
|
||||
IList<HostModal> Load(int hostID, DeviceType type);
|
||||
/// <summary>
|
||||
/// 获取当前主机下所有回路
|
||||
/// </summary>
|
||||
/// <param name="hostID"></param>
|
||||
/// <returns></returns>
|
||||
IList<HostModal> LoadByHostID(int hostID);
|
||||
/// <summary>
|
||||
/// 获取所有含有“灯”字的回路
|
||||
/// </summary>
|
||||
/// <param name="hostID"></param>
|
||||
/// <returns></returns>
|
||||
IList<HostModal> LoadAllLight(int hostID);
|
||||
|
||||
void UpdateHostModalStatus(Host host, string modalAddress, int status);
|
||||
/// <summary>
|
||||
/// 设置设备状态
|
||||
/// host 只需要hostnumber和mac
|
||||
/// hostmodal只需要 address 和type
|
||||
/// device.Address = hostModal.Modal.ModalAddress;
|
||||
/// device.Type = hostModal.Modal.Type;
|
||||
/// </summary>
|
||||
/// <param name="host">RCU Host</param>
|
||||
/// <param name="hostModal"></param>
|
||||
/// <param name="status">状态:1开,2关,6停</param>
|
||||
/// <param name="brightness">亮度:0~100</param>
|
||||
/// <param name="temperature">空调温度:16~32</param>
|
||||
/// <param name="fanSpeed">空调风速:自动0,低1,中2,高3</param>
|
||||
/// <param name="mode">空调模式:自动0,制冷1,制热2,送风3</param>
|
||||
/// <param name="valve">空调阀门:0,不变,1开,2关</param>
|
||||
void SetDevice(Host host, HostModal hostModal, int status, int brightness, int temperature = 0, int fanSpeed = 0, int mode = 0, int valve = 0);
|
||||
|
||||
/// <summary>
|
||||
/// 新添加的接口
|
||||
/// </summary>
|
||||
/// <param name="hostnumber"></param>
|
||||
/// <param name="mac"></param>
|
||||
/// <param name="Data"></param>
|
||||
void SendData(string hostnumber,string mac, byte[] Data);
|
||||
|
||||
void SetDevice_Repeat(string SingleKey,Host host, HostModal hostModal, int status, int brightness, int temperature = 0, int fanSpeed = 0, int mode = 0, int valve = 0);
|
||||
|
||||
void DeteleByHostID(int hostID);
|
||||
|
||||
void DeteleByRoomTypeModal(int hostID, int roomTypeModal);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user