2 * SPDX-License-Identifier: MIT
4 * Copyright 2024 EfficiOS, Inc.
7 #ifndef CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H
8 #define CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H
12 #include <babeltrace2/babeltrace.h>
14 #include "common/macros.h"
20 struct bt_clock_class
;
23 enum bt_clock_correlation_validator_error_type
25 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_NO_CLOCK_CLASS_GOT_ONE
,
26 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UNIX_GOT_NONE
,
27 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UNIX_GOT_OTHER
,
28 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_NONE
,
29 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_UNIX
,
30 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_NO_UUID
,
31 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_UUID_GOT_OTHER_UUID
,
32 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_NO_UUID_GOT_NONE
,
33 BT_CLOCK_CORRELATION_VALIDATOR_ERROR_TYPE_EXPECTING_ORIGIN_NO_UUID_GOT_OTHER
,
36 struct bt_clock_correlation_validator
*bt_clock_correlation_validator_create(
39 bool bt_clock_correlation_validator_validate_message(
40 struct bt_clock_correlation_validator
*validator
,
41 const struct bt_message
*msg
,
42 enum bt_clock_correlation_validator_error_type
*type
,
43 bt_uuid
*expected_uuid
,
44 const struct bt_clock_class
** const actual_clock_cls
,
45 const struct bt_clock_class
** const expected_clock_cls
) BT_NOEXCEPT
;
47 void bt_clock_correlation_validator_destroy(
48 struct bt_clock_correlation_validator
*validator
) BT_NOEXCEPT
;
54 #endif /* CLOCK_CORRELATION_VALIDATOR_CLOCK_CORRELATION_VALIDATOR_H */