pushData method
- SenseData senseData
Push the data
The data source might do some processing on the data. As a result, the data might be modified when the getLatestData method is called or when a listener callback is triggered.
Calling this method in quick succession might ignore some calls.
Parameters
- IN senseData The sense data to be added
Returns
- True if the push data type is available, false otherwise.
Throws
- An exception if it fails
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'];
}