DeviceExecuteAsynchronous
This feature is not supported on the Wolfram Cloud.

DeviceExecuteAsynchronous[device,"command",fun]
initiates asynchronous execution of the specified command on a device, calling the handler function fun when an event occurs.

DeviceExecuteAsynchronous[device,"command",params,fun]
executes the command with the parameters params.

DetailsDetails

  • A device can be specified either by a DeviceObject or by a string representing a device class.
  • DeviceExecuteAsynchronous is a non-blocking function that returns an AsynchronousTaskObject.
  • The parameters params can be given either as a list of raw parameters, or as an association or list of rules giving names and values of parameters.
  • The form in which specifications of events are fed to the handler function varies from one device to another.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Asynchronously read from a demo device that retrieves cookies from a specified URL, calling URLFetchAsynchronous in the background:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input

The retrieved cookies:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2014
(10.0)