2 * HAL (Hardware Abstract Layer) UWB API
4 * Copyright (c) 2021 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the License);
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 #ifndef __HAL_UWB_INTERFACE__
20 #define __HAL_UWB_INTERFACE__
22 #include <hal/hal-common-interface.h>
46 GSList *remote_node_list;
47 int remote_node_count;
51 void (*message_received_cb) (uint16_t node_id, unsigned char *message, int message_length);
52 void (*position_changed_cb) (uint16_t node_id, int x, int y, int z);
53 } uwb_hal_event_cbs_s;
55 typedef struct _hal_backend_uwb_funcs {
56 int (*start)(uwb_hal_event_cbs_s *event_cbs);
60 int (*factory_reset) (void);
61 int (*enable_network) (void);
62 int (*disable_network) (void);
63 int (*get_network_info) (uwb_hal_network_s **network_info);
64 int (*set_configurations) (uint16_t node_id, const GVariant *configurations);
65 int (*get_configurations) (uint16_t node_id, GVariant **configurations);
66 int (*set_position) (uint64_t node_id, int x, int y, int z);
67 int (*get_own_node) (uwb_hal_node_s **own_node);
68 int (*send_message) (const unsigned char *message, int message_length);
69 int (*send_message_to) (uint16_t node_id, const unsigned char *message, int message_length);
70 } hal_backend_uwb_funcs;
75 #endif /* __HAL_UWB_INTERFACE__ */