Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions
Options

TimeSync and Log Errors

I use TimeSync to synchronize the time between my Tps and the Masters in all my Netlinx projects and it works great. However, I have been noticing log errors in the 0:3:1 socket used by the TimeSync module. Are the errors below normal or they can be a problem? Please scrow through the 20 lines below and if anyone has an idea to fix this please let me now. Thanks,

1: 10-31-2005 MON 09:12:39 Interpreter CIpEvent::OnError 0:3:1
2: 10-31-2005 MON 09:12:39 Interpreter CIpEvent::OffLine 0:3:1
3: 10-31-2005 MON 09:12:39 SocketManager CIpSocketMan::ProcessPLPacket - Socket Already Closed
4: 10-31-2005 MON 09:12:39 Interpreter Exiting TCP Read thread - closing this socket for local port 3
5: 10-31-2005 MON 09:12:39 Interpreter CIpEvent::OnLine 0:3:1
6: 10-31-2005 MON 09:12:39 SocketManager Connected Successfully
7: 10-31-2005 MON 07:12:40 Interpreter CIpEvent::OnError 0:3:1
8: 10-31-2005 MON 07:12:40 Interpreter CIpEvent::OffLine 0:3:1
9: 10-31-2005 MON 07:12:40 SocketManager CIpSocketMan::ProcessPLPacket - Socket Already Closed
10: 10-31-2005 MON 07:12:40 Interpreter Exiting TCP Read thread - closing this socket for local port 3
11: 10-31-2005 MON 07:12:40 Interpreter CIpEvent::OnLine 0:3:1
12: 10-31-2005 MON 07:12:40 SocketManager Connected Successfully
13: 10-31-2005 MON 05:12:41 Interpreter CIpEvent::OnError 0:3:1
14: 10-31-2005 MON 05:12:41 Interpreter CIpEvent::OffLine 0:3:1
15: 10-31-2005 MON 05:12:41 SocketManager CIpSocketMan::ProcessPLPacket - Socket Already Closed
16: 10-31-2005 MON 05:12:38 Interpreter Exiting TCP Read thread - closing this socket for local port 3
17: 10-31-2005 MON 05:12:38 Interpreter CIpEvent::OnLine 0:3:1
18: 10-31-2005 MON 05:12:38 SocketManager Connected Successfully
19: 10-31-2005 MON 03:12:39 Interpreter CIpEvent::OnError 0:3:1
20: 10-31-2005 MON 03:12:39 Interpreter CIpEvent::OffLine 0:3:1

Comments

  • Options
    Not that dramatic. It seems that the IP port is tried to close again but the port is still closed.

    Before opening or closing an IP port, check if it is opened or closed.

    DATA_EVENT[dvMyIPconnect]
    {
      ONLINE: // connection established
      {
        IPisOnline = 1
      }
      OFFLINE: // connection was closed
      {
        IPisOnline = 0
      }
    }
    
    PUSH[dvPanel,1]
    {
      IF(IPisOnline = 0)
      {
        // open IP connect
      }
    }
    
    
    PUSH[dvPanel,3]
    {
      IF(IPisOnline)
      {
        // send a string to IP
      }
    }
    

    Find attached an Include with a function "translating" the mystic DATA.NUMBER number into clear text, to show you what's happening with your IP connect.
  • Options
    jeffacojeffaco Posts: 121
    If you're referring to the TimeSync module up on SourceForge:

    The problem is that certain "errors" mean the socket is closed, and certain errors mean the socket is opened. As a result, at the time that I had written it, I was anal in making sure the socket was *CLOSED*. If it wasn't, things would fail down the road.

    Marc's solution would work just fine, and would eliminate that error (although it is harmless). Be aware, however, that the console is pretty noisy with *ANY* module that establishes connections dynamically (and, by virtual definition, TimeSync does that by how it works). That always bugged me. That is:

    1. I could tens of thousands of lines of code doing tons of concurrent stuff, and the console is silent,

    2. Add something that dynamically connects and disconnects (like, say, the Audiotron module up on SourceForge, since that component required a fresh connection per API command), and now the console becomes absurdly noisy.

    If you feel compelled to fix it, please send me a diff of the .AXS file, or better yet, send me your modified module. I'd be happy to include your changes up on SourceForge so we could all benefit. The power of open source and all that ...

    Thanks,

    -- Jeff
Sign In or Register to comment.