blob: 7461a4ed0e9072f7890c11fc75e08e5648c24680 [file] [log] [blame]
Thomas Vachuskaa8f4e7d2015-01-08 17:31:55 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Thomas Vachuskaa8f4e7d2015-01-08 17:31:55 -08003 *
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 Vachuska3afbc7f2016-02-01 15:55:38 -080019 * 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 Vachuskaa8f4e7d2015-01-08 17:31:55 -080023 * <p>
24 * {@link org.onosproject.net.driver.Driver} is a representation of a
Thomas Vachuska3afbc7f2016-02-01 15:55:38 -080025 * specific family of entities (devices, links, etc.) which supports set of
Thomas Vachuskaa8f4e7d2015-01-08 17:31:55 -080026 * {@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 Vachuska3afbc7f2016-02-01 15:55:38 -080032 * learned about an entity. It is associated with a specific
Thomas Vachuskaa8f4e7d2015-01-08 17:31:55 -080033 * {@link org.onosproject.net.driver.Driver}
34 * and provides set of {@link org.onosproject.net.driver.Behaviour behaviours}
Thomas Vachuska3afbc7f2016-02-01 15:55:38 -080035 * for talking about an entity. A default
Thomas Vachuskaa8f4e7d2015-01-08 17:31:55 -080036 * 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 * &lt;drivers&gt;
59 * &lt;driver name=“...” [manufacturer="..." hwVersion="..." swVersion="..."]&gt;
60 * &lt;behaviour api="..." impl="..."/&gt;
61 * ...
62 * [&lt;property name=“key”&gt;value&lt;/key&gt;]
63 * ...
64 * &lt;/driver&gt;
65 * ...
66 * &lt;/drivers&gt;
67 * </pre>
68 *
69 */
70package org.onosproject.net.driver;