@Test void testCreateSingleCommand() { final DefaultControlledStationAsduFactory defaultControlledAsduFactory = new DefaultControlledStationAsduFactory(); final ASdu expected = new ASdu(ASduType.C_SC_NA_1, false, CauseOfTransmission.SPONTANEOUS, false, false, 0, 1, new InformationObject[] { new InformationObject(0, this.informationElementFactory .createInformationElements(Iec60870InformationObjectType.QUALIFIER_OF_INTERROGATION, 20)) }); final ASdu actual = defaultControlledAsduFactory.createSingleCommandAsdu(); assertThat(actual).usingRecursiveComparison().isEqualTo(expected); }
public ASdu createSingleCommandAsdu() { return new Iec60870AsduBuilder().withAsduType(ASduType.C_SC_NA_1) .withCauseOfTransmission(CauseOfTransmission.SPONTANEOUS) .withInformationObjects(new InformationObject[] { new InformationObject(0, new InformationElement[][] { { this.defaultIeQualifierOfInterrogation() } }) }) .build(); }
DefaultControlledStationAsduFactory implements Iec60870AsduFactory { public ASdu createSingleCommandAsdu() { return new Iec60870AsduBuilder().withAsduType(ASduType.C_SC_NA_1) .withCauseOfTransmission(CauseOfTransmission.SPONTANEOUS) .withInformationObjects(new InformationObject[] { new InformationObject(0, new InformationElement[][] { { this.defaultIeQualifierOfInterrogation() } }) }) .build(); } }
DefaultControlledStationAsduFactory implements Iec60870AsduFactory { public ASdu createSingleCommandAsdu() { return new Iec60870AsduBuilder().withAsduType(ASduType.C_SC_NA_1) .withCauseOfTransmission(CauseOfTransmission.SPONTANEOUS) .withInformationObjects(new InformationObject[] { new InformationObject(0, new InformationElement[][] { { this.defaultIeQualifierOfInterrogation() } }) }) .build(); }  }
DefaultControlledStationAsduFactory implements Iec60870AsduFactory { public ASdu createSingleCommandAsdu() { return new Iec60870AsduBuilder().withAsduType(ASduType.C_SC_NA_1) .withCauseOfTransmission(CauseOfTransmission.SPONTANEOUS) .withInformationObjects(new InformationObject[] { new InformationObject(0, new InformationElement[][] { { this.defaultIeQualifierOfInterrogation() } }) }) .build(); }  @PostConstruct @Override void initialize(); @Override ASdu createInterrogationCommandResponseAsdu(); ASdu createSingleCommandAsdu(); ASdu createShortFloatingPointMeasurementAsdu(); @Override void setIec60870Server(final Iec60870Server iec60870Server); }
DefaultControlledStationAsduFactory implements Iec60870AsduFactory { public ASdu createSingleCommandAsdu() { return new Iec60870AsduBuilder().withAsduType(ASduType.C_SC_NA_1) .withCauseOfTransmission(CauseOfTransmission.SPONTANEOUS) .withInformationObjects(new InformationObject[] { new InformationObject(0, new InformationElement[][] { { this.defaultIeQualifierOfInterrogation() } }) }) .build(); }  @PostConstruct @Override void initialize(); @Override ASdu createInterrogationCommandResponseAsdu(); ASdu createSingleCommandAsdu(); ASdu createShortFloatingPointMeasurementAsdu(); @Override void setIec60870Server(final Iec60870Server iec60870Server);  }