Add default Command to each

This commit is contained in:
2019-03-23 22:19:42 +01:00
parent aa20f9d466
commit a1944a1203
4 changed files with 8 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ namespace PlantBox.Shared.Communication.Commands
{
public class CaptorsRequest : CommandSerializable<CaptorsRequest>
{
public override Command Command => Command.Captors;
public override CaptorsRequest Deserialize(string[] arguments)
{
return this;

View File

@@ -8,6 +8,8 @@ namespace PlantBox.Shared.Communication.Commands
{
public class CaptorsResponse : CommandSerializable<CaptorsResponse>
{
public override Command Command => Command.Captors;
public double Humidity { get; set; }
public double Luminosity { get; set; }
public double Temperature { get; set; }

View File

@@ -7,6 +7,8 @@ namespace PlantBox.Shared.Communication.Commands
{
public class HistoricRequest : CommandSerializable<HistoricRequest>
{
public override Command Command => Command.Historic;
public HistoricInterval Interval { get; set; }
public int Number { get; set; }

View File

@@ -6,6 +6,8 @@ namespace PlantBox.Shared.Communication.Commands
{
public class PingCommand : CommandSerializable<PingCommand>
{
public override Command Command => Command.Ping;
public string Message { get; set; }
public PingCommand()