Search in sources :

Example 1 with LightMeasurementDeviceAsduFactory

use of org.opensmartgridplatform.simulator.protocol.iec60870.domain.lightmeasurementdevice.LightMeasurementDeviceAsduFactory 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)

Aggregations

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