MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / runtime_activation_response_encode

Function runtime_activation_response_encode

src/daemon/runtime.c:470–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

468}
469
470static bool runtime_activation_response_encode(
471 uint8_t out[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],
472 const cbm_daemon_runtime_activation_result_t *result) {
473 if (!out || !result) {
474 return false;
475 }
476 memset(out, 0, CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE);
477 runtime_put_u32(out + ACTIVATION_RESPONSE_ABI_OFFSET, CBM_DAEMON_RENDEZVOUS_ABI);
478 runtime_put_u32(out + ACTIVATION_RESPONSE_ACCEPTED_OFFSET, result->accepted ? 1U : 0U);
479 runtime_put_u64(out + ACTIVATION_RESPONSE_CLIENTS_OFFSET, result->active_clients);
480 runtime_put_u64(out + ACTIVATION_RESPONSE_CONNECTIONS_OFFSET, result->active_connections);
481 return true;
482}
483
484static bool runtime_activation_response_decode(
485 const uint8_t payload[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],

Calls 2

runtime_put_u32Function · 0.85
runtime_put_u64Function · 0.85

Tested by

no test coverage detected