blob: fbc39a89a1f1e49e3ed2bce59850a2e39e9d20b2 [file] [log] [blame]
Thomas Vachuskaa8f4e7d2015-01-08 17:31:55 -08001/*
2 * Copyright 2015 Open Networking Laboratory
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
19 * device specific behaviours and to allow modeling device behaviours while
20 * hiding details of specific device driver implementations.
21 * <p>
22 * {@link org.onosproject.net.driver.Driver} is a representation of a
23 * specific family of devices supports set of
24 * {@link org.onosproject.net.driver.Behaviour behaviour classes}. Default
25 * implementation is provided by the platform and allows DriverProviders to
26 * add different behaviour implementations via DriverService.
27 * </p>
28 * <p>
29 * {@link org.onosproject.net.driver.DriverData} is a container for data
30 * learned about a device. It is associated with a specific
31 * {@link org.onosproject.net.driver.Driver}
32 * and provides set of {@link org.onosproject.net.driver.Behaviour behaviours}
33 * for talking about a device. A default
34 * implementation provided by platform and has mutable key/value store for use by
35 * implementations of {@link org.onosproject.net.driver.Behaviour behaviours}.
36 * </p>
37 * <p>
38 * {@link org.onosproject.net.driver.DriverHandler} is an entity used as a
39 * context to interact with a device. It has a peer
40 * {@link org.onosproject.net.driver.DriverData} instance, which is used to
41 * store information learned about a device. It also
42 * provides set of {@link org.onosproject.net.driver.Behaviour behaviours}
43 * for talking to a device.
44 * </p>
45 * <p>
46 * {@link org.onosproject.net.driver.DriverService} can be used to query the
47 * inventory of device drivers and their behaviours, while the
48 * {@link org.onosproject.net.driver.DriverAdminService} allows adding/removing
49 * drivers and managing behaviour implementations.
50 * {@link org.onosproject.net.driver.DriverProvider} is an entity capable
51 * of add/removing drivers and supplying and managing behaviour
52 * implementations. A default implementation is provided by the framework along
53 * with a {@link org.onosproject.net.driver.XmlDriverLoader loader utility} to
54 * create a driver provider from an XML file structured as follows:
55 * <pre>
56 * &lt;drivers&gt;
57 * &lt;driver name=“...” [manufacturer="..." hwVersion="..." swVersion="..."]&gt;
58 * &lt;behaviour api="..." impl="..."/&gt;
59 * ...
60 * [&lt;property name=“key”&gt;value&lt;/key&gt;]
61 * ...
62 * &lt;/driver&gt;
63 * ...
64 * &lt;/drivers&gt;
65 * </pre>
66 *
67 */
68package org.onosproject.net.driver;