git_bsmd/AIS/bsmd.pasttrack.service/IService.cs

38 lines
1.1 KiB
C#

using System;
using System.Runtime.Serialization;
using System.ServiceModel;
namespace bsmd.pasttrack.service
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
[ServiceContract]
public interface IService
{
[OperationContract]
Pasttrack[] GetPasttrack(int mmsi, int mins);
}
// Use a data contract as illustrated in the sample below to add composite types to service operations.
[DataContract]
public class Pasttrack
{
/*
* select top 1000 Latitude, Longitude, Heading from aisposreport where mmsi=224717000
And timestamp > DATEADD(MINUTE, -120, GETDATE())
order by timestamp desc
*/
[DataMember]
public double Latitude { get; set; }
[DataMember]
public double Longitude { get; set; }
[DataMember]
public DateTime Timestamp { get; set; }
[DataMember]
public int Heading { get; set; }
}
}