Server: finish jtag controller; Web: finish sibebar animation
This commit is contained in:
@@ -59,6 +59,7 @@ namespace WebProtocol
|
||||
{
|
||||
public byte commandID;
|
||||
public bool isSuccess;
|
||||
public byte[] data;
|
||||
}
|
||||
|
||||
public struct SendAddrPackage
|
||||
@@ -184,13 +185,27 @@ namespace WebProtocol
|
||||
this.bodyData = bodyData;
|
||||
}
|
||||
|
||||
public RecvPackOptions Options()
|
||||
public RecvPackOptions Options
|
||||
{
|
||||
RecvPackOptions opts;
|
||||
opts.commandID = commandID;
|
||||
opts.isSuccess = Convert.ToBoolean((resp >> 1) == 0b01 ? true : false);
|
||||
get
|
||||
{
|
||||
RecvPackOptions opts;
|
||||
opts.commandID = commandID;
|
||||
opts.isSuccess = Convert.ToBoolean((resp >> 1) == 0b01 ? true : false);
|
||||
opts.data = bodyData;
|
||||
|
||||
return opts;
|
||||
return opts;
|
||||
}
|
||||
}
|
||||
|
||||
public static Result<RecvDataPackage> FromBytes(byte[] bytes)
|
||||
{
|
||||
if (bytes[0] != (byte)PackSign.RecvData)
|
||||
throw new ArgumentException(
|
||||
"The sign of bytes is not RecvData Package!",
|
||||
nameof(bytes)
|
||||
);
|
||||
return new RecvDataPackage(bytes[1], bytes[2], bytes[4..]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user