make gps events

This commit is contained in:
BlubbFish 2026-08-04 12:28:03 +02:00
parent 759842b528
commit a5894ceeb7
3 changed files with 59 additions and 2 deletions

View File

@ -5,6 +5,5 @@ namespace BlubbFish.Utils.IoT.Connector {
public abstract class AUserBackend : ABackend {
public AUserBackend(Dictionary<String, String> settings) : base(settings) {}
public abstract void Send(String message);
public abstract void Send(String message, String[] buttons);
}
}

View File

@ -0,0 +1,58 @@
using System;
namespace BlubbFish.Utils.IoT.Events {
public class GpsEvent : BackendEvent {
#region mandatory field
public Double BatteryLevel {
get; set;
}
public Boolean CorrectInterface {
get; set;
}
public LoraDataGps Gps {
get; set;
}
public String Hash {
get; set;
}
public String Name {
get; set;
}
#endregion
#region optional field
public DateTime Receivedtime {
get; set;
}
public Double Rssi {
get; set;
}
public Double Snr {
get; set;
}
#endregion
public class LoraDataGps {
#region mandatory field
public Double Latitude {
get; set;
}
public Double Longitude {
get; set;
}
public Boolean Fix {
get; set;
}
public Double Height {
get; set;
}
#endregion
#region optional field
public Double Hdop {
get; set;
}
#endregion
}
}
}

View File

@ -3,6 +3,6 @@
namespace BlubbFish.Utils.IoT.Events {
public class UserEvent : BackendEvent {
public UserEvent() : base() { }
public UserEvent(String message, Int64 UserId, DateTime date) : base(message, UserId, date, "User") { }
public UserEvent(String message, Tuple<Int64, String, Int64, String> UserId, DateTime date) : base(message, UserId, date, "User") { }
}
}