[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Kernel Extensions and Device Support Programming Concepts

Writing a Device Method

Device methods are programs associated with a device that perform basic device configuration operations. These operations consist of defining, undefining, configuring, unconfiguring, and reconfiguring a device. Some devices also use optional start and stop operations.

The following are the basic device methods:

Define Creates a device instance in the Customized database.
Configure Configures a device instance already represented in the Customized database. This method is responsible for making a device available for use in the system.
Change Reconfigures a device by allowing device characteristics or attributes to be changed.
Unconfigure Makes a configured device unavailable for use in the system. The device instance remains in the Customized database but must be reconfigured before it can be used.
Undefine Deletes a device instance from the Customized database.

Invoking Methods

One device method can invoke another device method. For instance, a Configure method for a device may need to invoke the Define method for child devices. The Change method can invoke the Unconfigure and Configure methods. To ensure proper operation, a method that invokes another method must always use the odm_run_method subroutine.

Example Methods

See the /usr/samples directory for example device method source code. These source code excerpts are provided for example purposes only. The examples do not function as written.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]