## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### Device States

Media devices that transport data are considered to be in one of the following states at any given time:

Registered
Deregistered
Saved
Restored
Closed

When a device is opened and restored, the device context is assumed to be in the restored state. The closed state can be viewed as both the initial state and the termination state. Or this state can be thought of as not a state at all, because a device context does not exist before it is opened, and ceases to exist when it is closed.

The following figure lists the allowable device states across the top of the table and indicates the changes in state that occur when the command messages shown in the first column of the table are issued. This table assumes all error conditions keep the device in its current state. For example, a waveform player that is opened without an element remains in the stopped state when a play is issued, and the MCD receives an error code.

The following figure is provided as a guide to application developers and MCD writers. There can be no guarantee that every media device will conform to this table, but every effort should be made to hide the complexity of the device from the application.

[Artwork not shown]

Legend

* After a restore, the device is considered active and available for use. If the stream has been registered, it is restored to the state it was in before the VSD_SAVE.
- Error condition.