Modelling, control and Pontryagin Maximum Principle for a two-body wave energy device