pushData method

bool pushData(
  1. SenseData senseData
)

Push a SenseData instance into the data source.

The data source might process or alter the data before it becomes visible via getLatestData or listener callbacks. Rapid successive calls may be ignored.

Parameters

  • senseData: The SenseData to push. Must be a SenseDataImpl or CameraImpl.

Returns

  • bool: True if the data type is supported and the push was accepted, false otherwise.

Implementation

bool pushData(final SenseData senseData) {
  if (senseData is! SenseDataImpl && senseData is! CameraImpl) {
    ApiErrorServiceImpl.apiErrorAsInt = GemError.invalidInput.code;
    return false;
  }
  final OperationResult resultString = objectMethod(
    pointerId,
    'DataSourceContainer',
    'pushData',
    args: (senseData as dynamic).toJson(),
  );

  return resultString['result'];
}