use of org.openmuc.jdlms.datatypes.DataObject in project open-smart-grid-platform by OSGP.
the class GetGsmDiagnosticCommandExecutorIntegrationTest method setResponseForAdjacentCells.
private void setResponseForAdjacentCells(final AttributeAddress address) {
final DataObject cellId1 = DataObject.newUInteger32Data(85);
final DataObject signalQuality1 = DataObject.newUInteger8Data((short) 24);
final DataObject adjacentCells1 = DataObject.newStructureData(cellId1, signalQuality1);
final DataObject cellId2 = DataObject.newUInteger32Data(0);
final DataObject signalQuality2 = DataObject.newUInteger8Data((short) 0);
final DataObject adjacentCells2 = DataObject.newStructureData(cellId2, signalQuality2);
final DataObject cellId3 = DataObject.newUInteger32Data(303);
final DataObject signalQuality3 = DataObject.newUInteger8Data((short) 31);
final DataObject adjacentCells3 = DataObject.newStructureData(cellId3, signalQuality3);
final DataObject responseDataObject = DataObject.newArrayData(Arrays.asList(adjacentCells1, adjacentCells2, adjacentCells3));
this.connectionStub.addReturnValue(address, responseDataObject);
}
use of org.openmuc.jdlms.datatypes.DataObject in project open-smart-grid-platform by OSGP.
the class GetGsmDiagnosticCommandExecutorIntegrationTest method setResponseForCellInfo.
private void setResponseForCellInfo(final AttributeAddress address) {
final DataObject cellId = DataObject.newUInteger32Data(93);
final DataObject locationId = DataObject.newUInteger16Data(2232);
final DataObject signalQuality = DataObject.newUInteger8Data((short) 13);
final DataObject ber = DataObject.newUInteger8Data((short) 6);
final DataObject mcc = DataObject.newUInteger16Data(204);
final DataObject mnc = DataObject.newUInteger16Data(66);
final DataObject channelNumber = DataObject.newUInteger32Data(107);
final DataObject responseDataObject = DataObject.newStructureData(cellId, locationId, signalQuality, ber, mcc, mnc, channelNumber);
this.connectionStub.addReturnValue(address, responseDataObject);
}
use of org.openmuc.jdlms.datatypes.DataObject in project open-smart-grid-platform by OSGP.
the class GetGsmDiagnosticCommandExecutorIntegrationTest method setResponseForRegistrationStatus.
private void setResponseForRegistrationStatus(final AttributeAddress address) {
final DataObject responseDataObject = DataObject.newEnumerateData(5);
this.connectionStub.addReturnValue(address, responseDataObject);
}
use of org.openmuc.jdlms.datatypes.DataObject in project open-smart-grid-platform by OSGP.
the class GetGsmDiagnosticCommandExecutorIntegrationTest method setResponseForCaptureTime.
private void setResponseForCaptureTime(final AttributeAddress address) {
final DataObject responseDataObject = DataObject.newDateTimeData(new CosemDateTime(2021, 4, 1, 9, 28, 0, 0));
this.connectionStub.addReturnValue(address, responseDataObject);
}
use of org.openmuc.jdlms.datatypes.DataObject in project open-smart-grid-platform by OSGP.
the class GetGsmDiagnosticCommandExecutorIntegrationTest method setResponseForOperator.
private void setResponseForOperator(final AttributeAddress address) {
final DataObject responseDataObject = DataObject.newVisibleStringData("Operator".getBytes(StandardCharsets.US_ASCII));
this.connectionStub.addReturnValue(address, responseDataObject);
}
Aggregations