blob: 56e0b170d0d4fe02814db95d798ca8017b7a4044 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
namespace com.clusterrr.TuyaNet
{
/// <summary>
/// Response from local Tuya device.
/// </summary>
public class TuyaLocalResponse
{
/// <summary>
/// Command code.
/// </summary>
public TuyaCommand Command { get; }
/// <summary>
/// Return code.
/// </summary>
public int ReturnCode { get; }
/// <summary>
/// Response as JSON string.
/// </summary>
public string JSON { get; }
internal TuyaLocalResponse(TuyaCommand command, int returnCode, string json)
{
Command = command;
ReturnCode = returnCode;
JSON = json;
}
public override string ToString() => $"{Command}: {JSON} (return code = {ReturnCode})";
}
}
|