has deviceStartComm completed?

Posted on
Sat Aug 07, 2021 11:59 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

has deviceStartComm completed?

Hopefully a simple question. Is there a way to know when deviceStartComm() completes? In other words, when all existing devices have been passed to the method.

Posted on
Sat Aug 07, 2021 1:25 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: has deviceStartComm completed?

Implement this:

Code: Select all
    def _postStartup(self):
        super(Plugin, self)._postStartup()
        # your code here


Your code will run after all the devices have been started (which is what the superclass call does).

The next thing that happens after that is the call to runConcurrentThread(), so you might put stuff there as well.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Aug 07, 2021 2:03 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: has deviceStartComm completed?

FlyingDiver wrote:
...
Code: Select all
    def _postStartup(self):
        super(Plugin, self)._postStartup()
        # your code here
... ...The next thing that happens after that is the call to runConcurrentThread(), so you might put stuff there as well.
Thanks, That's perfect. I am not implementing runConcurrentThread in this plugin, thus the need for exactly what you suggested.

Thanks

Posted on
Sat Aug 07, 2021 2:56 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: has deviceStartComm completed?

berkinet wrote:
Thanks, That's perfect. I am not implementing runConcurrentThread in this plugin, thus the need for exactly what you suggested.


Which is exactly why I needed it as well. Also, putting stuff in runConcurrentThread() has it's own problems if the thread crashes and get restarted,

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 15 guests