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

Function runtime_activation_response_encode

src/daemon/runtime.c:478–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478static bool runtime_activation_response_encode(
479 uint8_t out[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],
480 const cbm_daemon_runtime_activation_result_t *result) {
481 if (!out || !result) {
482 return false;
483 }
484 memset(out, 0, CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE);
485 runtime_put_u32(out + ACTIVATION_RESPONSE_ABI_OFFSET, CBM_DAEMON_RENDEZVOUS_ABI);
486 runtime_put_u32(out + ACTIVATION_RESPONSE_ACCEPTED_OFFSET, result->accepted ? 1U : 0U);
487 runtime_put_u64(out + ACTIVATION_RESPONSE_CLIENTS_OFFSET, result->active_clients);
488 runtime_put_u64(out + ACTIVATION_RESPONSE_CONNECTIONS_OFFSET, result->active_connections);
489 return true;
490}
491
492static bool runtime_activation_response_decode(
493 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