Tekvel Magic
|
Network adapter. More...
Public Member Functions | |
def | __init__ (self, index=None, desc=None, **kwargs) |
def | get_interface_list (self) |
Returns a list of network interfaces available in the machine. More... | |
def | select_interface (self, custom_title=None, custom_message=None) |
Displays the list of avilable interfaces and stores inforation about the selected interface in class instance. More... | |
def | get_index (self) |
Returns index (starting with 0) of the selected network interface or Raises exception if none was selected. More... | |
def | get_desc (self) |
Returns description of the selected network interface or Raises exception if none was selected. More... | |
def | get_id (self) |
Returns platform-indepndent identifier of the selected network interface or Raises exception if interface has not been selected or platform not supported. More... | |
Network adapter.
This class allows to perform manipulations with network adapter, such as displaying the list of available network adapters and selecting network adapter in a cross-platform way to be further used in other classes and functions where it is required. The class can be initialized multiple times thus allowing to select multiple interface IDs to be used by different functions (e.g. if it is required to publish Sampled Values on one interface while subscribing to GOOSE messages via another interface).
Example usage:
def __init__ | ( | self, | |
index = None , |
|||
desc = None , |
|||
** | kwargs | ||
) |
def get_desc | ( | self | ) |
Returns description of the selected network interface or Raises exception if none was selected.
Exception | Network interface has not been selected! |
def get_id | ( | self | ) |
Returns platform-indepndent identifier of the selected network interface or Raises exception if interface has not been selected or platform not supported.
This function shall always be used to obtain NIF identifier for further use in NIF-related functions and classes.
Exception | Network interface has not been selected! |
def get_index | ( | self | ) |
Returns index (starting with 0) of the selected network interface or Raises exception if none was selected.
Exception | Network interface has not been selected! |
def get_interface_list | ( | self | ) |
Returns a list of network interfaces available in the machine.
def select_interface | ( | self, | |
custom_title = None , |
|||
custom_message = None |
|||
) |
Displays the list of avilable interfaces and stores inforation about the selected interface in class instance.