IRC Logs for #circuits Tuesday, 2015-03-24

*** Romster has quit IRC00:20
*** Romster has joined #circuits00:21
*** Osso has quit IRC01:33
*** clixx-io has joined #circuits02:06
clixx-ioI'm wondering if somebody knows how to do a repeating loop event in circuits02:07
clixx-ioso, in paho_mqtt they have mqttc.loop()02:07
clixx-ioI want to continuously call it02:07
prologicsure do :)02:08
prologicTimer() :)02:08
prologicwrite an event poller02:08
prologicwhich is what Timer is02:08
clixx-iooh, ok02:09
clixx-ioI'm using those already02:09
prologicthis would be a great question to ask here02:09
prologicif you don't mind :)02:09
prologicI'm trying to get a bit more exposure and help rebuild a stronger more focused circuits community :)02:10
prologicit's a recent thing (last week) :)02:10
prologicBut essentilaly there are three options02:10
prologiccoroutines using call/wait and yield02:11
prologicTimer itself02:11
prologicor writing a custom event poller02:11
prologicother methods are to just wrap whatever it is you're doing in a traditional thread02:11
clixx-ioof course - I don't want to write anything - I'm bad at that02:11
prologiclike what I've done with autodock (
prologicbut I'd encourage you to write your question up on SO02:12
prologicI can more concisely answer it hopefully :)02:12
clixx-iowell you already answered02:12
prologictrue :)02:12
prologicbut help us out anyway :)02:12
prologicI'll even give a code sample hopefully02:12
prologicif you can spare the time02:13
prologicofc :)02:13
clixx-ioI'm in the process of changing all my code to circuits02:13
prologicwonderful :)02:14
clixx-ioa quick question, does the directory notify work on serial ports? ie /dev/ttyUSB0 added etc02:14
prologichopefully you'll have many q's then :)02:14
prologicit should do - yes02:14
prologicas /dev is part of your file system02:14
clixx-ioprobably not because what I have is mostly working02:15
clixx-ioand gpio? also?02:15
prologicwell anything that inotify can see - yeah02:15
prologicNB: we don't have implemtnations of for any other platform at this time02:15
prologicOnly Linux02:15
clixx-iooh ok, but there is a file notifications thing under windows02:17
clixx-ioSo here's an example of what I am doing. I want to see when new usbttl adaptors are plugged in02:18
clixx-ioI'm adding a set of tools so that I can detect new network devices... new gpio devices.. etc etc02:19
clixx-ioso ping/nmap/arp devices on a timer to see what's been added to the network02:22
clixx-ioand also use the same approach for i2c, gpio etc02:23
prologicso sounds like you need a cross-platform ?02:23
prologicto simplify some of this making the use of a Timer redundant02:23
clixx-ioI'm happy with what it has now02:23
clixx-ioso I don't "need" it02:23
clixx-ioI guess I will just use 250ms timers for my first question02:25
clixx-iothe next question is what to do with re-entrancy?02:25
prologicsounds reasonable02:25
prologichow does re-rentrancy come in to play here?02:26
prologiccircuits is not multi-threaded02:26
clixx-iosay I have a ping or nmap that takes 5 seconds instead of a planned 1-second02:26
prologicAhh I see02:26
clixx-iooh - so no problem then02:26
prologicso you're going to call out to /bin/ping ?02:26
prologicyeah okay02:26
prologicdo this in a Worker process pool02:26
prologicand use call/wait (coroutine)02:26
prologicdo your own event synchornoization02:27
prologicand some handler02:27
prologicbrb - grabbing lunch02:28
clixx-iodo you have the documentation link to the worker-process-pool?02:28
clixx-iothanks anyway - seeya02:30
*** clixx-io has quit IRC02:30
*** Workster has quit IRC06:29
*** Osso has joined #circuits08:14
*** ninkotech has joined #circuits09:24
*** koobs has quit IRC10:28
*** koobs has joined #circuits12:35
*** qwebirc1951 has joined #circuits15:32
*** qwebirc1951 has quit IRC15:32
*** Osso has quit IRC17:00
*** Workster has joined #circuits22:26

Generated by 2.11.0 by Marius Gedminas - find it at!