"the most correct way"... that sounds weird.
Anyways... I like the Siege Tank mode best.
HAve an array of 20 Siege Tanks, and every maybe half second, move the unit from a box in range of only 1 cannon to another box that's similar but for a dif cannon.
Every time it moves, the "HP" counter(a bunch of units is what I'd use) increases by one. To move, it has the condition that unit is in box so it doesn't keep teleporting when it's dead.
So, no, Siege Tanks
are a better method.
Their downfall is simply how big my method is.
Also you could have a 1HP burrowed unit under the hero so you can detect when the Siege Tank fires.
I'm so smart!

j/k