Closed mojtabavi closed 2 years ago
Several of the built-in commands have asyncronous operation from the perspective of Driverworks. The most commonly used ones are going to be the network IO libraries, which are either http(s) (using C4:Url
) or network operations (which can use either the built in TCPClient / TCPServer
modules, or the native Control4 network connection operations.
The timer commands also operate from an async perspective inside Driverworks, where the timer expiring triggers an async callback.
Input from the rest of the system (by watching events, variables, system variables etc) also triggers async callbacks inside the Driverworks environment.
What are you trying to achieve?
I think using Timer is best idea for me tnx
I would recommend using the module we publish at https://github.com/control4/drivers-common-public/blob/master/global/timer.lua as the basis for any work you do with timers. Other modules inside that repository will be good demonstrators of how to use the timer module.
thanks for your answer it realy helps me @WWalshC4 can i have your email? I have some question about driver developing
Does the driverworks-api have any Wait for Asynchronous Event API? or any Asynchronous delay?