summaryrefslogtreecommitdiff
path: root/include/UwbHal.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/UwbHal.h')
-rwxr-xr-xinclude/UwbHal.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/include/UwbHal.h b/include/UwbHal.h
new file mode 100755
index 0000000..e0256e4
--- /dev/null
+++ b/include/UwbHal.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __UWB_HAL_H__
+#define __UWB_HAL_H__
+
+#include <glib.h>
+
+#include <hal-uwb.h>
+#include <uwb-def.h>
+
+namespace UwbManagerNamespace {
+
+class UwbHal {
+public:
+ int init(void);
+ int deinit(void);
+
+ int start(void);
+ int stop(void);
+ int test(void);
+ int reset(void);
+ int factoryReset(void);
+
+ int setConfigurations(uint16_t node_id, const GVariant *configurations);
+ int getConfigurations(uint16_t node_id, GVariant **configurations);
+
+ int enableNetwork(void);
+ int disableNetwork(void);
+ int getOwnNode(uwb_node_s **own_node);
+ int getNetworkInfo(uwb_network_s **network_info);
+ int setPosition(uint64_t node_id, int x, int y, int z);
+
+ int sendMessage(const unsigned char *message, int message_length);
+ int sendMessageTo(uint16_t node_id, const unsigned char *message, int message_length);
+
+ static void messageReceivedCb(uint16_t node_id, unsigned char *message, int message_length);
+ static void positionChangedCb(uint16_t node_id, int x, int y, int z);
+private:
+ uwb_event_cbs_s event_cbs;
+};
+
+}
+
+#endif /* __UWB_HAL_H__ */