ApparatusFramework::DeviceMgr Class Reference
[Device Services]

#include <DeviceServices/common/current/include/DeviceMgr.h>

List of all members.


struct  DeviceMgrEntry

Public Member Functions

Factory startup

Methods related to the factory start-up pattern

void initialize ()
void startup ()

Retrieve any information from this object

CharDevicegetDevice (const char *deviceName)

Manipulate any information on this object

void registerDevice (CharDevice *device, const char *deviceName)
void unregisterDevice (const char *deviceName)


Methods related to the Singleton pattern

static DeviceMgrCreate ()
static DeviceMgrDefault ()
static bool IsCreated ()

Detailed Description

Holds and manages all low level character devices. No one should directly instantiate and use such devices. They may be fetched with the help of this manager. This guarantees that no conflicts happen and no device is used twice. The device manager is a singleton.

Definition at line 64 of file DeviceMgr.h.

Member Function Documentation

static DeviceMgr* ApparatusFramework::DeviceMgr::Create (  )  [static]

Creates an instance of the singleton if none exists yet. The object is created in static memory.

A pointer to the created singleton instance.
static DeviceMgr* ApparatusFramework::DeviceMgr::Default (  )  [static]

References an instance that has been previously created.

A pointer to the singleton instance.
CharDevice* ApparatusFramework::DeviceMgr::getDevice ( const char *  deviceName  ) 

Fetches a device using its name. The device name is a unique string.

deviceName name of the device to be fetched
pointer to a CharDevice
If null is returned, the device is not present or already in use.
void ApparatusFramework::DeviceMgr::initialize (  ) 

Initializes the DeviceMgr accordingly to the factory startup pattern.

static bool ApparatusFramework::DeviceMgr::IsCreated (  )  [static]

States whether an instance of this singleton has been created.

True if an instance has been created, false otherwise.
void ApparatusFramework::DeviceMgr::registerDevice ( CharDevice device,
const char *  deviceName 

The registerDevice function registers the given device with its name in the internal list.

device pointer to CharDevice to be registered
deviceName name of the device to register
void ApparatusFramework::DeviceMgr::startup (  ) 

Starts up the DeviceMgr accordingly to the factory startup pattern.

void ApparatusFramework::DeviceMgr::unregisterDevice ( const char *  deviceName  ) 

The unregisterDevice function unregisters the given device with its name from the internal list.

deviceName name of the device to unregister
© 2004-2010 bbv Software Services AG / Apparatus Services