Skip to content

API: Hardware Management

aashah edited this page Jun 13, 2013 · 22 revisions

Related Pages: The Hardware Manager Manifest, Drivers

The HardwareManager sits at the core of the hardware management system. Responsible for loading the hardware manifest file, checking modules' permissions and building the driver cache, the HardwareManager will act as the primary layer of communication.

Technical Overview

Since the hardware management system relies heavily on the data fed in by the manifest and module manager, implementing new functionality will be driven primarily from those sources. For adding new functionality and drivers, the hardware manager manifest will be the file to be modified. The module manager on the other hand, will use these methods in order to synchronize the lifecycle of modules with the hardware manager.

As many of the drivers may have specific configuration files, see the Supported Drivers section for information regarding individual driver configuration requirements & API.

API Overview

Configuring the HardwareManager

public static void setManifestFilepath(String filepath)

Sets the location for the manifest and reloads the HardwareManager given the new filepath.

Configuration Store

public void setConfigurationFileStore(Map<String, String> config)

Sets the configuration store such that drivers may easily access the information.


public boolean hasConfigFile(String driverPath)

Checks whether the configuration store contains a configuration file for the given parameter.


public String getConfigFile(String driverPath)

Retrieves the location of the configuration file for the given parameter.

Working with the currently running module

public void setRunningModulePermissions(Map<String, DependencyType> mmd)

Changes the currently running module's dependencies.


public void checkPermissions(Map<String, DependencyType> inputTypes)

Ensures that all the currently running module's dependencies that are required are supported by the HardwareManager. This response is driven by the manifest file.

Working with the driver cache

public void resetAllDrivers()

Lets all the drivers know that they are being cleared, and clears the actual driver cache. Calling this method will also initiate the HardwareManager to rebuild the driver cache.


public DeviceDataInterface inflateDriver(String driverPath, String functionality)

Given driverPath and functionality, inflates the driver and returns the instance of it.


public List<String> getDevices(String functionality)

Provides a list of driver paths that support functionality.


public DeviceDataInterface getInitialDriver(String functionality)

Returns the first driver that supports the given functionality

Clone this wiki locally