This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using os_evt_get() alone ?

Hi,

Im using RTX kernel with the TCP Net library.
The manual says I have to do all my Tcpnet jobs in one task ...

So , I have to manage some events for each Tcp socket used. (connecting, sending data , deconnecting)
. I want to use the os_evt_wait_or() function with switch/case but the tcpnet requires a polling of main_tcp()

So is it possible to use os_evt_get() in order to avoid to much latency for the main_tcpnet to be called, like this ?

void tcp_task(void) __task
{
...
   while(1)
   {
      main_TcpNet();
      switch (os_evt_get())
      {
         case ...
         case ...
      }
   }
}

Or I have to use os_evt_wait_or() like this :

void tcp_task(void) __task
{
...
   while(1)
   {
      main_TcpNet();
      os_evt_wait_or(mask,100ms)
      switch (os_evt_get())
      {
         case ...
         case ...
      }
   }
}

Thanks in advance

0