Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
ola::rdm::UIDAllocator Class Reference
RDM » UID

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. More...
 
 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. More...
 
UIDAllocateNext ()
 Allocate the next UID from the pool. More...
 

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: