> Are you extracting the data out of the
> struct with the ">>" operators 

Thank you again for that hint:

For interested the way I implemented it:

Greets Michael

struct GPSSatellite{
                int ID;
                bool InUse;
                unsigned int Elevation;
                unsigned int Azimuth;
                unsigned int SNR;
                };

GPSSatellite SatellitesArray[32];
GPSSatellite Satellite;


void
MokoGPS::GetSatellites() 
{ 
QDBusMessage SatelliteReply;
SatelliteReply = GPSInterface->call("GetSatellites");
QList <QVariant> args = SatelliteReply.arguments();
QVariant attrs = args[0];
const QDBusArgument arg = args[0].value <QDBusArgument> ();

arg.beginArray ();
NumberOfSats = 0;

while ( !arg.atEnd ()) {
        NumberOfSats +=1; /// SatellitesArray[] beginnt bei 1
        arg.beginArray ();
        arg >> SatellitesArray[NumberOfSats].ID >> 
SatellitesArray[NumberOfSats].InUse >> 
SatellitesArray[NumberOfSats].Elevation >> 
SatellitesArray[NumberOfSats].Azimuth >> SatellitesArray[NumberOfSats].SNR;
        arg.endArray ();
}
arg.endArray ();

qDebug() <<"Number of Satellites"<< NumberOfSats;

}



_______________________________________________
Openmoko community mailing list
[email protected]
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to