Open Lighting Architecture  0.9.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
ola::rdm::UIDAllocator Class Reference

Detailed Description

Allocate UIDs from a pool.

Given a starting UID, this returns successive UIDs until the manufacturer range is exhausted.

Public Member Functions

 UIDAllocator (const UID &uid)
 Create a new allocator with the starting UID.
 UIDAllocator (const UID &uid, uint32_t last_device_id)
 Create a new allocator with the starting UID that ends at the specified last_device_id.
UIDAllocateNext ()
 Allocate the next UID from the pool.

Constructor & Destructor Documentation

ola::rdm::UIDAllocator::UIDAllocator ( const UID uid)
inlineexplicit

Create a new allocator with the starting UID.

Parameters
uidthe first UID to allocate.
ola::rdm::UIDAllocator::UIDAllocator ( const UID uid,
uint32_t  last_device_id 
)
inline

Create a new allocator with the starting UID that ends at the specified last_device_id.

Parameters
uidthe first UID to allocate.
last_device_idthe last device_id to use.

Member Function Documentation

UID* ola::rdm::UIDAllocator::AllocateNext ( )
inline

Allocate the next UID from the pool.

Returns
a new UID object, or NULL if the pool is empty. Ownership of the UID object is transferred to the caller.

The documentation for this class was generated from the following file: