2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.openflowplugin.impl.device;
11 import org.opendaylight.openflowplugin.api.openflow.device.DeviceState;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeaturesReply;
17 * org.opendaylight.openflowplugin.impl.device
19 * DeviceState is builded from {@link FeaturesReply} and {@link NodeId}. Both values are inside
20 * {@link org.opendaylight.openflowplugin.api.openflow.connection.ConnectionContext}
23 class DeviceStateImpl implements DeviceState {
25 private boolean meterIsAvailable;
26 private boolean groupIsAvailable;
27 private boolean flowStatisticsAvailable;
28 private boolean tableStatisticsAvailable;
29 private boolean portStatisticsAvailable;
30 private boolean statPollEnabled;
31 private boolean queueStatisticsAvailable;
33 public DeviceStateImpl() {
34 statPollEnabled = false;
38 public boolean isMetersAvailable() {
39 return meterIsAvailable;
43 public void setMeterAvailable(final boolean available) {
44 meterIsAvailable = available;
48 public boolean isGroupAvailable() {
49 return groupIsAvailable;
53 public void setGroupAvailable(final boolean available) {
54 groupIsAvailable = available;
58 public boolean isFlowStatisticsAvailable() {
59 return flowStatisticsAvailable;
63 public void setFlowStatisticsAvailable(final boolean available) {
64 flowStatisticsAvailable = available;
68 public boolean isTableStatisticsAvailable() {
69 return tableStatisticsAvailable;
73 public void setTableStatisticsAvailable(final boolean available) {
74 tableStatisticsAvailable = available;
78 public boolean isPortStatisticsAvailable() {
79 return portStatisticsAvailable;
83 public void setPortStatisticsAvailable(final boolean available) {
84 portStatisticsAvailable = available;
88 public boolean isQueueStatisticsAvailable() {
89 return queueStatisticsAvailable;
93 public void setQueueStatisticsAvailable(final boolean available) {
94 queueStatisticsAvailable = available;
99 public boolean isStatisticsPollingEnabled() {
100 return statPollEnabled;