Async processing issue within an event handler

--001a11c24356b52fbf05204cf683
Content-Type: multipart/alternative; boundary=001a11c24356b52fba05204cf681

--001a11c24356b52fba05204cf681
Content-Type: text/plain; charset=UTF-8

I apologize for the length of this question in advance.

Background: The July 2015 issue of Nuts and Volts magazine had an article
on using an inexpensive DVB-T USB dongle along with a 24MHz upconverter as
the basis for an HF and higher Software Defined Receiver(SDR). The software
used in the article was SDR# an MS-Windows application. As I am an Ubuntu
user, I looked for a similar Linux application. I found gqrx. While waiting
on parts to build the upconverter, I installed gqrx-sdr from the Ubuntu
Software Center. It ran and pulled in various signals from 24MHz up, but
was unstable. Turns out this was a pretty old version and after
uninstalling and then installing sudo add-apt-repository
ppa:gqrx/snapshots, a stable version was found.

Well, gqrx has a Remote Control feature that can accept commands over a
Telnet connection and more digging turned up a perl script(gqrx-scan) that
uses this interface, through Net::Telnet, to implement a scanner feature.
gqrx-scan has many bells and whistles that I wouldn't ever use so I wrote a
lite/crude version(lite.pl) that just scans from F1 to F2 repeatedly. For
more flexibility(and practice) I decided to expand lite.pl into a wxPerl
application(wxgqrxLite.pl), mostly a bunch of text controls and sizers.

Problem 1: lite.pl is basically a while(1) loop scanning from F1 to F2,
listening for a second when a strong signal is detected.
Question 1: Where should the non-GUI stuff fit into a wxPerl application?
Current Solution 1: I created two timer events and put the scan code in one
and the listen code in the other. They trigger each other alternately at
separate rates(30msec and 2 seconds). Only one of these events/timers are
active at a time. This actually works!

Problem 2: You can't start scanning unless the Telnet connection is open,
otherwise it throws a connection refused error.
Solution 2: Add code to track scanning and connection status to prevent the
user from doing illegal operations or multiple consecutive hits of the same
button, and popup message boxes to flag these errors.

Problem 3: The error checks, interlocks and message boxes between the
{startbutton} and {stopbutton} events seems to be ok. The same cannot be
said for the {connectbutton} and {disconnectbutton} events. There seems to
be a race/async processing problem between establishing the Telnet
connection(which errors and should set the {tnerror} flag) and the mainline
event code. The three individual print Dumper $self->{tnerror} statements
all show {tnerror} = 0 (wrong!) while the print Dumper $self statement
below shows {tnerror} = 1 (right!). There's a delay in this flag being set
in the Net::Telnet call which causes the rest of the {connectbutton} event
routine to process a wrong flag value.
Question 3: HELP ????? I'm out of ideas...

Question 4: Does event->Skip() terminate the current event handler like
last terminates a while loop?

Code attached. It will run without the dongle or gqrx installed. It just
fails on the Telnet connection.

Thanks for your input.

James
Ubuntu 14.04.2LTS/perl 5.18.2/wxPerl 3.0.1/HP 15 Quadcore Laptop

--001a11c24356b52fba05204cf681
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I apologize for the length of this question in advance.<br=
><br>Background: The July 2015 issue of Nuts and Volts magazine had an arti=
cle on using an inexpensive DVB-T USB dongle along with a 24MHz upconverter=
 as the basis for an HF and higher Software Defined Receiver(SDR). The soft=
ware used in the article was SDR# an MS-Windows application. As I am an Ubu=
ntu user, I looked for a similar Linux application. I found gqrx. While wai=
ting on parts to build the upconverter, I installed gqrx-sdr from the Ubunt=
u Software Center. It ran and pulled in various signals from 24MHz up, but =
was unstable. Turns out this was a pretty old version and after uninstallin=
g and then installing sudo add-apt-repository ppa:gqrx/snapshots, a stable =
version was found.<br><br>Well, gqrx has a Remote Control feature that can =
accept commands over a Telnet connection and more digging turned up a perl =
script(gqrx-scan) that uses this interface, through Net::Telnet, to impleme=
nt a scanner feature. gqrx-scan has many bells and whistles that I wouldn&#=
39;t ever use so I wrote a lite/crude version(<a href=3D"http://lite.pl">li=
te.pl</a>) that just scans from F1 to F2 repeatedly. For more flexibility(a=
nd practice) I decided to expand <a href=3D"http://lite.pl">lite.pl</a> int=
o a wxPerl application(wxgqrxLite.pl), mostly a bunch of text controls and =
sizers.<br><br>Problem 1: <a href=3D"http://lite.pl">lite.pl</a> is basical=
ly a while(1) loop scanning from F1 to F2, listening for a second when a st=
rong signal is detected.<br>Question 1: Where should the non-GUI stuff fit =
into a wxPerl application?<br>Current Solution 1: I created two timer event=
s and put the scan code in one and the listen code in the other. They trigg=
er each other alternately at separate rates(30msec and 2 seconds). Only one=
 of these events/timers are active at a time. This actually works!<br><br>P=
roblem 2: You can&#39;t start scanning unless the Telnet connection is open=
, otherwise it throws a connection refused error.<br>Solution 2: Add code t=
o track scanning and connection status to prevent the user from doing illeg=
al operations or multiple consecutive hits of the same button, and popup me=
ssage boxes to flag these errors.<br><br>Problem 3: The error checks, inter=
locks and message boxes between the {startbutton} and {stopbutton} events s=
eems to be ok. The same cannot be said for the {connectbutton} and {disconn=
ectbutton} events. There seems to be a race/async processing problem betwee=
n establishing the Telnet connection(which errors and should set the {tnerr=
or} flag) and the mainline event code. The three individual print Dumper $s=
elf-&gt;{tnerror} statements all show {tnerror} =3D 0 (wrong!) while the pr=
int Dumper $self statement below shows {tnerror} =3D 1 (right!). There&#39;=
s a delay in this flag being set in the Net::Telnet call which causes the r=
est of the {connectbutton} event routine to process a wrong flag value.<br>=
Question 3: HELP ????? I&#39;m out of ideas...<br><br>Question 4: Does even=
t-&gt;Skip() terminate the current event handler like last terminates a whi=
le loop?<br><br>Code attached. It will run without the dongle or gqrx insta=
lled. It just fails on the Telnet connection.<br><br>Thanks for your input.=
<br><br>James<br>Ubuntu 14.04.2LTS/perl 5.18.2/wxPerl 3.0.1/HP 15 Quadcore =
Laptop<br>=C2=A0<br><br></div>

--001a11c24356b52fba05204cf681--
--001a11c24356b52fbf05204cf683
Content-Type: application/x-perl; name="lite.pl"
Content-Disposition: attachment; filename="lite.pl"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ieurbu450

