Package org.onosproject.net.driver

Set of facilities to allow the platform to be extended with device specific behaviours and to allow modeling device (and other entity) behaviours while hiding details of specific driver implementations. While primarily intended for devices, this subsystem can be used to abstract behaviours of other entities as well.

Driver is a representation of a specific family of entities (devices, links, etc.) which supports set of behaviour classes. Default implementation is provided by the platform and allows DriverProviders to add different behaviour implementations via DriverService.

DriverData is a container for data learned about an entity. It is associated with a specific Driver and provides set of behaviours for talking about an entity. A default implementation provided by platform and has mutable key/value store for use by implementations of behaviours.

DriverHandler is an entity used as a context to interact with a device. It has a peer DriverData instance, which is used to store information learned about a device. It also provides set of behaviours for talking to a device.

DriverService can be used to query the inventory of device drivers and their behaviours, while the DriverAdminService allows adding/removing drivers and managing behaviour implementations. DriverProvider is an entity capable of add/removing drivers and supplying and managing behaviour implementations. A default implementation is provided by the framework along with a loader utility to create a driver provider from an XML file structured as follows:

     <drivers>
         <driver name=“...” [manufacturer="..." hwVersion="..." swVersion="..."]>
             <behaviour api="..." impl="..."/>
             ...
             [<property name=“key”>value</key>]
             ...
         </driver>
         ...
     </drivers>