EthernetConnectionConfig¶
Bases: ConnectionConfig
EthernetConnectionConfig class provides required information for Ethernet devices configuration.
Notes: This class is non-copyable and non-movable.
This class extends ConnectionConfig to manage network-specific settings such as IP address, subnet mask, gateway, and port configuration for Ethernet-connected devices.
__init__()
¶
Default constructor.
Initializes a new instance of the EthernetConnectionConfig class.
fromXML(connectionNode)
¶
Provide Ethernet connection information from the XML node.
Populates the Ethernet connection configuration from the provided XML node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connectionNode
|
XMLNode
|
The XML node containing Ethernet connection information |
required |
Raises:
| Type | Description |
|---|---|
InscoperException
|
If an error occurred |
toXML(xmlParent)
¶
Export Ethernet connection information in an XML node attached to the parent XML node.
Serializes the Ethernet connection configuration to the specified parent XML node.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xmlParent
|
XMLNode
|
The parent XML node |
required |
Raises:
| Type | Description |
|---|---|
InscoperException
|
If an error occurred |
getType()
¶
Return the connection type.
Retrieves the specific type of connection configuration (Ethernet).
Returns:
| Type | Description |
|---|---|
int
|
The type of the connection |
getServerClient()
¶
Get the mode validation byte.
Retrieves the server/client mode validation byte.
Returns:
| Type | Description |
|---|---|
int
|
The mode validation byte |
setServerClient(serverClient)
¶
Set the mode validation byte.
Sets the server/client mode validation byte.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
serverClient
|
int
|
The mode validation byte |
required |
getAddressType()
¶
Get the IP addressing mode.
Retrieves the mode of IP addressing (Static, DHCP).
Returns:
| Type | Description |
|---|---|
int
|
The IP addressing mode |
setAddressType(addressType)
¶
Set the IP addressing mode.
Sets the mode of IP addressing (Static, DHCP).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
addressType
|
int
|
The IP addressing mode |
required |
getIpAddress()
¶
Get the IP address.
Retrieves the IP address as an unsigned integer.
Returns:
| Type | Description |
|---|---|
int
|
The IP address |
setIpAddress(ipAddress)
¶
Set the IP address.
Sets the IP address as an unsigned integer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ipAddress
|
int
|
The IP address |
required |
getMask()
¶
Get the subnet mask.
Retrieves the subnet mask as an unsigned integer.
Returns:
| Type | Description |
|---|---|
int
|
The subnet mask |
setMask(mask)
¶
Set the subnet mask.
Sets the subnet mask as an unsigned integer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mask
|
int
|
The subnet mask |
required |
getGateWAddress()
¶
Get the gateway address.
Retrieves the gateway address as an unsigned integer.
Returns:
| Type | Description |
|---|---|
int
|
The gateway address |
setGateWAddress(gateWAddress)
¶
Set the gateway address.
Sets the gateway address as an unsigned integer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gateWAddress
|
int
|
The gateway address |
required |
getPort()
¶
Get the connection port.
Retrieves the network port number.
Returns:
| Type | Description |
|---|---|
int
|
The connection port |
setPort(port)
¶
Set the connection port.
Sets the network port number.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
port
|
int
|
The port |
required |