IyEgL3Vzci9iaW4vcGVybAoKIyBOYW1lOgkJCWxpdGUucGwgLSBTaW1wbGUgZ3FyeCBTRFIgU2Nh
bm5lcgojIEF1dGhvcjoJCUphbWVzIE0uIEx5bmVzLCBKci4KIyBDcmVhdGVkOgkJU2VwdGVtYmVy
IDE3LCAyMDE1CiMgTW9kaWZpZWQgQnk6CQlKYW1lcyBNLiBMeW5lcywgSnIuCiMgTGFzdCBNb2Rp
ZmllZDoJU2VwdGVtYmVyIDE3LCAyMDE1CiM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Skge25leHR9OwojICAgICAgIHByaW50ICRsZXZlbDsKCiAgICAgICAgaWYo
JGxldmVsID4gJHNxdWVsY2gpIHtUaW1lOjpIaVJlczo6c2xlZXAoJGxpc3Rlbil9OwkJIyBQYXVz
ZSBzY2FuIHdoZW4gc2lnbmFsIGRldGVjdGVkCgogICAgICAgICRzdGFydCA9ICRzdGFydCArICRz
dGVwOwogICAgICAgIFRpbWU6OkhpUmVzOjpzbGVlcCgkcGF1c2UpOwkJCQkJIyBQYXVzZSBiZWZv
cmUgbmV4dCBmcmVxdWVuY3kgaG9wCiAgICB9CgokY291bnQrKzsJCQkJCQkJCSMgTG9vcCBmb3Ig
bmV4dCBzY2FuIGN5Y2xlCn0KCiMgQ2xvc2UgdGhlIFRlbG5ldCBjb25uZWN0aW9uCiR0LT5wcmlu
dCgiYyIpOwoK
--001a11c24356b52fbf05204cf683
Content-Type: application/x-perl; name="wxgqrxLite.pl"
Content-Disposition: attachment; filename="wxgqrxLite.pl"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_ieurc16h1

IyEgL3Vzci9iaW4vcGVybAoKIyBOYW1lOgkJCXd4Z3FyeExpdGUucGwgLSBTaW1wbGUgZ3FyeCBT
RFIgU2Nhbm5lciAtIHd4UGVybCBWZXJzaW9uCiMgQXV0aG9yOgkJSmFtZXMgTS4gTHluZXMsIEpy
LgojIENyZWF0ZWQ6CQlTZXB0ZW1iZXIgMTcsIDIwMTUKIyBNb2RpZmllZCBCeToJCUphbWVzIE0u
IEx5bmVzLCBKci4KIyBMYXN0IE1vZGlmaWVkOglTZXB0ZW1iZXIgMjAsIDIwMTUKIyBFbnZpcm9u
bWVudDoJCVVidW50dSAxNC4wNExUUyAvIHBlcmwgdjUuMTguMiAvIHd4UGVybCAzLjAuMSAvIEhQ
IDE1IFF1YWQgQ29yZQojIENoYW5nZSBMb2c6CQk5LzE3LzIwMTUgLSBQcm9ncmFtIENyZWF0ZWQK
IwkJCTkvMTkvMjAxNSAtIEFkZGVkIFRpd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TUVSKCRzZWxmLCAkc2VsZi0+e2x0aW1lcn0sIHN1YiB7CQkJCSMgTGlzdGVuIG1v
ZGUgLSBSdW5zIG9uY2UgcGVyIFJTU0kgdHJpZ2dlcgoJCQlteSAoJHNlbGYsICRldmVudCkgPSBA
XzsKCQkJJHNlbGYtPntsdGltZXJ9LT5TdG9wOwkJCQkJIyBTdG9wIGxpc3RlbiBtb2RlCgkJCSRz
ZWxmLT57cHRpbWVyfS0+U3RhcnQoJHNlbGYtPntwYXVzZX0pOwkJCSMgUmVzdGFydCBzY2FuIG1v
ZGUKCQkJfSk7CiMgQXNzaWduIG1haW5TaXplciB0byB0aGUgRnJhbWUgYW5kIHRyaWdnZXIgbGF5
b3V0CgogICAgJG1haW5TaXplci0+Rml0KCRzZWxmKTsKICAgICRtYWluU2l6ZXItPkxheW91dCgp
OwoKCgogICAgcmV0dXJuICRzZWxmOwp9CjE7Cgo=
--001a11c24356b52fbf05204cf683--
0
jmlynesjr
9/22/2015 2:43:31 AM
perl.wxperl.users 3070 articles. 0 followers. Follow

5 Replies
419 Views

Similar Articles

[PageSpeed] 59

--------------090309080301080001040504
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi James,

On 21/09/15 23:43, James Lynes wrote:
> I apologize for the length of this question in advance.
>
> Background: The July 2015 issue of Nuts and Volts magazine had an 
> article on using an inexpensive DVB-T USB dongle along with a 24MHz 
> upconverter as the basis for an HF and higher Software Defined 
> Receiver(SDR). 
Amazing, I didn't know there were such things as SDRs, although I did 
play around with the idea of using a microprocessor to act as a video 
capture card, which I guess is a similar idea.  So you're using a TV 
receiver as a radio receiver? Slightly inverted, but cool.
> The software used in the article was SDR# an MS-Windows application. 
> As I am an Ubuntu user, I looked for a similar Linux application. I 
> found gqrx. While waiting on parts to build the upconverter, I 
> installed gqrx-sdr from the Ubuntu Software Center. It ran and pulled 
> in various signals from 24MHz up, but was unstable. Turns out this was 
> a pretty old version and after uninstalling and then installing sudo 
> add-apt-repository ppa:gqrx/snapshots, a stable version was found.
>
> Well, gqrx has a Remote Control feature that can accept commands over 
> a Telnet connection and more digging turned up a perl 
> script(gqrx-scan) that uses this interface, through Net::Telnet, to 
> implement a scanner feature. gqrx-scan has many bells and whistles 
> that I wouldn't ever use so I wrote a lite/crude version(lite.pl 
> <http://lite.pl>) that just scans from F1 to F2 repeatedly. For more 
> flexibility(and practice) I decided to expand lite.pl <http://lite.pl> 
> into a wxPerl application(wxgqrxLite.pl), mostly a bunch of text 
> controls and sizers.
>
> Problem 1: lite.pl <http://lite.pl> is basically a while(1) loop 
> scanning from F1 to F2, listening for a second when a strong signal is 
> detected.
> Question 1: Where should the non-GUI stuff fit into a wxPerl application?
> Current Solution 1: I created two timer events and put the scan code 
> in one and the listen code in the other. They trigger each other 
> alternately at separate rates(30msec and 2 seconds). Only one of these 
> events/timers are active at a time. This actually works!
This depends on how decoupled you are.  If you are completely decoupled 
and just want an on or off signal (and I have a number of cases where I 
do this) then a parallel process will do it.  For instrance I have a 
process to check network availability.  Sometimes the network 
availability is mixed, like on the edge of a mobile or wifi signal, in 
this case wx::Timer will appear to hang and your process will freeze.  
If this is not what you want, use a separate process.  Here is an 
example where I use a temporary file with 1 byte in it.

    `echo 0 > /home/image/Documents/Endoscopia/DB/nw.txt`;     # Create 
base file with '0' (network not available)
                                         # if in case previous instance 
crashed with nw available
                                         # and it now isn't.

    $gl_nw_process_id_int=Wx::ExecuteCommand("perl iM_nw.pl", 
wxEXEC_ASYNC);    # Maintain network status file asynchronously.
..
..
..
call other stuff.
..
..
..
     # on exit or crash
    # Switch off nw monitor.
    Wx::Process::Kill( $gl_nw_process_id_int, Wx::wxSIGKILL() ) if 
$gl_nw_process_id_int;

