Thomas Vachuska | a8f4e7d | 2015-01-08 17:31:55 -0800 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
Thomas Vachuska | a8f4e7d | 2015-01-08 17:31:55 -0800 | [diff] [blame] | 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | /** |
| 18 | * Set of facilities to allow the platform to be extended with |
Thomas Vachuska | 3afbc7f | 2016-02-01 15:55:38 -0800 | [diff] [blame] | 19 | * device specific behaviours and to allow modeling device (and other entity) |
| 20 | * behaviours while hiding details of specific driver implementations. |
| 21 | * While primarily intended for devices, this subsystem can be used to abstract |
| 22 | * behaviours of other entities as well. |
Thomas Vachuska | a8f4e7d | 2015-01-08 17:31:55 -0800 | [diff] [blame] | 23 | * <p> |
| 24 | * {@link org.onosproject.net.driver.Driver} is a representation of a |
Thomas Vachuska | 3afbc7f | 2016-02-01 15:55:38 -0800 | [diff] [blame] | 25 | * specific family of entities (devices, links, etc.) which supports set of |
Thomas Vachuska | a8f4e7d | 2015-01-08 17:31:55 -0800 | [diff] [blame] | 26 | * {@link org.onosproject.net.driver.Behaviour behaviour classes}. Default |
| 27 | * implementation is provided by the platform and allows DriverProviders to |
| 28 | * add different behaviour implementations via DriverService. |
| 29 | * </p> |
| 30 | * <p> |
| 31 | * {@link org.onosproject.net.driver.DriverData} is a container for data |
Thomas Vachuska | 3afbc7f | 2016-02-01 15:55:38 -0800 | [diff] [blame] | 32 | * learned about an entity. It is associated with a specific |
Thomas Vachuska | a8f4e7d | 2015-01-08 17:31:55 -0800 | [diff] [blame] | 33 | * {@link org.onosproject.net.driver.Driver} |
| 34 | * and provides set of {@link org.onosproject.net.driver.Behaviour behaviours} |
Thomas Vachuska | 3afbc7f | 2016-02-01 15:55:38 -0800 | [diff] [blame] | 35 | * for talking about an entity. A default |
Thomas Vachuska | a8f4e7d | 2015-01-08 17:31:55 -0800 | [diff] [blame] | 36 | * implementation provided by platform and has mutable key/value store for use by |
| 37 | * implementations of {@link org.onosproject.net.driver.Behaviour behaviours}. |
| 38 | * </p> |
| 39 | * <p> |
| 40 | * {@link org.onosproject.net.driver.DriverHandler} is an entity used as a |
| 41 | * context to interact with a device. It has a peer |
| 42 | * {@link org.onosproject.net.driver.DriverData} instance, which is used to |
| 43 | * store information learned about a device. It also |
| 44 | * provides set of {@link org.onosproject.net.driver.Behaviour behaviours} |
| 45 | * for talking to a device. |
| 46 | * </p> |
| 47 | * <p> |
| 48 | * {@link org.onosproject.net.driver.DriverService} can be used to query the |
| 49 | * inventory of device drivers and their behaviours, while the |
| 50 | * {@link org.onosproject.net.driver.DriverAdminService} allows adding/removing |
| 51 | * drivers and managing behaviour implementations. |
| 52 | * {@link org.onosproject.net.driver.DriverProvider} is an entity capable |
| 53 | * of add/removing drivers and supplying and managing behaviour |
| 54 | * implementations. A default implementation is provided by the framework along |
| 55 | * with a {@link org.onosproject.net.driver.XmlDriverLoader loader utility} to |
| 56 | * create a driver provider from an XML file structured as follows: |
| 57 | * <pre> |
| 58 | * <drivers> |
| 59 | * <driver name=“...” [manufacturer="..." hwVersion="..." swVersion="..."]> |
| 60 | * <behaviour api="..." impl="..."/> |
| 61 | * ... |
| 62 | * [<property name=“key”>value</key>] |
| 63 | * ... |
| 64 | * </driver> |
| 65 | * ... |
| 66 | * </drivers> |
| 67 | * </pre> |
| 68 | * |
| 69 | */ |
| 70 | package org.onosproject.net.driver; |