use of org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.configuration.service.SetConfigurationObjectService in project open-smart-grid-platform by OSGP.
the class SetConfigurationObjectCommandExecutor method execute.
@Override
public AccessResultCode execute(final DlmsConnectionManager conn, final DlmsDevice device, final ConfigurationObjectDto configurationToSet, final MessageMetadata messageMetadata) throws ProtocolAdapterException {
final Protocol protocol = Protocol.forDevice(device);
final GetConfigurationObjectService getService = this.protocolServiceLookup.lookupGetService(protocol);
final ConfigurationObjectDto configurationOnDevice = getService.getConfigurationObject(conn);
final SetConfigurationObjectService setService = this.protocolServiceLookup.lookupSetService(protocol);
return setService.setConfigurationObject(conn, configurationToSet, configurationOnDevice);
}
use of org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.configuration.service.SetConfigurationObjectService in project open-smart-grid-platform by OSGP.
the class SetRandomisationSettingsCommandExecutor method writeDirectAttach.
private void writeDirectAttach(final DlmsConnectionManager conn, final DlmsDevice device, final boolean directAttach) throws ProtocolAdapterException {
final Protocol protocol = Protocol.forDevice(device);
final GetConfigurationObjectService getConfigurationObjectService = this.protocolServiceLookup.lookupGetService(protocol);
final ConfigurationObjectDto configurationOnDevice = getConfigurationObjectService.getConfigurationObject(conn);
final SetConfigurationObjectService setService = this.protocolServiceLookup.lookupSetService(protocol);
final ConfigurationObjectDto configurationToSet = this.createNewConfiguration(directAttach, configurationOnDevice);
final AccessResultCode result = setService.setConfigurationObject(conn, configurationToSet, configurationOnDevice);
this.checkResult(result, "directAttach");
}
use of org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.configuration.service.SetConfigurationObjectService in project open-smart-grid-platform by OSGP.
the class SetConfigurationObjectCommandExecutorDsmr4IT method setUp.
@BeforeEach
public void setUp() throws IOException {
final DlmsHelper dlmsHelper = new DlmsHelper();
final GetConfigurationObjectService getService = new GetConfigurationObjectServiceDsmr4(dlmsHelper);
final SetConfigurationObjectService setService = new SetConfigurationObjectServiceDsmr4(dlmsHelper);
super.setUp(getService, setService);
}
use of org.opensmartgridplatform.adapter.protocol.dlms.domain.commands.configuration.service.SetConfigurationObjectService in project open-smart-grid-platform by OSGP.
the class SetConfigurationObjectCommandExecutorSmr5IT method setUp.
@BeforeEach
public void setUp() throws IOException {
final DlmsHelper dlmsHelper = new DlmsHelper();
final GetConfigurationObjectService getService = new GetConfigurationObjectServiceSmr5(dlmsHelper);
final SetConfigurationObjectService setService = new SetConfigurationObjectServiceSmr5(dlmsHelper);
super.setUp(getService, setService);
}
Aggregations