I then use wx::Timer to reread the file and there is no pause.  It 
always returns 1 or 0.
>
> Problem 2: You can't start scanning unless the Telnet connection is 
> open, otherwise it throws a connection refused error.
> Solution 2: Add code to track scanning and connection status to 
> prevent the user from doing illegal operations or multiple consecutive 
> hits of the same button, and popup message boxes to flag these errors.
You can use a similar solution to the above.
>
> Problem 3: The error checks, interlocks and message boxes between the 
> {startbutton} and {stopbutton} events seems to be ok. The same cannot 
> be said for the {connectbutton} and {disconnectbutton} events. There 
> seems to be a race/async processing problem between establishing the 
> Telnet connection(which errors and should set the {tnerror} flag) and 
> the mainline event code. The three individual print Dumper 
> $self->{tnerror} statements all show {tnerror} = 0 (wrong!) while the 
> print Dumper $self statement below shows {tnerror} = 1 (right!). 
> There's a delay in this flag being set in the Net::Telnet call which 
> causes the rest of the {connectbutton} event routine to process a 
> wrong flag value.
> Question 3: HELP ????? I'm out of ideas...
Maybe a similar one a again?
>
> Question 4: Does event->Skip() terminate the current event handler 
> like last terminates a while loop?
You have Skip and Veto, Skip says continue and imagine I am not here.  
Eg if you pressed the escape key out of a dialog box,  if you have code 
there, the dialog box will not exit.  If you use ->Skip, it will, as it 
would as if there was no code there.

Veto says, undo what you just did and is not always applicable.

Neither of these says this routine over-rides and replaces the default 
behaviour.

(People, do you all agree?).
>
> Code attached. It will run without the dongle or gqrx installed. It 
> just fails on the Telnet connection.
>
> Thanks for your input.
Broadly speaking your choices are Wx::Timer, Threads and 
Wx::ExecuteCommand/Wx::Process

Good luck,

Steve
>
> James
> Ubuntu 14.04.2LTS/perl 5.18.2/wxPerl 3.0.1/HP 15 Quadcore Laptop
>


--------------090309080301080001040504
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi James,<br>
    <br>
    <div class="moz-cite-prefix">On 21/09/15 23:43, James Lynes wrote:<br>
    </div>
    <blockquote
cite="mid:CABPysehy=T2-sdvekw57NAcYM_epaFYRy+b2_2MGCYJu0dCzxQ@mail.gmail.com"
      type="cite">I apologize for the length of this question in
      advance.<br>
      <br>
      Background: The July 2015 issue of Nuts and Volts magazine had an
      article on using an inexpensive DVB-T USB dongle along with a
      24MHz upconverter as the basis for an HF and higher Software
      Defined Receiver(SDR). </blockquote>
    Amazing, I didn't know there were such things as SDRs, although I
    did play around with the idea of using a microprocessor to act as a
    video capture card, which I guess is a similar idea.  So you're
    using a TV receiver as a radio receiver? Slightly inverted, but
    cool. <br>
    <blockquote
cite="mid:CABPysehy=T2-sdvekw57NAcYM_epaFYRy+b2_2MGCYJu0dCzxQ@mail.gmail.com"
      type="cite">The software used in the article was SDR# an
      MS-Windows application. As I am an Ubuntu user, I looked for a
      similar Linux application. I found gqrx. While waiting on parts to
      build the upconverter, I installed gqrx-sdr from the Ubuntu
      Software Center. It ran and pulled in various signals from 24MHz
      up, but was unstable. Turns out this was a pretty old version and
      after uninstalling and then installing sudo add-apt-repository
      ppa:gqrx/snapshots, a stable version was found.<br>
      <br>
      Well, gqrx has a Remote Control feature that can accept commands
      over a Telnet connection and more digging turned up a perl
      script(gqrx-scan) that uses this interface, through Net::Telnet,
      to implement a scanner feature. gqrx-scan has many bells and
      whistles that I wouldn't ever use so I wrote a lite/crude version(<a
        moz-do-not-send="true" href="http://lite.pl">lite.pl</a>) that
      just scans from F1 to F2 repeatedly. For more flexibility(and
      practice) I decided to expand <a moz-do-not-send="true"
        href="http://lite.pl">lite.pl</a> into a wxPerl
      application(wxgqrxLite.pl), mostly a bunch of text controls and
      sizers.<br>
      <br>
      Problem 1: <a moz-do-not-send="true" href="http://lite.pl">lite.pl</a>
      is basically a while(1) loop scanning from F1 to F2, listening for
      a second when a strong signal is detected.<br>
      Question 1: Where should the non-GUI stuff fit into a wxPerl
      application?<br>
      Current Solution 1: I created two timer events and put the scan
      code in one and the listen code in the other. They trigger each
      other alternately at separate rates(30msec and 2 seconds). Only
      one of these events/timers are active at a time. This actually
      works!<br>
    </blockquote>
    This depends on how decoupled you are.  If you are completely
    decoupled and just want an on or off signal (and I have a number of
    cases where I do this) then a parallel process will do it.  For
    instrance I have a process to check network availability.  Sometimes
    the network availability is mixed, like on the edge of a mobile or
    wifi signal, in this case wx::Timer will appear to hang and your
    process will freeze.  If this is not what you want, use a separate
    process.  Here is an example where I use a temporary file with 1
    byte in it.<br>
    <br>
       `echo 0 &gt; /home/image/Documents/Endoscopia/DB/nw.txt`;       
        # Create base file with '0' (network not available)<br>
                                                                       
                                            # if in case previous
    instance crashed with nw available<br>
                                                                       
                                            # and it now isn't.<br>
    <br>
       $gl_nw_process_id_int=Wx::ExecuteCommand("perl iM_nw.pl",
    wxEXEC_ASYNC);    # Maintain network status file asynchronously.<br>
    .<br>
    .<br>
    .<br>
    call other stuff.<br>
    .<br>
    .<br>
    .<br>
        # on exit or crash<br>
       # Switch off nw monitor.<br>
       Wx::Process::Kill( $gl_nw_process_id_int, Wx::wxSIGKILL() ) if
    $gl_nw_process_id_int;<br>
    <br>
    I then use wx::Timer to reread the file and there is no pause.  It
    always returns 1 or 0.<br>
    <blockquote
cite="mid:CABPysehy=T2-sdvekw57NAcYM_epaFYRy+b2_2MGCYJu0dCzxQ@mail.gmail.com"
      type="cite"><br>
      Problem 2: You can't start scanning unless the Telnet connection
      is open, otherwise it throws a connection refused error.<br>
      Solution 2: Add code to track scanning and connection status to
      prevent the user from doing illegal operations or multiple
      consecutive hits of the same button, and popup message boxes to
      flag these errors.<br>
    </blockquote>
    You can use a similar solution to the above.<br>
    <blockquote
cite="mid:CABPysehy=T2-sdvekw57NAcYM_epaFYRy+b2_2MGCYJu0dCzxQ@mail.gmail.com"
      type="cite"><br>
      Problem 3: The error checks, interlocks and message boxes between
      the {startbutton} and {stopbutton} events seems to be ok. The same
      cannot be said for the {connectbutton} and {disconnectbutton}
      events. There seems to be a race/async processing problem between
      establishing the Telnet connection(which errors and should set the
      {tnerror} flag) and the mainline event code. The three individual
      print Dumper $self-&gt;{tnerror} statements all show {tnerror} = 0
      (wrong!) while the print Dumper $self statement below shows
      {tnerror} = 1 (right!). There's a delay in this flag being set in
      the Net::Telnet call which causes the rest of the {connectbutton}
      event routine to process a wrong flag value.<br>
      Question 3: HELP ????? I'm out of ideas...<br>
    </blockquote>
    Maybe a similar one a again?<br>
    <blockquote
