This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

localbus library documentation
#3
Thank you @admin for your answer.

If I understand correctly, using localbus in a resident script:

(1) If I use, for example, step(10), the resident script waits for a message and,
- if the message arrives before 10 seconds, it calls whatever callbackfunction is defined, and, after that, exit the step(), continues with other instructions and, when it reaches the end of the resident script. it starts the script again
- if the message does not arrive before 10 seconds, after 10 seconds it exit the step(), continues with other instructions and, when it reaches the end of the resident script. it starts the script again
(2) If I use, for example, loop(10), the resident script:
- waits for messages for 10 seconds, and, for each message it receives, it calls whatever callbackfunction is defined
- after 10 seconds it exit the loop(), continues with other instructions and, when it reaches the end of the resident script. it starts the script again

Is this correct ?

The script for the reaload event on the bus is perfect for my need, thank you.

Just one more question: which is the meaning of the timeout I can define when creating the local bus connection ? Has it any relations with the time-out in step() and loop() ?

Thanks again
Reply


Messages In This Thread
localbus library documentation - by antlomb - 28.01.2025, 16:44
RE: localbus library documentation - by admin - 29.01.2025, 06:41
RE: localbus library documentation - by antlomb - 29.01.2025, 07:35
RE: localbus library documentation - by admin - 29.01.2025, 07:56

Forum Jump: