#ifndef LAMP_GUARD_WIRE_ADAPTER_H
#define LAMP_GUARD_WIRE_ADAPTER_H

#include "lamp_guard.h"
#include "ai_wire.h"
#include <stddef.h>
#include <stdint.h>

/* A malformed AI result is passed to the guard as an invalid frame, clearing
   output and consuming the pending ticket when AI mode is active. */
bool lg_accept_ai_packet(lg_guard *guard, const uint8_t *packet, size_t length,
                         uint32_t now_ms);

/* Use only after ai_wire or aiw_stream has validated the packet structure/CRC. */
bool lg_accept_ai_decoded_result(lg_guard *guard, const aiw_result *result,
                                 uint32_t now_ms);

#endif