cite="mid:CABPysehy=T2-sdvekw57NAcYM_epaFYRy+b2_2MGCYJu0dCzxQ@mail.gmail.com"
      type="cite"><br>
      Question 4: Does event-&gt;Skip() terminate the current event
      handler like last terminates a while loop?<br>
    </blockquote>
    You have Skip and Veto, Skip says continue and imagine I am not
    here.  Eg if you pressed the escape key out of a dialog box,  if you
    have code there, the dialog box will not exit.  If you use
    -&gt;Skip, it will, as it would as if there was no code there.<br>
    <br>
    Veto says, undo what you just did and is not always applicable.  <br>
    <br>
    Neither of these says this routine over-rides and replaces the
    default behaviour.<br>
    <br>
    (People, do you all agree?).<br>
    <blockquote
cite="mid:CABPysehy=T2-sdvekw57NAcYM_epaFYRy+b2_2MGCYJu0dCzxQ@mail.gmail.com"
      type="cite"><br>
      Code attached. It will run without the dongle or gqrx installed.
      It just fails on the Telnet connection.<br>
      <br>
      Thanks for your input.<br>
    </blockquote>
    Broadly speaking your choices are Wx::Timer, Threads and
    Wx::ExecuteCommand/Wx::Process<br>
    <br>
    Good luck,<br>
    <br>
    Steve<br>
    <blockquote
cite="mid:CABPysehy=T2-sdvekw57NAcYM_epaFYRy+b2_2MGCYJu0dCzxQ@mail.gmail.com"
      type="cite"><br>
      James<br>
      Ubuntu 14.04.2LTS/perl 5.18.2/wxPerl 3.0.1/HP 15 Quadcore Laptop<br>
       <br>
    </blockquote>
    <br>
  </body>
</html>

--------------090309080301080001040504--
0
steve
9/24/2015 1:47:54 PM
--001a11c24356e5509d052084b460
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Steve:

Thanks for the great response as always.

Yes, I've been having fun playing with this stuff. DVB-T is the EU standard
for digital broadcast television. The standard is different in the US(go
figure=E2=98=BA). The dongle I bought was around $12 USD. I've heard WWV on=
 25MHz,
US Citizen's Band around 27MHz, US Broadcast FM 88-108 MHz, Aircraft
120-135 MHz, 2m Amateur 144-148 MHz, NOAA Weather 162 MHz, and 70cm Amateur
440 Mhz. Normal Amateur bands and shortwave stations below 24 MHz require
the 24 MHz upconverter which I haven't built yet). The output of gqrx can
be fed through Pulse Audio to fldigi for decoding digital data streams(I
have just started looking at this feature).

Based on your comments I went and read the Perl Threads tutorial and
searched Perl Monks for Wx and Threads(very little there). Also no working
example on the wxPerl Wiki.

I think Threads and Threads::Shared with lock() is the way to go. Now I
just have to go figure it out!

Thanks again,

James



On Thu, Sep 24, 2015 at 9:47 AM, Steve Cookson <steve.cookson@sca-uk.com>
wrote:

> Hi James,
>
> On 21/09/15 23:43, James Lynes wrote:
>
> I apologize for the length of this question in advance.
>
> Background: The July 2015 issue of Nuts and Volts magazine had an article
> on using an inexpensive DVB-T USB dongle along with a 24MHz upconverter a=
s
> the basis for an HF and higher Software Defined Receiver(SDR).
>
> Amazing, I didn't know there were such things as SDRs, although I did pla=
y
> around with the idea of using a microprocessor to act as a video capture
> card, which I guess is a similar idea.  So you're using a TV receiver as =
a
> radio receiver? Slightly inverted, but cool.
>
> The software used in the article was SDR# an MS-Windows application. As I
> am an Ubuntu user, I looked for a similar Linux application. I found gqrx=
..
> While waiting on parts to build the upconverter, I installed gqrx-sdr fro=
m
> the Ubuntu Software Center. It ran and pulled in various signals from 24M=
Hz
> up, but was unstable. Turns out this was a pretty old version and after
> uninstalling and then installing sudo add-apt-repository
> ppa:gqrx/snapshots, a stable version was found.
>
> Well, gqrx has a Remote Control feature that can accept commands over a
> Telnet connection and more digging turned up a perl script(gqrx-scan) tha=
t
> uses this interface, through Net::Telnet, to implement a scanner feature.
> gqrx-scan has many bells and whistles that I wouldn't ever use so I wrote=
 a
> lite/crude version(lite.pl) that just scans from F1 to F2 repeatedly. For
> more flexibility(and practice) I decided to expand lite.pl into a wxPerl
> application(wxgqrxLite.pl), mostly a bunch of text controls and sizers.
>
> Problem 1: lite.pl is basically a while(1) loop scanning from F1 to F2,
> listening for a second when a strong signal is detected.
> Question 1: Where should the non-GUI stuff fit into a wxPerl application?
> Current Solution 1: I created two timer events and put the scan code in
> one and the listen code in the other. They trigger each other alternately
> at separate rates(30msec and 2 seconds). Only one of these events/timers
> are active at a time. This actually works!
>
> This depends on how decoupled you are.  If you are completely decoupled
> and just want an on or off signal (and I have a number of cases where I d=
o
> this) then a parallel process will do it.  For instrance I have a process
> to check network availability.  Sometimes the network availability is
> mixed, like on the edge of a mobile or wifi signal, in this case wx::Time=
r
> will appear to hang and your process will freeze.  If this is not what yo=
u
> want, use a separate process.  Here is an example where I use a temporary
> file with 1 byte in it.
>
>    `echo 0 > /home/image/Documents/Endoscopia/DB/nw.txt`;            #
> Create base file with '0' (network not available)
>
>                                     # if in case previous instance crashe=
d
> with nw available
>
>                                     # and it now isn't.
>
>    $gl_nw_process_id_int=3DWx::ExecuteCommand("perl iM_nw.pl",
> wxEXEC_ASYNC);    # Maintain network status file asynchronously.
> .
> .
> .
> call other stuff.
> .
> .
> .
>     # on exit or crash
>    # Switch off nw monitor.
>    Wx::Process::Kill( $gl_nw_process_id_int, Wx::wxSIGKILL() ) if
> $gl_nw_process_id_int;
>
> I then use wx::Timer to reread the file and there is no pause.  It always
> returns 1 or 0.
>
>
> Problem 2: You can't start scanning unless the Telnet connection is open,
> otherwise it throws a connection refused error.
> Solution 2: Add code to track scanning and connection status to prevent
> the user from doing illegal operations or multiple consecutive hits of th=
e
> same button, and popup message boxes to flag these errors.
>
> You can use a similar solution to the above.
>
>
> Problem 3: The error checks, interlocks and message boxes between the
> {startbutton} and {stopbutton} events seems to be ok. The same cannot be
> said for the {connectbutton} and {disconnectbutton} events. There seems t=
o
> be a race/async processing problem between establishing the Telnet
> connection(which errors and should set the {tnerror} flag) and the mainli=
ne
> event code. The three individual print Dumper $self->{tnerror} statements
> all show {tnerror} =3D 0 (wrong!) while the print Dumper $self statement
> below shows {tnerror} =3D 1 (right!). There's a delay in this flag being =
set
> in the Net::Telnet call which causes the rest of the {connectbutton} even=
t
> routine to process a wrong flag value.
> Question 3: HELP ????? I'm out of ideas...
>
> Maybe a similar one a again?
>
>
> Question 4: Does event->Skip() terminate the current event handler like
> last terminates a while loop?
>
> You have Skip and Veto, Skip says continue and imagine I am not here.  Eg
> if you pressed the escape key out of a dialog box,  if you have code ther=
e,
> the dialog box will not exit.  If you use ->Skip, it will, as it would as
> if there was no code there.
>
> Veto says, undo what you just did and is not always applicable.
>
> Neither of these says this routine over-rides and replaces the default
> behaviour.
>
> (People, do you all agree?).
>
>
> Code attached. It will run without the dongle or gqrx installed. It just
> fails on the Telnet connection.
>
> Thanks for your input.
>
> Broadly speaking your choices are Wx::Timer, Threads and
> Wx::ExecuteCommand/Wx::Process
>
> Good luck,
>
> Steve
>
>
> James
> Ubuntu 14.04.2LTS/perl 5.18.2/wxPerl 3.0.1/HP 15 Quadcore Laptop
>
>
>
>

