GCS can mirror the UAVTallk traffic via udp in binary format.
There is also the stream plugin that will mirror traffic via tcp in a json format.
Object IDs are a hash of the object structure so any time the object structure is changed, the corresponding ID will change too.
This means that hardcoding the IDs in your application is usually a bad idea (unless you track a few objects and are ready to update your app any time the ID changes).
We have few generators that translate the xml object description to various code forms (for GCS, fligh, java, arduino, ...).
They are located here ./ground/uavobjgenerator/generators. Using or adapting one of those for your own needs is relatively simple.