Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

multi-threads using groupswrite

vogel
2012-11-24
2013-05-28
  • vogel
    vogel
    2012-11-24

    i want to use the command "groupswrite " in two different threads.
    is it conflicting or not?

    thx

     
  • Martin Koegler
    Martin Koegler
    2012-11-24

    On one connection, only one function should be called at a time - so you need to use a mutex. Or you can create a seperate connection for each thread.

     
  • vogel
    vogel
    2012-12-06

    thanks for your reply!

    how long is the "at a time"?

    In my programm, i use the function "EIBSendGroup (eibcon, dest, len, buf);" in "groupsocketwrite"
    does this method create a new thread to handle?
    Because in my application, when i receive such as "0/2/0"=6(1 Byte), i should transimit multi groupaddress such as:

    0/0/1=1
    0/0/2=1

    0/0/20=1

    when the "0/2/0=6" is so quickly received, and the transmits misses some groupaddresses.

    the logic above is in just one thread and one connection.

    By the way, i just see the difference between "groupswrite " and "groupsocketwrite" from sdkdoc. That means the difference is just the ACKs. The groupswrite generates the ACKs by itself when man use TP-UART backend?But the ACKs should be generated by other devices, i think. So the method "groupsocketwrite" is true, is it?

    mfg