Search in sources :

Example 1 with Iec60870AsduFactory

use of org.opensmartgridplatform.simulator.protocol.iec60870.domain.Iec60870AsduFactory in project open-smart-grid-platform by OSGP.

the class ScenarioHooks method initMockServerLightMeasurement.

@Before("@Iec60870MockServerLightMeasurement")
public void initMockServerLightMeasurement() {
    ScenarioContext.current().put(PROFILE, Iec60870ProfileType.LIGHT_MEASUREMENT_DEVICE);
    final Iec60870AsduFactory factory = new LightMeasurementDeviceAsduFactory("UTC");
    factory.setIec60870Server(this.mockServer.getRtuSimulator());
    this.mockServer.addIec60870ASduHandler(ASduType.C_IC_NA_1, new Iec60870InterrogationCommandAsduHandler(factory));
}
Also used : Iec60870AsduFactory(org.opensmartgridplatform.simulator.protocol.iec60870.domain.Iec60870AsduFactory) Iec60870InterrogationCommandAsduHandler(org.opensmartgridplatform.simulator.protocol.iec60870.server.handlers.Iec60870InterrogationCommandAsduHandler) LightMeasurementDeviceAsduFactory(org.opensmartgridplatform.simulator.protocol.iec60870.domain.lightmeasurementdevice.LightMeasurementDeviceAsduFactory) Before(io.cucumber.java.Before)

Example 2 with Iec60870AsduFactory

use of org.opensmartgridplatform.simulator.protocol.iec60870.domain.Iec60870AsduFactory in project open-smart-grid-platform by OSGP.

the class ScenarioHooks method initMockServerDefaultControlledStation.

@Before("@Iec60870MockServerDefaultControlledStation")
public void initMockServerDefaultControlledStation() {
    ScenarioContext.current().put(PROFILE, Iec60870ProfileType.DEFAULT_CONTROLLED_STATION);
    final Iec60870AsduFactory factory = new DefaultControlledStationAsduFactory();
    factory.setIec60870Server(this.mockServer.getRtuSimulator());
    this.mockServer.addIec60870ASduHandler(ASduType.C_IC_NA_1, new Iec60870InterrogationCommandAsduHandler(factory));
}
Also used : Iec60870AsduFactory(org.opensmartgridplatform.simulator.protocol.iec60870.domain.Iec60870AsduFactory) Iec60870InterrogationCommandAsduHandler(org.opensmartgridplatform.simulator.protocol.iec60870.server.handlers.Iec60870InterrogationCommandAsduHandler) DefaultControlledStationAsduFactory(org.opensmartgridplatform.simulator.protocol.iec60870.domain.defaultcontrolledstation.DefaultControlledStationAsduFactory) Before(io.cucumber.java.Before)

Aggregations

Before (io.cucumber.java.Before)2 Iec60870AsduFactory (org.opensmartgridplatform.simulator.protocol.iec60870.domain.Iec60870AsduFactory)2 Iec60870InterrogationCommandAsduHandler (org.opensmartgridplatform.simulator.protocol.iec60870.server.handlers.Iec60870InterrogationCommandAsduHandler)2 DefaultControlledStationAsduFactory (org.opensmartgridplatform.simulator.protocol.iec60870.domain.defaultcontrolledstation.DefaultControlledStationAsduFactory)1 LightMeasurementDeviceAsduFactory (org.opensmartgridplatform.simulator.protocol.iec60870.domain.lightmeasurementdevice.LightMeasurementDeviceAsduFactory)1