--001a11c24356e5509d052084b460
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div>Steve:<br><br></div>Thanks for the gre=
at response as always.<br><br></div>Yes, I&#39;ve been having fun playing w=
ith this stuff. DVB-T is the EU standard for digital broadcast television. =
The standard is different in the US(go figure=E2=98=BA). The dongle I bough=
t was around $12 USD. I&#39;ve heard WWV on 25MHz, US Citizen&#39;s Band ar=
ound 27MHz, US Broadcast FM 88-108 MHz, Aircraft 120-135 MHz, 2m Amateur 14=
4-148 MHz, NOAA Weather 162 MHz, and 70cm Amateur 440 Mhz. Normal Amateur b=
ands and shortwave stations below 24 MHz require the 24 MHz upconverter whi=
ch I haven&#39;t built yet). The output of gqrx can be fed through Pulse Au=
dio to fldigi for decoding digital data streams(I have just started looking=
 at this feature).<br><br></div>Based on your comments I went and read the =
Perl Threads tutorial and searched Perl Monks for Wx and Threads(very littl=
e there). Also no working example on the wxPerl Wiki.<br><br></div>I think =
Threads and Threads::Shared with lock() is the way to go. Now I just have t=
o go figure it out!<br><div><div><br></div><div>Thanks again,<br><br></div>=
<div>James<br><br></div><div><br></div></div></div><div class=3D"gmail_extr=
a"><br><div class=3D"gmail_quote">On Thu, Sep 24, 2015 at 9:47 AM, Steve Co=
okson <span dir=3D"ltr">&lt;<a href=3D"mailto:steve.cookson@sca-uk.com" tar=
get=3D"_blank">steve.cookson@sca-uk.com</a>&gt;</span> wrote:<br><blockquot=
e class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc sol=
id;padding-left:1ex">
 =20
   =20
 =20
  <div text=3D"#000000" bgcolor=3D"#FFFFFF">
    Hi James,<span class=3D""><br>
    <br>
    <div>On 21/09/15 23:43, James Lynes wrote:<br>
    </div>
    <blockquote type=3D"cite">I apologize for the length of this question i=
n
      advance.<br>
      <br>
      Background: The July 2015 issue of Nuts and Volts magazine had an
      article on using an inexpensive DVB-T USB dongle along with a
      24MHz upconverter as the basis for an HF and higher Software
      Defined Receiver(SDR). </blockquote></span>
    Amazing, I didn&#39;t know there were such things as SDRs, although I
    did play around with the idea of using a microprocessor to act as a
    video capture card, which I guess is a similar idea.=C2=A0 So you&#39;r=
e
    using a TV receiver as a radio receiver? Slightly inverted, but
    cool. <br><span class=3D"">
    <blockquote type=3D"cite">The software used in the article was SDR# an
      MS-Windows application. As I am an Ubuntu user, I looked for a
      similar Linux application. I found gqrx. While waiting on parts to
      build the upconverter, I installed gqrx-sdr from the Ubuntu
      Software Center. It ran and pulled in various signals from 24MHz
      up, but was unstable. Turns out this was a pretty old version and
      after uninstalling and then installing sudo add-apt-repository
      ppa:gqrx/snapshots, a stable version was found.<br>
      <br>
      Well, gqrx has a Remote Control feature that can accept commands
      over a Telnet connection and more digging turned up a perl
      script(gqrx-scan) that uses this interface, through Net::Telnet,
      to implement a scanner feature. gqrx-scan has many bells and
      whistles that I wouldn&#39;t ever use so I wrote a lite/crude version=
(<a href=3D"http://lite.pl" target=3D"_blank">lite.pl</a>) that
      just scans from F1 to F2 repeatedly. For more flexibility(and
      practice) I decided to expand <a href=3D"http://lite.pl" target=3D"_b=
lank">lite.pl</a> into a wxPerl
      application(wxgqrxLite.pl), mostly a bunch of text controls and
      sizers.<br>
      <br>
      Problem 1: <a href=3D"http://lite.pl" target=3D"_blank">lite.pl</a>
      is basically a while(1) loop scanning from F1 to F2, listening for
      a second when a strong signal is detected.<br>
      Question 1: Where should the non-GUI stuff fit into a wxPerl
      application?<br>
      Current Solution 1: I created two timer events and put the scan
      code in one and the listen code in the other. They trigger each
      other alternately at separate rates(30msec and 2 seconds). Only
      one of these events/timers are active at a time. This actually
      works!<br>
    </blockquote></span>
    This depends on how decoupled you are.=C2=A0 If you are completely
    decoupled and just want an on or off signal (and I have a number of
    cases where I do this) then a parallel process will do it.=C2=A0 For
    instrance I have a process to check network availability.=C2=A0 Sometim=
es
    the network availability is mixed, like on the edge of a mobile or
    wifi signal, in this case wx::Timer will appear to hang and your
    process will freeze.=C2=A0 If this is not what you want, use a separate
    process.=C2=A0 Here is an example where I use a temporary file with 1
    byte in it.<br>
    <br>
    =C2=A0=C2=A0 `echo 0 &gt; /home/image/Documents/Endoscopia/DB/nw.txt`;=
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0
    =C2=A0=C2=A0=C2=A0 # Create base file with &#39;0&#39; (network not ava=
ilable)<br>
    =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=
=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=
=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =C2=
=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =
=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0
    =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=
=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=
=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 # if in case previous
    instance crashed with nw available<br>
    =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=
=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=
=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=
=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=
=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0
    =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=
=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=
=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 # and it now isn&#39;t.<br>
    <br>
    =C2=A0=C2=A0 $gl_nw_process_id_int=3DWx::ExecuteCommand(&quot;perl iM_n=
w.pl&quot;,
    wxEXEC_ASYNC);=C2=A0=C2=A0=C2=A0 # Maintain network status file asynchr=
