1cbc3c28039dbaaba0b9cb5ca884e4a12b81f494
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / device / DeviceState.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowplugin.api.openflow.device;
10
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.Node;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.NodeKey;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.GetFeaturesOutput;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.role.service.rev150727.OfpRole;
16 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
17
18 /**
19  * Created by Martin Bobak <mbobak@cisco.com> on 25.2.2015.
20  */
21 public interface DeviceState {
22
23     /**
24      * @return id of encapsulated node
25      */
26     NodeId getNodeId();
27
28     /**
29      * @return {@link Node} instance identifier
30      */
31     KeyedInstanceIdentifier<Node, NodeKey> getNodeInstanceIdentifier();
32
33     /**
34      * @return the features of corresponding switch
35      */
36     GetFeaturesOutput getFeatures();
37
38     /**
39      * @return true if this session is valid
40      */
41     boolean isValid();
42
43     /**
44      * @param valid the valid to set
45      */
46     void setValid(boolean valid);
47
48     /**
49      * Return node current OF protocol version
50      *
51      * @return
52      */
53     short getVersion();
54
55     /**
56      * Return true if we have relevant meter information
57      * from device
58      *
59      * @return
60      */
61     boolean isMetersAvailable();
62
63     /**
64      * Set information about meter statistics availability.
65      */
66     void setMeterAvailable(boolean available);
67
68     /**
69      * Return true if we have relevant group information
70      * from device
71      *
72      * @return
73      */
74     boolean isGroupAvailable();
75
76     /**
77      * Set information about group statistics availability.
78      */
79     void setGroupAvailable(boolean available);
80
81     /**
82      * Method returns true if initial statistics data were collected and written to DS.
83      *
84      * @return
85      */
86     boolean deviceSynchronized();
87
88     /**
89      * Method returns true, if device capabilities provides flow statistics.
90      *
91      * @return
92      */
93     boolean isFlowStatisticsAvailable();
94
95     void setFlowStatisticsAvailable(boolean available);
96
97     /**
98      * Method returns true, if device capabilities provides table statistics.
99      *
100      * @return
101      */
102     boolean isTableStatisticsAvailable();
103
104     void setTableStatisticsAvailable(boolean available);
105
106     /**
107      * Method returns true, if device capabilities provides flow statistics.
108      *
109      * @return
110      */
111     boolean isPortStatisticsAvailable();
112
113     void setPortStatisticsAvailable(boolean available);
114
115     /**
116      * Method returns true, if device capabilities provides queue statistics.
117      *
118      * @return
119      */
120     boolean isQueueStatisticsAvailable();
121
122     void setQueueStatisticsAvailable(boolean available);
123
124     void setDeviceSynchronized(boolean deviceSynchronized);
125
126     boolean isStatisticsPollingEnabled();
127
128     void setStatisticsPollingEnabledProp(boolean statPollEnabled);
129
130 }