init
This commit is contained in:
27
DataPRO/CanFDApiProxy/Requests/CANConfigRequest.cs
Normal file
27
DataPRO/CanFDApiProxy/Requests/CANConfigRequest.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using CANFDApiProxy.Messages;
|
||||
|
||||
namespace CANFDApiProxy.Requests
|
||||
{
|
||||
|
||||
public class CANConfigRequest
|
||||
{
|
||||
public config config { get; set; }
|
||||
public string Status { get; set; }
|
||||
public override string ToString()
|
||||
{
|
||||
return $"config: {config}, Status: {Status}";
|
||||
}
|
||||
}
|
||||
|
||||
public class config
|
||||
{
|
||||
public CanConfigItem can1 { get; set; }
|
||||
public CanConfigItem can2 { get; set; }
|
||||
public CanConfigItem can3 { get; set; }
|
||||
public CanConfigItem can4 { get; set; }
|
||||
public override string ToString()
|
||||
{
|
||||
return $"can1: {can1}, can2: {can2}, can3: {can3}, can4: {can4}";
|
||||
}
|
||||
}
|
||||
}
|
||||
27
DataPRO/CanFDApiProxy/Requests/CanConfigItem.cs
Normal file
27
DataPRO/CanFDApiProxy/Requests/CanConfigItem.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
namespace CANFDApiProxy.Requests
|
||||
{
|
||||
public class CanConfigItem
|
||||
{
|
||||
public CanConfigItem(int base_or_arb_bitrate, int base_or_arb_sjw, int data_bitrate, int data_sjw, string filetype, bool included, bool is_fd)
|
||||
{
|
||||
this.base_or_arb_bitrate = base_or_arb_bitrate;
|
||||
this.base_or_arb_sjw = base_or_arb_sjw;
|
||||
this.data_bitrate = data_bitrate;
|
||||
this.data_sjw = data_sjw;
|
||||
this.filetype = filetype;
|
||||
this.included = included;
|
||||
this.is_fd = is_fd;
|
||||
}
|
||||
public int base_or_arb_bitrate { get; set; }
|
||||
public int base_or_arb_sjw { get; set; }
|
||||
public int data_bitrate { get; set; }
|
||||
public int data_sjw { get; set; }
|
||||
public string filetype { get; set; }
|
||||
public bool included { get; set; }
|
||||
public bool is_fd { get; set; }
|
||||
public override string ToString()
|
||||
{
|
||||
return $"baseBR: {base_or_arb_bitrate}, baseSJW: {base_or_arb_sjw}, br: {data_bitrate}, sjw: {data_sjw}, ft: {filetype}, inc: {included}, fd: {is_fd}";
|
||||
}
|
||||
}
|
||||
}
|
||||
7
DataPRO/CanFDApiProxy/Requests/CanPostRequest.cs
Normal file
7
DataPRO/CanFDApiProxy/Requests/CanPostRequest.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace CANFDApiProxy.Requests
|
||||
{
|
||||
internal class CanPostRequest
|
||||
{
|
||||
public string cmd { get; set; }
|
||||
}
|
||||
}
|
||||
8
DataPRO/CanFDApiProxy/Requests/ClocksRequest.cs
Normal file
8
DataPRO/CanFDApiProxy/Requests/ClocksRequest.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace CANFDApiProxy.Requests
|
||||
{
|
||||
internal class ClocksRequest
|
||||
{
|
||||
public string cmd { get; set; }
|
||||
public string time { get; set; }
|
||||
}
|
||||
}
|
||||
8
DataPRO/CanFDApiProxy/Requests/FileRequest.cs
Normal file
8
DataPRO/CanFDApiProxy/Requests/FileRequest.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace CANFDApiProxy.Requests
|
||||
{
|
||||
internal class FileRequest
|
||||
{
|
||||
public string cmd { get; set; }
|
||||
public string path { get; set; }
|
||||
}
|
||||
}
|
||||
28
DataPRO/CanFDApiProxy/Requests/LEDsRequest.cs
Normal file
28
DataPRO/CanFDApiProxy/Requests/LEDsRequest.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
namespace CANFDApiProxy.Requests
|
||||
{
|
||||
public class LEDsRequest
|
||||
{
|
||||
public string led { get; set; }
|
||||
public string cmd { get; set; }
|
||||
public string color { get; set; }
|
||||
}
|
||||
|
||||
public enum LedColor
|
||||
{
|
||||
red,
|
||||
green,
|
||||
blue
|
||||
}
|
||||
|
||||
public enum LedCmd
|
||||
{
|
||||
on,
|
||||
off,
|
||||
}
|
||||
|
||||
public enum LedName
|
||||
{
|
||||
can1, can2, can3, can4, pwr, sts, status
|
||||
}
|
||||
|
||||
}
|
||||
9
DataPRO/CanFDApiProxy/Requests/NetworkRequest.cs
Normal file
9
DataPRO/CanFDApiProxy/Requests/NetworkRequest.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace CANFDApiProxy.Requests
|
||||
{
|
||||
public class NetworkRequest
|
||||
{
|
||||
public bool dhcp { get; set; }
|
||||
public string set_address { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
7
DataPRO/CanFDApiProxy/Requests/SerialRequest.cs
Normal file
7
DataPRO/CanFDApiProxy/Requests/SerialRequest.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace CANFDApiProxy.Requests
|
||||
{
|
||||
public class SerialRequest
|
||||
{
|
||||
public string serial { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user