I am currently developping a new Driver to accept TCP/IP proprietary messages.
Everything runs weel during an hour until the driver stop unexpectively.
The error tells you that the manager failed to deserialize a message it received. The dump shows the first few bytes of the received data.
50 56 53 53 -> "PVSS", magic number for messages
ff ff ff ff -> I think this is supposed to be the message length, but it seems incorrect
a0 3 -> version number 3.10
Maybe your TCP/IP proprietary messages are somehow interfering with the regular message communication?
Well, the TCP port of our propriétary communication is 5000.
We already have a java solution in the same server which use this port and we never has this problem..... :S :S :S :S :S
PS : the java interface is desactivated when I run the new solution.... of course....
Or maybe the message length is correct and has overflowed. No idea if this can actually happen, or would be caught somehow. Do you find it likely that your driver is sending >= 2GB of data in one message, either just by producing a lot of data, or maybe by additionally blocking the dispatch-loop for a long time?
The dumped message seems to be a DP_MSG_COMPLEX_VC (or dpSet), if that helps.
From what you told me, I guess an architecture mistake.
The principle is the following :
A singleton object contains the servers threads
When driver has finnish to initialize the internals DPs, server are added to the singleton and then starter. I don't use th DRV object to do that.
Oh what do you call dp-function ? Is it database access ?
If it is the case, the problème I have is : clients / server TCP architecture is based on multi-thread.
The only solution I have is to put a synchronous message queue.
Threads add messages to queue and notify message manager that is on the main thread.
Message manager loop until queue is empty and wait.
With dp-functions I mean functions, that start with 'dp', like 'dpSet', 'dpConnect', 'dpGet' and 'dpQuery'. In other words functions that provide access to or modify the internal WinCC OA database.
I think that the mentioned solution will solve the problem.
The WinCC OA Manager API is strictly single-threaded. In your own TCP communcation stuff you can use as many threads as you like, but basically everything that the WinCC OA API provides should only be used from a single thread.