Hi,
Thank you for this extraordinary work on EIB first of all !
Now I have this question:
I am using the async code below to check events on a KNX bus, and that seems to work fine.
How can I guarantee that I will not miss events (eg if I stay too long in the do_some_other_stuff routine, or if 2 events arrived "simultaneously") ?
Thanks for your help on this (it is pretty urgent for me...)
con = EIBSocketURL (ag[1]);
if (!con)
die ("Open failed");
if (EIBOpen_GroupSocket_async (con, 0) == -1)
die ("Connect failed");
while (1) {
if (EIB_Poll_Complete(con) != 0) {
len = EIBGetGroup_Src (con, sizeof (buf), buf, &src, &dest);
do_stuff(buf, &src, &dest);
}
do_some_other_stuff();
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From memory/AFAIR: you won't loose any telegram as long as
do_some_other_stuff doesn't take forever.
It's a socket (buffer-size unknown but it's pretty big)..
Michael
On 30.04.2014 12:09, DrMad wrote:
Hi,
Thank you for this extraordinary work on EIB first of all !
Now I have this question:
I am using the async code below to check events on a KNX bus, and that
seems to work fine.
How can I guarantee that I will not miss events (eg if I stay too long
in the do_some_other_stuff routine, or if 2 events arrived
"simultaneously") ?
Thanks for your help on this (it is pretty urgent for me...)
con = EIBSocketURL (ag[1]);
if (!con)
die ("Open failed");
if (EIBOpen_GroupSocket_async (con, 0) == -1)
die ("Connect failed");
while (1) {
if (EIB_Poll_Complete(con) != 0) {
len = EIBGetGroup_Src (con, sizeof (buf), buf, &src, &dest);
do_stuff(buf, &src, &dest);
}
do_some_other_stuff();
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Thank you for this extraordinary work on EIB first of all !
Now I have this question:
I am using the async code below to check events on a KNX bus, and that seems to work fine.
How can I guarantee that I will not miss events (eg if I stay too long in the do_some_other_stuff routine, or if 2 events arrived "simultaneously") ?
Thanks for your help on this (it is pretty urgent for me...)
con = EIBSocketURL (ag[1]);
if (!con)
die ("Open failed");
if (EIBOpen_GroupSocket_async (con, 0) == -1)
die ("Connect failed");
while (1) {
if (EIB_Poll_Complete(con) != 0) {
len = EIBGetGroup_Src (con, sizeof (buf), buf, &src, &dest);
do_stuff(buf, &src, &dest);
}
do_some_other_stuff();
}
From memory/AFAIR: you won't loose any telegram as long as
do_some_other_stuff doesn't take forever.
It's a socket (buffer-size unknown but it's pretty big)..
Michael
On 30.04.2014 12:09, DrMad wrote:
Sorry, forgot to say "thank you" for the prompt reply...
:)