DeviceExecuteAsynchronous

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.

Details

  • 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.

Examples

Basic Examples  (1)

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

The retrieved cookies:

Wolfram Research (2014), DeviceExecuteAsynchronous, Wolfram Language function, https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html.

Text

Wolfram Research (2014), DeviceExecuteAsynchronous, Wolfram Language function, https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html.

CMS

Wolfram Language. 2014. "DeviceExecuteAsynchronous." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html.

APA

Wolfram Language. (2014). DeviceExecuteAsynchronous. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html

BibTeX

@misc{reference.wolfram_2024_deviceexecuteasynchronous, author="Wolfram Research", title="{DeviceExecuteAsynchronous}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html}", note=[Accessed: 07-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_deviceexecuteasynchronous, organization={Wolfram Research}, title={DeviceExecuteAsynchronous}, year={2014}, url={https://reference.wolfram.com/language/ref/DeviceExecuteAsynchronous.html}, note=[Accessed: 07-December-2024 ]}