Commit 55d27899 by xjp0422

clientid设置为suid ini文件格式修改 主题改为四层 ip和port 从ini文件读取并连接服务器 不再用原来命令行参数方式

parent 0563a3d1
No preview for this file type
......@@ -5,30 +5,24 @@ namespace Mqtt_AGI
enum systemID {
SERVER=1,UI,DEVICE,AGI,OAM
}
enum AGI_Module {CACL_TLE=1,CACL_REPORT }
enum Server_Module { CACL_TLE = 1, CACL_REPORT }
//分解string类型的主题 工具类 暂时用不到
class ParseUid
{
public static uint getlevel1(string topic)
{
return (Convert.ToUInt32(topic) & 0xf0000000) >> 28;
return (Convert.ToUInt32(topic,2) & 0xf0000000) >> 28;
}
public static uint getlevel2(string topic)
{
return (Convert.ToUInt32(topic) & 0x0f000000) >> 24;
return (Convert.ToUInt32(topic,2) & 0x0f000000) >> 24;
}
public static uint getlevel3(string topic)
{
return (Convert.ToUInt32(topic) & 0x00f00000) >> 20;
return (Convert.ToUInt32(topic,2) & 0x00f00000) >> 20;
}
public static uint getsystem(string topic)
{
return (Convert.ToUInt32(topic) & 0x000f0000) >> 16;
}
public static uint getsymodule(string topic)
{
return (Convert.ToUInt32(topic) & 0x0000f000) >> 12;
return (Convert.ToUInt32(topic,2) & 0x000f0000) >> 16;
}
}
......@@ -43,18 +37,10 @@ namespace Mqtt_AGI
return Convert.ToString(numtopic, 2).PadLeft(32, '0');//uint转string 32位 前面补0
}
//由level id生成system id 和 module id
public static string SerilizeString(string level_uid, systemID system, uint module)
//由level_uid生成level_system_uid 和
public static string SerilizeString(string level_uid, systemID system)
{
return Convert.ToString((Convert.ToUInt32(level_uid) | ((uint)system << 16) | (((uint)module) << 12)), 2).PadLeft(32, '0');
}
//指定module id
public static string SerilizeString(string level_system_uid, uint module) {
return Convert.ToString( (Convert.ToUInt32(level_system_uid) |(((uint)module)<<12)) ,2).PadLeft(32,'0');
return Convert.ToString((Convert.ToUInt32(level_uid,2) | (((uint)system) << 16) ), 2).PadLeft(32, '0');
}
}
}
......@@ -3,8 +3,8 @@ level1=1
level2=2
level3=3
[mqtt-local]
server=null
port=null
server=127.0.0.1
port=1883
[mqtt-cloud]
server=null
port=null
\ No newline at end of file
server=127.0.0.1
port=1883
\ No newline at end of file
[role]
level1:1
level2:2
level3:3
level1=1
level2=2
level3=3
[mqtt-local]
server:
port:
server=127.0.0.1
port=1883
[mqtt-cloud]
server:
port:
\ No newline at end of file
server=127.0.0.1
port=1883
\ No newline at end of file
db2993a2800aeb7dc1754e20ffa465e6754241e0
b30ae5d6ea524ee0ee189b3222a07c4c6c7596c1
......@@ -27,3 +27,24 @@ D:\MQTT_AGI\Mqtt_AGI\Kepler_J20002TLE\bin\Debug\System.Buffers.xml
D:\MQTT_AGI\Mqtt_AGI\Kepler_J20002TLE\bin\Debug\System.Memory.xml
D:\MQTT_AGI\Mqtt_AGI\Kepler_J20002TLE\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
D:\MQTT_AGI\Mqtt_AGI\Kepler_J20002TLE\obj\Debug\Mqtt_AGI.csproj.AssemblyReference.cache
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\Mqtt_AGI.exe.config
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\Mqtt_AGI.exe
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\Mqtt_AGI.pdb
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\Google.Protobuf.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\M2Mqtt.Net.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\Newtonsoft.Json.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\System.Buffers.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\System.Memory.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\System.Runtime.CompilerServices.Unsafe.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\Google.Protobuf.pdb
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\Google.Protobuf.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\M2Mqtt.Net.pdb
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\Newtonsoft.Json.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\System.Buffers.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\System.Memory.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Debug\System.Runtime.CompilerServices.Unsafe.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Debug\Mqtt_AGI.csproj.AssemblyReference.cache
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Debug\Mqtt_AGI.csproj.CoreCompileInputs.cache
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Debug\Mqtt_AGI.csproj.CopyComplete
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Debug\Mqtt_AGI.exe
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Debug\Mqtt_AGI.pdb
309040c17457bc65ae603286f7165730ab1aff9e
dc8766d0c3caf9d64c8ee1044151fbc91b8aab4f
......@@ -35,3 +35,28 @@ D:\MQTT_AGI\Mqtt_AGI\Kepler_J20002TLE\bin\Release\Google.Protobuf.xml
D:\MQTT_AGI\Mqtt_AGI\Kepler_J20002TLE\bin\Release\System.Buffers.xml
D:\MQTT_AGI\Mqtt_AGI\Kepler_J20002TLE\bin\Release\System.Memory.xml
D:\MQTT_AGI\Mqtt_AGI\Kepler_J20002TLE\bin\Release\System.Runtime.CompilerServices.Unsafe.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Mqtt_AGI.exe.config
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Mqtt_AGI.exe
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Mqtt_AGI.pdb
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\AGI.Foundation.Core.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\AGI.Foundation.Models.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\AGI.Foundation.Platforms.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Basic_Astrodynamics.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Google.Protobuf.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\M2Mqtt.Net.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Newtonsoft.Json.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\System.Buffers.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\System.Memory.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\System.Runtime.CompilerServices.Unsafe.dll
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Google.Protobuf.pdb
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Google.Protobuf.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\M2Mqtt.Net.pdb
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\Newtonsoft.Json.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\System.Buffers.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\System.Memory.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\bin\Release\System.Runtime.CompilerServices.Unsafe.xml
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Release\Mqtt_AGI.csproj.AssemblyReference.cache
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Release\Mqtt_AGI.csproj.CoreCompileInputs.cache
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Release\Mqtt_AGI.csproj.CopyComplete
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Release\Mqtt_AGI.exe
D:\gitlab\MQTT_AGI_hy\Kepler_J20002TLE\obj\Release\Mqtt_AGI.pdb
......@@ -46,32 +46,32 @@ message CalcReportReq{
}
//AGI返回:任务预报report
message CalcReportRet{
repeated Xxd xxds = 1;
repeated Task tasks = 2;
repeated Xxd xxds = 1; //星下点
repeated Task tasks = 2; //任务预报信息
}
//星下点
message Xxd{
string dt=1;
double lon=2;
double lat=3;
double height=4;
string dt=1; //时间
double lon=2; //经度
double lat=3; //纬度
double height=4; //高度
}
//单圈次任务预报
message Task{
string start=1;
string end=2;
double startAzi=3;
double endAzi=4;
double startEle=5;
double maxEle=6;
double minDist=7;
double maxDist=8;
repeated Obs obss = 9;
string start=1; //开始时间
string end=2; //结束时间
double startAzi=3; //开始方位角
double endAzi=4; //结束方位角
double startEle=5; //开始俯仰角
double maxEle=6; //最大俯仰角
double minDist=7; //最短距离
double maxDist=8; //最大距离
repeated Obs obss = 9; //方位角俯仰角信息
}
//dat文件俯仰角方位角
message Obs{
string dt=1;
double azi=2;
double ele=3;
double range=4;
string dt=1; //时间
double azi=2; //方位角
double ele=3; //俯仰角
double range=4; //距离
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment