getLatestData method

SenseData? getLatestData(
  1. DataType type
)

The latest data from the DataSource.

Parameters

  • IN type The type for which to get the sense data

Returns

  • The SenseData object if it exists, otherwise false.

Throws

  • An exception if it fails

Implementation

SenseData? getLatestData(final DataType type) {
  final OperationResult resultString = objectMethod(
    _pointerId,
    'PlaybackContainer',
    'getLatestPlaybackData',
    args: type.id,
  );

  final dynamic result = resultString['result'];
  if (result != null) {
    return senseFromJson(result);
  } else {
    return null;
  }
}