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

Function runtime_activation_response_encode

src/daemon/runtime.c:585–597  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585static bool runtime_activation_response_encode(
586 uint8_t out[CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE],
587 const cbm_daemon_runtime_activation_result_t *result) {
588 if (!out || !result) {
589 return false;
590 }
591 memset(out, 0, CBM_DAEMON_ACTIVATION_SHUTDOWN_RESPONSE_SIZE);
592 runtime_put_u32(out + ACTIVATION_RESPONSE_ABI_OFFSET, CBM_DAEMON_RENDEZVOUS_ABI);
593 runtime_put_u32(out + ACTIVATION_RESPONSE_ACCEPTED_OFFSET, result->accepted ? 1U : 0U);
594 runtime_put_u64(out + ACTIVATION_RESPONSE_CLIENTS_OFFSET, result->active_clients);
595 runtime_put_u64(out + ACTIVATION_RESPONSE_CONNECTIONS_OFFSET, result->active_connections);
596 return true;
597}
598
599static bool runtime_activation_response_decode(
600 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