use of org.opensmartgridplatform.adapter.protocol.iec60870.domain.services.DeviceResponseService in project open-smart-grid-platform by OSGP.
the class SinglePointInformationWithTimeTagAsduHandler method handleAsdu.
@Override
public void handleAsdu(final ASdu asdu, final ResponseMetadata responseMetadata) {
LOGGER.debug("Received asdu {} for device {}.", asdu, responseMetadata.getDeviceIdentification());
final MeasurementReportDto measurementReportDto = this.converter.convert(asdu);
final DeviceResponseService deviceResponseService = this.deviceResponseServiceRegistry.forDeviceType(responseMetadata.getDeviceType());
if (CauseOfTransmission.SPONTANEOUS == asdu.getCauseOfTransmission()) {
deviceResponseService.processEvent(measurementReportDto, responseMetadata);
} else {
deviceResponseService.process(measurementReportDto, responseMetadata);
}
}
Aggregations