Microchip® Advanced Software Framework

device_info.h File Reference

Device information Service declarations.

Copyright (c) 2017-2018 Microchip Technology Inc. and its subsidiaries.

#include "ble_manager.h"

Data Structures

struct  device_info_char_value_t
 characteristic value information More...
 
struct  dis_gatt_service_handler
 
struct  dis_info_data
 Configurable Client characteristic data for a given dis info type. More...
 
struct  pnp_id_char_value_t
 pnp characteristic value information More...
 
struct  system_id_char_value_t
 system ID characteristic value information More...
 

Macros

#define DEFAULT_FIRMWARE_REIVSION   ("FW_BETA")
 User should set the default firmware revision before calling dis_init_service API. More...
 
#define DEFAULT_HARDWARE_REVISION   ("Rev A")
 User should set the default hardware revision before calling dis_init_service API. More...
 
#define DEFAULT_MANUFACTURER_NAME   ("ATMEL")
 User should set the default manufacturer name before calling dis_init_service API. More...
 
#define DEFAULT_MODEL_NUMBER   ("BLE DEVICE")
 User should set the default model number before calling dis_init_service API. More...
 
#define DEFAULT_SERIAL_NUMBER   ("BTLC1000/SAMB11")
 User should set the default serial number before calling dis_init_service API. More...
 
#define DEFAULT_SOFTWARE_REVISION   ("SW_BETA")
 User should set the default software revision before calling dis_init_service API. More...
 
#define DIS_CHAR_FIRMWARE_REIVSION_INIT_LEN   0x07
 User should set the length based on DEFAULT_FIRMWARE_REIVSION. More...
 
#define DIS_CHAR_FIRMWARE_REIVSION_MAX_LEN   0x14
 User can set the maximum length for firmware revision. More...
 
#define DIS_CHAR_HARDWARE_REVISION_INIT_LEN   0x05
 User should set the length based on DEFAULT_HARDWARE_REVISION. More...
 
#define DIS_CHAR_HARDWARE_REVISION_MAX_LEN   0x14
 User can set the maximum length for hardware revision. More...
 
#define DIS_CHAR_IEEE_REG_CERT_DATA_LIST_INIT_LEN   0x01
 IEEE regulatory certification data list characteristic minimum length. More...
 
#define DIS_CHAR_IEEE_REG_CERT_DATA_LIST_MAX_LEN   0x0a
 IEEE regulatory certification data list characteristic maximum length. More...
 
#define DIS_CHAR_MANUFACTURER_NAME_INIT_LEN   (0x05)
 User should set the length based on DEFAULT_MANUFACTURER_NAME. More...
 
#define DIS_CHAR_MANUFACTURER_NAME_MAX_LEN   (0x14)
 User can set the maximum length for manufacture name. More...
 
#define DIS_CHAR_MODEL_NUMBER_INIT_LEN   (0x0a)
 User should set the length based on DEFAULT_MODEL_NUMBER. More...
 
#define DIS_CHAR_MODEL_NUMBER_MAX_LEN   (0x14)
 User can set the maximum length for model number. More...
 
#define DIS_CHAR_PNP_ID_INIT_LEN   0x07
 PnP id characteristic initial length. More...
 
#define DIS_CHAR_PNP_ID_MAX_LEN   0x07
 PnP id characteristic maximum length. More...
 
#define DIS_CHAR_SERIAL_NUMBER_INIT_LEN   0x0f
 User should set the length based on DEFAULT_SERIAL_NUMBER. More...
 
#define DIS_CHAR_SERIAL_NUMBER_MAX_LEN   0x14
 User can set the maximum length for serial number. More...
 
#define DIS_CHAR_SOFTWARE_REVISION_INIT_LEN   0x07
 User should set the length based on DEFAULT_SOFTWARE_REVISION. More...
 
#define DIS_CHAR_SOFTWARE_REVISION_MAX_LEN   0x14
 User can set the maximum length for software revision. More...
 
#define DIS_CHAR_SYSTEM_ID_INIT_LEN   sizeof(system_id_char_value_t)
 system id characteristic initial length More...
 
