public class CfgFeat extends Object
| Constructor and Description |
|---|
CfgFeat()
No-args constructor to allow incremental creation.
|
| Modifier and Type | Method and Description |
|---|---|
Set<PortConfig> |
getPortConfig()
Returns the default port config flags.
|
Set<PortConfig> |
getPortConfig(int index)
Returns the port config flags for the given port index.
|
int |
getPortCount()
Returns the port count.
|
Set<PortFeature> |
getPortFeatures()
Returns the port feature flags.
|
Set<PortFeature> |
getPortFeatures(int index)
Returns the port feature flags for the given port index.
|
MacPrefix |
getPortMac()
Returns the port MAC prefix used to configure the port MACs.
|
Set<SupportedAction> |
getSuppActs()
Returns the set of supported actions.
|
void |
overridePortConfig(int index,
Set<PortConfig> portConfig)
Overrides the default port config for the given port index.
|
void |
overridePortFeatures(int index,
Set<PortFeature> features)
Overrides the default port features for the given port index.
|
static long |
pickCurrentSpeed(PortFeature rate)
Using the specified rate, divides by 2 to provide a fake
current port speed value.
|
static long |
pickMaxSpeed(PortFeature rate)
Uses the specified rate to return a fake max port speed value.
|
static PortFeature |
pickRate(Set<PortFeature> portFeatures)
Picks the first Rate flag and returns it.
|
void |
setPortConfig(Set<PortConfig> portConfig)
Sets the default port config.
|
void |
setPortCount(int portCount)
Sets the port count.
|
void |
setPortFeatures(Set<PortFeature> portFeatures)
Sets the default port features.
|
void |
setPortMac(MacPrefix pfx)
Sets the port MAC prefix.
|
void |
setSuppActs(Set<SupportedAction> suppActs)
Sets the supported actions.
|
String |
toString() |
public Set<SupportedAction> getSuppActs()
public int getPortCount()
public MacPrefix getPortMac()
public Set<PortConfig> getPortConfig()
public Set<PortConfig> getPortConfig(int index)
portCount - 1.index - the port indexIllegalArgumentException - if the index is out of rangepublic Set<PortFeature> getPortFeatures()
public Set<PortFeature> getPortFeatures(int index)
portCount - 1.index - the port indexIllegalArgumentException - if the index is out of rangepublic void setSuppActs(Set<SupportedAction> suppActs)
suppActs - the supported actionspublic void setPortCount(int portCount)
portCount - the number of portspublic void setPortMac(MacPrefix pfx)
pfx - the port mac prefixpublic void setPortConfig(Set<PortConfig> portConfig)
portConfig - the default port configpublic void overridePortConfig(int index,
Set<PortConfig> portConfig)
index - the port indexportConfig - the port config for that portpublic void setPortFeatures(Set<PortFeature> portFeatures)
portFeatures - the default port featurespublic void overridePortFeatures(int index,
Set<PortFeature> features)
index - the port indexfeatures - the port features for that portpublic static PortFeature pickRate(Set<PortFeature> portFeatures)
portFeatures - the port features to examinepublic static long pickCurrentSpeed(PortFeature rate)
rate - port ratepublic static long pickMaxSpeed(PortFeature rate)
rate - port rateCopyright © 2014. All Rights Reserved.