Hi everybody,
I have a problem with the next programme, when I try to retrieve the data in the variable recordsCollection, i get this error:
Error 1 Expression is of type 'JRI.Systeme.Interfaces.Devices.SpyRf.Records.IRecordsCollection', which is not a collection type
The problem out in this part:
For Each record As JRI.Systeme.Interfaces.Devices.SpyRf.Records.IRecord In recordsCollection
more precisely in recordsCollection
Here is the program:
Private Sub ButtonDecharger_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles ButtonDecharger.Click
numSerieSonde = TextBoxNumSerie.Text
CaptSonde = typeSonde + TextBoxNumSerie.Text
Dim monitoring As New Monitoring()
SpyModem.GetSatelliteMeasurementsFromLast(CaptSonde, 1, Data1)
Dim converter As New JRI.Systeme.Data.SpyRf.Records.RecordsDataToRecordsCollectionConverter(Monitoring)
Dim recordsCollection As JRI.Systeme.Interfaces.Devices.SpyRf.Records.IRecordsCollection = Converter.convert(Data1)
For Each record As JRI.Systeme.Interfaces.Devices.SpyRf.Records.IRecord In recordsCollection
If record.recordType = JRI.Systeme.Interfaces.Devices.SpyRf.Records.RecordType.TrackMeasure Then
Dim recordMeasure As JRI.Systeme.Interfaces.Devices.SpyRf.Records.IRecordMeasure = TryCast(record, JRI.Systeme.Interfaces.Devices.SpyRf.Records.IRecordMeasure)
Console.WriteLine("{0} : Mesure {1}", record.dateTime, recordMeasure.measure.intValue / Math.Pow(10, recordMeasure.monitoring.numOfDecimals))
Else
Console.WriteLine("{0} : {1}", record.dateTime, record.recordType)
End If
Next
End Sub
What is the problem?
Thanks