#define DIS_CHAR_SYSTEM_ID_MAX_LEN   sizeof(system_id_char_value_t)
 system id characteristic maximum length More...
 
#define DIS_TOTAL_CHARATERISTIC_NUM   0x09
 number of device information service characteristics More...
 
#define PNP_ID_PRODUCT_ID   0x3333
 
#define PNP_ID_PRODUCT_VERSION   0x0001
 
#define PNP_ID_VENDOR_ID   0x2222
 
#define PNP_ID_VENDOR_ID_SOURCE   0x01
 PnP ID characteristic value configure by user. More...
 
#define SYSTEM_ID_MANUFACTURER_ID   "\x00\x00\x00\x00\x00"
 
#define SYSTEM_ID_MANUFACTURER_ID_LEN   0x05
 system ID characteristic default values More...
 
#define SYSTEM_ID_ORG_UNIQUE_ID   "\x00\x04\x25"
 
#define SYSTEM_ID_ORG_UNIQUE_ID_LEN   0x03
 
#define UPDATE_FIRMWARE_REVISION(ptr, info_data, conn_handle)
 Macro used for updating firmware revision after defining the service using dis_primary_service_define. More...
 
#define UPDATE_HARDWARE_REVISION(ptr, info_data, conn_handle)
 Macro used for updating hardware revision after defining the service using dis_primary_service_define. More...
 
#define UPDATE_IEEE_REG_CERT_DATA_LIST(ptr, info_data, conn_handle)
 Macro used for updating IEEE regulatory certification data list after defining the service using dis_primary_service_define. More...
 
#define UPDATE_MANUFACTURER_STRING(ptr, info_data, conn_handle)
 Macro used for updating manufacturing string after defining the service using dis_primary_service_define. More...
 
#define UPDATE_MODEL_NUMBER(ptr, info_data, conn_handle)
 Macro used for updating model number after defining the service using dis_primary_service_define. More...
 
#define UPDATE_PNP_ID(ptr, info_data, conn_handle)
 Macro used for updating PnP ID after defining the service using dis_primary_service_define. More...
 
#define UPDATE_SERIAL_NUMBER(ptr, info_data, conn_handle)
 Macro used for updating serial number after defining the service using dis_primary_service_define. More...
 
#define UPDATE_SOFTWARE_REVISION(ptr, info_data, conn_handle)
 Macro used for updating software revision after defining the service using dis_primary_service_define. More...
 
#define UPDATE_SYSTEM_ID(ptr, info_data, conn_handle)
 Macro used for updating system ID after defining the service using dis_primary_service_define. More...
 

Typedefs

typedef struct
dis_gatt_service_handler 
dis_gatt_service_handler_t
 

Enumerations

enum  dis_info_type {
  DIS_MANUFACTURER_NAME = 0,
  DIS_MODEL_NUMBER,
  DIS_SERIAL_NUMBER,
  DIS_HARDWARE_REVISION,
  DIS_FIRMWARE_REVISION,
  DIS_SOFTWARE_REVISION,
  DIS_SYSTEM_ID,
  DIS_PNP_ID,
  DIS_IEEE_REG_CERT_DATA_LIST,
  DIS_END_VALUE
}
 The type of the information. More...
 

Functions

at_ble_status_t dis_info_update (dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
 Update the DIS characteristic value after defining the services using dis_primary_service_define. More...
 
void dis_init_service (dis_gatt_service_handler_t *device_info_serv)
 DIS service and characteristic initialization(Called only once by user). More...
 
at_ble_status_t dis_primary_service_define (dis_gatt_service_handler_t *dis_primary_service)
 Register a dis service instance inside stack. More...
 

#define DEFAULT_FIRMWARE_REIVSION   ("FW_BETA")

User should set the default firmware revision before calling dis_init_service API.

Referenced by dis_init_service().

#define DEFAULT_HARDWARE_REVISION   ("Rev A")

User should set the default hardware revision before calling dis_init_service API.

Referenced by dis_init_service().

#define DEFAULT_MANUFACTURER_NAME   ("ATMEL")

User should set the default manufacturer name before calling dis_init_service API.

Referenced by dis_init_service().

#define DEFAULT_MODEL_NUMBER   ("BLE DEVICE")

User should set the default model number before calling dis_init_service API.

Referenced by dis_init_service().

#define DEFAULT_SERIAL_NUMBER   ("BTLC1000/SAMB11")

User should set the default serial number before calling dis_init_service API.

Referenced by dis_init_service().

#define DEFAULT_SOFTWARE_REVISION   ("SW_BETA")

User should set the default software revision before calling dis_init_service API.

Referenced by dis_init_service().

#define DIS_CHAR_FIRMWARE_REIVSION_INIT_LEN   0x07

User should set the length based on DEFAULT_FIRMWARE_REIVSION.

Referenced by dis_init_service().

#define DIS_CHAR_FIRMWARE_REIVSION_MAX_LEN   0x14

User can set the maximum length for firmware revision.

Referenced by dis_init_service().

#define DIS_CHAR_HARDWARE_REVISION_INIT_LEN   0x05

User should set the length based on DEFAULT_HARDWARE_REVISION.

Referenced by dis_init_service().

#define DIS_CHAR_HARDWARE_REVISION_MAX_LEN   0x14

User can set the maximum length for hardware revision.

Referenced by dis_init_service().

#define DIS_CHAR_IEEE_REG_CERT_DATA_LIST_INIT_LEN   0x01

IEEE regulatory certification data list characteristic minimum length.

Referenced by dis_init_service().

#define DIS_CHAR_IEEE_REG_CERT_DATA_LIST_MAX_LEN   0x0a

IEEE regulatory certification data list characteristic maximum length.

Referenced by dis_init_service().

#define DIS_CHAR_MANUFACTURER_NAME_INIT_LEN   (0x05)

User should set the length based on DEFAULT_MANUFACTURER_NAME.

Referenced by dis_init_service().

#define DIS_CHAR_MANUFACTURER_NAME_MAX_LEN   (0x14)

User can set the maximum length for manufacture name.

Referenced by dis_init_service().

#define DIS_CHAR_MODEL_NUMBER_INIT_LEN   (0x0a)

User should set the length based on DEFAULT_MODEL_NUMBER.

Referenced by dis_init_service().

#define DIS_CHAR_MODEL_NUMBER_MAX_LEN   (0x14)

User can set the maximum length for model number.

Referenced by dis_init_service().

#define DIS_CHAR_PNP_ID_INIT_LEN   0x07

PnP id characteristic initial length.

Referenced by dis_init_service().

#define DIS_CHAR_PNP_ID_MAX_LEN   0x07

PnP id characteristic maximum length.

Referenced by dis_init_service().

#define DIS_CHAR_SERIAL_NUMBER_INIT_LEN   0x0f

User should set the length based on DEFAULT_SERIAL_NUMBER.

Referenced by dis_init_service().

#define DIS_CHAR_SERIAL_NUMBER_MAX_LEN   0x14

User can set the maximum length for serial number.

Referenced by dis_init_service().

#define DIS_CHAR_SOFTWARE_REVISION_INIT_LEN   0x07

User should set the length based on DEFAULT_SOFTWARE_REVISION.

Referenced by dis_init_service().

#define DIS_CHAR_SOFTWARE_REVISION_MAX_LEN   0x14

User can set the maximum length for software revision.

Referenced by dis_init_service().

#define DIS_CHAR_SYSTEM_ID_INIT_LEN   sizeof(system_id_char_value_t)

system id characteristic initial length

Referenced by dis_init_service().

#define DIS_CHAR_SYSTEM_ID_MAX_LEN   sizeof(system_id_char_value_t)

system id characteristic maximum length

Referenced by dis_init_service().

#define DIS_TOTAL_CHARATERISTIC_NUM   0x09

number of device information service characteristics

Referenced by dis_primary_service_define().

#define PNP_ID_PRODUCT_ID   0x3333

Referenced by dis_init_service().

#define PNP_ID_PRODUCT_VERSION   0x0001

Referenced by dis_init_service().

#define PNP_ID_VENDOR_ID   0x2222

Referenced by dis_init_service().

#define PNP_ID_VENDOR_ID_SOURCE   0x01

PnP ID characteristic value configure by user.

Referenced by dis_init_service().

#define SYSTEM_ID_MANUFACTURER_ID   "\x00\x00\x00\x00\x00"

Referenced by dis_init_service().

#define SYSTEM_ID_MANUFACTURER_ID_LEN   0x05

system ID characteristic default values

Referenced by dis_init_service().

#define SYSTEM_ID_ORG_UNIQUE_ID   "\x00\x04\x25"

Referenced by dis_init_service().

#define SYSTEM_ID_ORG_UNIQUE_ID_LEN   0x03

Referenced by dis_init_service().

#define UPDATE_FIRMWARE_REVISION (   ptr,
  info_data,
  conn_handle 
)
Value:
do{ \
DBG_LOG("Updating firmware revision failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Definition: device_info.h:239
Generic errors Success.
Definition: at_ble_errno.h:39
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Macro used for updating firmware revision after defining the service using dis_primary_service_define.

Referenced by dis_custom_event().

#define UPDATE_HARDWARE_REVISION (   ptr,
  info_data,
  conn_handle 
)
Value:
do{ \
DBG_LOG("Updating hardware revision failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Generic errors Success.
Definition: at_ble_errno.h:39
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101
Definition: device_info.h:237

Macro used for updating hardware revision after defining the service using dis_primary_service_define.

#define UPDATE_IEEE_REG_CERT_DATA_LIST (   ptr,
  info_data,
  conn_handle 
)
Value:
do { \
DBG_LOG("Updating IEEE regulatory certification data list failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Generic errors Success.
Definition: at_ble_errno.h:39
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
Definition: device_info.h:247
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Macro used for updating IEEE regulatory certification data list after defining the service using dis_primary_service_define.

#define UPDATE_MANUFACTURER_STRING (   ptr,
  info_data,
  conn_handle 
)
Value:
do { \
if ( (dis_info_update(ptr,DIS_MANUFACTURER_NAME,info_data, conn_handle)) != AT_BLE_SUCCESS) { \
DBG_LOG("Updating Manufacturer string failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Generic errors Success.
Definition: at_ble_errno.h:39
Definition: device_info.h:231
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Macro used for updating manufacturing string after defining the service using dis_primary_service_define.

#define UPDATE_MODEL_NUMBER (   ptr,
  info_data,
  conn_handle 
)
Value:
do { \
if (dis_info_update(ptr,DIS_MODEL_NUMBER,info_data, conn_handle) != AT_BLE_SUCCESS) { \
DBG_LOG("Updating model number failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Definition: device_info.h:233
Generic errors Success.
Definition: at_ble_errno.h:39
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Macro used for updating model number after defining the service using dis_primary_service_define.

#define UPDATE_PNP_ID (   ptr,
  info_data,
  conn_handle 
)
Value:
do { \
if (dis_info_update(ptr,DIS_PNP_ID,info_data, conn_handle) != AT_BLE_SUCCESS) { \
DBG_LOG("Updating PnP ID failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Generic errors Success.
Definition: at_ble_errno.h:39
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101
Definition: device_info.h:245

Macro used for updating PnP ID after defining the service using dis_primary_service_define.

#define UPDATE_SERIAL_NUMBER (   ptr,
  info_data,
  conn_handle 
)
Value:
do{ \
if (dis_info_update(ptr,DIS_SERIAL_NUMBER,info_data, conn_handle) != AT_BLE_SUCCESS) { \
DBG_LOG("Updating serial number failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Definition: device_info.h:235
Generic errors Success.
Definition: at_ble_errno.h:39
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Macro used for updating serial number after defining the service using dis_primary_service_define.

#define UPDATE_SOFTWARE_REVISION (   ptr,
  info_data,
  conn_handle 
)
Value:
do{ \
DBG_LOG("Updating software revision failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Definition: device_info.h:241
Generic errors Success.
Definition: at_ble_errno.h:39
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Macro used for updating software revision after defining the service using dis_primary_service_define.

#define UPDATE_SYSTEM_ID (   ptr,
  info_data,
  conn_handle 
)
Value:
do { \
if (dis_info_update(ptr,DIS_SYSTEM_ID,info_data, conn_handle) != AT_BLE_SUCCESS) { \
DBG_LOG("Updating system id failed"); \
}\
} while (0)
if((SERIAL_RX_BUF_SIZE_HOST-1)==serial_rx_buf_tail)
Definition: sio2host.c:258
uint8_t * ptr
Definition: sam_ba_monitor.c:174
Definition: device_info.h:243
Generic errors Success.
Definition: at_ble_errno.h:39
at_ble_status_t dis_info_update(dis_gatt_service_handler_t *dis_serv, dis_info_type info_type, dis_info_data *info_data, at_ble_handle_t conn_handle)
Update the DIS characteristic value after defining the services using dis_primary_service_define.
Definition: device_info.c:330
#define DBG_LOG
Definition: ble_host_sdk/utils/ble_utils.h:101

Macro used for updating system ID after defining the service using dis_primary_service_define.

The type of the information.

Enumerator
DIS_MANUFACTURER_NAME 
DIS_MODEL_NUMBER 
DIS_SERIAL_NUMBER 
DIS_HARDWARE_REVISION 
DIS_FIRMWARE_REVISION 
DIS_SOFTWARE_REVISION 
DIS_SYSTEM_ID 
DIS_PNP_ID 
DIS_IEEE_REG_CERT_DATA_LIST 
DIS_END_VALUE 

at_ble_status_t dis_info_update ( dis_gatt_service_handler_t dis_serv,
dis_info_type  info_type,
dis_info_data info_data,
at_ble_handle_t  conn_handle 
)

Update the DIS characteristic value after defining the services using dis_primary_service_define.

Parameters
[in]dis_servdis service instance
[in]info_typedis characteristic type to be updated
[in]info_datadata need to be updated
Returns
AT_BLE_SUCCESS operation completed successfully .
AT_BLE_FAILURE Generic error.

References ALL_UNUSED, at_ble_characteristic_value_set(), AT_BLE_FAILURE, AT_BLE_SUCCESS, at_ble_characteristic_t::char_val_handle, dis_info_data::data_len, DBG_LOG, dis_info_data::info_data, at_ble_characteristic_t::init_value, dis_gatt_service_handler::serv_chars, and at_ble_characteristic_t::value_max_len.

void dis_init_service ( dis_gatt_service_handler_t device_info_serv)

DIS service and characteristic initialization(Called only once by user).

Parameters
[in]device_info_servdis service instance
Returns
none

DIS service and characteristic initialization(Called only once by user).

References AT_BLE_ATTR_NO_PERMISSIONS, AT_BLE_ATTR_READABLE_NO_AUTHN_NO_AUTHR, AT_BLE_ATTR_READABLE_REQ_AUTHN_NO_AUTHR, AT_BLE_CHAR_READ, AT_BLE_UUID_16, BLE_PAIR_ENABLE, at_ble_characteristic_t::char_val_handle, at_ble_characteristic_t::client_config_handle, at_ble_characteristic_t::client_config_permissions, DEFAULT_FIRMWARE_REIVSION, device_info_char_value_t::default_firmware_revision, DEFAULT_HARDWARE_REVISION, device_info_char_value_t::default_hardware_revision, DEFAULT_MANUFACTURER_NAME, DEFAULT_MODEL_NUMBER, device_info_char_value_t::default_model_number, device_info_char_value_t::default_pnp_id, DEFAULT_SERIAL_NUMBER, device_info_char_value_t::default_serial_number, DEFAULT_SOFTWARE_REVISION, device_info_char_value_t::default_software_revision, device_info_char_value_t::default_system_id, DIS_CHAR_FIRMWARE_REIVSION_INIT_LEN, DIS_CHAR_FIRMWARE_REIVSION_MAX_LEN, DIS_CHAR_FIRMWARE_REIVSION_UUID, DIS_CHAR_HARDWARE_REVISION_INIT_LEN, DIS_CHAR_HARDWARE_REVISION_MAX_LEN, DIS_CHAR_HARDWARE_REVISION_UUID, DIS_CHAR_IEEE_REG_CERT_DATA_LIST_INIT_LEN, DIS_CHAR_IEEE_REG_CERT_DATA_LIST_MAX_LEN, DIS_CHAR_IEEE_REG_CERT_DATA_LIST_UUID, DIS_CHAR_MANUFACTURER_NAME_INIT_LEN, DIS_CHAR_MANUFACTURER_NAME_MAX_LEN, DIS_CHAR_MANUFACTURER_NAME_UUID, DIS_CHAR_MODEL_NUMBER_INIT_LEN, DIS_CHAR_MODEL_NUMBER_MAX_LEN, DIS_CHAR_MODEL_NUMBER_UUID, DIS_CHAR_PNP_ID_INIT_LEN, DIS_CHAR_PNP_ID_MAX_LEN, DIS_CHAR_PNP_ID_UUID, DIS_CHAR_SERIAL_NUMBER_INIT_LEN, DIS_CHAR_SERIAL_NUMBER_MAX_LEN, DIS_CHAR_SERIAL_NUMBER_UUID, DIS_CHAR_SOFTWARE_REVISION_INIT_LEN, DIS_CHAR_SOFTWARE_REVISION_MAX_LEN, DIS_CHAR_SOFTWARE_REVISION_UUID, DIS_CHAR_SYSTEM_ID_INIT_LEN, DIS_CHAR_SYSTEM_ID_MAX_LEN, DIS_CHAR_SYSTEM_ID_UUID, DIS_SERVICE_UUID, device_info_char_value_t::ieee_reg_cert_data_list, at_ble_characteristic_t::init_value, system_id_char_value_t::manufacturer_id, device_info_char_value_t::manufacturer_name, NULL, system_id_char_value_t::org_unique_id, PNP_ID_PRODUCT_ID, PNP_ID_PRODUCT_VERSION, PNP_ID_VENDOR_ID, PNP_ID_VENDOR_ID_SOURCE, at_ble_characteristic_t::presentation_format, pnp_id_char_value_t::product_id, pnp_id_char_value_t::product_version, at_ble_characteristic_t::properties, dis_gatt_service_handler::serv_chars, dis_gatt_service_handler::serv_handle, dis_gatt_service_handler::serv_uuid, at_ble_characteristic_t::server_config_handle, at_ble_characteristic_t::server_config_permissions, SYSTEM_ID_MANUFACTURER_ID, SYSTEM_ID_MANUFACTURER_ID_LEN, SYSTEM_ID_ORG_UNIQUE_ID, SYSTEM_ID_ORG_UNIQUE_ID_LEN, at_ble_uuid_t::type, at_ble_characteristic_t::user_desc, at_ble_characteristic_t::user_desc_handle, at_ble_characteristic_t::user_desc_len, at_ble_characteristic_t::user_desc_max_len, at_ble_characteristic_t::user_desc_permissions, at_ble_uuid_t::uuid, at_ble_characteristic_t::uuid, at_ble_characteristic_t::value_init_len, at_ble_characteristic_t::value_max_len, at_ble_characteristic_t::value_permissions, pnp_id_char_value_t::vendor_id, and pnp_id_char_value_t::vendor_id_source.

Referenced by blp_sensor_service_init(), hid_prf_init(), hr_sensor_service_init(), htp_init(), and main().

at_ble_status_t dis_primary_service_define ( dis_gatt_service_handler_t dis_primary_service)

Register a dis service instance inside stack.

Parameters
[in]dis_primary_servicedis service instance
Returns
AT_BLE_SUCCESS operation completed successfully
AT_BLE_FAILURE Generic error.

References at_ble_primary_service_define(), DIS_TOTAL_CHARATERISTIC_NUM, NULL, dis_gatt_service_handler::serv_chars, dis_gatt_service_handler::serv_handle, and dis_gatt_service_handler::serv_uuid.

Referenced by blp_sensor_service_define(), hid_prf_init(), hr_sensor_service_define(), htp_init(), and main().