I need to send a struct(consisting of booleans, ints and strings) over a TCP socket. The sender(a PLC) is implemented in CoDeSys and the receiver is implemented in Java.
One solution would be to create a big string with the data, send it over the socket and interpet it in Java. But this seems to be very unefficient(since the struct has 50+ variables).
Are there any other ways to send the struct(e.g.: in Java there is Serialization, but it's not supported in CoDeSys) ?
If not, what would be a good way to format the data? (e.g.: "variableName1:value1;variableName2:value2;...")
Are there any "tricks" to automatically assign the values from the string to the object on the Java side?