增加RCU上离线功能,能耗双通道
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Google.Protobuf" Version="3.33.2" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.Orleans.Sdk" Version="8.2.0" />
|
||||
<PackageReference Include="MongoDB.Bson" Version="3.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace BLWData.Entity {
|
||||
string.Concat(
|
||||
"CiBEZXZpY2VBY3Rpb25DaGFuZ2VEYXRhUHVzaC5wcm90bxIOQkxXRGF0YS5F",
|
||||
"bnRpdHkilgIKGkRldmljZUFjdGlvbkNoYW5nZURhdGFQdXNoEgwKBGNvZGUY",
|
||||
"ASABKAMSEgoKcm9vbU51bWJlchgCIAEoCRISCgpob3N0TnVtYmVyGAMgASgJ",
|
||||
"ASABKAkSEgoKcm9vbU51bWJlchgCIAEoCRISCgpob3N0TnVtYmVyGAMgASgJ",
|
||||
"EhIKCmRldmljZXR5cGUYBCABKAkSDwoHYWRkcmVzcxgFIAEoCRIMCgRuYW1l",
|
||||
"GAYgASgJEg4KBnN0YXR1cxgHIAEoBRISCgpicmlnaHRuZXNzGAggASgFEhMK",
|
||||
"C2N1cnJlbnRUZW1wGAkgASgFEhMKC3NldHRpbmdUZW1wGAogASgFEhAKCGZh",
|
||||
@@ -105,13 +105,13 @@ namespace BLWData.Entity {
|
||||
|
||||
/// <summary>Field number for the "code" field.</summary>
|
||||
public const int CodeFieldNumber = 1;
|
||||
private long code_;
|
||||
private string code_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public long Code {
|
||||
public string Code {
|
||||
get { return code_; }
|
||||
set {
|
||||
code_ = value;
|
||||
code_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace BLWData.Entity {
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (Code != 0L) hash ^= Code.GetHashCode();
|
||||
if (Code.Length != 0) hash ^= Code.GetHashCode();
|
||||
if (RoomNumber.Length != 0) hash ^= RoomNumber.GetHashCode();
|
||||
if (HostNumber.Length != 0) hash ^= HostNumber.GetHashCode();
|
||||
if (Devicetype.Length != 0) hash ^= Devicetype.GetHashCode();
|
||||
@@ -339,9 +339,9 @@ namespace BLWData.Entity {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (Code != 0L) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt64(Code);
|
||||
if (Code.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(Code);
|
||||
}
|
||||
if (RoomNumber.Length != 0) {
|
||||
output.WriteRawTag(18);
|
||||
@@ -405,9 +405,9 @@ namespace BLWData.Entity {
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (Code != 0L) {
|
||||
output.WriteRawTag(8);
|
||||
output.WriteInt64(Code);
|
||||
if (Code.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(Code);
|
||||
}
|
||||
if (RoomNumber.Length != 0) {
|
||||
output.WriteRawTag(18);
|
||||
@@ -471,8 +471,8 @@ namespace BLWData.Entity {
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (Code != 0L) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Code);
|
||||
if (Code.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Code);
|
||||
}
|
||||
if (RoomNumber.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomNumber);
|
||||
@@ -525,7 +525,7 @@ namespace BLWData.Entity {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.Code != 0L) {
|
||||
if (other.Code.Length != 0) {
|
||||
Code = other.Code;
|
||||
}
|
||||
if (other.RoomNumber.Length != 0) {
|
||||
@@ -586,8 +586,8 @@ namespace BLWData.Entity {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 8: {
|
||||
Code = input.ReadInt64();
|
||||
case 10: {
|
||||
Code = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
@@ -661,8 +661,8 @@ namespace BLWData.Entity {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 8: {
|
||||
Code = input.ReadInt64();
|
||||
case 10: {
|
||||
Code = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
|
||||
13
CommonEntity/IRCUDataComing.cs
Normal file
13
CommonEntity/IRCUDataComing.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
public interface IRCUDataComing:IGrainWithStringKey
|
||||
{
|
||||
ValueTask DataAccept();
|
||||
}
|
||||
}
|
||||
@@ -71,26 +71,38 @@ namespace CommonEntity
|
||||
[Key(1)]
|
||||
public string? DeviceAddress { get; set; }
|
||||
}
|
||||
|
||||
[GenerateSerializer()]
|
||||
[MessagePackObject()]
|
||||
public class OnOffLineData
|
||||
{
|
||||
[Id(0)]
|
||||
[Key(0)]
|
||||
public string? HotelCode { get; set; }
|
||||
|
||||
[Id(1)]
|
||||
[Key(1)]
|
||||
public string? MAC { get; set; }
|
||||
|
||||
[Id(2)]
|
||||
[Key(2)]
|
||||
public string? HostNumber { get; set; }
|
||||
|
||||
[Id(3)]
|
||||
[Key(3)]
|
||||
public string? EndPoint { get; set; }
|
||||
|
||||
[Id(4)]
|
||||
[Key(4)]
|
||||
public string? CurrentStatus { get; set; }
|
||||
|
||||
[Id(5)]
|
||||
[Key(5)]
|
||||
public DateTime CurrentTime { get; set; }
|
||||
|
||||
[Id(6)]
|
||||
[Key(6)]
|
||||
public string? RoomNumber { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
469
CommonEntity/RCUOnOffLine.cs
Normal file
469
CommonEntity/RCUOnOffLine.cs
Normal file
@@ -0,0 +1,469 @@
|
||||
// <auto-generated>
|
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: RCUOnOffLine.proto
|
||||
// </auto-generated>
|
||||
#pragma warning disable 1591, 0612, 3021, 8981
|
||||
#region Designer generated code
|
||||
|
||||
using pb = global::Google.Protobuf;
|
||||
using pbc = global::Google.Protobuf.Collections;
|
||||
using pbr = global::Google.Protobuf.Reflection;
|
||||
using scg = global::System.Collections.Generic;
|
||||
namespace BLWData.Entity {
|
||||
|
||||
/// <summary>Holder for reflection information generated from RCUOnOffLine.proto</summary>
|
||||
public static partial class RCUOnOffLineReflection {
|
||||
|
||||
#region Descriptor
|
||||
/// <summary>File descriptor for RCUOnOffLine.proto</summary>
|
||||
public static pbr::FileDescriptor Descriptor {
|
||||
get { return descriptor; }
|
||||
}
|
||||
private static pbr::FileDescriptor descriptor;
|
||||
|
||||
static RCUOnOffLineReflection() {
|
||||
byte[] descriptorData = global::System.Convert.FromBase64String(
|
||||
string.Concat(
|
||||
"ChJSQ1VPbk9mZkxpbmUucHJvdG8SDkJMV0RhdGEuRW50aXR5IpUBCg1Pbk9m",
|
||||
"ZkxpbmVEYXRhEhEKCUhvdGVsQ29kZRgBIAEoCRISCgpIb3N0TnVtYmVyGAIg",
|
||||
"ASgJEgsKA01hYxgDIAEoCRISCgpSb29tTnVtYmVyGAQgASgJEhAKCEVuZFBv",
|
||||
"aW50GAUgASgJEhUKDUN1cnJlbnRTdGF0dXMYBiABKAkSEwoLQ3VycmVudFRp",
|
||||
"bWUYByABKAliBnByb3RvMw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::BLWData.Entity.OnOffLineData), global::BLWData.Entity.OnOffLineData.Parser, new[]{ "HotelCode", "HostNumber", "Mac", "RoomNumber", "EndPoint", "CurrentStatus", "CurrentTime" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Messages
|
||||
/// <summary>
|
||||
/// 定义一个Person消息类型
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
|
||||
public sealed partial class OnOffLineData : pb::IMessage<OnOffLineData>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<OnOffLineData> _parser = new pb::MessageParser<OnOffLineData>(() => new OnOffLineData());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<OnOffLineData> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::BLWData.Entity.RCUOnOffLineReflection.Descriptor.MessageTypes[0]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public OnOffLineData() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public OnOffLineData(OnOffLineData other) : this() {
|
||||
hotelCode_ = other.hotelCode_;
|
||||
hostNumber_ = other.hostNumber_;
|
||||
mac_ = other.mac_;
|
||||
roomNumber_ = other.roomNumber_;
|
||||
endPoint_ = other.endPoint_;
|
||||
currentStatus_ = other.currentStatus_;
|
||||
currentTime_ = other.currentTime_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public OnOffLineData Clone() {
|
||||
return new OnOffLineData(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "HotelCode" field.</summary>
|
||||
public const int HotelCodeFieldNumber = 1;
|
||||
private string hotelCode_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string HotelCode {
|
||||
get { return hotelCode_; }
|
||||
set {
|
||||
hotelCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "HostNumber" field.</summary>
|
||||
public const int HostNumberFieldNumber = 2;
|
||||
private string hostNumber_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string HostNumber {
|
||||
get { return hostNumber_; }
|
||||
set {
|
||||
hostNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "Mac" field.</summary>
|
||||
public const int MacFieldNumber = 3;
|
||||
private string mac_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string Mac {
|
||||
get { return mac_; }
|
||||
set {
|
||||
mac_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "RoomNumber" field.</summary>
|
||||
public const int RoomNumberFieldNumber = 4;
|
||||
private string roomNumber_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string RoomNumber {
|
||||
get { return roomNumber_; }
|
||||
set {
|
||||
roomNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "EndPoint" field.</summary>
|
||||
public const int EndPointFieldNumber = 5;
|
||||
private string endPoint_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string EndPoint {
|
||||
get { return endPoint_; }
|
||||
set {
|
||||
endPoint_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "CurrentStatus" field.</summary>
|
||||
public const int CurrentStatusFieldNumber = 6;
|
||||
private string currentStatus_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string CurrentStatus {
|
||||
get { return currentStatus_; }
|
||||
set {
|
||||
currentStatus_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "CurrentTime" field.</summary>
|
||||
public const int CurrentTimeFieldNumber = 7;
|
||||
private string currentTime_ = "";
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string CurrentTime {
|
||||
get { return currentTime_; }
|
||||
set {
|
||||
currentTime_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as OnOffLineData);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(OnOffLineData other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (HotelCode != other.HotelCode) return false;
|
||||
if (HostNumber != other.HostNumber) return false;
|
||||
if (Mac != other.Mac) return false;
|
||||
if (RoomNumber != other.RoomNumber) return false;
|
||||
if (EndPoint != other.EndPoint) return false;
|
||||
if (CurrentStatus != other.CurrentStatus) return false;
|
||||
if (CurrentTime != other.CurrentTime) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (HotelCode.Length != 0) hash ^= HotelCode.GetHashCode();
|
||||
if (HostNumber.Length != 0) hash ^= HostNumber.GetHashCode();
|
||||
if (Mac.Length != 0) hash ^= Mac.GetHashCode();
|
||||
if (RoomNumber.Length != 0) hash ^= RoomNumber.GetHashCode();
|
||||
if (EndPoint.Length != 0) hash ^= EndPoint.GetHashCode();
|
||||
if (CurrentStatus.Length != 0) hash ^= CurrentStatus.GetHashCode();
|
||||
if (CurrentTime.Length != 0) hash ^= CurrentTime.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (HotelCode.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(HotelCode);
|
||||
}
|
||||
if (HostNumber.Length != 0) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteString(HostNumber);
|
||||
}
|
||||
if (Mac.Length != 0) {
|
||||
output.WriteRawTag(26);
|
||||
output.WriteString(Mac);
|
||||
}
|
||||
if (RoomNumber.Length != 0) {
|
||||
output.WriteRawTag(34);
|
||||
output.WriteString(RoomNumber);
|
||||
}
|
||||
if (EndPoint.Length != 0) {
|
||||
output.WriteRawTag(42);
|
||||
output.WriteString(EndPoint);
|
||||
}
|
||||
if (CurrentStatus.Length != 0) {
|
||||
output.WriteRawTag(50);
|
||||
output.WriteString(CurrentStatus);
|
||||
}
|
||||
if (CurrentTime.Length != 0) {
|
||||
output.WriteRawTag(58);
|
||||
output.WriteString(CurrentTime);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (HotelCode.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(HotelCode);
|
||||
}
|
||||
if (HostNumber.Length != 0) {
|
||||
output.WriteRawTag(18);
|
||||
output.WriteString(HostNumber);
|
||||
}
|
||||
if (Mac.Length != 0) {
|
||||
output.WriteRawTag(26);
|
||||
output.WriteString(Mac);
|
||||
}
|
||||
if (RoomNumber.Length != 0) {
|
||||
output.WriteRawTag(34);
|
||||
output.WriteString(RoomNumber);
|
||||
}
|
||||
if (EndPoint.Length != 0) {
|
||||
output.WriteRawTag(42);
|
||||
output.WriteString(EndPoint);
|
||||
}
|
||||
if (CurrentStatus.Length != 0) {
|
||||
output.WriteRawTag(50);
|
||||
output.WriteString(CurrentStatus);
|
||||
}
|
||||
if (CurrentTime.Length != 0) {
|
||||
output.WriteRawTag(58);
|
||||
output.WriteString(CurrentTime);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (HotelCode.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(HotelCode);
|
||||
}
|
||||
if (HostNumber.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(HostNumber);
|
||||
}
|
||||
if (Mac.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Mac);
|
||||
}
|
||||
if (RoomNumber.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(RoomNumber);
|
||||
}
|
||||
if (EndPoint.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(EndPoint);
|
||||
}
|
||||
if (CurrentStatus.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(CurrentStatus);
|
||||
}
|
||||
if (CurrentTime.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(CurrentTime);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(OnOffLineData other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.HotelCode.Length != 0) {
|
||||
HotelCode = other.HotelCode;
|
||||
}
|
||||
if (other.HostNumber.Length != 0) {
|
||||
HostNumber = other.HostNumber;
|
||||
}
|
||||
if (other.Mac.Length != 0) {
|
||||
Mac = other.Mac;
|
||||
}
|
||||
if (other.RoomNumber.Length != 0) {
|
||||
RoomNumber = other.RoomNumber;
|
||||
}
|
||||
if (other.EndPoint.Length != 0) {
|
||||
EndPoint = other.EndPoint;
|
||||
}
|
||||
if (other.CurrentStatus.Length != 0) {
|
||||
CurrentStatus = other.CurrentStatus;
|
||||
}
|
||||
if (other.CurrentTime.Length != 0) {
|
||||
CurrentTime = other.CurrentTime;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
HotelCode = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
HostNumber = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
Mac = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
RoomNumber = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 42: {
|
||||
EndPoint = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 50: {
|
||||
CurrentStatus = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 58: {
|
||||
CurrentTime = input.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
if ((tag & 7) == 4) {
|
||||
// Abort on any end group tag.
|
||||
return;
|
||||
}
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
HotelCode = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 18: {
|
||||
HostNumber = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 26: {
|
||||
Mac = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 34: {
|
||||
RoomNumber = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 42: {
|
||||
EndPoint = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 50: {
|
||||
CurrentStatus = input.ReadString();
|
||||
break;
|
||||
}
|
||||
case 58: {
|
||||
CurrentTime = input.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
#endregion Designer generated code
|
||||
40
CommonEntity/TSLog.cs
Normal file
40
CommonEntity/TSLog.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CommonEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// ts 日志
|
||||
/// </summary>
|
||||
public class NewVersionLog
|
||||
{
|
||||
public string hotel_id { get; set; }
|
||||
public string room_id { get; set; }
|
||||
public string device_id { get; set; }
|
||||
public string ip { get; set; }
|
||||
|
||||
public int power_state { get; set; }
|
||||
public int guest_type { get; set; }
|
||||
public int cardless_state { get; set; }
|
||||
public ulong service_mask { get; set; }
|
||||
public int pms_state { get; set; }
|
||||
public int carbon_state { get; set; }
|
||||
public int device_count { get; set; }
|
||||
public int comm_seq { get; set; }
|
||||
public long ts_ms { get; set; }
|
||||
|
||||
public extra_data extra { get; set; }
|
||||
|
||||
}
|
||||
public class extra_data
|
||||
{
|
||||
public byte[] original_byte { get; set; }
|
||||
public string source { get; set; }
|
||||
public string ver { get; set; }
|
||||
public object ac { get; set; }
|
||||
public object meter { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,17 @@ namespace CommonEntity
|
||||
/// <summary>
|
||||
/// 宝镜系统使用的数据
|
||||
/// </summary>
|
||||
public static string BLWLog4BaoJing_RCU_Topic = "blwlog4BaoJing-rcu-udppackage-topic";
|
||||
//public static string BLWLog4BaoJing_RCU_Topic = "blwlog4BaoJing-rcu-udppackage-topic";
|
||||
public static string BLWLog4BaoJing_RCU_Topic = "blwlog4BaoJing-rcu-heartbeat-topic";
|
||||
|
||||
#region 日志系统
|
||||
/// <summary>
|
||||
/// 新的 TS写的日志系统
|
||||
/// 心跳包
|
||||
/// </summary>
|
||||
public static string BLWLog4NodeJs_RCU_Topic = "blwlog4Nodejs-rcu-heartbeat-topic";
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 选住使用kafka数据
|
||||
@@ -176,11 +186,38 @@ namespace CommonEntity
|
||||
public int Valve { get; set; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 能耗实体类
|
||||
/// </summary>
|
||||
[MessagePackObject()]
|
||||
public class NengHao_Repeat
|
||||
{
|
||||
[Key(0)]
|
||||
public string? address { get; set; }
|
||||
|
||||
[Key(1)]
|
||||
public double dianya { get; set; }
|
||||
|
||||
[Key(2)]
|
||||
public double dianliu { get; set; }
|
||||
|
||||
[Key(3)]
|
||||
public double gonglv { get; set; }
|
||||
|
||||
[Key(4)]
|
||||
public double nenghao { get; set; }
|
||||
|
||||
[Key(5)]
|
||||
public double zongnenghao { get; set; }
|
||||
}
|
||||
|
||||
[MessagePackObject()]
|
||||
public class NengHao
|
||||
{
|
||||
[Key(0)]
|
||||
public long HotelCode { get; set; }
|
||||
|
||||
[Key(1)]
|
||||
public string? HostNumber { get; set; }
|
||||
|
||||
@@ -197,43 +234,66 @@ namespace CommonEntity
|
||||
public bool IsTakeCard { get; set; }
|
||||
|
||||
[Key(6)]
|
||||
public double V { get; set; }
|
||||
public List<NengHao_Repeat> NengHaoList { get; set; }
|
||||
|
||||
#region 过期的数据
|
||||
//[Key(6)]
|
||||
//public double V { get; set; }
|
||||
|
||||
//[Key(7)]
|
||||
//public double A { get; set; }
|
||||
|
||||
//[Key(8)]
|
||||
//public double P { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 能耗
|
||||
///// </summary>
|
||||
//[Key(9)]
|
||||
//public double Energy_Consumption { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 总能耗
|
||||
///// </summary>
|
||||
//[Key(10)]
|
||||
//public double Sum_Energy_Consumption { get; set; }
|
||||
#endregion
|
||||
|
||||
[Key(7)]
|
||||
public double A { get; set; }
|
||||
|
||||
[Key(8)]
|
||||
public double P { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 能耗
|
||||
/// </summary>
|
||||
[Key(9)]
|
||||
public double Energy_Consumption { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总能耗
|
||||
/// </summary>
|
||||
[Key(10)]
|
||||
public double Sum_Energy_Consumption { get; set; }
|
||||
|
||||
[Key(11)]
|
||||
public long CreateTime { get; set; }
|
||||
|
||||
[Key(12)]
|
||||
[Key(8)]
|
||||
public string? ReportTime { get; set; }
|
||||
|
||||
[Key(13)]
|
||||
[Key(9)]
|
||||
public string? RoomNumber { get; set; }
|
||||
|
||||
[Key(14)]
|
||||
[Key(10)]
|
||||
public int CarbonVIP { get; set; }
|
||||
|
||||
[Key(15)]
|
||||
[Key(11)]
|
||||
public List<DingShiReportDate>? AllDeviceData { get; set; }
|
||||
|
||||
[Key(16)]
|
||||
[Key(12)]
|
||||
public int IdentityInfo { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///短离长离
|
||||
///我们这里叫卡事件
|
||||
/// </summary>
|
||||
[Key(13)]
|
||||
public ushort CardEvent { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// PMS 状态
|
||||
/// </summary>
|
||||
[Key(14)]
|
||||
public string? PMS_Status { get; set; }
|
||||
|
||||
[Key(15)]
|
||||
public int IsInsertCard { get; set; }
|
||||
}
|
||||
|
||||
[MessagePackObject()]
|
||||
|
||||
Reference in New Issue
Block a user