diff --git a/Service/Cloud/Client/CloudClient.cs b/Service/Cloud/Client/CloudClient.cs index 927cd08..d9aa9e1 100644 --- a/Service/Cloud/Client/CloudClient.cs +++ b/Service/Cloud/Client/CloudClient.cs @@ -137,8 +137,11 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR private static ushort _incrementId; - private static ushort GetIncrementId() + private static int GetIncrementId() { + string s = DateTime.Now.ToString("yyMMddHHmmss"); + + if (_incrementId < 65535) { _incrementId += 1; @@ -148,9 +151,9 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR _incrementId = 1; } - return _incrementId; + + return Int32.Parse(s+_incrementId); } - public void InitHandler() { var list = new List();