Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
Immediate Alert Service (IAS)

Immediate Alert Service (IAS) . More...

Data Structures

struct  bt_ias_cb
 Immediate Alert Service callback structure. More...
 
struct  bt_ias_client_cb
 

Macros

#define BT_IAS_CB_DEFINE(_name)
 Register a callback structure for immediate alert events.
 

Enumerations

enum  bt_ias_alert_lvl { BT_IAS_ALERT_LVL_NO_ALERT , BT_IAS_ALERT_LVL_MILD_ALERT , BT_IAS_ALERT_LVL_HIGH_ALERT }
 

Functions

int bt_ias_local_alert_stop (void)
 Method for stopping alert locally.
 
int bt_ias_client_alert_write (struct bt_conn *conn, enum bt_ias_alert_lvl)
 Set alert level.
 
int bt_ias_discover (struct bt_conn *conn)
 Discover Immediate Alert Service.
 
int bt_ias_client_cb_register (const struct bt_ias_client_cb *cb)
 Register Immediate Alert Client callbacks.
 

Detailed Description

Immediate Alert Service (IAS) .

[Experimental] Users should note that the APIs can change as a part of ongoing development.

Macro Definition Documentation

◆ BT_IAS_CB_DEFINE

#define BT_IAS_CB_DEFINE ( _name)

#include <zephyr/bluetooth/services/ias.h>

Value:
static const STRUCT_SECTION_ITERABLE(bt_ias_cb, _CONCAT(bt_ias_cb_, _name))
#define STRUCT_SECTION_ITERABLE(struct_type, varname)
Defines a new element for an iterable section.
Definition iterable_sections.h:216
Immediate Alert Service callback structure.
Definition ias.h:39

Register a callback structure for immediate alert events.

Parameters
_nameName of callback structure.

Enumeration Type Documentation

◆ bt_ias_alert_lvl

#include <zephyr/bluetooth/services/ias.h>

Enumerator
BT_IAS_ALERT_LVL_NO_ALERT 

No alerting should be done on device.

BT_IAS_ALERT_LVL_MILD_ALERT 

Device shall alert.

BT_IAS_ALERT_LVL_HIGH_ALERT 

Device should alert in strongest possible way.

Function Documentation

◆ bt_ias_client_alert_write()

int bt_ias_client_alert_write ( struct bt_conn * conn,
enum bt_ias_alert_lvl )

#include <zephyr/bluetooth/services/ias.h>

Set alert level.

Parameters
connBluetooth connection object
bt_ias_alert_lvlLevel of alert to write
Returns
Zero in case of success and error code in case of error.

◆ bt_ias_client_cb_register()

int bt_ias_client_cb_register ( const struct bt_ias_client_cb * cb)

#include <zephyr/bluetooth/services/ias.h>

Register Immediate Alert Client callbacks.

Parameters
cbThe callback structure
Returns
Zero in case of success and error code in case of error.

◆ bt_ias_discover()

int bt_ias_discover ( struct bt_conn * conn)

#include <zephyr/bluetooth/services/ias.h>

Discover Immediate Alert Service.

Parameters
connBluetooth connection object
Returns
Zero in case of success and error code in case of error.

◆ bt_ias_local_alert_stop()

int bt_ias_local_alert_stop ( void )

#include <zephyr/bluetooth/services/ias.h>

Method for stopping alert locally.

Returns
Zero in case of success and error code in case of error.