Home
last modified time | relevance | path

Searched refs:pkt (Results 1 – 25 of 29) sorted by relevance

12

/base/sensors/sensor/utils/ipc/src/
Dstream_socket.cpp64 NetPacket pkt(head->idMsg); in OnReadPackets() local
65 if ((head->size > 0) && (!pkt.Write(&buf[headSize], head->size))) { in OnReadPackets()
70 if (!circBuf.SeekReadPos(pkt.GetPacketLength())) { in OnReadPackets()
72 … " packetSize:%{public}zu, unreadSize:%{public}zu", pkt.GetPacketLength(), unreadSize); in OnReadPackets()
76 callbackFun(pkt); in OnReadPackets()
Dnet_packet.cpp25 NetPacket::NetPacket(const NetPacket &pkt) : NetPacket(pkt.GetMsgId()) in NetPacket() argument
27 Clone(pkt); in NetPacket()
Dstream_session.cpp143 bool StreamSession::SendMsg(const NetPacket &pkt) const in SendMsg()
146 if (StreamBufferChkRWError(pkt.streamBufferPtr_.get())) { in SendMsg()
151 pkt.MakeData(buf); in SendMsg()
154 if (pkt.ChkRWError()) { in SendMsg()
159 pkt.MakeData(buf); in SendMsg()
/base/msdp/device_status/utils/ipc/src/
Dnet_packet.cpp22 NetPacket::NetPacket(const NetPacket &pkt) : NetPacket(pkt.GetMsgId()) in NetPacket() argument
24 Clone(pkt); in NetPacket()
Dstream_socket.cpp102 NetPacket pkt(head->idMsg); in OnReadPackets() local
103 if ((head->size > 0) && (!pkt.Write(&buf[headSize], head->size))) { in OnReadPackets()
108 if (!circBuf.SeekReadPos(pkt.GetPacketLength())) { in OnReadPackets()
110 "packetSize:%{public}d, unreadSize:%{public}d", pkt.GetPacketLength(), unreadSize); in OnReadPackets()
114 callbackFun(pkt); in OnReadPackets()
Dstream_client.cpp88 bool StreamClient::SendMsg(const NetPacket &pkt) const in SendMsg()
90 if (pkt.ChkRWError()) { in SendMsg()
95 pkt.MakeData(buf); in SendMsg()
Dstream_session.cpp109 bool StreamSession::SendMsg(NetPacket &pkt) const in SendMsg()
111 if (pkt.ChkRWError()) { in SendMsg()
116 pkt.MakeData(buf); in SendMsg()
/base/msdp/device_status/services/interaction/drag/src/
Dstate_change_notify.cpp77 NetPacket pkt(msgId); in OnStateChangedNotify() local
78 pkt << static_cast<int32_t>(state); in OnStateChangedNotify()
79 if (pkt.ChkRWError()) { in OnStateChangedNotify()
83 if (!session->SendMsg(pkt)) { in OnStateChangedNotify()
/base/msdp/device_status/services/interaction/coordination/src/
Dcoordination_event_manager.cpp144 NetPacket pkt(msgId); in NotifyCoordinationMessage() local
145 pkt << userData << deviceId << static_cast<int32_t>(msg); in NotifyCoordinationMessage()
146 if (pkt.ChkRWError()) { in NotifyCoordinationMessage()
150 if (!sess->SendMsg(pkt)) { in NotifyCoordinationMessage()
160 NetPacket pkt(msgId); in NotifyCoordinationState() local
161 pkt << userData << state; in NotifyCoordinationState()
162 if (pkt.ChkRWError()) { in NotifyCoordinationState()
166 if (!sess->SendMsg(pkt)) { in NotifyCoordinationState()
/base/msdp/device_status/frameworks/native/interaction/src/
Dcoordination_manager_impl.cpp240 int32_t CoordinationManagerImpl::OnCoordinationListener(const StreamClient& client, NetPacket& pkt) in OnCoordinationListener() argument
246 pkt >> userData >> deviceId >> nType; in OnCoordinationListener()
247 if (pkt.ChkRWError()) { in OnCoordinationListener()
255 int32_t CoordinationManagerImpl::OnCoordinationMessage(const StreamClient& client, NetPacket& pkt) in OnCoordinationMessage() argument
261 pkt >> userData >> deviceId >> nType; in OnCoordinationMessage()
262 if (pkt.ChkRWError()) { in OnCoordinationMessage()
270 int32_t CoordinationManagerImpl::OnCoordinationState(const StreamClient& client, NetPacket& pkt) in OnCoordinationState() argument
276 pkt >> userData >> state; in OnCoordinationState()
277 if (pkt.ChkRWError()) { in OnCoordinationState()
Ddrag_manager_impl.cpp83 int32_t DragManagerImpl::OnNotifyResult(const StreamClient& client, NetPacket& pkt) in OnNotifyResult() argument
88 pkt >> notifyMsg.displayX >> notifyMsg.displayY >> result >> notifyMsg.targetPid; in OnNotifyResult()
89 if (pkt.ChkRWError()) { in OnNotifyResult()
105 int32_t DragManagerImpl::OnStateChangedMessage(const StreamClient& client, NetPacket& pkt) in OnStateChangedMessage() argument
109 pkt >> state; in OnStateChangedMessage()
110 if (pkt.ChkRWError()) { in OnStateChangedMessage()
/base/msdp/device_status/interfaces/innerkits/include/
Dclient.h39 bool SendMessage(const NetPacket& pkt) const override;
59 void OnPacket(NetPacket& pkt);
63 void OnMsgHandler(const StreamClient& client, NetPacket& pkt);
/base/msdp/device_status/frameworks/native/src/
Dclient.cpp65 bool Client::SendMessage(const NetPacket &pkt) const in SendMessage()
67 return SendMsg(pkt); in SendMessage()
167 void Client::OnPacket(NetPacket& pkt) in OnPacket() argument
169 recvFun_(*this, pkt); in OnPacket()
287 void Client::OnMsgHandler(const StreamClient& client, NetPacket& pkt) in OnMsgHandler() argument
290 auto id = pkt.GetMsgId(); in OnMsgHandler()
297 int32_t ret = (*callback)(client, pkt); in OnMsgHandler()
/base/sensors/sensor/utils/ipc/include/
Dnet_packet.h35 NetPacket(const NetPacket &pkt);
36 NetPacket &operator = (const NetPacket &pkt);
/base/msdp/device_status/utils/ipc/include/
Dnet_packet.h34 NetPacket(const NetPacket &pkt);
35 NetPacket &operator = (const NetPacket &pkt);
Dstream_client.h41 bool SendMsg(const NetPacket &pkt) const;
Dstream_session.h42 bool SendMsg(NetPacket &pkt) const;
/base/msdp/device_status/frameworks/native/interaction/include/
Dcoordination_manager_impl.h58 int32_t OnCoordinationListener(const StreamClient& client, NetPacket& pkt);
59 int32_t OnCoordinationMessage(const StreamClient& client, NetPacket& pkt);
60 int32_t OnCoordinationState(const StreamClient& client, NetPacket& pkt);
Ddrag_manager_impl.h44 int32_t OnNotifyResult(const StreamClient& client, NetPacket& pkt);
45 int32_t OnStateChangedMessage(const StreamClient& client, NetPacket& pkt);
/base/msdp/device_status/services/native/include/
Dstream_server.h49 bool SendMsg(int32_t fd, NetPacket& pkt);
50 void Multicast(const std::vector<int32_t>& fdList, NetPacket& pkt);
67 void OnPacket(int32_t fd, NetPacket& pkt);
/base/sensors/sensor/rust/utils/socket_ipc_rust_ffi/src/
Dstream_buffer.rs29 pkt: *const CNetPacket,
308 let mut pkt: NetPacket = NetPacket { in read_client_packets() localVariable
314 !pkt.stream_buffer.write_char_usize(buf.add(HEAD_SIZE) as *const c_char, size) { in read_client_packets()
320 if !self.seek_read_pos(pkt.get_packet_length()) { in read_client_packets()
322 … will be reset. packetSize:{} unreadSize:{}", pkt.get_packet_length(), unread_size); in read_client_packets()
327 msg_id: pkt.msg_id, in read_client_packets()
328 stream_buffer_ptr: Box::into_raw(Box::new(pkt.stream_buffer)) in read_client_packets()
/base/msdp/device_status/services/native/src/
Dstream_server.cpp72 bool StreamServer::SendMsg(int32_t fd, NetPacket& pkt) in SendMsg() argument
84 return ses->SendMsg(pkt); in SendMsg()
87 void StreamServer::Multicast(const std::vector<int32_t>& fdList, NetPacket& pkt) in Multicast() argument
90 SendMsg(item, pkt); in Multicast()
191 void StreamServer::OnPacket(int32_t fd, NetPacket& pkt) in OnPacket() argument
195 recvFun_(sess, pkt); in OnPacket()
Ddevicestatus_service.cpp796 NetPacket pkt(MessageId::COORDINATION_MESSAGE); in OnPrepareCoordination() local
797 pkt << userData << deviceId << static_cast<int32_t>(msg); in OnPrepareCoordination()
798 if (pkt.ChkRWError()) { in OnPrepareCoordination()
804 if (!sess->SendMsg(pkt)) { in OnPrepareCoordination()
820 NetPacket pkt(MessageId::COORDINATION_MESSAGE); in OnUnprepareCoordination() local
821 pkt << userData << deviceId << static_cast<int32_t>(msg); in OnUnprepareCoordination()
822 if (pkt.ChkRWError()) { in OnUnprepareCoordination()
828 if (!sess->SendMsg(pkt)) { in OnUnprepareCoordination()
851 NetPacket pkt(event->msgId); in OnActivateCoordination() local
852 pkt << userData << "" << static_cast<int32_t>(CoordinationMessage::ACTIVATE_SUCCESS); in OnActivateCoordination()
[all …]
/base/sensors/sensor/services/sensor/src/
Dsensor_power_policy.cpp237 NetPacket pkt(MessageId::ACTIVE_INFO); in ReportActiveInfo() local
238 pkt << activeInfo.GetPid() << activeInfo.GetSensorId() << in ReportActiveInfo()
241 if (StreamBufferChkRWError(pkt.streamBufferPtr_.get())) { in ReportActiveInfo()
243 if (pkt.ChkRWError()) { in ReportActiveInfo()
249 if (!sess->SendMsg(pkt)) { in ReportActiveInfo()
/base/sensors/sensor/frameworks/native/sensor/src/
Dsensor_service_client.cpp46 NetPacket pkt(cPkt->msgId); in OnPacket() local
47 pkt.streamBufferPtr_.reset(cPkt->streamBuffer); in OnPacket()
48 object->HandleNetPacke(pkt); in OnPacket()
395 void SensorServiceClient::HandleNetPacke(NetPacket &pkt) in HandleNetPacke() argument
397 auto id = pkt.GetMsgId(); in HandleNetPacke()
403 pkt >> sensorActiveInfo.pid >> sensorActiveInfo.sensorId >> sensorActiveInfo.samplingPeriodNs >> in HandleNetPacke()
406 if (StreamBufferChkRWError(pkt.streamBufferPtr_.get())) { in HandleNetPacke()
408 if (pkt.ChkRWError()) { in HandleNetPacke()

12