MCPcopy Create free account
hub / github.com/BabitMF/bmf / PyPacketQueue

Class PyPacketQueue

bmf/python/py_module_sdk.cpp:193–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193struct PyPacketQueue {
194 PyPacketQueue(const std::shared_ptr<std::queue<bmf_sdk::Packet>> &queue)
195 : q_(queue) {}
196
197 bool empty() const { return q_->empty(); }
198
199 int put(const bmf_sdk::Packet &pkt) {
200 q_->push(pkt);
201 return 0;
202 }
203
204 bmf_sdk::Packet get() {
205 auto pkt = q_->front();
206 q_->pop();
207 return pkt;
208 }
209
210 bmf_sdk::Packet &front() { return q_->front(); }
211
212 std::shared_ptr<std::queue<bmf_sdk::Packet>> q_;
213};
214
215} // namespace
216

Callers 1

module_sdk_bindFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected