本文整理汇总了C++中GATTServApp_InitCharCfg函数的典型用法代码示例。如果您正苦于以下问题:C++ GATTServApp_InitCharCfg函数的具体用法?C++ GATTServApp_InitCharCfg怎么用?C++ GATTServApp_InitCharCfg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GATTServApp_InitCharCfg函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ScanParam_AddService
/*********************************************************************
* @fn ScanParam_AddService
*
* @brief Initializes the Battery Service by registering
* GATT attributes with the GATT server.
*
* @return Success or Failure
*/
bStatus_t ScanParam_AddService( void )
{
uint8 status = SUCCESS;
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, scanParamRefreshClientCharCfg );
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( scanParamAttrTbl, GATT_NUM_ATTRS( scanParamAttrTbl ),
&scanParamCBs );
return ( status );
}
开发者ID:ClarePhang,项目名称:CC2540,代码行数:21,代码来源:scanparamservice.c
示例2: SimpleProfile_AddService
/*********************************************************************
* @fn SimpleProfile_AddService
*
* @brief Initializes the Simple Profile service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t SimpleProfile_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, simpleProfileChar4Config );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, simpleProfileChar6Config );
//GATTServApp_InitCharCfg( INVALID_CONNHANDLE, simpleProfileChar7Config );
// Register with Link DB to receive link status change callback
VOID linkDB_Register( simpleProfile_HandleConnStatusCB );
if ( services & SIMPLEPROFILE_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( simpleProfileAttrTbl,
GATT_NUM_ATTRS( simpleProfileAttrTbl ),
&simpleProfileCBs );
}
return ( status );
}
开发者ID:reyno123456,项目名称:android_bluetooth,代码行数:33,代码来源:simpleGATTprofile.c
示例3: Thermometer_AddService
/*********************************************************************
* @fn Thermometer_AddService
*
* @brief Initializes the Thermometer service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t Thermometer_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, thermometerTempConfig );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, thermometerIMeasConfig );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, thermometerIntervalConfig );
// Register with Link DB to receive link status change callback
VOID linkDB_Register( thermometer_HandleConnStatusCB );
if ( services & THERMOMETER_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( thermometerAttrTbl,
GATT_NUM_ATTRS( thermometerAttrTbl ),
&thermometerCBs );
}
return ( status );
}
开发者ID:yzkqfll,项目名称:baby,代码行数:33,代码来源:ther_profile.c
示例4: Accel_AddService
/*********************************************************************
* @fn Accel_AddService
*
* @brief Initializes the Accelerometer service by
* registering GATT attributes with the GATT server. Only
* call this function once.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t Accel_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, accelXConfigCoordinates );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, accelYConfigCoordinates );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, accelZConfigCoordinates );
// Register with Link DB to receive link status change callback
VOID linkDB_Register( accel_HandleConnStatusCB );
if ( services & ACCEL_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( accelAttrTbl,
GATT_NUM_ATTRS( accelAttrTbl ),
&accelCBs );
}
return ( status );
}
开发者ID:AlfredHunter,项目名称:Oidpen,代码行数:34,代码来源:accelerometer.c
示例5: test_HandleConnStatusCB
/*********************************************************************
* @fn test_HandleConnStatusCB
*
* @brief Test Profile link status change handler function.
*
* @param connHandle - connection handle
* @param changeType - type of change
*
* @return none
*/
static void test_HandleConnStatusCB( uint16 connHandle, uint8 changeType )
{
// Make sure this is not loopback connection
if ( connHandle != LOOPBACK_CONNHANDLE )
{
// Reset Client Char Config if connection has dropped
if ( ( changeType == LINKDB_STATUS_UPDATE_REMOVED ) ||
( ( changeType == LINKDB_STATUS_UPDATE_STATEFLAGS ) &&
( !linkDB_Up( connHandle ) ) ) )
{
GATTServApp_InitCharCfg( connHandle, testDataConfig );
}
}
}
开发者ID:ClarePhang,项目名称:CC2540,代码行数:24,代码来源:testservice.c
示例6: Temp_AddService
/*********************************************************************
* @fn Temp_AddService
*
* @brief Initializes the Heart Rate service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t Temp_AddService( uint32 services )
{
uint8 status = SUCCESS;
VOID linkDB_Register( Temp_HandleConnStatusCB );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, valueConfigCoordinates );
status = GATTServApp_RegisterService( tempAttrTbl,
GATT_NUM_ATTRS( tempAttrTbl ),
&tempCBs );
return ( status );
}
开发者ID:qodome,项目名称:Firmware,代码行数:25,代码来源:temperature.c
示例7: Batt_AddService
/*********************************************************************
* @fn Batt_AddService
*
* @brief Initializes the Battery Service by registering
* GATT attributes with the GATT server.
*
* @return Success or Failure
*/
bStatus_t Batt_AddService( void )
{
uint8 status = SUCCESS;
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, battLevelClientCharCfg );
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( battAttrTbl,
GATT_NUM_ATTRS( battAttrTbl ),
&battCBs );
return ( status );
}
开发者ID:zhangjie201412,项目名称:Study,代码行数:22,代码来源:battservice.c
示例8: UartProfile_AddService
/**
* @fn UartProfile_AddService
*
* @brief Initializes the Simple Profile service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t UartProfile_AddService(void)
{
uint8 status = SUCCESS;
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg(INVALID_CONNHANDLE, uartServ2CharCfg);
// Register with Link DB to receive link status change callback
linkDB_Register(UartProfile_HandleConnStatusCB);
// Register GATT attribute list and CBs with GATT Server App
GATTServApp_RegisterService(uartServ1AttrTbl, GATT_NUM_ATTRS(uartServ1AttrTbl), &uartServ1CBs);
GATTServApp_RegisterService(uartServ2AttrTbl, GATT_NUM_ATTRS(uartServ2AttrTbl), &uartServ2CBs);
return (status);
}
开发者ID:wythe-lin,项目名称:ZTKBLE,代码行数:26,代码来源:uartserv.c
示例9: util_initCharacteristicConfig
/*********************************************************************
* @fn util_initCharacteristicConfig
*
* @brief Initialise a characteristics configuration
*
* @param pDataConfig - pointer to characteristics configuration
*
* @return Success or bleMemAllocError
*/
bStatus_t util_initCharacteristicConfig( gattCharCfg_t **pDataConfig )
{
// Allocate Client Characteristic Configuration table
*pDataConfig = (gattCharCfg_t *)osal_mem_alloc(sizeof(gattCharCfg_t) *
linkDBNumConns);
if (*pDataConfig == NULL)
{
return (bleMemAllocError);
}
// Register with Link DB to receive link status change callback
GATTServApp_InitCharCfg(INVALID_CONNHANDLE, *pDataConfig);
return SUCCESS;
}
开发者ID:aidaima,项目名称:RemoteControl-Car,代码行数:24,代码来源:st_util.c
示例10: Temp_HandleConnStatusCB
/*********************************************************************
* @fn Temp_HandleConnStatusCB
*
* @brief Heart Rate Service link status change handler function.
*
* @param connHandle - connection handle
* @param changeType - type of change
*
* @return none
*/
void Temp_HandleConnStatusCB( uint16 connHandle, uint8 changeType )
{
// Make sure this is not loopback connection
if ( connHandle != LOOPBACK_CONNHANDLE )
{
// Reset Client Char Config if connection has dropped
if ( ( changeType == LINKDB_STATUS_UPDATE_REMOVED ) ||
( ( changeType == LINKDB_STATUS_UPDATE_STATEFLAGS ) &&
( !linkDB_Up( connHandle ) ) ) )
{
GATTServApp_InitCharCfg( connHandle, valueConfigCoordinates );
enable_fast_read = 0;
}
}
}
开发者ID:qodome,项目名称:Firmware,代码行数:25,代码来源:temperature.c
示例11: sensor_HandleConnStatusCB
/*********************************************************************
* @fn sensor_HandleConnStatusCB
*
* @brief Sensor Profile link status change handler function.
*
* @param connHandle - connection handle
* @param changeType - type of change
*
* @return none
*/
static void sensor_HandleConnStatusCB( uint16 connHandle, uint8 changeType )
{
// Make sure this is not loopback connection
if ( connHandle != LOOPBACK_CONNHANDLE )
{
// Reset Client Char Config if connection has dropped
if ( ( changeType == LINKDB_STATUS_UPDATE_REMOVED ) ||
( ( changeType == LINKDB_STATUS_UPDATE_STATEFLAGS ) &&
( !linkDB_Up( connHandle ) ) ) )
{
GATTServApp_InitCharCfg( connHandle, sensorDataConfig );
GATTServApp_InitCharCfg( connHandle, sensorData1Config );
GATTServApp_InitCharCfg( connHandle, sensorData2Config );
GATTServApp_InitCharCfg( connHandle, sensorData3Config );
}
if ( changeType == LINKDB_STATUS_UPDATE_NEW )
{
GATTServApp_WriteCharCfg(connHandle,sensorDataConfig,GATT_CLIENT_CFG_NOTIFY);
GATTServApp_WriteCharCfg(connHandle,sensorData1Config,GATT_CLIENT_CFG_NOTIFY);
GATTServApp_WriteCharCfg(connHandle,sensorData2Config,GATT_CLIENT_CFG_NOTIFY);
GATTServApp_WriteCharCfg(connHandle,sensorData3Config,GATT_CLIENT_CFG_NOTIFY);
}
}
}
开发者ID:jackchased,项目名称:ble-firmware,代码行数:34,代码来源:environmentalservice.c
示例12: HeartRate_AddService
/*********************************************************************
* @fn HeartRate_AddService
*
* @brief Initializes the Heart Rate service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t HeartRate_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, heartRateMeasClientCharCfg );
if ( services & HEARTRATE_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( heartRateAttrTbl,
GATT_NUM_ATTRS( heartRateAttrTbl ),
&heartRateCBs );
}
return ( status );
}
开发者ID:Mecabot,项目名称:BLE-CC254x-1.4.0,代码行数:28,代码来源:heartrateservice.c
示例13: ProxReporter_AddService
/*********************************************************************
* @fn proxReporter_AddService
*
* @brief Initializes the Proximity Reporter service by
* registering GATT attributes with the GATT server.
* Only call this function once.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t ProxReporter_AddService( uint32 services )
{
uint8 status = SUCCESS;
if ( services & PP_LINK_LOSS_SERVICE )
{
// Register Link Loss attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( linkLossAttrTbl,
GATT_NUM_ATTRS( linkLossAttrTbl ),
GATT_MAX_ENCRYPT_KEY_SIZE,
&proxReporterCBs );
}
if ( ( status == SUCCESS ) && ( services & PP_IM_ALETR_SERVICE ) )
{
// Register Link Loss attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( imAlertAttrTbl,
GATT_NUM_ATTRS( imAlertAttrTbl ),
GATT_MAX_ENCRYPT_KEY_SIZE,
&proxReporterCBs );
}
if ( ( status == SUCCESS ) && ( services & PP_TX_PWR_LEVEL_SERVICE ) )
{
// Allocate Client Characteristic Configuration table
txPwrLevelConfig = (gattCharCfg_t *)osal_mem_alloc( sizeof(gattCharCfg_t) *
linkDBNumConns );
if ( txPwrLevelConfig != NULL )
{
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, txPwrLevelConfig );
// Register Tx Power Level attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( txPwrLevelAttrTbl,
GATT_NUM_ATTRS( txPwrLevelAttrTbl ),
GATT_MAX_ENCRYPT_KEY_SIZE,
&proxReporterCBs );
}
else
{
status = bleMemAllocError;
}
}
return ( status );
}
开发者ID:DRuffer,项目名称:coinForth,代码行数:58,代码来源:proxreporter.c
示例14: Accel_AddService
/*********************************************************************
* @fn Accel_AddService
*
* @brief Initializes the Sensor Profile service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t Accel_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Register with Link DB to receive link status change callback
VOID linkDB_Register( acc_HandleConnStatusCB );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, accelDataConfig );
if (services & ACCELEROMETER_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( accelAttrTbl,
GATT_NUM_ATTRS( accelAttrTbl ),
&accCBs );
}
return ( status );
}
开发者ID:ClarePhang,项目名称:CC2540,代码行数:29,代码来源:accelerometerservice.c
示例15: IRTemp_AddService
/*********************************************************************
* @fn IRTemp_AddService
*
* @brief Initializes the Sensor Profile service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t IRTemp_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Register with Link DB to receive link status change callback
VOID linkDB_Register( irTemp_HandleConnStatusCB );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, irTempDataConfig );
if (services & IRTEMPERATURE_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( irTempAttrTbl,
GATT_NUM_ATTRS( irTempAttrTbl ),
&irTempCBs );
}
return ( status );
}
开发者ID:backman-git,项目名称:EcoSim-sample-project,代码行数:29,代码来源:irtempservice.c
示例16: Humidity_AddService
/*********************************************************************
* @fn Humidity_AddService
*
* @brief Initializes the Sensor Profile service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t Humidity_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Register with Link DB to receive link status change callback
VOID linkDB_Register( humid_HandleConnStatusCB );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, humidDataConfig );
if (services & HUMIDITY_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( humidAttrTbl,
GATT_NUM_ATTRS( humidAttrTbl ),
&humidCBs );
}
return ( status );
}
开发者ID:element14,项目名称:nocturne,代码行数:29,代码来源:humidityservice.c
示例17: Pir_AddService
/*********************************************************************
* @fn Pir_AddService
*
* @brief Initializes the Sensor Profile service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t Pir_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Register with Link DB to receive link status change callback
VOID linkDB_Register( sensor_HandleConnStatusCB );
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, sensorDataConfig );
if (services & SENSOR_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( sensorAttrTable,
GATT_NUM_ATTRS( sensorAttrTable ),
&sensorCBs );
}
return ( status );
}
开发者ID:jackchased,项目名称:ble-firmware,代码行数:29,代码来源:pirservice.c
示例18: AHRS_addService
/*********************************************************************
* @fn AHRS_addService
*
* @brief Initializes the AHRS Profile service by registering
* GATT attributes with the GATT server.
*
* @return Success or Failure
*/
bStatus_t AHRS_addService(void)
{
// Allocate Client Characteristic Configuration table
sensorDataConfig = (gattCharCfg_t *)ICall_malloc(sizeof(gattCharCfg_t) *
linkDBNumConns);
if (sensorDataConfig == NULL)
{
return (bleMemAllocError);
}
// Register with Link DB to receive link status change callback
GATTServApp_InitCharCfg(INVALID_CONNHANDLE, sensorDataConfig);
// Register GATT attribute list and CBs with GATT Server App
return GATTServApp_RegisterService(sensorAttrTable,
GATT_NUM_ATTRS (sensorAttrTable),
GATT_MAX_ENCRYPT_KEY_SIZE,
&sensorCBs);
}
开发者ID:PolymorphicLabs,项目名称:PML-Firmware,代码行数:27,代码来源:ahrsservice.c
示例19: CcService_addService
/*********************************************************************
* @fn CcService_addService
*
* @brief Initializes the service by registering
* GATT attributes with the GATT server.
*
* @return Success or Failure
*/
bStatus_t CcService_addService(void)
{
// Allocate Client Characteristic Configuration table
ccDataConfig = (gattCharCfg_t *)ICall_malloc(sizeof(gattCharCfg_t) *
linkDBNumConns);
if (ccDataConfig == NULL)
{
return (bleMemAllocError);
}
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg(INVALID_CONNHANDLE, ccDataConfig);
// Register GATT attribute list and CBs with GATT Server App
return GATTServApp_RegisterService(ccServiceAttrTbl,
GATT_NUM_ATTRS(ccServiceAttrTbl),
GATT_MAX_ENCRYPT_KEY_SIZE,
&ccServiceCBs);
}
开发者ID:PolymorphicLabs,项目名称:PML-Firmware,代码行数:27,代码来源:ccservice.c
示例20: Test_AddService
/*********************************************************************
* @fn Test_AddService
*
* @brief Initializes the Test Profile service by registering
* GATT attributes with the GATT server.
*
* @param services - services to add. This is a bit map and can
* contain more than one service.
*
* @return Success or Failure
*/
bStatus_t Test_AddService( uint32 services )
{
uint8 status = SUCCESS;
// Initialize Client Characteristic Configuration attributes
GATTServApp_InitCharCfg( INVALID_CONNHANDLE, testDataConfig );
// Register with Link DB to receive link status change callback
VOID linkDB_Register( test_HandleConnStatusCB );
if ( services & TEST_SERVICE )
{
// Register GATT attribute list and CBs with GATT Server App
status = GATTServApp_RegisterService( testAttrTbl,
GATT_NUM_ATTRS( testAttrTbl ),
&testCBs );
}
return ( status );
}
开发者ID:ClarePhang,项目名称:CC2540,代码行数:31,代码来源:testservice.c
注:本文中的GATTServApp_InitCharCfg函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论