📄 class_bluetooth_a_p_i.tex
字号:
\hypertarget{class_bluetooth_a_p_i}{\section{BluetoothAPI Class Reference}\label{class_bluetooth_a_p_i}\index{BluetoothAPI@{BluetoothAPI}}}{\tt \#include $<$Bluetooth.h$>$}\subsection*{Public Member Functions}\begin{CompactItemize}\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_e8be6bd79353cecc73c3943a7a053201}{searchDevices} ()\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_494939d78c93765da200c1865f38b91f}{searchServices} (unsigned long int BTServiceUUID)\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_eb8e826485b6d7fd151e89405818632c}{searchServices} (unsigned long int BTServiceUUID1, unsigned long int BTServiceUUID2, unsigned long int BTServiceUUID3, unsigned long int BTServiceUUID4)\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_ed0f4861483fabb420e2796ff6e76d79}{connectToServer} (\hyperlink{struct_b_t_device_data}{BTDeviceData} deviceData)\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_598a44b3418155da4402762170f3fdea}{startAdvertising} (unsigned long int BTServiceUUID, char $\ast$BTServiceName)\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_4398239a617ce8c3c706004ffc85b32f}{startAdvertising} (unsigned long int BTServiceUUID1, unsigned long int BTServiceUUID2, unsigned long int BTServiceUUID3, unsigned long int BTServiceUUID4, char $\ast$BTServiceName)\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_c2759fc1bafe2ea8b1c8c7225367f4e4}{stopServerAndAdvertising} ()\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_5c343136c92a5897863fbef64fa748cb}{disconnectAsClient} ()\item IMPORT\_\-C vector$<$ \hyperlink{struct_b_t_device_data}{BTDeviceData} $>$ \& \hyperlink{class_bluetooth_a_p_i_05d80e21bbb49dc5a1ddf0fd93068d4f}{foundDevicesList} ()\item IMPORT\_\-C vector$<$ \hyperlink{struct_b_t_device_data}{BTDeviceData} $>$ \& \hyperlink{class_bluetooth_a_p_i_7423812de6c9cbe704addca34105c228}{foundServicesList} ()\item virtual IMPORT\_\-C \hyperlink{class_bluetooth_a_p_i_3354634e65bd5f75c8e442b9f46bfabb}{$\sim$BluetoothAPI} ()\item IMPORT\_\-C void \hyperlink{class_bluetooth_a_p_i_1969ab54d399d1a4f6a29c0048bd24b3}{sendMessage} (char $\ast$message)\end{CompactItemize}\subsection*{Static Public Member Functions}\begin{CompactItemize}\item static IMPORT\_\-C \hyperlink{class_bluetooth_a_p_i}{BluetoothAPI} $\ast$ \hyperlink{class_bluetooth_a_p_i_fb83ddc15fd3722e1160a55387926c05}{create} (\hyperlink{class_bluetooth_a_p_i_listener}{BluetoothAPIListener} $\ast$listener)\end{CompactItemize}\subsection{Detailed Description}\hyperlink{class_bluetooth_a_p_i}{BluetoothAPI} class. Provides an easy use of the bluetooth available resources \subsection{Constructor \& Destructor Documentation}\hypertarget{class_bluetooth_a_p_i_3354634e65bd5f75c8e442b9f46bfabb}{\index{BluetoothAPI@{BluetoothAPI}!$\sim$BluetoothAPI@{$\sim$BluetoothAPI}}\index{$\sim$BluetoothAPI@{$\sim$BluetoothAPI}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{$\sim$BluetoothAPI}]{\setlength{\rightskip}{0pt plus 5cm}virtual IMPORT\_\-C BluetoothAPI::$\sim$BluetoothAPI ()\hspace{0.3cm}{\tt \mbox{[}virtual\mbox{]}}}}\label{class_bluetooth_a_p_i_3354634e65bd5f75c8e442b9f46bfabb}Class destructor \subsection{Member Function Documentation}\hypertarget{class_bluetooth_a_p_i_ed0f4861483fabb420e2796ff6e76d79}{\index{BluetoothAPI@{BluetoothAPI}!connectToServer@{connectToServer}}\index{connectToServer@{connectToServer}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{connectToServer}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::connectToServer ({\bf BTDeviceData} {\em deviceData})}}\label{class_bluetooth_a_p_i_ed0f4861483fabb420e2796ff6e76d79}This function connects the device to a server of the device passed as parameter \begin{Desc}\item[Parameters:]\begin{description}\item[{\em deviceData,data}]of the device with user wants to connect \end{description}\end{Desc}\hypertarget{class_bluetooth_a_p_i_fb83ddc15fd3722e1160a55387926c05}{\index{BluetoothAPI@{BluetoothAPI}!create@{create}}\index{create@{create}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{create}]{\setlength{\rightskip}{0pt plus 5cm}static IMPORT\_\-C {\bf BluetoothAPI}$\ast$ BluetoothAPI::create ({\bf BluetoothAPIListener} $\ast$ {\em listener})\hspace{0.3cm}{\tt \mbox{[}static\mbox{]}}}}\label{class_bluetooth_a_p_i_fb83ddc15fd3722e1160a55387926c05}Class constructor \begin{Desc}\item[Parameters:]\begin{description}\item[{\em listener,pointer}]of a user class to be notified when changes occur \end{description}\end{Desc}\begin{Desc}\item[Returns:]a \hyperlink{class_bluetooth_a_p_i}{BluetoothAPI} pointer \end{Desc}\hypertarget{class_bluetooth_a_p_i_5c343136c92a5897863fbef64fa748cb}{\index{BluetoothAPI@{BluetoothAPI}!disconnectAsClient@{disconnectAsClient}}\index{disconnectAsClient@{disconnectAsClient}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{disconnectAsClient}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::disconnectAsClient ()}}\label{class_bluetooth_a_p_i_5c343136c92a5897863fbef64fa748cb}This class closes the connection to the server, if the device in use is the client \hypertarget{class_bluetooth_a_p_i_05d80e21bbb49dc5a1ddf0fd93068d4f}{\index{BluetoothAPI@{BluetoothAPI}!foundDevicesList@{foundDevicesList}}\index{foundDevicesList@{foundDevicesList}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{foundDevicesList}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C vector$<${\bf BTDeviceData}$>$\& BluetoothAPI::foundDevicesList ()}}\label{class_bluetooth_a_p_i_05d80e21bbb49dc5a1ddf0fd93068d4f}This class gives access to the list of founded devices \begin{Desc}\item[Returns:]a vector with data of the founded devices \end{Desc}\hypertarget{class_bluetooth_a_p_i_7423812de6c9cbe704addca34105c228}{\index{BluetoothAPI@{BluetoothAPI}!foundServicesList@{foundServicesList}}\index{foundServicesList@{foundServicesList}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{foundServicesList}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C vector$<${\bf BTDeviceData}$>$\& BluetoothAPI::foundServicesList ()}}\label{class_bluetooth_a_p_i_7423812de6c9cbe704addca34105c228}This class gives access to the list of devices with the searched service \begin{Desc}\item[Returns:]a vector with data of the devices with the searched service \end{Desc}\hypertarget{class_bluetooth_a_p_i_e8be6bd79353cecc73c3943a7a053201}{\index{BluetoothAPI@{BluetoothAPI}!searchDevices@{searchDevices}}\index{searchDevices@{searchDevices}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{searchDevices}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::searchDevices ()}}\label{class_bluetooth_a_p_i_e8be6bd79353cecc73c3943a7a053201}This function starts the search for bluetooth devices in the area \hypertarget{class_bluetooth_a_p_i_eb8e826485b6d7fd151e89405818632c}{\index{BluetoothAPI@{BluetoothAPI}!searchServices@{searchServices}}\index{searchServices@{searchServices}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{searchServices}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::searchServices (unsigned long int {\em BTServiceUUID1}, \/ unsigned long int {\em BTServiceUUID2}, \/ unsigned long int {\em BTServiceUUID3}, \/ unsigned long int {\em BTServiceUUID4})}}\label{class_bluetooth_a_p_i_eb8e826485b6d7fd151e89405818632c}This function starts the search for a specific service on the found devices \begin{Desc}\item[Parameters:]\begin{description}\item[{\em BTServiceUUID1,highest}]part of identifier of the service to be searched \item[{\em BTServiceUUID2,second}]highest part of identifier of the service to be searched \item[{\em BTServiceUUID3,second}]lowest part of identifier of the service to be searched \item[{\em BTServiceUUID4,lowest}]part of identifier of the service to be searched \end{description}\end{Desc}\hypertarget{class_bluetooth_a_p_i_494939d78c93765da200c1865f38b91f}{\index{BluetoothAPI@{BluetoothAPI}!searchServices@{searchServices}}\index{searchServices@{searchServices}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{searchServices}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::searchServices (unsigned long int {\em BTServiceUUID})}}\label{class_bluetooth_a_p_i_494939d78c93765da200c1865f38b91f}This function starts the search for a specific service on the found devices \begin{Desc}\item[Parameters:]\begin{description}\item[{\em BTServiceUUID,short-form}]identifier of the service to be searched \end{description}\end{Desc}\hypertarget{class_bluetooth_a_p_i_1969ab54d399d1a4f6a29c0048bd24b3}{\index{BluetoothAPI@{BluetoothAPI}!sendMessage@{sendMessage}}\index{sendMessage@{sendMessage}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{sendMessage}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::sendMessage (char $\ast$ {\em message})}}\label{class_bluetooth_a_p_i_1969ab54d399d1a4f6a29c0048bd24b3}This function sends a message to the device connected with the device in use, The first message must be sent by the client, then the client and server must alternate in sending messages. \begin{Desc}\item[Parameters:]\begin{description}\item[{\em message,message}]to be sent \end{description}\end{Desc}\hypertarget{class_bluetooth_a_p_i_4398239a617ce8c3c706004ffc85b32f}{\index{BluetoothAPI@{BluetoothAPI}!startAdvertising@{startAdvertising}}\index{startAdvertising@{startAdvertising}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{startAdvertising}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::startAdvertising (unsigned long int {\em BTServiceUUID1}, \/ unsigned long int {\em BTServiceUUID2}, \/ unsigned long int {\em BTServiceUUID3}, \/ unsigned long int {\em BTServiceUUID4}, \/ char $\ast$ {\em BTServiceName})}}\label{class_bluetooth_a_p_i_4398239a617ce8c3c706004ffc85b32f}This function starts the server advetising of a specific service \begin{Desc}\item[Parameters:]\begin{description}\item[{\em BTServiceUUID1,highest}]part of identifier of the service to be advertised \item[{\em BTServiceUUID2,second}]highest part of identifier of the service to be advertised \item[{\em BTServiceUUID3,second}]lowest part of identifier of the service to be advertised \item[{\em BTServiceUUID4,lowest}]part of identifier of the service to be advertised \item[{\em BTServiceName,name}]of de service advertised \end{description}\end{Desc}\hypertarget{class_bluetooth_a_p_i_598a44b3418155da4402762170f3fdea}{\index{BluetoothAPI@{BluetoothAPI}!startAdvertising@{startAdvertising}}\index{startAdvertising@{startAdvertising}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{startAdvertising}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::startAdvertising (unsigned long int {\em BTServiceUUID}, \/ char $\ast$ {\em BTServiceName})}}\label{class_bluetooth_a_p_i_598a44b3418155da4402762170f3fdea}This function starts the server advetising of a specific service \begin{Desc}\item[Parameters:]\begin{description}\item[{\em BTServiceUUID,short-form}]identifier of the service to be advertised \item[{\em BTServiceName,name}]of de service advertised \end{description}\end{Desc}\hypertarget{class_bluetooth_a_p_i_c2759fc1bafe2ea8b1c8c7225367f4e4}{\index{BluetoothAPI@{BluetoothAPI}!stopServerAndAdvertising@{stopServerAndAdvertising}}\index{stopServerAndAdvertising@{stopServerAndAdvertising}!BluetoothAPI@{BluetoothAPI}}\subsubsection[{stopServerAndAdvertising}]{\setlength{\rightskip}{0pt plus 5cm}IMPORT\_\-C void BluetoothAPI::stopServerAndAdvertising ()}}\label{class_bluetooth_a_p_i_c2759fc1bafe2ea8b1c8c7225367f4e4}This function stops a server connection or the advertising of a service, must be called when the application is closed, otherwise the advertising will continue with the application closed The documentation for this class was generated from the following file:\begin{CompactItemize}\item inc/\hyperlink{_bluetooth_8h}{Bluetooth.h}\end{CompactItemize}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -