Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:communication_api [2016/08/03 09:46] 127.0.0.1 external edit |
en:communication_api [2023/02/28 14:51] (current) mwkim [Communication API] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Communication API ====== | ====== Communication API ====== | ||
- | API that controls the device communication having LAN, USB, RS485 for communication interface. To get the status of the connection and the search results in real-time, register a callback function using the [[BS2_SetDeviceEventListener]] function. | + | As API that configures the SSL communication, there are communication interfaces include LAN, USB, and RS485. To get real-time device connectivity and search results, please register the callback function via the [[BS2_SetDeviceEventListener]] function. |
\\ | \\ | ||
- | * [[BS2_SetDeviceEventListener]]: Sets the device search, network connection, and Event listener. | + | * [[BS2_SetDeviceEventListener]]: Sets device search and network connection event listener. |
- | * [[BS2_SearchDevices]]: Searches BioStar devices from the subnet. | + | * [[BS2_SearchDevices]]: Search for devices in subnet. |
- | * [[BS2_GetDevices]]: Gets the information of the devices that are being managed. | + | * [[BS2_SearchDevicesEx]]: Search for devices in a specific IP address band. |
- | * [[BS2_ConnectDevice]]: Connects to a device through the device ID. | + | * [[BS2_GetDevices]]: Gets the managed device information. |
- | * [[BS2_ConnectDeviceViaIP]]: Connects to a device through the IP address and Port number. | + | * [[BS2_ConnectDevice]]: Connects the device using the device identifier. |
- | * [[BS2_DisconnectDevice]]: Disconnects with the device. | + | * [[BS2_ConnectDeviceIPV6]]: Connects the device in IPv6 mode using the device identifier. |
- | * [[BS2_SetKeepAliveTimeout]]: Sets the keep-alive timeout. | + | * [[BS2_ConnectDeviceViaIP]]: Connect devices using IP address and Port. |
- | * [[BS2_SetNotificationListener]]: Sets the notification listener. | + | * [[BS2_DisconnectDevice]]: Disconnects from the device. |
- | * [[BS2_SetServerPort]]: Sets the server port. | + | * [[BS2_SetKeepAliveTimeout]]: Sets the keep-alive timeout. |
+ | * [[BS2_SetNotificationListener]]: Sets the Notification listener. | ||
+ | * [[BS2_SetServerPort]]: Sets the server Port. | ||
+ | * [[BS2_SetSSLServerPort]]: Sets the SSL server Port. | ||
+ | * [[BS2_GetServerPort]]: [+ 2.6.3] Gets the server Port. | ||
+ | * [[BS2_GetSSLServerPort]]: [+ 2.6.3] Gets the SSL server port. | ||
+ | * [[BS2_IsConnected]]: Checks device connection status. | ||
+ | * [[BS2_IsAutoConnection]]: Checks auto connection status. | ||
+ | * [[BS2_SetAutoConnection]]: Sets auto connection. | ||
+ | * [[BS2_GetEnableIPV4]]: [+ 2.6.3] Gets IPv4 connection mode. | ||
+ | * [[BS2_SetEnableIPV4]]: [+ 2.6.3] Sets IPv4 connection mode. | ||
+ | * [[BS2_GetEnableIPV6]]: [+ 2.6.3] Gets IPv6 connection mode. | ||
+ | * [[BS2_SetEnableIPV6]]: [+ 2.6.3] Sets IPv6 connection mode. | ||
+ | * [[BS2_SetServerPortIPV6]]: [+ 2.6.3] Sets server port when connecting IPv6 server mode. | ||
+ | * [[BS2_GetServerPortIPV6]]: [+ 2.6.3] Gets server port when connecting IPv6 server mode. | ||
+ | * [[BS2_SetSSLServerPortIPV6]]: [+ 2.6.3] Sets server port when connecting IPv6 server mode using SSL. | ||
+ | * [[BS2_GetSSLServerPortIPV6]]: [+ 2.6.3] Gets server port when connecting IPv6 server mode using SSL. | ||
+ | * [[BS2_SetDefaultResponseTimeout]]: [+ 2.6.3] Sets default response timeout between device and server. | ||
+ | * [[BS2_GetDefaultResponseTimeout]]: [+ 2.6.3] Gets default response timeout between device and server. | ||
+ | * [[BS2_GetSocketRetryCount]]: [+ 2.9.1] Gets the setting value of the number of retries for read/write failures during Non SSL communication. | ||
+ | * [[BS2_SetSocketRetryCount]]: [+ 2.9.1] Set the number of retries for read/write failures during Non SSL communication. | ||
+ | * [[BS2_GetSocketSSLRetryCount]]: [+ 2.9.1] Gets the setting value of the number of retries for read/write failures during SSL communication. | ||
+ | * [[BS2_SetSocketSSLRetryCount]]: [+ 2.9.1] Set the number of retries for read/write failures during SSL communication. | ||
===== Callback Function ===== | ===== Callback Function ===== | ||
<code cpp> | <code cpp> | ||
Line 22: | Line 45: | ||
typedef void (*OnConfigChanged)(BS2_DEVICE_ID deviceId, uint32_t configMask); | typedef void (*OnConfigChanged)(BS2_DEVICE_ID deviceId, uint32_t configMask); | ||
</code> | </code> | ||
- | + | 1. // OnDeviceFound // \\ | |
- | **1. //OnDeviceFound//** \\ | + | Callback function that is called when a new BioStar device is found in Subnet. \\ \\ |
- | Callback function that is called when a new BioStar device has been found in the subnet. \\ | + | 2. // OnDeviceAccepted // \\ |
- | + | Callback function that is called when the BioStar device requests a connection to the BioStar application. \\ \\ | |
- | **2. //OnDeviceAccepted//** \\ | + | 3. // OnDeviceConnected // \\ |
- | Callback function that is called when a BioStar device requests to connect to the BioStar application. \\ | + | Callback function that is called when the device and the BioStar application are connected. \\ \\ |
- | + | 4. // OnDeviceDisconnected // \\ | |
- | **3. //OnDeviceConnected//** \\ | + | Callback function that is called when the connection between the device and the BioStar application is lost. \\ \\ |
- | Callback function that is called when the device and BioStar application is connected. \\ | + | 5. // OnAlarmFired // \\ |
- | + | Callback function that is called when an alarm set in the Zone occurs. \\ \\ | |
- | **4. //OnDeviceDisconnected//** \\ | + | 6. // OnInputDetected // \\ |
- | Callback function that is called when the device and BioStar application is disconnected. \\ | + | Callback function that is called when an input signal is generated. \\ \\ |
- | + | 7. // OnConfigChanged // \\ | |
- | **5. //OnAlarmFired//** \\ | + | Callback function that is called when the configuration is changed by manipulating the terminal. \\ |
- | Callback function that is called when the alarm configured to a zone triggers. \\ | + | |
- | + | ||
- | **6. //OnInputDetected//** \\ | + | |
- | Callback function that is called when an input signal is detected. \\ | + | |
- | + | ||
- | **7. //OnConfigChanged//** \\ | + | |
- | Callback function that is called when the configuration of the device is modified. \\ | + |