11111
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1043c3356e14496b3692c245bfb461b
|
||||
timeCreated: 1753941548
|
||||
@@ -0,0 +1,33 @@
|
||||
namespace Server
|
||||
{
|
||||
public enum ServerOpenSceneSchemaType
|
||||
{
|
||||
BirdView, //鸟瞰
|
||||
Spot //临场
|
||||
}
|
||||
|
||||
public enum ServerOpenSceneType
|
||||
{
|
||||
Unit1, //场景1
|
||||
Unit2, //场景2
|
||||
Unit3, //场景3
|
||||
Unit4 //场景4
|
||||
}
|
||||
|
||||
public enum ServerPanelType
|
||||
{
|
||||
OpenScene, //打开场景
|
||||
ControlSchema, //控制场景开关
|
||||
QueryClient //查询客户端
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 信号强度
|
||||
/// </summary>
|
||||
public enum RSSI
|
||||
{
|
||||
Good,
|
||||
Bad,
|
||||
Not
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cab61756e91e4736afde89c57340b821
|
||||
timeCreated: 1753941563
|
||||
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
[Serializable]
|
||||
public struct ResultCodeEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态码ServerPanelType
|
||||
/// </summary>
|
||||
private string code { get; set; }
|
||||
|
||||
private object message { get; set; }
|
||||
|
||||
private ResultCodeEntity(string code, object message)
|
||||
{
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
public string Code()
|
||||
{
|
||||
return code;
|
||||
}
|
||||
|
||||
public object Message()
|
||||
{
|
||||
return message;
|
||||
}
|
||||
|
||||
public static readonly ResultCodeEntity OpenScene = new(ServerPanelType.OpenScene.ToString(), "");
|
||||
public static readonly ResultCodeEntity ControlSchema = new(ServerPanelType.ControlSchema.ToString(), "");
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct ResultEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态码ServerPanelType
|
||||
/// </summary>
|
||||
public string code { get; set; }
|
||||
|
||||
public string deviceCode { get; set; }
|
||||
|
||||
public object message { get; set; }
|
||||
|
||||
public void SetDeviceCode(string deviceCode)
|
||||
{
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public string DeviceCode()
|
||||
{
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
public void SetMessage(object message)
|
||||
{
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
|
||||
public ResultEntity(string code, string deviceCode, object message)
|
||||
{
|
||||
this.code = code;
|
||||
this.deviceCode = deviceCode;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public ResultEntity(ResultCodeEntity resultCode, string deviceCode)
|
||||
{
|
||||
code = resultCode.Code();
|
||||
this.deviceCode = deviceCode;
|
||||
message = resultCode.Message();
|
||||
}
|
||||
|
||||
public static string ToEntityString(ResultEntity entity)
|
||||
{
|
||||
var data = JsonConvert.SerializeObject(entity, Formatting.Indented);
|
||||
return JsonConvert.SerializeObject(data);
|
||||
}
|
||||
|
||||
public static ResultEntity SetResultCode(ResultCodeEntity resultCode, string deviceCode)
|
||||
{
|
||||
var result = new ResultEntity(resultCode, deviceCode);
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ResultEntity SetResultCode(ResultCodeEntity resultCode, object message)
|
||||
{
|
||||
var result = new ResultEntity(resultCode, "");
|
||||
result.message = message;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static ResultEntity SetResultCode(ResultCodeEntity resultCode, string deviceCode, object message)
|
||||
{
|
||||
var result = new ResultEntity(resultCode, deviceCode);
|
||||
result.message = message;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 41f092961d2c4f33a0d0e980158dd89a
|
||||
timeCreated: 1753941907
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace Server
|
||||
{
|
||||
public struct ServerOpenSceneEntity
|
||||
{
|
||||
/// <summary>
|
||||
/// ServerOpenSceneType
|
||||
/// </summary>
|
||||
public string serverOpenSceneType;
|
||||
|
||||
/// <summary>
|
||||
/// ServerOpenSceneSchemaType
|
||||
/// </summary>
|
||||
public string serverOpenSceneSchemaType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fbb30584a7ca4dd7afadf941cb67692e
|
||||
timeCreated: 1753941679
|
||||
Reference in New Issue
Block a user