use of org.opensmartgridplatform.adapter.protocol.iec61850.domain.entities.Iec61850DeviceReportGroup in project open-smart-grid-platform by OSGP.
the class DeviceManagementService method sendPqValues.
public void sendPqValues(final String deviceIdentification, final String reportDataSet, final GetPQValuesResponseDto response) {
final Iec61850DeviceReportGroup deviceReportGroup = this.deviceReportGroupRepository.findByDeviceIdentificationAndReportDataSet(deviceIdentification, reportDataSet);
final ProtocolResponseMessage responseMessage = ProtocolResponseMessage.newBuilder().messageMetadata(MessageMetadata.newBuilder().withDeviceIdentification(deviceIdentification).withOrganisationIdentification(NO_ORGANISATION).withCorrelationUid(NO_CORRELATION_UID).withMessageType(MessageType.GET_POWER_QUALITY_VALUES.name()).withDomain(deviceReportGroup.getDomain()).withDomainVersion(deviceReportGroup.getDomainVersion()).withMessagePriority(0).withScheduled(false).build()).result(ResponseMessageResultType.OK).dataObject(response).build();
this.responseSender.send(responseMessage);
}
use of org.opensmartgridplatform.adapter.protocol.iec61850.domain.entities.Iec61850DeviceReportGroup in project open-smart-grid-platform by OSGP.
the class Iec61850RtuDeviceReportingService method enableSpecificReports.
private void enableSpecificReports(final DeviceConnection connection, final String deviceIdentification, final String serverName) {
final ServerModel serverModel = connection.getConnection().getServerModel();
final ClientAssociation clientAssociation = connection.getConnection().getClientAssociation();
final List<Iec61850DeviceReportGroup> deviceReportGroups = this.iec61850DeviceReportRepository.findByDeviceIdentificationAndEnabled(deviceIdentification, true);
for (final Iec61850DeviceReportGroup deviceReportGroup : deviceReportGroups) {
this.enableReportGroup(serverName, deviceIdentification, deviceReportGroup.getIec61850ReportGroup(), serverModel, clientAssociation);
}
}
Aggregations