onously.<br>
    .<br>
    .<br>
    .<br>
    call other stuff.<br>
    .<br>
    .<br>
    .<br>
    =C2=A0=C2=A0=C2=A0 # on exit or crash<br>
    =C2=A0=C2=A0 # Switch off nw monitor.<br>
    =C2=A0=C2=A0 Wx::Process::Kill( $gl_nw_process_id_int, Wx::wxSIGKILL() =
) if
    $gl_nw_process_id_int;<br>
    <br>
    I then use wx::Timer to reread the file and there is no pause.=C2=A0 It
    always returns 1 or 0.<span class=3D""><br>
    <blockquote type=3D"cite"><br>
      Problem 2: You can&#39;t start scanning unless the Telnet connection
      is open, otherwise it throws a connection refused error.<br>
      Solution 2: Add code to track scanning and connection status to
      prevent the user from doing illegal operations or multiple
      consecutive hits of the same button, and popup message boxes to
      flag these errors.<br>
    </blockquote></span>
    You can use a similar solution to the above.<span class=3D""><br>
    <blockquote type=3D"cite"><br>
      Problem 3: The error checks, interlocks and message boxes between
      the {startbutton} and {stopbutton} events seems to be ok. The same
      cannot be said for the {connectbutton} and {disconnectbutton}
      events. There seems to be a race/async processing problem between
      establishing the Telnet connection(which errors and should set the
      {tnerror} flag) and the mainline event code. The three individual
      print Dumper $self-&gt;{tnerror} statements all show {tnerror} =3D 0
      (wrong!) while the print Dumper $self statement below shows
      {tnerror} =3D 1 (right!). There&#39;s a delay in this flag being set =
in
      the Net::Telnet call which causes the rest of the {connectbutton}
      event routine to process a wrong flag value.<br>
      Question 3: HELP ????? I&#39;m out of ideas...<br>
    </blockquote></span>
    Maybe a similar one a again?<span class=3D""><br>
    <blockquote type=3D"cite"><br>
      Question 4: Does event-&gt;Skip() terminate the current event
      handler like last terminates a while loop?<br>
    </blockquote></span>
    You have Skip and Veto, Skip says continue and imagine I am not
    here.=C2=A0 Eg if you pressed the escape key out of a dialog box,=C2=A0=
 if you
    have code there, the dialog box will not exit.=C2=A0 If you use
    -&gt;Skip, it will, as it would as if there was no code there.<br>
    <br>
    Veto says, undo what you just did and is not always applicable.=C2=A0 <=
br>
    <br>
    Neither of these says this routine over-rides and replaces the
    default behaviour.<br>
    <br>
    (People, do you all agree?).<span class=3D""><br>
    <blockquote type=3D"cite"><br>
      Code attached. It will run without the dongle or gqrx installed.
      It just fails on the Telnet connection.<br>
      <br>
      Thanks for your input.<br>
    </blockquote></span>
    Broadly speaking your choices are Wx::Timer, Threads and
    Wx::ExecuteCommand/Wx::Process<br>
    <br>
    Good luck,<br>
    <br>
    Steve<span class=3D""><br>
    <blockquote type=3D"cite"><br>
      James<br>
      Ubuntu 14.04.2LTS/perl 5.18.2/wxPerl 3.0.1/HP 15 Quadcore Laptop<br>
      =C2=A0<br>
    </blockquote>
    <br>
  </span></div>

</blockquote></div><br></div>

--001a11c24356e5509d052084b460--
0
jmlynesjr
9/24/2015 9:13:46 PM
Hi James,

On 24/09/15 18:13, James Lynes wrote:
> Based on your comments I went and read the Perl Threads tutorial and 
> searched Perl Monks for Wx and Threads(very little there). Also no 
> working example on the wxPerl Wiki.
>
> I think Threads and Threads::Shared with lock() is the way to go. Now 
> I just have to go figure it out!
You'll still need wx::Timer to keep on checking the status of your threads.

Here are some snippets from my code, $gl_media_thread_hsh is a global 
variable.  I hope you can make sense of it.  If you need more detail, 
please just ask.

# import libraries
use threads ();                                        # Used for 
multi-tasking ffmpeg
use threads::shared;

