measure method
Implementation
Future<ScpStatusMeasure> measure(String deviceId, String action) async {
log('do measure for device: $deviceId');
final ScpStatusMeasure measureResponseStatus =
await ScpMessageSender.sendMeasure(
knownDevices.firstWhere((element) => element.deviceId == deviceId),
action);
if (measureResponseStatus.status == ScpStatus.RESULT_SUCCESS) {
log('Successfully send measure $action to $deviceId');
return measureResponseStatus;
} else {
log('Failed to send measure $action to $deviceId');
return measureResponseStatus;
}
}