simplersble 0.12.2-dev5

The all-in-one Bluetooth library that makes it easy to add wireless connectivity to your projects.
Documentation
#include <simpleble/Service.h>

#include "BuildVec.h"
#include "ServiceBase.h"

using namespace SimpleBLE;

bool Service::initialized() const { return internal_ != nullptr; }

ServiceBase* Service::operator->() {
    if (!initialized()) throw Exception::NotInitialized();

    return internal_.get();
}

const ServiceBase* Service::operator->() const {
    if (!initialized()) throw Exception::NotInitialized();

    return internal_.get();
}

BluetoothUUID Service::uuid() { return (*this)->uuid(); }

ByteArray Service::data() { return (*this)->data(); }

std::vector<Characteristic> Service::characteristics() { return Factory::vector((*this)->characteristics()); }