using System;
|
namespace HDL_ON.Entity
|
{
|
public class A_Protocol_FunctionInfo
|
{
|
|
/*
|
HDL统一协议格式:16bytes
|
厂商代号:2bytes
|
通讯方式:有线/无线/ZIGBEE等1bytes
|
产品识别码:以添加设备的年月日时分秒 + 随机数8bytes Category
|
功能类别:1bytes
|
数据表索引地址:2bytes
|
回路:2bytes
|
举例: 0001-00-201910120900002567-01-0001-0001
|
*/
|
|
/// <summary>
|
/// 当前功能分类行
|
/// 如:空调类、灯光类、窗帘类
|
/// </summary>
|
public FunctionType functionCategory
|
{
|
get
|
{
|
var functionType = sid.Substring(22, 2);//截取23,24字符获取控制的设备的类型
|
return (FunctionType)Enum.ToObject(typeof(FunctionType), Convert.ToInt32(functionType));
|
}
|
}
|
/// <summary>
|
/// 功能ID
|
/// </summary>
|
public string sid = "1234121234567890123456FF00010001";
|
/// <summary>
|
/// 备注
|
/// </summary>
|
public string name;
|
/// <summary>
|
/// A协议数据格式
|
/// </summary>
|
public string a_Protocol_Namespace = "HDL";
|
/// <summary>
|
/// A协议功能的通行
|
/// 如:是AC功能:特性包含:Switch/mode/fan/temperature
|
/// </summary>
|
public string trait = "";
|
|
|
}
|
}
|