A mains priority circuit can be realized in all directions and with all voltages. It is always used when two identical voltage sources are available which compete with each other. Since the CamperVan has only the batteries as a voltage source for the 12V range, only the 230V network comes into question.
Here is on the one hand the inverter and on the other hand the direct connection to the shore power.
Which power I give priority to depends on the planning.
In the first step you can say that I don’t need the Wechserlrichter when the shore power is connected. This would mean that the shore power is preferred to the inverter.
In the example above the charger is supplied parallel to the total 230V demand of the CamperVan, which charges the battery(ies), because the battery(ies) still supply the 12V grid and also the inverter.
If you want to connect a generator to charge the battery, a switch should be installed in the supply line to the relay for the mains priority circuit, as very few generators can supply enough power to maintain full 230V operation during charging. But even if this were the case, it would only prolong the charging process unnecessarily and thus also the noise pollution caused by the generator.
By the way, the picture shows the mains priority switch of the company offgridtec* which I plan to use
* The links are so called affiliate links. This is a fair way to support me and say thank you, because it costs you nothing except the regular price of the item and I get a commission for your purchase which helps me to realize this project and the following.
You are a very clever person!