Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
GattCharacteristic.cpp
- Committer:
- ktownsend
- Date:
- 2013-12-10
- Revision:
- 2:ffc5216bd2cc
- Child:
- 4:50a31ff5f974
File content as of revision 2:ffc5216bd2cc:
#include <stdio.h>
#include <string.h>
#include "GattCharacteristic.h"
/**************************************************************************/
/*!
@brief Creates a new GattCharacteristic using the specified 16-bit
UUID, value length, and properties
@note The UUID value must be unique in the service and is normally >1
@param[in] id
The 16-bit UUID to use for this characteristic
@param[in] minLen
The min length in bytes of this characteristic's value
@param[in] maxLen
The max length in bytes of this characteristic's value
@param[in] props
The 8-bit bit field containing the characteristic's
properties
@section EXAMPLE
@code
// UUID = 0x2A19, Min length 2, Max len = 2, Properties = write
GattCharacteristic c = GattCharacteristic( 0x2A19, 2, 2, 0x08 );
@endcode
*/
/**************************************************************************/
GattCharacteristic::GattCharacteristic(uint16_t id, uint16_t minLen, uint16_t maxLen, uint8_t props)
{
uuid = id;
memcpy(&properties, &props, 1);
lenMin = minLen;
lenMax = maxLen;
}
/**************************************************************************/
/*!
Destructor
*/
/**************************************************************************/
GattCharacteristic::~GattCharacteristic(void)
{
}
