ApparatusFramework::DeviceMgr Class Reference
[Device Services]

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

List of all members.

Classes

struct  DeviceMgrEntry

Public Member Functions

Factory startup

Methods related to the factory start-up pattern

void initialize ()
void startup ()
Queries

Retrieve any information from this object

CharDevicegetDevice (const char *deviceName)
Modifiers

Manipulate any information on this object

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

Singleton

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.

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

References an instance that has been previously created.

Returns:
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.

Parameters:
deviceName name of the device to be fetched
Returns:
pointer to a CharDevice
Note:
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.

Returns:
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.

Parameters:
device pointer to CharDevice to be registered
deviceName name of the device to register
Returns:
void
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.

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