parent
43a02c1b7c
commit
08d1477f61
|
@ -117,7 +117,7 @@ void TinyServer::OnReceive(TinyMessage& msg, TinyController& ctrl)
|
|||
{
|
||||
if (!OnJoin(msg)) return;
|
||||
dv = Current;
|
||||
pDevMgmt->DeviceRequest(DeviceAtions::Online, dv);
|
||||
// pDevMgmt->DeviceRequest(DeviceAtions::Online, dv); 成功收到登录消息不等于上线
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -132,6 +132,7 @@ void TinyServer::OnReceive(TinyMessage& msg, TinyController& ctrl)
|
|||
// 设置当前设备
|
||||
Current = dv;
|
||||
OnPing(msg);
|
||||
pDevMgmt->DeviceRequest(DeviceAtions::Online, dv); // 成功收到Ping才等于上线
|
||||
break;
|
||||
case 5:
|
||||
case 0x15:
|
||||
|
|
|
@ -491,7 +491,11 @@ bool DevicesManagement::SendDevices(DeviceAtions act, const Device* dv)
|
|||
BinaryPair bp(datams);
|
||||
GetDevInfo((Device*)dv, datams);
|
||||
|
||||
if (Port)Port->Invoke(actstr, Buffer(datams.GetBuffer(), datams.Position()));
|
||||
MemoryStream ms;
|
||||
BinaryPair bp2(ms);
|
||||
bp2.Set("dv", Buffer(datams.GetBuffer(), datams.Position()));
|
||||
|
||||
if (Port)Port->Invoke(actstr, Buffer(ms.GetBuffer(), ms.Position()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue