public interface OpenFlowSwitch
| Modifier and Type | Method and Description |
|---|---|
String |
channelId()
Identifies the channel used to communicate with the switch.
|
String |
datapathDescription()
fetch the datapath description.
|
org.onosproject.net.Device.Type |
deviceType()
Returns the switch device type.
|
void |
disconnectSwitch()
Disconnects the switch by closing the TCP connection.
|
org.projectfloodlight.openflow.protocol.OFFactory |
factory()
Provides the factory for this OF version.
|
long |
getId()
Gets the datapathId of the switch.
|
List<org.projectfloodlight.openflow.protocol.OFPortDesc> |
getPorts()
Fetches the ports of this switch.
|
RoleState |
getRole()
Fetch the role for this switch.
|
String |
getStringId()
Gets a string version of the ID for this switch.
|
void |
handleMessage(org.projectfloodlight.openflow.protocol.OFMessage fromSwitch)
Handle a message from the switch.
|
String |
hardwareDescription()
fetch the hardware description.
|
boolean |
isConnected()
Checks if the switch is still connected.
|
String |
manufacturerDescription()
fetch the manufacturer description.
|
void |
returnRoleReply(RoleState requested,
RoleState response)
Notifies the controller that the device has responded to a set-role request.
|
void |
sendMsg(List<org.projectfloodlight.openflow.protocol.OFMessage> msgs)
Writes the OFMessage list to the driver.
|
void |
sendMsg(org.projectfloodlight.openflow.protocol.OFMessage msg)
Writes the message to the driver.
|
String |
serialNumber()
fetch the serial number.
|
void |
setRole(RoleState role)
Sets the role for this switch.
|
String |
softwareDescription()
fetch the software description.
|
void sendMsg(org.projectfloodlight.openflow.protocol.OFMessage msg)
Note: Messages may be silently dropped/lost due to IOExceptions or role. If this is a concern, then a caller should use barriers.
msg - the message to writevoid sendMsg(List<org.projectfloodlight.openflow.protocol.OFMessage> msgs)
Note: Messages may be silently dropped/lost due to IOExceptions or role. If this is a concern, then a caller should use barriers.
msgs - the messages to be writtenvoid handleMessage(org.projectfloodlight.openflow.protocol.OFMessage fromSwitch)
fromSwitch - the message to handlevoid setRole(RoleState role)
role - the role to set.RoleState getRole()
List<org.projectfloodlight.openflow.protocol.OFPortDesc> getPorts()
org.projectfloodlight.openflow.protocol.OFFactory factory()
String getStringId()
long getId()
String manufacturerDescription()
String datapathDescription()
String hardwareDescription()
String softwareDescription()
String serialNumber()
boolean isConnected()
void disconnectSwitch()
void returnRoleReply(RoleState requested, RoleState response)
requested - the role requested by the controllerresponse - the role set at the deviceorg.onosproject.net.Device.Type deviceType()
String channelId()