Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
en:ssl_api [2018/03/20 16:02] yjjung [Callback Function] |
en:ssl_api [2018/05/28 21:28] michael [Callback Function] |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== SSL API ====== | ====== SSL API ====== | ||
- | 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. | + | API that configures the SSL communication |
\\ | \\ | ||
- | * [[BS2_SetDeviceEventListener]]: Sets device search and network connection event listener. | + | * [[BS2_SetSSLHandler]]: Configures the SSL communication. |
- | * [[BS2_SearchDevices]]: Search for devices in subnet. | + | * [[BS2_DisableSSL]]: Disables the SSL communication. |
- | * [[BS2_SearchDevicesEx]]: Search for devices in a specific IP address band. | + | |
- | * [[BS2_GetDevices]]: Gets the managed device information. | + | |
- | * [[BS2_ConnectDevice]]: Connects the device using the device identifier. | + | |
- | * [[BS2_ConnectDeviceViaIP]]: Connect devices using IP address and Port. | + | |
- | * [[BS2_DisconnectDevice]]: Disconnects from the device. | + | |
- | * [[BS2_SetKeepAliveTimeout]]: Sets the keep-alive timeout. | + | |
- | * [[BS2_SetNotificationListener]]: Sets the Notification listener. | + | |
- | * [[BS2_SetServerPort]]: Set the Server Port. | + | |
===== Callback Function ===== | ===== Callback Function ===== | ||
<code cpp> | <code cpp> | ||
- | typedef void (*OnDeviceFound)(uint32_t deviceId); | + | typedef const char* (*GetRootCaFilePath)(uint32_t deviceId); |
- | typedef void (*OnDeviceAccepted)(BS2_DEVICE_ID deviceId); | + | typedef const char* (*GetServerCaFilePath)(BS2_DEVICE_ID deviceId); |
- | typedef void (*OnDeviceConnected)(uint32_t deviceId); | + | typedef const char* (*GetServerPrivateKeyFilePath)(uint32_t deviceId); |
- | typedef void (*OnDeviceDisconnected)(uint32_t deviceId); | + | typedef const char* (*GetPassword)(uint32_t deviceId); |
- | typedef void (*OnAlarmFired)(BS2_DEVICE_ID deviceId, const BS2Event* event); | + | typedef void (*OnErrorOccured)(BS2_DEVICE_ID decoviceId, int errCode); |
- | typedef void (*OnInputDetected)(BS2_DEVICE_ID deviceId, const BS2Event* event); | + | |
- | typedef void (*OnConfigChanged)(BS2_DEVICE_ID deviceId, uint32_t configMask); | + | |
</code> | </code> | ||
- | 1. // OnDeviceFound // \\ | + | |
- | Callback function that is called when a new BioStar device is found in Subnet. \\ \\ | + | 1. //GetRootCaFilePath// \\ |
- | 2. // OnDeviceAccepted // \\ | + | Callback function that is called when to retrieve the root CA file directory. \\ \\ |
- | Callback function that is called when the BioStar device requests a connection to the BioStar application. \\ \\ | + | 2. //GetServerCaFilePath// \\ |
- | 3. // OnDeviceConnected // \\ | + | Callback function that is called when to retrieve the server CA file directory. \\ \\ |
- | Callback function that is called when the device and the BioStar application are connected. \\ \\ | + | 3. //GetServerPrivateKeyFilePath// \\ |
- | 4. // OnDeviceDisconnected // \\ | + | Callback function that is called when to retrieve the server private key file directory. \\ \\ |
- | Callback function that is called when the connection between the device and the BioStar application is lost. \\ \\ | + | 4. //GetPassword// \\ |
- | 5. // OnAlarmFired // \\ | + | Callback function that is called when to retrieve the password. \\ \\ |
- | Callback function that is called when an alarm set in the Zone occurs. \\ \\ | + | 5. //OnErrorOccured// \\ |
- | 6. // OnInputDetected // // | + | Callback function that is called when an error has occurred. \\ \\ |
- | Callback function that is called when an input signal is generated. \\ \\ | + | |
- | 7. // OnConfigChanged // | + | |
- | Callback function that is called when the configuration is changed by manipulating the terminal. \\ | + |