union and struct example to decode protocol data