Package io.openems.edge.core.host
Class OperatingSystemDebianSystemd
java.lang.Object
io.openems.edge.core.host.OperatingSystemDebianSystemd
- All Implemented Interfaces:
OperatingSystem
OperatingSystem implementation for Debian with systemd.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the network configuration.Gets the USB configuration.Executes a command.void
handleSetNetworkConfigRequest
(User user, NetworkConfiguration oldNetworkConfiguration, SetNetworkConfigRequest request) Handles a SetNetworkConfigRequest.protected static <A> NetworkInterface<A>
parseSystemdNetworkdConfigurationFile
(List<String> lines, A attachment) Parses a Systemd-Networkd configuration file.
-
Constructor Details
-
OperatingSystemDebianSystemd
-
-
Method Details
-
getNetworkConfiguration
Description copied from interface:OperatingSystem
Gets the network configuration.- Specified by:
getNetworkConfiguration
in interfaceOperatingSystem
- Returns:
- the network configuration object
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
handleSetNetworkConfigRequest
public void handleSetNetworkConfigRequest(User user, NetworkConfiguration oldNetworkConfiguration, SetNetworkConfigRequest request) throws OpenemsError.OpenemsNamedException Description copied from interface:OperatingSystem
Handles a SetNetworkConfigRequest.- Specified by:
handleSetNetworkConfigRequest
in interfaceOperatingSystem
- Parameters:
user
- the UseroldNetworkConfiguration
- the current/old network configurationrequest
- the SetNetworkConfigRequest- Throws:
OpenemsError.OpenemsNamedException
- on error
-
handleExecuteCommandRequest
public CompletableFuture<ExecuteSystemCommandResponse> handleExecuteCommandRequest(ExecuteSystemCommandRequest request) Description copied from interface:OperatingSystem
Executes a command.- Specified by:
handleExecuteCommandRequest
in interfaceOperatingSystem
- Parameters:
request
- the ExecuteCommandRequest- Returns:
- a ExecuteCommandResponse
-
getUsbConfiguration
Description copied from interface:OperatingSystem
Gets the USB configuration.- Specified by:
getUsbConfiguration
in interfaceOperatingSystem
- Returns:
- the original configuration in textual form
- Throws:
OpenemsError.OpenemsNamedException
- on error
-
parseSystemdNetworkdConfigurationFile
protected static <A> NetworkInterface<A> parseSystemdNetworkdConfigurationFile(List<String> lines, A attachment) throws OpenemsError.OpenemsNamedException Parses a Systemd-Networkd configuration file.See systemd.network.5 man page
- Type Parameters:
A
- the type of the attachment- Parameters:
lines
- the lines to parseattachment
- to be added as an attachment to theNetworkInterface
- Returns:
- a
NetworkInterface
- Throws:
OpenemsError.OpenemsNamedException
- on error
-