com.sentilla.system
Interface Driver

All Known Subinterfaces:
SynchronousSendRx
All Known Implementing Classes:
ButtonDriver, ByteReceiverDriver, ByteReceiverDriver, ByteSenderDriver, ByteSenderDriver, ClientRadioProtocol, CollectionProtocol, CpuDriver, DigitalPinDriver, Dispatcher, DriverAdapter, FileDriver, InterruptPinDriver, LedsDriver, Mimeo, MimeoDisseminationProtocol, MoteSecurityDriver, PowerManagerDriver, PropertyDriver, Protocol, ReceiverDriver, ReceiverDriver, RemotePropertyDriver, RemotePropertyDriver, SenderDriver, SenderDriver, SensorDriver

public interface Driver

Provides a interface that all drivers must implement.

Drivers must provide an implementation of the getDriverName function. The setNextDriver and getNextDriver are typically implemented by DriverAdapter, which new drivers may extend.

See Also:
Drivers, DriverAdapter

Method Summary
 String getDriverName(int n)
          Returns the valid name(s) for each driver.
 Driver getNextDriver()
          Used by the Driver registry (Drivers) to get the next Driver in the linked list of drivers.
 void setNextDriver(Driver d)
          Used by the Driver registry (Drivers) to create a linked list of drivers.
 

Method Detail

setNextDriver

void setNextDriver(Driver d)
Used by the Driver registry (Drivers) to create a linked list of drivers.

Parameters:
d - A reference to the next driver in the list of registered drivers
See Also:
Drivers

getNextDriver

Driver getNextDriver()
Used by the Driver registry (Drivers) to get the next Driver in the linked list of drivers.

Returns:
An instance of the next driver, or null if the end of the list is reached
See Also:
Drivers

getDriverName

String getDriverName(int n)
Returns the valid name(s) for each driver. If a driver has N-names, then getDriverName returns a string for n=0 to n=N-1, and returns null for all other values of n.

A driver may return multiple names because it provides the default implementation for a specific name, such as associating "flash" by default to the external flash, or "extflash" if an application specifically asserts it requires the external flash resources. Some drivers may return only a single valid name, such as "intflash" for the internal flash.



Copyright © 2007 Sentilla Corporation. All Rights Reserved.