@Override
    public void setEmbededhannel(Channel embeded_channel, PlcConnectionConfiguration configuration) {
        final S7Configuration conf = (S7Configuration) configuration;
        this.embededChannel = embeded_channel;
        this.embededChannel.attr(IS_CONNECTED).set(false);
        this.embededChannel.attr(WAS_CONNECTED).set(false);
        this.embededChannel.attr(IS_PRIMARY).set(true);

        //From the URL
        this.embededChannel.attr(READ_TIME_OUT).set(conf.getReadTimeout());
        this.embededChannel.attr(IS_PING_ACTIVE).set(conf.getPing());
        this.embededChannel.attr(PING_TIME).set(conf.getPingTime());
        this.embededChannel.attr(RETRY_TIME).set(conf.getRetryTime());
    }
Implementation of a multiplexing channel, from an embedded channel to two
possible TCP connections, primary and secondary.
The objective is to allow connections to individual systems
with a two CP (PN CPUs, CP343-1, CP443-1 or similar), or H-type systems
(S7-400H or S7-1500H).
The user App must be in charge of restoring the requests or
subscriptions that it is requesting.
plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7HMuxImpl.java