BT_ASSERT(stack);
BT_ASSERT(base_class);
bfcr = stack->bfcr;
- BT_COMP_LOGV("Pushing field class on stack: stack-addr=%p, "
+ BT_COMP_LOGT("Pushing field class on stack: stack-addr=%p, "
"fc-addr=%p, fc-type=%d, base-length=%zu, "
"stack-size-before=%zu, stack-size-after=%zu",
stack, base_class, base_class->type,
BT_ASSERT(stack);
BT_ASSERT(stack_size(stack));
bfcr = stack->bfcr;
- BT_COMP_LOGV("Popping from stack: "
+ BT_COMP_LOGT("Popping from stack: "
"stack-addr=%p, stack-size-before=%u, stack-size-after=%u",
stack, stack->entries->len, stack->entries->len - 1);
stack->size--;
static inline
void consume_bits(struct bt_bfcr *bfcr, size_t incr)
{
- BT_COMP_LOGV("Advancing cursor: bfcr-addr=%p, cur-before=%zu, cur-after=%zu",
+ BT_COMP_LOGT("Advancing cursor: bfcr-addr=%p, cur-before=%zu, cur-after=%zu",
bfcr, bfcr->buf.at, bfcr->buf.at + incr);
bfcr->buf.at += incr;
}
abort();
}
- BT_COMP_LOGV("Read unsigned bit array: cur=%zu, size=%u, "
+ BT_COMP_LOGT("Read unsigned bit array: cur=%zu, size=%u, "
"bo=%d, val=%" PRIu64, at, field_size, bo, *v);
}
abort();
}
- BT_COMP_LOGV("Read signed bit array: cur=%zu, size=%u, "
+ BT_COMP_LOGT("Read signed bit array: cur=%zu, size=%u, "
"bo=%d, val=%" PRId64, at, field_size, bo, *v);
}
abort();
}
- BT_COMP_LOGV("Read floating point number value: bfcr=%p, cur=%zu, val=%f",
+ BT_COMP_LOGT("Read floating point number value: bfcr=%p, cur=%zu, val=%f",
bfcr, at, dblval);
if (bfcr->user.cbs.classes.floating_point) {
- BT_COMP_LOGV("Calling user function (floating point number).");
+ BT_COMP_LOGT("Calling user function (floating point number).");
status = bfcr->user.cbs.classes.floating_point(dblval,
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
read_signed_bitfield(bfcr, buf, at, field_size, bo, &v);
if (bfcr->user.cbs.classes.signed_int) {
- BT_COMP_LOGV("Calling user function (signed integer).");
+ BT_COMP_LOGT("Calling user function (signed integer).");
status = bfcr->user.cbs.classes.signed_int(v,
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
read_unsigned_bitfield(bfcr, buf, at, field_size, bo, &v);
if (bfcr->user.cbs.classes.unsigned_int) {
- BT_COMP_LOGV("Calling user function (unsigned integer).");
+ BT_COMP_LOGT("Calling user function (unsigned integer).");
status = bfcr->user.cbs.classes.unsigned_int(v,
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
(void *) bfcr->cur_basic_field_class;
if (!at_least_one_bit_left(bfcr)) {
- BT_COMP_LOGV("Reached end of data: bfcr-addr=%p", bfcr);
+ BT_COMP_LOGT("Reached end of data: bfcr-addr=%p", bfcr);
status = BT_BFCR_STATUS_EOF;
goto end;
}
available = available_bits(bfcr);
needed_bits = fc->size - bfcr->stitch.at;
- BT_COMP_LOGV("Continuing basic field decoding: "
+ BT_COMP_LOGT("Continuing basic field decoding: "
"bfcr-addr=%p, field-size=%u, needed-size=%zu, "
"available-size=%zu",
bfcr, fc->size, needed_bits, available);
}
/* We are here; it means we don't have enough data to decode this */
- BT_COMP_LOGV_STR("Not enough data to read the next basic field: appending to stitch buffer.");
+ BT_COMP_LOGT_STR("Not enough data to read the next basic field: appending to stitch buffer.");
stitch_append_from_remaining_buf(bfcr);
status = BT_BFCR_STATUS_EOF;
(void *) bfcr->cur_basic_field_class;
if (!at_least_one_bit_left(bfcr)) {
- BT_COMP_LOGV("Reached end of data: bfcr-addr=%p", bfcr);
+ BT_COMP_LOGT("Reached end of data: bfcr-addr=%p", bfcr);
status = BT_BFCR_STATUS_EOF;
goto end;
}
}
/* We are here; it means we don't have enough data to decode this */
- BT_COMP_LOGV_STR("Not enough data to read the next basic field: setting stitch buffer.");
+ BT_COMP_LOGT_STR("Not enough data to read the next basic field: setting stitch buffer.");
stitch_set_from_remaining_buf(bfcr);
bfcr->state = BFCR_STATE_READ_BASIC_CONTINUE;
status = BT_BFCR_STATUS_EOF;
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
if (!at_least_one_bit_left(bfcr)) {
- BT_COMP_LOGV("Reached end of data: bfcr-addr=%p", bfcr);
+ BT_COMP_LOGT("Reached end of data: bfcr-addr=%p", bfcr);
status = BT_BFCR_STATUS_EOF;
goto end;
}
result = memchr(first_chr, '\0', available_bytes);
if (begin && bfcr->user.cbs.classes.string_begin) {
- BT_COMP_LOGV("Calling user function (string, beginning).");
+ BT_COMP_LOGT("Calling user function (string, beginning).");
status = bfcr->user.cbs.classes.string_begin(
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
if (!result) {
/* No null character yet */
if (bfcr->user.cbs.classes.string) {
- BT_COMP_LOGV("Calling user function (substring).");
+ BT_COMP_LOGT("Calling user function (substring).");
status = bfcr->user.cbs.classes.string(
(const char *) first_chr,
available_bytes, bfcr->cur_basic_field_class,
bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
size_t result_len = (size_t) (result - first_chr);
if (bfcr->user.cbs.classes.string && result_len) {
- BT_COMP_LOGV("Calling user function (substring).");
+ BT_COMP_LOGT("Calling user function (substring).");
status = bfcr->user.cbs.classes.string(
(const char *) first_chr,
result_len, bfcr->cur_basic_field_class,
bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
}
if (bfcr->user.cbs.classes.string_end) {
- BT_COMP_LOGV("Calling user function (string, end).");
+ BT_COMP_LOGT("Calling user function (string, end).");
status = bfcr->user.cbs.classes.string_end(
bfcr->cur_basic_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: "
goto end;
} else {
/* No: need more data */
- BT_COMP_LOGV("Reached end of data when aligning: bfcr-addr=%p", bfcr);
+ BT_COMP_LOGT("Reached end of data when aligning: bfcr-addr=%p", bfcr);
status = BT_BFCR_STATUS_EOF;
}
/* Are we done with this base class? */
while (top->index == top->base_len) {
if (bfcr->user.cbs.classes.compound_end) {
- BT_COMP_LOGV("Calling user function (compound, end).");
+ BT_COMP_LOGT("Calling user function (compound, end).");
status = bfcr->user.cbs.classes.compound_end(
top->base_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
if (next_field_class->is_compound) {
if (bfcr->user.cbs.classes.compound_begin) {
- BT_COMP_LOGV("Calling user function (compound, begin).");
+ BT_COMP_LOGT("Calling user function (compound, begin).");
status = bfcr->user.cbs.classes.compound_begin(
next_field_class, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(status));
if (status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
bfcr->state = BFCR_STATE_ALIGN_COMPOUND;
} else {
/* Replace current basic field class */
- BT_COMP_LOGV("Replacing current basic field class: "
+ BT_COMP_LOGT("Replacing current basic field class: "
"bfcr-addr=%p, cur-basic-fc-addr=%p, "
"next-basic-fc-addr=%p",
bfcr, bfcr->cur_basic_field_class, next_field_class);
{
enum bt_bfcr_status status = BT_BFCR_STATUS_OK;
- BT_COMP_LOGV("Handling state: bfcr-addr=%p, state=%s",
+ BT_COMP_LOGT("Handling state: bfcr-addr=%p, state=%s",
bfcr, bfcr_state_string(bfcr->state));
switch (bfcr->state) {
break;
}
- BT_COMP_LOGV("Handled state: bfcr-addr=%p, status=%s",
+ BT_COMP_LOGT("Handled state: bfcr-addr=%p, status=%s",
bfcr, bt_bfcr_status_string(status));
return status;
}
static
void update_packet_offset(struct bt_bfcr *bfcr)
{
- BT_COMP_LOGV("Updating packet offset for next call: "
+ BT_COMP_LOGT("Updating packet offset for next call: "
"bfcr-addr=%p, cur-packet-offset=%zu, next-packet-offset=%zu",
bfcr, bfcr->buf.packet_offset,
bfcr->buf.packet_offset + bfcr->buf.at);
bfcr->buf.sz = BYTES_TO_BITS(sz) - offset;
*status = BT_BFCR_STATUS_OK;
- BT_COMP_LOGV("Starting decoding: bfcr-addr=%p, fc-addr=%p, "
+ BT_COMP_LOGT("Starting decoding: bfcr-addr=%p, fc-addr=%p, "
"buf-addr=%p, buf-size=%zu, offset=%zu, "
"packet-offset=%zu",
bfcr, cls, buf, sz, offset, packet_offset);
int stack_ret;
if (bfcr->user.cbs.classes.compound_begin) {
- BT_COMP_LOGV("Calling user function (compound, begin).");
+ BT_COMP_LOGT("Calling user function (compound, begin).");
*status = bfcr->user.cbs.classes.compound_begin(
cls, bfcr->user.data);
- BT_COMP_LOGV("User function returned: status=%s",
+ BT_COMP_LOGT("User function returned: status=%s",
bt_bfcr_status_string(*status));
if (*status != BT_BFCR_STATUS_OK) {
BT_COMP_LOGW("User function failed: bfcr-addr=%p, status=%s",
}
/* Run the machine! */
- BT_COMP_LOGV_STR("Running the state machine.");
+ BT_COMP_LOGT_STR("Running the state machine.");
while (true) {
*status = handle_state(bfcr);
bfcr->buf.sz = BYTES_TO_BITS(sz);
*status = BT_BFCR_STATUS_OK;
- BT_COMP_LOGV("Continuing decoding: bfcr-addr=%p, buf-addr=%p, buf-size=%zu",
+ BT_COMP_LOGT("Continuing decoding: bfcr-addr=%p, buf-addr=%p, buf-size=%zu",
bfcr, buf, sz);
/* Continue running the machine */
- BT_COMP_LOGV_STR("Running the state machine.");
+ BT_COMP_LOGT_STR("Running the state machine.");
while (true) {
*status = handle_state(bfcr);