# Check operation

             if ($value->is_running ne "1") {                    # Check 
status and if not executing:-
                 my $result = $gl_media_thread_hsh->{$key}->join();    
     #     - collect result.



# Post next thread

             $gl_media_thread_hsh->{$thread_no} = threads->new(
                 sub {
                     my $result = 0;
                     $result = $next_job->execute() if -e 
$next_job->{input_file};            # trigger job in background.
                     return $result;
                 }
             );
             $i_queue->post_new_job($loc_hash_count_int);        # 
Increment next available thread.

Regards

Steve.
0
steve
9/27/2015 12:27:11 PM
--001a11c3124a424d820520bfb943
Content-Type: text/plain; charset=UTF-8

Steve:

Thanks for the example code. I think I am doing something similar.

I have stub threads running along with my Wx code and I'm passing data and
flags via a shared Hash. Now I need to move the function code from the
event/timer handlers into the stubs. Probably another day or so of trial
and error and error and error... It's a good thing the compiler is fast and
it's not the old punch card days...

I'll post the code when it's working again.

Jim


On Sun, Sep 27, 2015 at 8:27 AM, Steve Cookson <steve.cookson@sca-uk.com>
wrote:

> Hi James,
>
> On 24/09/15 18:13, James Lynes wrote:
>
>> Based on your comments I went and read the Perl Threads tutorial and
>> searched Perl Monks for Wx and Threads(very little there). Also no working
>> example on the wxPerl Wiki.
>>
>> I think Threads and Threads::Shared with lock() is the way to go. Now I
>> just have to go figure it out!
>>
> You'll still need wx::Timer to keep on checking the status of your threads.
>
> Here are some snippets from my code, $gl_media_thread_hsh is a global
> variable.  I hope you can make sense of it.  If you need more detail,
> please just ask.
>
> # import libraries
> use threads ();                                        # Used for
> multi-tasking ffmpeg
> use threads::shared;
>
> # Check operation
>
>             if ($value->is_running ne "1") {                    # Check
> status and if not executing:-
>                 my $result = $gl_media_thread_hsh->{$key}->join();
> #     - collect result.
>
>
>
> # Post next thread
>
>             $gl_media_thread_hsh->{$thread_no} = threads->new(
>                 sub {
>                     my $result = 0;
>                     $result = $next_job->execute() if -e
> $next_job->{input_file};            # trigger job in background.
>                     return $result;
>                 }
>             );
>             $i_queue->post_new_job($loc_hash_count_int);        #
> Increment next available thread.
>
> Regards
>
> Steve.
>

--001a11c3124a424d820520bfb943
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div>Steve:<br><br></div>Thanks for the exa=
mple code. I think I am doing something similar.<br><br></div>I have stub t=
hreads running along with my Wx code and I&#39;m passing data and flags via=
 a shared Hash. Now I need to move the function code from the event/timer h=
andlers into the stubs. Probably another day or so of trial and error and e=
rror and error... It&#39;s a good thing the compiler is fast and it&#39;s n=
ot the old punch card days...<br><br></div>I&#39;ll post the code when it&#=
39;s working again.<br><br></div>Jim<br><br></div><div class=3D"gmail_extra=
"><br><div class=3D"gmail_quote">On Sun, Sep 27, 2015 at 8:27 AM, Steve Coo=
kson <span dir=3D"ltr">&lt;<a href=3D"mailto:steve.cookson@sca-uk.com" targ=
et=3D"_blank">steve.cookson@sca-uk.com</a>&gt;</span> wrote:<br><blockquote=
 class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc soli=
d;padding-left:1ex">Hi James,<span class=3D""><br>
<br>
On 24/09/15 18:13, James Lynes wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
Based on your comments I went and read the Perl Threads tutorial and search=
ed Perl Monks for Wx and Threads(very little there). Also no working exampl=
e on the wxPerl Wiki.<br>
<br>
I think Threads and Threads::Shared with lock() is the way to go. Now I jus=
t have to go figure it out!<br>
</blockquote></span>
You&#39;ll still need wx::Timer to keep on checking the status of your thre=
ads.<br>
<br>
Here are some snippets from my code, $gl_media_thread_hsh is a global varia=
ble.=C2=A0 I hope you can make sense of it.=C2=A0 If you need more detail, =
please just ask.<br>
<br>
# import libraries<br>
use threads ();=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 # Used for multi-tasking ffmpeg<br>
use threads::shared;<br>
<br>
# Check operation<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if ($value-&gt;is_running ne &quo=
t;1&quot;) {=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 # Check status and if not executing:-<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 my $result =3D $gl_=
media_thread_hsh-&gt;{$key}-&gt;join();=C2=A0 =C2=A0 =C2=A0 =C2=A0 #=C2=A0 =
=C2=A0 =C2=A0- collect result.<br>
<br>
<br>
<br>
# Post next thread<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $gl_media_thread_hsh-&gt;{$thread=
_no} =3D threads-&gt;new(<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sub {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 my $r=
esult =3D 0;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $resu=
lt =3D $next_job-&gt;execute() if -e $next_job-&gt;{input_file};=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 # trigger job in background.<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 retur=
n $result;<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 );<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 $i_queue-&gt;post_new_job($loc_ha=
sh_count_int);=C2=A0 =C2=A0 =C2=A0 =C2=A0 # Increment next available thread=
..<br>
<br>
Regards<span class=3D"HOEnZb"><font color=3D"#888888"><br>
<br>
Steve.<br>
</font></span></blockquote></div><br></div>

--001a11c3124a424d820520bfb943--
0
jmlynesjr
9/27/2015 7:38:22 PM
Hi James,

(Whoops, forgot to copy list).

On 28/09/15 16:15, James Lynes wrote:
> Your comment clicked. I see where a Timer will be the way to check my
> flags.
I set mine up to run in:

sub OnInit {
#
# Wx::Timers
#
     # Start processing job queue
     $gl_media_control_available=0;
     $gl_i_Main_Menu->{queue_timer} = Wx::Timer->new( $gl_i_Main_Menu, -1 );
     $gl_i_Main_Menu->{queue_timer} -> Start( 10000 );  # Evrey 10 secs 
normally, (every sec during an exam.)
     Wx::Event::EVT_TIMER( $gl_i_Main_Menu, 
$gl_i_Main_Menu->{queue_timer}, \&i_Mage::on_timer_queue_processing );

     # Start checking for network connectivitiy every 10 secs.
     $gl_i_Main_Menu->{ping_timer} = Wx::Timer->new( $gl_i_Main_Menu, -1  );
     $gl_i_Main_Menu->{ping_timer} -> Start( 10000 );
     Wx::Event::EVT_TIMER( $gl_i_Main_Menu, 
$gl_i_Main_Menu->{ping_timer}, 
\&i_Mage::on_timer_set_internet_connectivity );

         # Connect to Network.
     nw();

     # Start checking hardware every 10 mins (battery life and disk 
utilisation).
     $gl_i_Main_Menu->{hw_timer} = Wx::Timer->new( $gl_i_Main_Menu, -1  );
     $gl_i_Main_Menu->{hw_timer} -> Start( 600000 ); #
     Wx::Event::EVT_TIMER( $gl_i_Main_Menu, $gl_i_Main_Menu->{hw_timer}, 
\&i_Mage::on_timer_check_hardware_slow );
     i_Mage::on_timer_check_hardware_slow();

         return 1;
}

Good luck,

Steve.
0
steve
9/29/2015 9:58:44 AM
Reply:

Similar Artilces:

[wxperl-users] Disconnect handler from inside event?
I was wondering if it was possible to disconnect an function from an event while the event was happening. Here's what I tried: ......dialog constructor.... $self->Connect( -1, -1, wxEVT_ACTIVATE, \&SetPasswdFocus, ); $self; } my $done; sub SetPasswdFocus { my ($self, $event) = @_; # Set focus on password if we have user $self->{Passwd}->SetFocus if !$done++ and ${$self->{user_out}}; $self->Disconnect( -1, -1, wxEVT_ACTIVATE, \&SetPasswdFocus ); } If I comment out the Disconnect, then it work...

[wxperl-users] Fixed: using die() in event handler
Hello, the subject is very optimistic: it works in the single and simple case I have tried. I have no evidence that, for example, it will not leak like a sieve. But it is a start... Regards Mattia Hi All, Has anyone successfully used Wx::Menu::UpdateUI when using a PopupMenu. From the documentation it looks like this sub should be called before the menu is displayed, but my routine does not get called. I have tried using EVT_UPDATE_UI as well but no luck, I also tried EVT_MENU_OPEN but nothing. I want to click on a button that diaplys a context type PopupMenu that...

RE: [wxperl-users] Disconnect handler from inside event?
my $done; sub SetPasswdFocus { my ($self, $event) = @_; $self->{Passwd}->SetFocus if !$done++ and ${$self->{user_out}}; print "set focus\n"; #self->Disconnect( # -1, -1, # wxEVT_ACTIVATE #); #EVT_ACTIVATE($self, undef); } > Why not just use: > EVT_ACTIVATE($self, \&SetPasswdFocus) I'm just doing the best I can from the docs. The WxWindows docs said you can't disconnect unless you explicitly do a connect (from http://www.wxwindows.org/manuals/2.4.1/wx131.htm#wxevthandlerdisconnect) If that's what the above does, t...

[wxperl-users] processing events from "outside"
hi list, i have a running GUI in Wx with a TreeCtrl. a plugin (a perl-class) from my app now wants to register an event-handler in this TreeCtrl to catch events generated by the TreeCtrl. the TreeCtrl has no idea about the plugin, but the plugin has a ref to the TreeCtrl. due to my bad Wx-knowledge i fiddled around and tried something like package MyPlugin; .... EVT_TREE_SEL_CHANGED($self, $TREECTRL, \&OnTreeSelect); .... sub OnTreeSelect { ... } of course this doesn't work, since MyPlugin is no Wx::EvtHandler. if i make MyPlugin a subclass of Wx::EvtHandler ...

Re:[wxperl-users] processing events from "outside"
Hi, > i have a running GUI in Wx with a TreeCtrl. a plugin (a perl-c= lass) from my > app now wants to register an event-handler in this Tree= Ctrl to catch events > generated by the TreeCtrl. > > the TreeCtrl h= as no idea about the plugin, but the plugin has a ref to the > TreeCtrl= .. > > due to my bad Wx-knowledge i fiddled around and tried something = like > > package MyPlugin; > ... > EVT_TREE_SEL_CHANGED($self, $TREE= CTRL, \&OnTreeSelect); > ... > sub OnTreeSelect { ... } > > of cours= e this doesn...

[wxperl-users] Custom Event in WxPerl
--0-1473938600-1137054089=:29229 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi how i can make custom event to rise when i have text in windows clipboard ? i know about working with win32::clipboard but i need some help on creating custom event in wxperl thanks Mohsen --------------------------------- Yahoo! Photos � Showcase holiday pictures in hardcover Photo Books. You design it and we�ll bind it! --0-1473938600-1137054089=:29229 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit <div id="RTECont...

[wxperl-users] Window icons; async I/O event handling ?
Google wasn't much help, so please bear with a poor wxPerl newbie crossing over from the pTk chaos... 1) How can I change the little left-hand corner window icons in Win32 to my own custom icon ? 2) Any pointers to docs/examples of using async I/O events with wxPerl much appreciated. I've got a DBI driver that supports async operations and a simple polling i/f, works nicely w/ pTk; hopefully, there are equivalent hooks in wxPerl ? Are threads a viable solution in wxPerl (my DBI driver is also thread safe) ? Many thanks, Dean Arnold Presicient Corp. www.presicient.com...

RE: [wxperl-users] Disconnect handler from inside event? #2
> I'm just doing the best I can from the docs. The WxWindows docs said > you can't disconnect unless you explicitly do a connect > (from > http://www.wxwindows.org/manuals/2.4.1/wx131.htm#wxevthandlerdisconnect) > If that's what the above does, then great. > If you could point me to which documentation, I'd appreciate it :-) Found it. I see I should have read this first: http://wxperl.sourceforge.net/manual/manual4.html But yes, a pointer on how to Disconnect an event handler would be helpful to some newbie in the future :-) Thanks aga...

[wxperl-users] Faking Events for Testing in WxPerl
We've been talking about trying to put together a "test scripting language" for our big wxPerl application. We'd like to be able to write a file full of commands stated in some very simplistic code like -- text-enter name "Smith" button-click update check name equals "Smith" that sort of thing -- and have the program trigger the appropriate series of events, and make sure the right things happen. I tried to put together a minimalist, "proof of concept" demo. I put together in wxglade a tiny application with a couple buttons ...

RE: [wxperl-users] Re: Wx::Process::Kill problems (was: How to make class acept events)
Hmm, OK thanks everyone! Problem was that I had: Wx::Process->Kill and although it seems to be crashing with a syntax error on the machine = in front of me (activestate 5.8, win2K) something similar was dying = completely on Activestate 5.6.1 on WinXP. I have just upgraded that = machine to 5.8, so I suspect that it might have been something tickled = by 5.6.1? Seems to be working OK now. Thanks very much everyone -----Original Message----- From: Mattia Barbon [mailto:mattia.barbon@libero.it] Sent: 01 October 2003 19:04 To: Edward Wildgoose; wxperl-users@lists.sourcef...

superreview granted: [Bug 337199] Keypress events for RETURN key processed but return nsEventStatus_eIgnore (RETURN key events double-processed) : [Attachment 222537] v2 for trunk, AE TSM handlers res
Mike Shaver <shaver@mozilla.org> has granted superreview: Bug 337199: Keypress events for RETURN key processed but return nsEventStatus_eIgnore (RETURN key events double-processed) https://bugzilla.mozilla.org/show_bug.cgi?id=337199 Attachment 222537: v2 for trunk, AE TSM handlers restored https://bugzilla.mozilla.org/attachment.cgi?id=222537&action=edit ------- Additional Comments from Mike Shaver <shaver@mozilla.org> If the assertions in HandleNKeyEvent can happen in situations that don't involve changing a fundamental physical constant, it seems like we shou...

superreview requested: [Bug 337199] Keypress events for RETURN key processed but return nsEventStatus_eIgnore (RETURN key events double-processed) : [Attachment 222537] v2 for trunk, AE TSM handlers r #2
Mark Mentovai <mark@moxienet.com> has asked Mike Pinkerton <mikepinkerton@mac.com> for superreview: Bug 337199: Keypress events for RETURN key processed but return nsEventStatus_eIgnore (RETURN key events double-processed) https://bugzilla.mozilla.org/show_bug.cgi?id=337199 Attachment 222537: v2 for trunk, AE TSM handlers restored https://bugzilla.mozilla.org/attachment.cgi?id=222537&action=edit ...

superreview requested: [Bug 337199] Keypress events for RETURN key processed but return nsEventStatus_eIgnore (RETURN key events double-processed) : [Attachment 222537] v2 for trunk, AE TSM handlers r #3
Mark Mentovai <mark@moxienet.com> has asked Darin Fisher (Google) <darin@meer.net> for superreview: Bug 337199: Keypress events for RETURN key processed but return nsEventStatus_eIgnore (RETURN key events double-processed) https://bugzilla.mozilla.org/show_bug.cgi?id=337199 Attachment 222537: v2 for trunk, AE TSM handlers restored https://bugzilla.mozilla.org/attachment.cgi?id=222537&action=edit ...

Async process KILL other async process! Why?
Hello! I have two UpdatePanel controls where I am making some tests and is happening a problem.   It follows below the two controls with the contents: <asp:UpdatePanel ID="UpdatePanel1" runat="server">    <ContentTemplate>        <asp:UpdateProgress ID="UpdateProgress1" DisplayAfter="0" runat="server" AssociatedUpdatePanelID="UpdatePanel1">            <ProgressTemplate>Loading...</ProgressTem...

Web resources about - Async processing issue within an event handler - perl.wxperl.users

Analog signal processing - Wikipedia, the free encyclopedia
Analog signal processing is any signal processing conducted on analog signals by analog means. "Analog" indicates something that is mathematically ...

Hyatt warns of malware on its payment-processing system
Hyatt Hotels Corp. says it found malicious software on the computer system that processes customer payments, raising the possibility that hackers ...

Common payment processing protocols found to be full of flaws
Stealing PINs and pillaging bank accounts are both trivial.

ImBatch 4.4.0 adds PDF processing support
High Motion Software has shipped ImBatch 4.4.0 , a major update to its free-for-personal-use image batch processing tool. New PDF input support ...

The Kobalt diaries: annotation processing
I recently added apt support to Kobalt , which is a requirement for a build system these days, and something interesting happened. First of all, ...

AS PARIS BURNED: Obama Quietly Doubles Processing Centers for Syrian Refugees into the U.S.
By Sara Noble As Parisians were being slaughtered by radical Islamists, of whom at least one and perhaps two were migrants, Barack Obama was ...

Government "Processing Error" Sinks Housing Reports for Entire Year; Where to From Here?
Huge "Processing Error" in Government Housing Data When I saw some of the upwardly revised GDP estimates in 2015 I thought they were too good ...

Audi turns to Qualcomm power for entertainment, navigation processing
Qualcomm proves its chip-making innovation, announcing a deal at CES where Audi will use its first automotive quality infotainment chipset, the ...

Nvidia Ramps Up Processing Power for Self-Driving Cars
With its new Drive PX 2 platform, the GPU maker is offering a computer that can deliver up to 8 teraflops of computing power to autonomous vehicles. ...

‘Critical flicker fusion’ test can measure the brain’s processing speed
Scientists from the University of Georgia have devised an elegant method of testing the visual sampling rate of the human brain.

Resources last updated: 1/9/2016 2:50:15 AM