You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
2.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace Ems.CollectService.Entity.dto
{
/*
*EMS_COMM_PARAMS
*
*
*ID
*/
public struct EMS_COMM_PARAMS
{
//电类型
public const uint AI = 0x8E21;
public const uint BI = 0x8E22;
public const uint CI = 0x8E23;
public const uint AU = 0x8E11;
public const uint BU = 0x8E12;
public const uint CU = 0x8E13;
public const uint GLYS = 0xB650;
public const uint ZXYGZ = 0x9010;
public const uint JF = 0x9011;
public const uint F = 0x9012;
public const uint P = 0x9013;
public const uint G = 0x9014;
public const uint ZXWG = 0x9030;
public const uint CJSJ = 0x8030;
public const uint YGGL = 0xB651; //新增有功功率 Add By Wenjy 2023-03-23
public const uint WGGL = 0xB652; //新增无功功率 Add By Wenjy 2023-03-23
//蒸汽、压缩空气、水
public const uint Press = 0x9B00;
public const uint STemperature = 0x9B01;
public const uint Frequency = 0x9B02;
public const uint FluxInstantValue = 0x9B03;
public const uint FluxEyeableTotalValue = 0x9B05;
public const uint HeatInstantValue = 0x9B06;
public const uint HeatToftalValue = 0x9B07;
public const uint Density = 0x9B0E;
//温湿度、照度
public const uint TTempreture = 0x8E50;
public const uint Humidity = 0x8E52;
public const uint Illuminance = 0x8E51;
public const uint Concentration = 0x8E54;
public const uint Noise = 0x8E53;
}
public class MessagePack
{
public byte m_BeginChar = 0x68; //帧头
public byte m_EnergyType; //能源类型
public byte[] m_Meteraddr = new byte[2];//地址
public byte[] m_Msta = new byte[2]; //命令序列号
public byte m_StartFlag; //起始符
public byte m_MessageType; //控制码
public byte[] m_PackLen = new byte[2]; //数据长度
public byte m_Verify;
public byte m_EndChar = 0x16; //尾盘
}
}