MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / send_export_buffer_request

Method send_export_buffer_request

src/host/ipc/ipc_client.cpp:247–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void IpcClient::send_export_buffer_request(const std::string& variable_name,
248 int format,
249 const std::vector<float>& contrast) {
250 oid::MessageComposer composer;
251 composer.push(oid::MessageType::ExportBufferRequest)
252 .push(variable_name)
253 .push(format);
254 // Fixed 8-float contrast layout on the wire (mirrors the Qt sender,
255 // MessageHandler::request_export_buffer): pad missing entries with
256 // 0.0f, ignore any beyond the 8th.
257 for (int i = 0; i < 8; ++i) {
258 const float value =
259 static_cast<std::size_t>(i) < contrast.size() ? contrast[i] : 0.0F;
260 composer.push(value);
261 }
262 composer.send(transport_);
263}
264
265void IpcClient::set_session_state_callback(
266 std::function<void(const std::string& json)> cb) {

Callers 1

TESTFunction · 0.80

Calls 2

sizeMethod · 0.45
sendMethod · 0.45

Tested by 1

TESTFunction · 0.64