use of org.openmuc.j60870.ie.IeQualifierOfInterrogation in project open-smart-grid-platform by OSGP.
the class ControlledStationSteps method sendInterrogationResponse.
private Object sendInterrogationResponse(final int commonAddress, final IeQualifierOfInterrogation qualifier, final ProcessImage processImage) {
final ConnectionEventListener listener = this.connectionSteps.getConnectionEventListener();
listener.newASdu(this.interrogationActivationConfirmationAsdu(commonAddress, qualifier));
for (final ASdu asdu : processImage.toInterrogationAsdus(commonAddress, qualifier)) {
listener.newASdu(asdu);
}
listener.newASdu(this.interrogationActivationTerminationAsdu(commonAddress, qualifier));
return null;
}
use of org.openmuc.j60870.ie.IeQualifierOfInterrogation in project open-smart-grid-platform by OSGP.
the class GeneralInterrogationService method sendGeneralInterrogation.
public void sendGeneralInterrogation(final ClientConnection deviceConnection, final RequestMetadata requestMetadata) throws IOException {
final String connectedDevice = deviceConnection.getConnectionParameters().getDeviceIdentification();
final int commonAddress = deviceConnection.getConnectionParameters().getCommonAddress();
deviceConnection.getConnection().interrogation(commonAddress, CauseOfTransmission.ACTIVATION, new IeQualifierOfInterrogation(QUALIFIER_OF_INTERROGATION_ID));
// interrogation command creates this asdu internally, however we
// need it here as well for logging...
final ASdu asdu = new ASdu(ASduType.C_IC_NA_1, false, CauseOfTransmission.ACTIVATION, false, false, ORIGINATOR_ADDRESS, commonAddress, new InformationObject(0, new IeQualifierOfInterrogation(QUALIFIER_OF_INTERROGATION_ID)));
final LogItem logItem = new LogItem(connectedDevice, requestMetadata.getOrganisationIdentification(), false, asdu.toString());
this.loggingService.log(logItem);
}
Aggregations