Converting signed 16 bit data to unsigned

@jwehr - if you have the agent code wrapped up in a nice class it would be great to see it in our reference lib :slight_smile: