Hey Chris, thanks for your reply. Unfortunately I cannot help you with gathering the types based on the protocol messages (we also have only one type here so reverse engineering is kind of... difficould). But what I "know" is how to read it from the SPS via request (we could send this request directly after establishing connection?). The necessary telegrams to send are here https://github.com/xtrinch/moka7-live/blob/master/src/com/sourceforge/snap7/moka7/S7Client.java (Labelled as S7_SZL_FIRST and S7_SZL_NEXT) and the structure of the response is here https://github.com/xtrinch/moka7-live/blob/master/src/com/sourceforge/snap7/moka7/S7CpuInfo.java I don't know if this helps you and how easy this can be adopted to the Structure in PLC4J as the github code is really... well... nevermind ; )
But as I understand you correctly we need to have a logic that does unmarshalling of byte[] to some Class based on (possibly) several conditions and then in the unmarshal logic we do the unmarshalling based on the enum you create, right? Julian Am 14.08.18, 10:22 schrieb "Christofer Dutz" <[email protected]>: Some things I just noticed when starting to work on implementing the enum: 1) We currently don't have the type codes for all the supported types 2) Supported types seem to differ from controller type to controller type So it seems we would have to reverse engineer these missing codes (if there are any ... eventually some of the new types are only supported via S7CommPlus (AKA 0x72 protocol). We seem to have to include some sort of controller type detection into the connection mechanism. Would be cool if someone here knew how to detect the different S7 controller types via S7 protocol. (Will start a new thread for this as some people might be just filtering this lengthy thread). Chris
