diff --git a/components.d.ts b/components.d.ts
index 81fa89b..dca5943 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -13,6 +13,7 @@ declare module 'vue' {
BaseBoard: typeof import('./src/components/equipments/BaseBoard.vue')['default']
BaseInputField: typeof import('./src/components/InputField/BaseInputField.vue')['default']
Canvas: typeof import('./src/components/Canvas.vue')['default']
+ ChannelConfig: typeof import('./src/components/LogicAnalyzer/ChannelConfig.vue')['default']
CollapsibleSection: typeof import('./src/components/CollapsibleSection.vue')['default']
ComponentSelector: typeof import('./src/components/LabCanvas/ComponentSelector.vue')['default']
DDR: typeof import('./src/components/equipments/DDR.vue')['default']
@@ -29,6 +30,7 @@ declare module 'vue' {
LabCanvasNew: typeof import('./src/components/LabCanvas/LabCanvasNew.vue')['default']
LabComponentsDrawer: typeof import('./src/components/LabCanvasNew/LabComponentsDrawer.vue')['default']
LabComponentsDrawerNew: typeof import('./src/components/LabCanvas/LabComponentsDrawerNew.vue')['default']
+ LogicalWaveFormDisplay: typeof import('./src/components/LogicAnalyzer/LogicalWaveFormDisplay.vue')['default']
LoginCard: typeof import('./src/components/LoginCard.vue')['default']
MarkdownRenderer: typeof import('./src/components/MarkdownRenderer.vue')['default']
MechanicalButton: typeof import('./src/components/equipments/MechanicalButton.vue')['default']
@@ -66,6 +68,7 @@ declare module 'vue' {
TabsTrigger: typeof import('reka-ui')['TabsTrigger']
ThemeControlButton: typeof import('./src/components/ThemeControlButton.vue')['default']
ThemeControlToggle: typeof import('./src/components/ThemeControlToggle.vue')['default']
+ TriggerSettings: typeof import('./src/components/LogicAnalyzer/TriggerSettings.vue')['default']
TutorialCarousel: typeof import('./src/components/TutorialCarousel.vue')['default']
UploadCard: typeof import('./src/components/UploadCard.vue')['default']
WaveformDisplay: typeof import('./src/components/Oscilloscope/WaveformDisplay.vue')['default']
diff --git a/server/src/MsgBus.cs b/server/src/MsgBus.cs
index f087f03..573b074 100644
--- a/server/src/MsgBus.cs
+++ b/server/src/MsgBus.cs
@@ -3,7 +3,7 @@
///
public static class MsgBus
{
- private static readonly UDPServer udpServer = new UDPServer(1234);
+ private static readonly UDPServer udpServer = new UDPServer(1234, 12);
///
/// 获取UDP服务器
///
diff --git a/server/src/Peripherals/CameraClient.cs b/server/src/Peripherals/CameraClient.cs
index 00c1cf2..e3815a2 100644
--- a/server/src/Peripherals/CameraClient.cs
+++ b/server/src/Peripherals/CameraClient.cs
@@ -1,5 +1,6 @@
using System.Net;
using DotNext;
+using Peripherals.PowerClient;
namespace Peripherals.CameraClient;
@@ -27,7 +28,7 @@ class Camera
const uint CAM_I2C_ADDR = 0x3C;
const Peripherals.I2cClient.I2cProtocol CAM_PROTO = Peripherals.I2cClient.I2cProtocol.SCCB;
- const byte PLL_MUX = 60;
+ const byte PLL_MUX = 105;
const UInt32 FrameAddr = 0x00;
// 动态分辨率参数
@@ -54,6 +55,8 @@ class Camera
public async ValueTask> Init()
{
+ await PowerHardwareCamera(true);
+ await SleepHardwareCamera(false);
// 步骤1: 复位
var resetResult = await Reset();
if (!resetResult.IsSuccessful) return resetResult;
@@ -139,14 +142,16 @@ class Camera
var resolutionResult = await ConfigureResolution1280x720();
if (!resolutionResult.IsSuccessful) return resolutionResult;
- // 步骤22: 开始流
+ // // 步骤22: 开始流
var startResult = await StartStreaming();
if (!startResult.IsSuccessful) return startResult;
+ // var resetResult2 = await Reset();
+ // if (!resetResult2.IsSuccessful) return resetResult2;
return true;
}
- public async ValueTask> EnableCamera(bool isEnable)
+ public async ValueTask> EnableHardwareTrans(bool isEnable)
{
var ret = await UDPClientPool.WriteAddr(this.ep, this.taskID, CameraAddr.CAPTURE_ON, Convert.ToUInt32(isEnable));
if (!ret.IsSuccessful)
@@ -162,7 +167,7 @@ class Camera
return true;
}
- public async ValueTask> EnableCameraHardware(bool isEnable)
+ public async ValueTask> PowerHardwareCamera(bool isEnable)
{
{
var ret = await UDPClientPool.WriteAddr(this.ep, this.taskID, CameraAddr.CAMERA_POWER, (isEnable ? 0x00000001u : 0x00000000u));
@@ -180,7 +185,7 @@ class Camera
return true;
}
- public async ValueTask> SleepCameraHardware(bool isEnable)
+ public async ValueTask> SleepHardwareCamera(bool isEnable)
{
{
var ret = await UDPClientPool.WriteAddr(this.ep, this.taskID, CameraAddr.CAMERA_POWER, (isEnable ? 0x00000101u : 0x00000001u));
@@ -224,7 +229,7 @@ class Camera
// 读取失败时清除缓冲区,为下次读取做准备
try
{
- await MsgBus.UDPServer.ClearUDPData(this.address, this.taskID);
+ MsgBus.UDPServer.ClearUDPData(this.address, this.taskID);
}
catch (Exception ex)
{
@@ -237,6 +242,33 @@ class Camera
return result.Value;
}
+ ///
+ /// 读取摄像头寄存器
+ ///
+ /// 寄存器地址
+ /// 读取到的寄存器值
+ private async ValueTask> ReadRegister(UInt16 registerAddr)
+ {
+ var i2c = new Peripherals.I2cClient.I2c(this.address, this.port, this.taskID, this.timeout);
+
+ // 地址高低字节
+ var addrBytes = new byte[2];
+ addrBytes[0] = (byte)(registerAddr >> 8);
+ addrBytes[1] = (byte)(registerAddr & 0xFF);
+
+ // 先写寄存器地址
+ var writeResult = await i2c.WriteData(CAM_I2C_ADDR, addrBytes, CAM_PROTO);
+ if (!writeResult.IsSuccessful)
+ return new(writeResult.Error);
+
+ // 再读一个字节
+ var readResult = await i2c.ReadData(CAM_I2C_ADDR, 1, CAM_PROTO);
+ if (!readResult.IsSuccessful)
+ return new(readResult.Error);
+
+ return readResult.Value[0];
+ }
+
///
/// 批量配置I2C寄存器
///
@@ -260,7 +292,7 @@ class Camera
var address = cmd[0];
i2cData[0] = (byte)(address >> 8); // 地址高位
i2cData[1] = (byte)(address & 0xFF); // 地址低位
-
+
// 复制数据部分
for (int i = 1; i < cmd.Length; i++)
{
@@ -296,7 +328,7 @@ class Camera
}
else
{
- await Task.Delay(3); // 其他命令延时3ms
+ await Task.Delay(5); // 其他命令延时3ms
}
}
}
@@ -391,11 +423,6 @@ class Camera
// 2. 配置I2C寄存器
var resolutionRegisters = new UInt16[][]
{
- // H_OFFSET/V_OFFSET
- [0x3810, unchecked((byte)((hOffset >> 8) & 0xFF))],
- [0x3811, unchecked((byte)(hOffset & 0xFF))],
- [0x3812, unchecked((byte)((vOffset >> 8) & 0xFF))],
-
// H_START/V_START
[0x3800, unchecked((byte)((hStart >> 8) & 0xFF))],
[0x3801, unchecked((byte)(hStart & 0xFF))],
@@ -420,6 +447,10 @@ class Camera
[0x380E, unchecked((byte)((vts >> 8) & 0xFF))],
[0x380F, unchecked((byte)(vts & 0xFF))],
+ // H_OFFSET/V_OFFSET
+ [0x3810, unchecked((byte)((hOffset >> 8) & 0xFF))],
+ [0x3811, unchecked((byte)(hOffset & 0xFF))],
+ [0x3812, unchecked((byte)((vOffset >> 8) & 0xFF))],
// Timing Voffset
[0x3813, unchecked((byte)(vOffset & 0xFF))]
};
@@ -548,10 +579,11 @@ class Camera
{
var resetRegisters = new UInt16[][]
{
- [0x30, 0x08, 0x82] // 复位命令
+ [0x3103, 0x11],// system clock from pad, bit[1]
+ [0x3008, 0x82] // 复位命令
};
- return await ConfigureRegisters(resetRegisters, customDelayMs: 5); // 复位后等待5ms
+ return await ConfigureRegisters(resetRegisters, customDelayMs: 50); // 复位后等待5ms
}
///
@@ -576,7 +608,7 @@ class Camera
{
var basicRegisters = new UInt16[][]
{
- [0x3103, 0x02],
+ [0x3103, 0x02], // system clock from pad, bit[1]
[0x3017, 0xff],
[0x3018, 0xff],
[0x3037, 0x13],
@@ -633,9 +665,7 @@ class Camera
{
[0x3905, 0x02],
[0x3906, 0x10],
- [0x3901, 0x0a],
- [0x3035, 0x11], // 30fps
- [0x3036, PLL_MUX] // PLL倍频
+ [0x3901, 0x0a]
};
return await ConfigureRegisters(clockRegisters);
@@ -693,7 +723,6 @@ class Camera
[0x3c04, 0x28],
[0x3c05, 0x98],
[0x3c06, 0x00],
- [0x3c07, 0x08],
[0x3c08, 0x00],
[0x3c09, 0x1c],
[0x3c0a, 0x9c],
@@ -753,10 +782,6 @@ class Camera
[0x3a1e, 0x26], // AEC控制;stable range out low
[0x3a11, 0x60], // AEC控制; fast zone high
[0x3a1f, 0x14], // AEC控制; fast zone low
- [0x3a02, 0x17], // 60Hz max exposure
- [0x3a03, 0x10], // 60Hz max exposure
- [0x3a14, 0x17], // 50Hz max exposure
- [0x3a15, 0x10], // 50Hz max exposure
[0x3b07, 0x0a] // 帧曝光模式
};
@@ -900,14 +925,13 @@ class Camera
{
var timingRegisters = new UInt16[][]
{
- [0x3820, 0x46], // vflip
- [0x3821, 0x01], // mirror
- [0x3814, 0x31], // timing X inc
- [0x3815, 0x31], // timing Y inc
- [0x3618, 0x00],
- [0x3612, 0x29],
- [0x3709, 0x52],
- [0x370c, 0x03]
+ [0x3035, 0x11], // 60fps
+ [0x3036, PLL_MUX],// PLL倍频
+ [0x3c07, 0x08],
+ [0x3820, 0x41], // vflip
+ [0x3821, 0x00], // mirror
+ [0x3814, 0x11], // timing X inc
+ [0x3815, 0x11] // timing Y inc
};
return await ConfigureRegisters(timingRegisters);
@@ -921,14 +945,22 @@ class Camera
{
var testRegisters = new UInt16[][]
{
+ [0x3618, 0x00],
+ [0x3612, 0x29],
+ [0x3709, 0x52],
+ [0x370c, 0x03],
[0x4004, 0x02], // BLC(背光) 2 lines
[0x4713, 0x03], // JPEG mode 3
[0x4407, 0x04], // 量化标度
[0x460c, 0x20],
+ [0x3a02, 0x17], // 60Hz max exposure
+ [0x3a03, 0x10], // 60Hz max exposure
+ [0x3a14, 0x17], // 50Hz max exposure
+ [0x3a15, 0x10], // 50Hz max exposure
[0x4837, 0x22], // DVP CLK divider
[0x3824, 0x02], // DVP CLK divider
// 彩条测试禁用
- [0x503d, 0x00],
+ [0x503d, 0x80],
[0x4741, 0x00],
// 闪光灯配置
[0x3016, 0x02],
@@ -962,250 +994,250 @@ class Camera
private static readonly UInt16[] OV5640_AF_FIRMWARE =
[
0x02, 0x0d, 0xf3, 0x02, 0x0a, 0x5f, 0xc2, 0x01, 0x22, 0x22, 0x00, 0x02, 0x0f, 0x31, 0x30, 0x01,
- 0x03, 0x02, 0x03, 0x09, 0x30, 0x02, 0x03, 0x02, 0x03, 0x09, 0x90, 0x51, 0xa5, 0xe0, 0x78, 0xbb,
- 0xf6, 0xa3, 0xe0, 0x08, 0xf6, 0xa3, 0xe0, 0x08, 0xf6, 0xe5, 0x1f, 0x70, 0x45, 0x75, 0x1e, 0x20,
- 0xd2, 0x34, 0x12, 0x0c, 0x0c, 0x78, 0x9c, 0x12, 0x0b, 0xd2, 0x78, 0xa8, 0xa6, 0x14, 0x08, 0xa6,
- 0x15, 0x78, 0xb3, 0xa6, 0x09, 0x18, 0x76, 0x01, 0x78, 0x4c, 0xa6, 0x0a, 0x08, 0xa6, 0x0b, 0x78,
- 0x6c, 0xa6, 0x14, 0x08, 0xa6, 0x15, 0x78, 0xb3, 0xe6, 0x78, 0x8c, 0xf6, 0x75, 0x1f, 0x01, 0x78,
- 0xbb, 0xe6, 0x78, 0xb8, 0xf6, 0x78, 0xbc, 0xe6, 0x78, 0xb9, 0xf6, 0x78, 0xbd, 0xe6, 0x78, 0xba,
- 0xf6, 0x22, 0x79, 0xb8, 0xe7, 0xd3, 0x78, 0xbb, 0x96, 0x40, 0x05, 0xe7, 0x96, 0xff, 0x80, 0x08,
- 0xc3, 0x79, 0xbb, 0xe7, 0x78, 0xb8, 0x96, 0xff, 0x78, 0xa6, 0x76, 0x00, 0x08, 0xa6, 0x07, 0x79,
- 0xb9, 0xe7, 0xd3, 0x78, 0xbc, 0x96, 0x40, 0x05, 0xe7, 0x96, 0xff, 0x80, 0x08, 0xc3, 0x79, 0xbc,
- 0xe7, 0x78, 0xb9, 0x96, 0xff, 0x12, 0x0c, 0x13, 0x79, 0xba, 0xe7, 0xd3, 0x78, 0xbd, 0x96, 0x40,
- 0x05, 0xe7, 0x96, 0xff, 0x80, 0x08, 0xc3, 0x79, 0xbd, 0xe7, 0x78, 0xba, 0x96, 0xff, 0x12, 0x0c,
- 0x13, 0x78, 0xb2, 0xe6, 0x25, 0xe0, 0x24, 0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0xf8, 0xfe, 0x78, 0xb0, 0xa6, 0x06, 0x08, 0xa6, 0x07, 0x79, 0xb4,
- 0xe7, 0xd3, 0x78, 0xb3, 0x96, 0x40, 0x05, 0xe7, 0x96, 0xff, 0x80, 0x08, 0xc3, 0x79, 0xb3, 0xe7,
- 0x78, 0xb4, 0x96, 0xff, 0x78, 0xb7, 0xa6, 0x07, 0xe5, 0x1f, 0x64, 0x02, 0x60, 0x03, 0x02, 0x02,
- 0xef, 0x90, 0x30, 0x24, 0x74, 0x0f, 0xf0, 0x90, 0x0e, 0x8a, 0xe4, 0x93, 0xff, 0x18, 0xe6, 0xc3,
- 0x9f, 0x40, 0x03, 0x02, 0x03, 0x09, 0x90, 0x30, 0x24, 0x74, 0x0e, 0xf0, 0x78, 0xa2, 0x12, 0x0b,
- 0xd9, 0x12, 0x0b, 0xa2, 0x90, 0x0e, 0x87, 0x12, 0x0b, 0xb7, 0x78, 0x9e, 0x12, 0x0b, 0xe8, 0x7b,
- 0x04, 0x12, 0x0b, 0x90, 0xc3, 0x12, 0x07, 0x0e, 0x50, 0x6f, 0x90, 0x0e, 0x8b, 0xe4, 0x93, 0xff,
- 0x78, 0xb7, 0xe6, 0x9f, 0x40, 0x07, 0x90, 0x30, 0x24, 0x74, 0x0a, 0x80, 0x16, 0x90, 0x0e, 0x89,
- 0xe4, 0x93, 0xff, 0xd3, 0x78, 0xa7, 0xe6, 0x9f, 0x18, 0xe6, 0x94, 0x00, 0x40, 0x09, 0x90, 0x30,
- 0x24, 0x74, 0x0b, 0xf0, 0x75, 0x1f, 0x05, 0x78, 0xae, 0x12, 0x0b, 0xd9, 0x12, 0x0b, 0xa2, 0x90,
- 0x0e, 0x88, 0x12, 0x0b, 0xb7, 0x78, 0xa8, 0x12, 0x0b, 0xe8, 0x7b, 0x40, 0x12, 0x0b, 0x90, 0xd3,
- 0x12, 0x07, 0x0e, 0x40, 0x24, 0x90, 0x30, 0x24, 0x74, 0x0c, 0xf0, 0x75, 0x1f, 0x05,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x39, 0x12, 0x0e,
- 0xba, 0x40, 0x04, 0x7f, 0xfe, 0x80, 0x02, 0x7f, 0x02, 0x78, 0xbb, 0xa6, 0x07, 0x78, 0xb7, 0xe6,
- 0x24, 0x03, 0x78, 0xbd, 0xf6, 0x78, 0xb7, 0xe6, 0x24, 0xfd, 0x78, 0xbe, 0xf6, 0x12, 0x0e, 0xba,
- 0x40, 0x06, 0x78, 0xbe, 0xe6, 0xff, 0x80, 0x04, 0x78, 0xbd, 0xe6, 0xff, 0x78, 0xbc, 0xa6, 0x07,
- 0x75, 0x1f, 0x02, 0x78, 0xb6, 0x76, 0x01, 0x02, 0x05, 0x59, 0xe5, 0x1f, 0x64, 0x02, 0x60, 0x03,
- 0x02, 0x05, 0x39, 0x78, 0xbc, 0xe6, 0xff, 0xc3, 0x78, 0xbe, 0x12, 0x0e, 0x98, 0x40, 0x08, 0x12,
- 0x0e, 0x92, 0x50, 0x03, 0x02, 0x05, 0x37, 0x12, 0x0e, 0xba, 0x40, 0x04, 0x7f, 0xff, 0x80, 0x02,
- 0x7f, 0x01, 0x78, 0xbb, 0xa6, 0x07, 0x78, 0xb7, 0xe6, 0x04, 0x78, 0xbd, 0xf6, 0x78, 0xb7, 0xe6,
- 0x14, 0x78, 0xbe, 0xf6, 0x18, 0x12, 0x0e, 0xbc, 0x40, 0x04, 0xe6, 0xff, 0x80, 0x02, 0x7f, 0x00,
- 0x78, 0xbd, 0xa6, 0x07, 0xd3, 0x08, 0xe6, 0x64, 0x80, 0x94, 0x80, 0x40, 0x04, 0xe6, 0xff, 0x80,
- 0x02, 0x7f, 0x00, 0x78, 0xbe, 0xa6, 0x07, 0xc3, 0x18, 0xe6, 0x64, 0x80, 0x94, 0xb3, 0x50, 0x04,
- 0xe6, 0xff, 0x80, 0x02, 0x7f, 0x33, 0x78, 0xbd, 0xa6, 0x07, 0xc3, 0x08, 0xe6, 0x64, 0x80, 0x94,
- 0xb3, 0x50, 0x04, 0xe6, 0xff, 0x80, 0x02, 0x7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x93, 0xfc, 0x74, 0x01, 0x93, 0xfd, 0x74, 0x02, 0x93, 0xfe, 0x74, 0x03, 0x93,
- 0xff, 0x22, 0xe6, 0xfb, 0x08, 0xe6, 0xf9, 0x08, 0xe6, 0xfa, 0x08, 0xe6, 0xcb, 0xf8, 0x22, 0xec,
- 0xf6, 0x08, 0xed, 0xf6, 0x08, 0xee, 0xf6, 0x08, 0xef, 0xf6, 0x22, 0xa4, 0x25, 0x82, 0xf5, 0x82,
- 0xe5, 0xf0, 0x35, 0x83, 0xf5, 0x83, 0x22, 0xd0, 0x83, 0xd0, 0x82, 0xf8, 0xe4, 0x93, 0x70, 0x12,
- 0x74, 0x01, 0x93, 0x70, 0x0d, 0xa3, 0xa3, 0x93, 0xf8, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x88, 0x83,
- 0xe4, 0x73, 0x74, 0x02, 0x93, 0x68, 0x60, 0xef, 0xa3, 0xa3, 0xa3, 0x80, 0xdf, 0x90, 0x38, 0x04,
- 0x78, 0x50, 0x12, 0x0c, 0x7f, 0x90, 0x38, 0x00, 0xe0, 0xfe, 0xa3, 0xe0, 0xfd, 0xed, 0xff, 0xc3,
- 0x12, 0x0c, 0x38, 0x90, 0x38, 0x10, 0x12, 0x0c, 0x2c, 0x90, 0x38, 0x06, 0x78, 0x52, 0x12, 0x0c,
- 0x7f, 0x90, 0x38, 0x02, 0xe0, 0xfe, 0xa3, 0xe0, 0xfd, 0xed, 0xff, 0xc3, 0x12, 0x0c, 0x38, 0x90,
- 0x38, 0x12, 0x12, 0x0c, 0x2c, 0xa3, 0xe0, 0xb4, 0x31, 0x07, 0x78, 0x50, 0x79, 0x50, 0x12, 0x0c,
- 0x95, 0x90, 0x38, 0x14, 0xe0, 0xb4, 0x71, 0x15, 0x78, 0x50, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x02,
- 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x79, 0x51, 0xf7, 0xee, 0x19, 0xf7, 0x90, 0x38, 0x15,
- 0xe0, 0xb4, 0x31, 0x07, 0x78, 0x52, 0x79, 0x52, 0x12, 0x0c, 0x95, 0x90, 0x38, 0x15, 0xe0, 0xb4,
- 0x71, 0x15, 0x78, 0x52, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8,
- 0xf9, 0x79, 0x53, 0xf7, 0xee, 0x19, 0xf7, 0x79, 0x50, 0x12, 0x0c, 0x67, 0x09, 0x12, 0x0c, 0x67,
- 0xaf, 0x45, 0x12, 0x0c, 0x1d, 0x7d, 0x50, 0x12, 0x05, 0x9c, 0x78, 0x58, 0xa6, 0x06, 0x08, 0xa6,
- 0x07, 0xaf, 0x43, 0x12, 0x0c, 0x1d, 0x7d, 0x50, 0x12, 0x05, 0x9c, 0x78, 0x54, 0xa6, 0x06, 0x08,
- 0xa6, 0x07, 0xaf, 0x46, 0x78, 0x52, 0x12, 0x0c, 0x1f, 0x7d, 0x3c, 0x12, 0x05, 0x9c, 0x78, 0x5a,
- 0xa6, 0x06, 0x08, 0xa6, 0x07, 0xaf, 0x44, 0x7e, 0x00, 0x78, 0x52, 0x12, 0x0c, 0x21, 0x7d, 0x3c,
- 0x12, 0x05, 0x9c, 0x78, 0x56, 0xa6, 0x06, 0x08, 0xa6, 0x07, 0xc3, 0x78, 0x59, 0xe6, 0x94, 0x08,
- 0x18, 0xe6, 0x94, 0x00, 0x50, 0x05, 0x76, 0x00, 0x08, 0x76, 0x08, 0xc3, 0x78, 0x5b, 0xe6, 0x94,
- 0x08, 0x18, 0xe6, 0x94, 0x00, 0x50, 0x05, 0x76, 0x00, 0x08, 0x76, 0x08, 0x78, 0x58, 0x12, 0x0c,
- 0x54, 0xff, 0xd3, 0x78, 0x55, 0xe6, 0x9f, 0x18, 0xe6, 0x9e, 0x40, 0x0e, 0x78, 0x58, 0xe6, 0x13,
- 0xfe, 0x08, 0xe6, 0x78, 0x55, 0x12, 0x0c, 0x8a, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0x78, 0x5c,
- 0x12, 0x0c, 0x4c, 0xff, 0xd3, 0x78, 0x57, 0xe6, 0x9f, 0x18, 0xe6, 0x9e, 0x40, 0x0e, 0x78, 0x5a,
- 0xe6, 0x13, 0xfe, 0x08, 0xe6, 0x78, 0x57, 0x12, 0x0c, 0x8a, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00,
- 0xe4, 0xfc, 0xfd, 0x78, 0x60, 0x12, 0x07, 0x4f, 0x78, 0x58, 0x12, 0x0c, 0x54, 0x78, 0x55, 0x26,
- 0xff, 0xee, 0x18, 0x36, 0xfe, 0x78, 0x64, 0x12, 0x0c, 0x4c, 0x78, 0x57, 0x26, 0xff, 0xee, 0x18,
- 0x36, 0xfe, 0xe4, 0xfc, 0xfd, 0x78, 0x68, 0x12, 0x07, 0x4f, 0x12, 0x0c, 0x5c, 0x78, 0x64, 0x12,
- 0x07, 0x42, 0xd3, 0x12, 0x07, 0x0e, 0x40, 0x08, 0x12, 0x0c, 0x5c, 0x78, 0x64, 0x12, 0x07, 0x4f,
- 0x78, 0x52, 0x12, 0x0c, 0x5e, 0x78, 0x68, 0x12, 0x07, 0x42, 0xd3, 0x12, 0x07, 0x0e, 0x40, 0x0a,
- 0x78, 0x52, 0x12, 0x0c, 0x5e, 0x78, 0x68, 0x12, 0x07, 0x4f, 0xe4, 0xfd, 0x78, 0x5f, 0x12, 0x0c,
- 0x77, 0x24, 0x01, 0x12, 0x0c, 0x40, 0x78, 0x63, 0x12, 0x0c, 0x77, 0x24, 0x02, 0x12, 0x0c, 0x40,
- 0x78, 0x67, 0x12, 0x0c, 0x77, 0x24, 0x03, 0x12, 0x0c, 0x40, 0x78, 0x6b, 0x12, 0x0c, 0x77, 0x24,
- 0x04, 0x12, 0x0c, 0x40, 0x0d, 0xbd, 0x05, 0xd4, 0xc2, 0x0e, 0xc2, 0x06, 0x22, 0x85, 0x08, 0x41,
- 0x90, 0x30, 0x24, 0x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0xc3, 0x13, 0xff, 0xfd, 0xe5,
- 0x44, 0x90, 0x0e, 0x80, 0x12, 0x0e, 0xea, 0x40, 0x04, 0xee, 0x9f, 0xf5, 0x44, 0x12, 0x07, 0x8d,
- 0x80, 0x11, 0x85, 0x40, 0x46, 0x85, 0x3f, 0x45, 0x85, 0x3e, 0x44, 0x85, 0x3d, 0x43, 0x80, 0x03,
- 0x02, 0x07, 0x8d, 0x90, 0x30, 0x24, 0xe5, 0x3d, 0xf0, 0xa3, 0xe5, 0x3e, 0xf0, 0xa3, 0xe5, 0x3f,
- 0xf0, 0xa3, 0xe5, 0x40, 0xf0, 0xa3, 0xe5, 0x3c, 0xf0, 0x90, 0x30, 0x23, 0xe4, 0xf0, 0x22, 0xc0,
- 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x90, 0x3f, 0x0c, 0xe0, 0xf5, 0x32, 0xe5, 0x32, 0x30,
- 0xe3, 0x4c, 0x30, 0x35, 0x3e, 0x90, 0x60, 0x19, 0xe0, 0xf5, 0x0a, 0xa3, 0xe0, 0xf5, 0x0b, 0x90,
- 0x60, 0x1d, 0xe0, 0xf5, 0x14, 0xa3, 0xe0, 0xf5, 0x15, 0x30, 0x01, 0x06, 0x30, 0x32, 0x03, 0xd3,
- 0x80, 0x01, 0xc3, 0x92, 0x09, 0x30, 0x02, 0x06, 0x30, 0x32, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92,
- 0x0a, 0x30, 0x32, 0x0c, 0x30, 0x03, 0x09, 0x20, 0x02, 0x06, 0x20, 0x01, 0x03, 0xd3, 0x80, 0x01,
- 0xc3, 0x92, 0x0b, 0x90, 0x30, 0x01, 0xe0, 0x44, 0x40, 0xf0, 0xe0, 0x54, 0xbf, 0xf0, 0xe5, 0x32,
- 0x30, 0xe1, 0x14, 0x30, 0x33, 0x11, 0x90, 0x30, 0x22, 0xe0, 0xf5, 0x08, 0xe4, 0xf0, 0x30, 0x00,
- 0x03, 0xd3, 0x80, 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x22,
- 0xff, 0xe5, 0xf0, 0x34, 0x60, 0x8f, 0x82, 0xf5, 0x83, 0xec, 0xf0, 0x22, 0xe4, 0xfc, 0xfd, 0x12,
- 0x07, 0x4f, 0x78, 0x5a, 0xe6, 0xc3, 0x13, 0xfe, 0x08, 0xe6, 0x13, 0x22, 0x78, 0x50, 0xe6, 0xfe,
- 0x08, 0xe6, 0xff, 0xe4, 0xfc, 0xfd, 0x22, 0xe7, 0xc4, 0xf8, 0x54, 0xf0, 0xc8, 0x68, 0xf7, 0x09,
- 0xe7, 0xc4, 0x54, 0x0f, 0x48, 0xf7, 0x22, 0xe6, 0xfc, 0xed, 0x75, 0xf0, 0x04, 0xa4, 0x22, 0xe0,
- 0xfe, 0xa3, 0xe0, 0xfd, 0xee, 0xf6, 0xed, 0x08, 0xf6, 0x22, 0x13, 0xff, 0xc3, 0xe6, 0x9f, 0xff,
- 0x18, 0xe6, 0x9e, 0xfe, 0x22, 0xe6, 0xc3, 0x13, 0xf7, 0x08, 0xe6, 0x13, 0x09, 0xf7, 0x22, 0x75,
- 0x89, 0x03, 0x75, 0xa8, 0x01, 0x75, 0xb8, 0x04, 0x75, 0x34, 0xff, 0x75, 0x35, 0x0e, 0x75, 0x36,
- 0x15, 0x75, 0x37, 0x0d, 0x12, 0x0d, 0x85, 0x12, 0x00, 0x09, 0x12, 0x0f, 0x17, 0x12, 0x00, 0x06,
- 0xd2, 0x00, 0xd2, 0x33, 0xd2, 0xaf, 0x75, 0x34, 0xff, 0x75, 0x35, 0x0e, 0x75, 0x36, 0x49, 0x75,
- 0x37, 0x03, 0x12, 0x0d, 0x85, 0x30, 0x08, 0x09, 0xc2, 0x33, 0x12, 0x09, 0x5d, 0xc2, 0x08, 0xd2,
- 0x33, 0x30, 0x0b, 0x09, 0xc2, 0x35, 0x12, 0x00, 0x0e, 0xc2, 0x0b, 0xd2, 0x35, 0x30, 0x09, 0x09,
- 0xc2, 0x35, 0x12, 0x03, 0x0a, 0xc2, 0x09, 0xd2, 0x35, 0x30, 0x0e, 0x03, 0x12, 0x07, 0x8d, 0x30,
- 0x34, 0xd3, 0x90, 0x30, 0x29, 0xe5, 0x1e, 0xf0, 0xb4, 0x10, 0x05, 0x90, 0x30, 0x23, 0xe4, 0xf0,
- 0xc2, 0x34, 0x80, 0xc1, 0xe4, 0xf5, 0x49, 0x90, 0x0e, 0x77, 0x93, 0xff, 0xe4, 0x8f, 0x37, 0xf5,
- 0x36, 0xf5, 0x35, 0xf5, 0x34, 0xaf, 0x37, 0xae, 0x36, 0xad, 0x35, 0xac, 0x34, 0x90, 0x0e, 0x6a,
- 0x12, 0x0f, 0x11, 0x8f, 0x37, 0x8e, 0x36, 0x8d, 0x35, 0x8c, 0x34, 0x90, 0x0e, 0x72, 0x12, 0x07,
- 0x32, 0xef, 0x45, 0x37, 0xf5, 0x37, 0xee, 0x45, 0x36, 0xf5, 0x36, 0xed, 0x45, 0x35, 0xf5, 0x35,
- 0xec, 0x45, 0x34, 0xf5, 0x34, 0xe4, 0xf5, 0x22, 0xf5, 0x23, 0x85, 0x37, 0x31, 0x85, 0x36, 0x30,
- 0x85, 0x35, 0x2f, 0x85, 0x34, 0x2e, 0x12, 0x0d, 0xc5, 0xe4, 0xf5, 0x22, 0xf5, 0x23, 0x90, 0x0e,
- 0x72, 0x12, 0x0f, 0x05, 0x12, 0x0d, 0xc5, 0xe4, 0xf5, 0x22, 0xf5, 0x23, 0x90, 0x0e, 0x6e, 0x12,
- 0x0f, 0x05, 0x02, 0x0d, 0xc5, 0xae, 0x35, 0xaf, 0x36, 0xe4, 0xfd, 0xed, 0xc3, 0x95, 0x37, 0x50,
- 0x33, 0x12, 0x0f, 0x52, 0xe4, 0x93, 0xf5, 0x38, 0x74, 0x01, 0x93, 0xf5, 0x39, 0x45, 0x38, 0x60,
- 0x23, 0x85, 0x39, 0x82, 0x85, 0x38, 0x83, 0xe0, 0xfc, 0x12, 0x0f, 0x52, 0x74, 0x03, 0x93, 0x52,
- 0x04, 0x12, 0x0f, 0x52, 0x74, 0x02, 0x93, 0x42, 0x04, 0x85, 0x39, 0x82, 0x85, 0x38, 0x83, 0xec,
- 0xf0, 0x0d, 0x80, 0xc7, 0x22, 0xa2, 0xaf, 0x92, 0x31, 0xc2, 0xaf, 0xe5, 0x23, 0x45, 0x22, 0x90,
- 0x0e, 0x5d, 0x60, 0x0b, 0x12, 0x0f, 0x47, 0xe0, 0xf5, 0x2c, 0xe0, 0xf5, 0x2d, 0x80, 0x0f, 0x12,
- 0x0f, 0x47, 0xe5, 0x30, 0xf0, 0x90, 0x0e, 0x5f, 0x12, 0x0f, 0x47, 0xe5, 0x31, 0xf0, 0xa2, 0x31,
- 0x92, 0xaf, 0x22, 0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0xcb, 0x02, 0x0c, 0x9f, 0x00,
- 0x11, 0x05, 0x25, 0x16, 0x33, 0x02, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x74, 0x20, 0x20, 0x14, 0x00,
- 0x10, 0x00, 0x56, 0x40, 0x1a, 0x30, 0x29, 0x7e, 0x00, 0x30, 0x04, 0x20, 0xdf, 0x30, 0x05, 0x40,
- 0xbf, 0x50, 0x03, 0x00, 0xfd, 0x50, 0x27, 0x01, 0xfe, 0x60, 0x00, 0x11, 0x00, 0x3f, 0x05, 0x30,
- 0x00, 0x3f, 0x06, 0x22, 0x00, 0x3f, 0x01, 0x2a, 0x00, 0x3f, 0x02, 0x00, 0x00, 0x36, 0x06, 0x07,
- 0x00, 0x3f, 0x0b, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x40, 0xbf, 0x30, 0x01, 0x00,
- 0xbf, 0x30, 0x29, 0x70, 0x00, 0x3a, 0x00, 0x00, 0xff, 0x3a, 0x00, 0x00, 0xff, 0x36, 0x03, 0x36,
- 0x02, 0x41, 0x44, 0x58, 0x20, 0x18, 0x10, 0x0a, 0x04, 0x04, 0x00, 0x03, 0xff, 0x64, 0x00, 0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0x52, 0x12, 0x0c,
+ 0x7f, 0x90, 0x38, 0x02, 0xe0, 0xfe, 0xa3, 0xe0, 0xfd, 0xed, 0xff, 0xc3, 0x12, 0x0c, 0x38, 0x90,
+ 0x38, 0x12, 0x12, 0x0c, 0x2c, 0xa3, 0xe0, 0xb4, 0x31, 0x07, 0x78, 0x50, 0x79, 0x50, 0x12, 0x0c,
+ 0x95, 0x90, 0x38, 0x14, 0xe0, 0xb4, 0x71, 0x15, 0x78, 0x50, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x02,
+ 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0x79, 0x51, 0xf7, 0xee, 0x19, 0xf7, 0x90, 0x38, 0x15,
+ 0xe0, 0xb4, 0x31, 0x07, 0x78, 0x52, 0x79, 0x52, 0x12, 0x0c, 0x95, 0x90, 0x38, 0x15, 0xe0, 0xb4,
+ 0x71, 0x15, 0x78, 0x52, 0xe6, 0xfe, 0x08, 0xe6, 0x78, 0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8,
+ 0xf9, 0x79, 0x53, 0xf7, 0xee, 0x19, 0xf7, 0x79, 0x50, 0x12, 0x0c, 0x67, 0x09, 0x12, 0x0c, 0x67,
+ 0xaf, 0x45, 0x12, 0x0c, 0x1d, 0x7d, 0x50, 0x12, 0x05, 0x9c, 0x78, 0x58, 0xa6, 0x06, 0x08, 0xa6,
+ 0x07, 0xaf, 0x43, 0x12, 0x0c, 0x1d, 0x7d, 0x50, 0x12, 0x05, 0x9c, 0x78, 0x54, 0xa6, 0x06, 0x08,
+ 0xa6, 0x07, 0xaf, 0x46, 0x78, 0x52, 0x12, 0x0c, 0x1f, 0x7d, 0x3c, 0x12, 0x05, 0x9c, 0x78, 0x5a,
+ 0xa6, 0x06, 0x08, 0xa6, 0x07, 0xaf, 0x44, 0x7e, 0x00, 0x78, 0x52, 0x12, 0x0c, 0x21, 0x7d, 0x3c,
+ 0x12, 0x05, 0x9c, 0x78, 0x56, 0xa6, 0x06, 0x08, 0xa6, 0x07, 0xc3, 0x78, 0x59, 0xe6, 0x94, 0x08,
+ 0x18, 0xe6, 0x94, 0x00, 0x50, 0x05, 0x76, 0x00, 0x08, 0x76, 0x08, 0xc3, 0x78, 0x5b, 0xe6, 0x94,
+ 0x08, 0x18, 0xe6, 0x94, 0x00, 0x50, 0x05, 0x76, 0x00, 0x08, 0x76, 0x08, 0x78, 0x58, 0x12, 0x0c,
+ 0x54, 0xff, 0xd3, 0x78, 0x55, 0xe6, 0x9f, 0x18, 0xe6, 0x9e, 0x40, 0x0e, 0x78, 0x58, 0xe6, 0x13,
+ 0xfe, 0x08, 0xe6, 0x78, 0x55, 0x12, 0x0c, 0x8a, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00, 0x78, 0x5c,
+ 0x12, 0x0c, 0x4c, 0xff, 0xd3, 0x78, 0x57, 0xe6, 0x9f, 0x18, 0xe6, 0x9e, 0x40, 0x0e, 0x78, 0x5a,
+ 0xe6, 0x13, 0xfe, 0x08, 0xe6, 0x78, 0x57, 0x12, 0x0c, 0x8a, 0x80, 0x04, 0x7e, 0x00, 0x7f, 0x00,
+ 0xe4, 0xfc, 0xfd, 0x78, 0x60, 0x12, 0x07, 0x4f, 0x78, 0x58, 0x12, 0x0c, 0x54, 0x78, 0x55, 0x26,
+ 0xff, 0xee, 0x18, 0x36, 0xfe, 0x78, 0x64, 0x12, 0x0c, 0x4c, 0x78, 0x57, 0x26, 0xff, 0xee, 0x18,
+ 0x36, 0xfe, 0xe4, 0xfc, 0xfd, 0x78, 0x68, 0x12, 0x07, 0x4f, 0x12, 0x0c, 0x5c, 0x78, 0x64, 0x12,
+ 0x07, 0x42, 0xd3, 0x12, 0x07, 0x0e, 0x40, 0x08, 0x12, 0x0c, 0x5c, 0x78, 0x64, 0x12, 0x07, 0x4f,
+ 0x78, 0x52, 0x12, 0x0c, 0x5e, 0x78, 0x68, 0x12, 0x07, 0x42, 0xd3, 0x12, 0x07, 0x0e, 0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04, 0x75, 0x34, 0xff, 0x75, 0x35, 0x0e, 0x75, 0x36,
+ 0x15, 0x75, 0x37, 0x0d, 0x12, 0x0d, 0x85, 0x12, 0x00, 0x09, 0x12, 0x0f, 0x17, 0x12, 0x00, 0x06,
+ 0xd2, 0x00, 0xd2, 0x33, 0xd2, 0xaf, 0x75, 0x34, 0xff, 0x75, 0x35, 0x0e, 0x75, 0x36, 0x49, 0x75,
+ 0x37, 0x03, 0x12, 0x0d, 0x85, 0x30, 0x08, 0x09, 0xc2, 0x33, 0x12, 0x09, 0x5d, 0xc2, 0x08, 0xd2,
+ 0x33, 0x30, 0x0b, 0x09, 0xc2, 0x35, 0x12, 0x00, 0x0e, 0xc2, 0x0b, 0xd2, 0x35, 0x30, 0x09, 0x09,
+ 0xc2, 0x35, 0x12, 0x03, 0x0a, 0xc2, 0x09, 0xd2, 0x35, 0x30, 0x0e, 0x03, 0x12, 0x07, 0x8d, 0x30,
+ 0x34, 0xd3, 0x90, 0x30, 0x29, 0xe5, 0x1e, 0xf0, 0xb4, 0x10, 0x05, 0x90, 0x30, 0x23, 0xe4, 0xf0,
+ 0xc2, 0x34, 0x80, 0xc1, 0xe4, 0xf5, 0x49, 0x90, 0x0e, 0x77, 0x93, 0xff, 0xe4, 0x8f, 0x37, 0xf5,
+ 0x36, 0xf5, 0x35, 0xf5, 0x34, 0xaf, 0x37, 0xae, 0x36, 0xad, 0x35, 0xac, 0x34, 0x90, 0x0e, 0x6a,
+ 0x12, 0x0f, 0x11, 0x8f, 0x37, 0x8e, 0x36, 0x8d, 0x35, 0x8c, 0x34, 0x90, 0x0e, 0x72, 0x12, 0x07,
+ 0x32, 0xef, 0x45, 0x37, 0xf5, 0x37, 0xee, 0x45, 0x36, 0xf5, 0x36, 0xed, 0x45, 0x35, 0xf5, 0x35,
+ 0xec, 0x45, 0x34, 0xf5, 0x34, 0xe4, 0xf5, 0x22, 0xf5, 0x23, 0x85, 0x37, 0x31, 0x85, 0x36, 0x30,
+ 0x85, 0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x30, 0x04, 0x20, 0xdf, 0x30, 0x05, 0x40,
+ 0xbf, 0x50, 0x03, 0x00, 0xfd, 0x50, 0x27, 0x01, 0xfe, 0x60, 0x00, 0x11, 0x00, 0x3f, 0x05, 0x30,
+ 0x00, 0x3f, 0x06, 0x22, 0x00, 0x3f, 0x01, 0x2a, 0x00, 0x3f, 0x02, 0x00, 0x00, 0x36, 0x06, 0x07,
+ 0x00, 0x3f, 0x0b, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x30, 0x01, 0x40, 0xbf, 0x30, 0x01, 0x00,
+ 0xbf, 0x30, 0x29, 0x70, 0x00, 0x3a, 0x00, 0x00, 0xff, 0x3a, 0x00, 0x00, 0xff, 0x36, 0x03, 0x36,
+ 0x02, 0x41, 0x44, 0x58, 0x20, 0x18, 0x10, 0x0a, 0x04, 0x04, 0x00, 0x03, 0xff, 0x64, 0x00, 0x00,
+ 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x06, 0x00, 0x03, 0x98, 0x00, 0xcc, 0x50,
+ 0x3c, 0x28, 0x1e, 0x0c, 0x0c, 0x00, 0x00, 0x10, 0x0c, 0x10, 0x04, 0x0c, 0x6e, 0x06, 0x05, 0x00,
+ 0xa5, 0x5a, 0x78, 0xbc, 0xe6, 0xd3, 0x08, 0xff, 0xe6, 0x64, 0x80, 0xf8, 0xef, 0x64, 0x80, 0x98,
+ 0x22, 0x93, 0xff, 0x7e, 0x00, 0xe6, 0xfc, 0x08, 0xe6, 0xfd, 0x12, 0x05, 0x8a, 0x78, 0xbf, 0xe6,
+ 0xfc, 0x08, 0xe6, 0xfd, 0xd3, 0xef, 0x9d, 0xee, 0x9c, 0x22, 0x78, 0xbb, 0xd3, 0xe6, 0x64, 0x80,
+ 0x94, 0x80, 0x22, 0x25, 0xe0, 0x24, 0x0a, 0xf8, 0xe6, 0xfe, 0x08, 0xe6, 0xff, 0x22, 0xd2, 0x01,
+ 0xc2, 0x02, 0xe4, 0xf5, 0x1f, 0xf5, 0x1e, 0xd2, 0x34, 0xd2, 0x32, 0xd2, 0x35, 0xd2, 0x01, 0xc2,
+ 0x02, 0xf5, 0x1f, 0xf5, 0x1e, 0xd2, 0x34, 0xd2, 0x32, 0x22, 0x2d, 0xfd, 0xe4, 0x33, 0xfc, 0xe4,
+ 0x93, 0xfe, 0xfb, 0xd3, 0xed, 0x9b, 0x74, 0x80, 0xf8, 0x6c, 0x98, 0x22, 0x8f, 0x3b, 0x8e, 0x3a,
+ 0x8d, 0x39, 0x8c, 0x38, 0x22, 0x12, 0x07, 0x32, 0x8f, 0x31, 0x8e, 0x30, 0x8d, 0x2f, 0x8c, 0x2e,
+ 0x22, 0x93, 0xf9, 0xf8, 0x02, 0x07, 0x1f, 0x90, 0x0e, 0x81, 0x12, 0x07, 0x32, 0x8f, 0x46, 0x8e,
+ 0x45, 0x8d, 0x44, 0x8c, 0x43, 0xd2, 0x06, 0x30, 0x06, 0x03, 0xd3, 0x80, 0x01, 0xc3, 0x92, 0x0e,
+ 0x22, 0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x3f, 0x0d, 0xe0, 0xf5, 0x33, 0xe5, 0x33, 0xf0,
+ 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32, 0xe4, 0x93, 0xfe, 0x74, 0x01, 0x93, 0xf5, 0x82, 0x8e,
0x83, 0x22, 0x8f, 0x82, 0x8e, 0x83, 0x75, 0xf0, 0x04, 0xed, 0x02, 0x07, 0x5b
];
@@ -1227,7 +1259,7 @@ class Camera
UInt16 addr = (UInt16)(firmwareAddr + i);
firmwareCommands.Add([addr, OV5640_AF_FIRMWARE[i]]);
}
-
+
var result = await ConfigureRegisters(firmwareCommands.ToArray());
if (!result.IsSuccessful)
{
@@ -1306,15 +1338,15 @@ class Camera
logger.Error($"读取对焦状态寄存器(0x3029)失败: {readResult.Error}");
return new(readResult.Error);
}
-
+
focusStatus = readResult.Value;
-
+
if (focusStatus == 0x10)
{
logger.Info("对焦已完成 (0x3029 = 0x10)");
break;
}
-
+
if (iteration-- == 0)
{
logger.Error($"自动对焦超时,状态: 0x{focusStatus:X2}");
diff --git a/server/src/Peripherals/DDSClient.cs b/server/src/Peripherals/DDSClient.cs
index 1dc4d68..e7d1fd9 100644
--- a/server/src/Peripherals/DDSClient.cs
+++ b/server/src/Peripherals/DDSClient.cs
@@ -108,7 +108,7 @@ public class DDS
if (waveNum < 0 || waveNum > 3) return new(new ArgumentException(
$"Wave number should be 0 ~ 3 instead of {waveNum}", nameof(waveNum)));
- await MsgBus.UDPServer.ClearUDPData(this.address, 1);
+ MsgBus.UDPServer.ClearUDPData(this.address, 1);
logger.Trace("Clear udp data finished");
var ret = await UDPClientPool.WriteAddr(
@@ -132,7 +132,7 @@ public class DDS
if (waveNum < 0 || waveNum > 3) return new(new ArgumentException(
$"Wave number should be 0 ~ 3 instead of {waveNum}", nameof(waveNum)));
- await MsgBus.UDPServer.ClearUDPData(this.address, 1);
+ MsgBus.UDPServer.ClearUDPData(this.address, 1);
logger.Trace("Clear udp data finished");
var ret = await UDPClientPool.WriteAddr(
@@ -158,7 +158,7 @@ public class DDS
if (phase < 0 || phase > 4096) return new(new ArgumentException(
$"Phase should be 0 ~ 4096 instead of {phase}", nameof(phase)));
- await MsgBus.UDPServer.ClearUDPData(this.address, 1);
+ MsgBus.UDPServer.ClearUDPData(this.address, 1);
logger.Trace("Clear udp data finished");
var ret = await UDPClientPool.WriteAddr(
diff --git a/server/src/Peripherals/I2cClient.cs b/server/src/Peripherals/I2cClient.cs
index a783a67..990dc13 100644
--- a/server/src/Peripherals/I2cClient.cs
+++ b/server/src/Peripherals/I2cClient.cs
@@ -82,7 +82,7 @@ public class I2c
/// [TODO:parameter]
/// [TODO:parameter]
/// [TODO:return]
- public I2c(string address, int port, int taskID,int timeout = 2000)
+ public I2c(string address, int port, int taskID, int timeout = 2000)
{
if (timeout < 0)
throw new ArgumentException("Timeout couldn't be negative", nameof(timeout));
@@ -109,7 +109,7 @@ public class I2c
}
// 清除UDP服务器接收缓冲区
- await MsgBus.UDPServer.ClearUDPData(this.address, this.taskID);
+ MsgBus.UDPServer.ClearUDPData(this.address, this.taskID);
logger.Trace($"Clear up udp server {this.address} receive data");
@@ -214,7 +214,7 @@ public class I2c
}
// 清除UDP服务器接收缓冲区
- await MsgBus.UDPServer.ClearUDPData(this.address, this.taskID);
+ MsgBus.UDPServer.ClearUDPData(this.address, this.taskID);
logger.Trace($"Clear up udp server {this.address} receive data");
diff --git a/server/src/Peripherals/JtagClient.cs b/server/src/Peripherals/JtagClient.cs
index 813455e..69d807a 100644
--- a/server/src/Peripherals/JtagClient.cs
+++ b/server/src/Peripherals/JtagClient.cs
@@ -627,7 +627,7 @@ public class Jtag
public async ValueTask> ReadIDCode()
{
// Clear Data
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace($"Clear up udp server {this.address,0} receive data");
@@ -665,7 +665,7 @@ public class Jtag
public async ValueTask> ReadStatusReg()
{
// Clear Data
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace($"Clear up udp server {this.address,0} receive data");
@@ -702,7 +702,7 @@ public class Jtag
public async ValueTask> DownloadBitstream(byte[] bitstream)
{
// Clear Data
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace($"Clear up udp server {this.address,0} receive data");
@@ -786,7 +786,7 @@ public class Jtag
logger.Debug($"Get boundar scan registers number: {portNum}");
// Clear Data
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace($"Clear up udp server {this.address,0} receive data");
@@ -853,7 +853,7 @@ public class Jtag
public async ValueTask> SetSpeed(UInt32 speed)
{
// Clear Data
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace($"Clear up udp server {this.address,0} receive data");
diff --git a/server/src/Peripherals/MatrixKeyClient.cs b/server/src/Peripherals/MatrixKeyClient.cs
index 99a035f..d952f47 100644
--- a/server/src/Peripherals/MatrixKeyClient.cs
+++ b/server/src/Peripherals/MatrixKeyClient.cs
@@ -44,7 +44,7 @@ public class MatrixKey
public async ValueTask> EnableControl()
{
if (MsgBus.IsRunning)
- await MsgBus.UDPServer.ClearUDPData(this.address, 1);
+ MsgBus.UDPServer.ClearUDPData(this.address, 1);
else return new(new Exception("Message Bus not work!"));
var ret = await UDPClientPool.WriteAddr(this.ep, 1, MatrixKeyAddr.KEY_ENABLE, 1, this.timeout);
@@ -59,7 +59,7 @@ public class MatrixKey
public async ValueTask> DisableControl()
{
if (MsgBus.IsRunning)
- await MsgBus.UDPServer.ClearUDPData(this.address, 1);
+ MsgBus.UDPServer.ClearUDPData(this.address, 1);
else return new(new Exception("Message Bus not work!"));
var ret = await UDPClientPool.WriteAddr(this.ep, 1, MatrixKeyAddr.KEY_ENABLE, 0, this.timeout);
@@ -75,7 +75,7 @@ public class MatrixKey
public async ValueTask> ControlKey(BitArray keyStates)
{
if (MsgBus.IsRunning)
- await MsgBus.UDPServer.ClearUDPData(this.address, 1);
+ MsgBus.UDPServer.ClearUDPData(this.address, 1);
else return new(new Exception("Message Bus not work!"));
if (keyStates.Length != 16) return new(new ArgumentException(
diff --git a/server/src/Peripherals/PowerClient.cs b/server/src/Peripherals/PowerClient.cs
index d7d6aea..6cb349a 100644
--- a/server/src/Peripherals/PowerClient.cs
+++ b/server/src/Peripherals/PowerClient.cs
@@ -45,7 +45,7 @@ public class Power
public async ValueTask> SetPowerOnOff(bool enable)
{
if (MsgBus.IsRunning)
- await MsgBus.UDPServer.ClearUDPData(this.address, 1);
+ MsgBus.UDPServer.ClearUDPData(this.address, 1);
else return new(new Exception("Message Bus not work!"));
var ret = await UDPClientPool.WriteAddr(this.ep, 1, PowerAddr.PowerCtrl, Convert.ToUInt32(enable), this.timeout);
diff --git a/server/src/Peripherals/RemoteUpdateClient.cs b/server/src/Peripherals/RemoteUpdateClient.cs
index ccfd8dd..e17cad9 100644
--- a/server/src/Peripherals/RemoteUpdateClient.cs
+++ b/server/src/Peripherals/RemoteUpdateClient.cs
@@ -382,7 +382,7 @@ public class RemoteUpdater
/// [TODO:return]
public async ValueTask> HotResetBitstream(int bitstreamNum)
{
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace("Clear udp data finished");
{
@@ -412,7 +412,7 @@ public class RemoteUpdater
byte[]? bitstream2,
byte[]? bitstream3)
{
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace("Clear udp data finished");
for (int bitstreamNum = 0; bitstreamNum < 4; bitstreamNum++)
@@ -463,7 +463,7 @@ public class RemoteUpdater
$"The length of data should be divided by 4096, bug given {bytesData.Length}", nameof(bytesData)));
var bitstreamBlockNum = bytesData.Length / (4 * 1024);
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace("Clear udp data finished");
{
@@ -539,7 +539,7 @@ public class RemoteUpdater
/// [TODO:return]
public async ValueTask> GetVersion()
{
- await MsgBus.UDPServer.ClearUDPData(this.address, 0);
+ MsgBus.UDPServer.ClearUDPData(this.address, 0);
logger.Trace("Clear udp data finished");
{
diff --git a/server/src/Services/HttpVideoStreamService.cs b/server/src/Services/HttpVideoStreamService.cs
index 442a654..e6209d2 100644
--- a/server/src/Services/HttpVideoStreamService.cs
+++ b/server/src/Services/HttpVideoStreamService.cs
@@ -156,8 +156,7 @@ public class HttpVideoStreamService : BackgroundService
throw new Exception("Please config camera first");
}
_cameraEnable = isEnabled;
- await _camera.EnableCamera(_cameraEnable);
- await _camera.SleepCameraHardware(!_cameraEnable);
+ await _camera.EnableHardwareTrans(_cameraEnable);
}
///
diff --git a/server/src/UdpClientPool.cs b/server/src/UdpClientPool.cs
index de671b8..9a5b210 100644
--- a/server/src/UdpClientPool.cs
+++ b/server/src/UdpClientPool.cs
@@ -477,7 +477,7 @@ public class UDPClientPool
int outstanding = sentCount - (found.HasValue ? found.Value : 0);
// If outstanding >= 512 - batchSize, wait for some data to be received
- if (outstanding >= 512 - batchSize)
+ if (outstanding >= 256 - batchSize)
continue;
diff --git a/server/src/UdpServer.cs b/server/src/UdpServer.cs
index 88eeac5..6e8eeca 100644
--- a/server/src/UdpServer.cs
+++ b/server/src/UdpServer.cs
@@ -1,9 +1,9 @@
+using System.Collections.Concurrent;
using System.Net;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Text;
using DotNext;
-using DotNext.Threading;
using Newtonsoft.Json;
using WebProtocol;
@@ -72,12 +72,10 @@ public class UDPServer
{
private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
- private Dictionary> udpData = new Dictionary>();
-
- private Semaphore taskPool = new Semaphore(3, 3);
+ private ConcurrentDictionary> udpData = new ConcurrentDictionary>();
private int listenPort;
- private UdpClient listener;
+ private List listeners = new List();
private IPEndPoint groupEP;
private bool isRunning = false;
@@ -103,15 +101,19 @@ public class UDPServer
/// Construct a udp server with fixed port
///
/// Device UDP Port
+ /// UDP Client Num
/// UDPServer class
- public UDPServer(int port)
+ public UDPServer(int port, int num)
{
// Construction
- listenPort = port;
+ this.listenPort = port;
try
{
- listener = new UdpClient(listenPort);
- groupEP = new IPEndPoint(IPAddress.Any, listenPort);
+ for (int i = 0; i < num; i++)
+ {
+ listeners.Add(new UdpClient(this.listenPort + i));
+ }
+ this.groupEP = new IPEndPoint(IPAddress.Any, listenPort);
}
catch (Exception e)
{
@@ -145,25 +147,19 @@ public class UDPServer
{
UDPData? data = null;
- // logger.Debug($"Caller \"{callerName}|{callerLineNum}\": Try to find {ipAddr}-{taskID} UDP Data");
-
var startTime = DateTime.Now;
var isTimeout = false;
- var timeleft = TimeSpan.FromMilliseconds(timeout);
while (!isTimeout)
{
var elapsed = DateTime.Now - startTime;
isTimeout = elapsed >= TimeSpan.FromMilliseconds(timeout);
if (isTimeout) break;
- timeleft = TimeSpan.FromMilliseconds(timeout) - elapsed;
- using (await udpData.AcquireWriteLockAsync(timeleft))
+ lock (udpData)
{
- if (udpData.ContainsKey($"{ipAddr}-{taskID}") &&
- udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue) &&
- dataQueue.Count > 0)
+ if (udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue) &&
+ dataQueue.TryDequeue(out data))
{
- data = dataQueue.Dequeue();
// logger.Debug($"Find UDP Data: {data.ToString()}");
break;
}
@@ -196,22 +192,22 @@ public class UDPServer
var startTime = DateTime.Now;
var isTimeout = false;
- var timeleft = TimeSpan.FromMilliseconds(timeout);
while (!isTimeout)
{
var elapsed = DateTime.Now - startTime;
isTimeout = elapsed >= TimeSpan.FromMilliseconds(timeout);
if (isTimeout) break;
- timeleft = TimeSpan.FromMilliseconds(timeout) - elapsed;
- using (await udpData.AcquireWriteLockAsync(timeleft))
+ lock (udpData)
{
- if (udpData.ContainsKey($"{ipAddr}-{taskID}") &&
- udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue) &&
- dataQueue.Count > 0)
+ if (udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue) &&
+ !dataQueue.IsEmpty)
{
- data = dataQueue.ToList();
- dataQueue.Clear();
+ data = new List();
+ while (dataQueue.TryDequeue(out var item))
+ {
+ data.Add(item);
+ }
break;
}
}
@@ -241,24 +237,18 @@ public class UDPServer
var startTime = DateTime.Now;
var isTimeout = false;
- var timeleft = TimeSpan.FromMilliseconds(timeout);
while (!isTimeout)
{
var elapsed = DateTime.Now - startTime;
isTimeout = elapsed >= TimeSpan.FromMilliseconds(timeout);
if (isTimeout) break;
- timeleft = TimeSpan.FromMilliseconds(timeout) - elapsed;
- using (await udpData.AcquireReadLockAsync(timeleft))
+ if (udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue) &&
+ !dataQueue.IsEmpty)
{
- if (udpData.ContainsKey($"{ipAddr}-{taskID}") &&
- udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue) &&
- dataQueue.Count > 0)
- {
- data = dataQueue.ToList();
- // logger.Debug($"Find UDP Data Array: {JsonConvert.SerializeObject(data)}");
- break;
- }
+ data = dataQueue.ToArray().ToList();
+ // logger.Debug($"Find UDP Data Array: {JsonConvert.SerializeObject(data)}");
+ break;
}
}
@@ -286,22 +276,16 @@ public class UDPServer
var startTime = DateTime.Now;
var isTimeout = false;
- var timeleft = TimeSpan.FromMilliseconds(timeout);
while (!isTimeout)
{
var elapsed = DateTime.Now - startTime;
isTimeout = elapsed >= TimeSpan.FromMilliseconds(timeout);
if (isTimeout) break;
- timeleft = TimeSpan.FromMilliseconds(timeout) - elapsed;
- using (await udpData.AcquireReadLockAsync(timeleft))
+ if (udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue))
{
- if (udpData.ContainsKey($"{ipAddr}-{taskID}") &&
- udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue))
- {
- count = dataQueue.Count;
- break;
- }
+ count = dataQueue.Count;
+ break;
}
}
@@ -367,52 +351,26 @@ public class UDPServer
return retPack.Value;
}
- static int ReceiveHandleCcount = 0;
- private void ReceiveHandler(IAsyncResult res)
+ private async Task ReceiveHandler(byte[] data, IPEndPoint endPoint, DateTime time)
{
- var remoteEP = new IPEndPoint(IPAddress.Any, listenPort);
- byte[] bytes = listener.EndReceive(res, ref remoteEP);
-
- // 提前开始接收下一个包
- listener.BeginReceive(new AsyncCallback(ReceiveHandler), null);
- logger.Debug($"Test ReceiveHandler Count = {ReceiveHandleCcount}");
- ReceiveHandleCcount++;
-
- // Handle RemoteEP
- if (remoteEP is null)
+ // 异步锁保护 udpData
+ await Task.Run(() =>
{
- logger.Debug($"Receive Data from Unknown at {DateTime.Now.ToString()}:");
- logger.Debug($" Original Data : {BitConverter.ToString(bytes).Replace("-", " ")}");
- return;
- }
+ // Handle RemoteEP
+ if (endPoint is null)
+ {
+ logger.Debug($"Receive Data from Unknown at {DateTime.Now.ToString()}:");
+ logger.Debug($" Original Data : {BitConverter.ToString(data).Replace("-", " ")}");
+ return;
+ }
- // 异步处理数据包
- Task.Run(() =>
- {
- var udpData = RecordUDPData(bytes, remoteEP, Convert.ToInt32(bytes[1]));
- PrintData(udpData);
+ var udpDataObj = RecordUDPData(data, endPoint, time, Convert.ToInt32(data[1]));
+ // PrintData(udpDataObj);
});
}
- private bool SendBytes(IPEndPoint endPoint, byte[] buf)
- {
- var sendLen = listener.Send(buf, endPoint);
-
- if (sendLen == buf.Length) { return true; }
- else { return false; }
- }
-
- private bool SendString(IPEndPoint endPoint, string text)
- {
- byte[] buf = Encoding.ASCII.GetBytes(text);
- var sendLen = listener.Send(buf, endPoint);
-
- if (sendLen == buf.Length) { return true; }
- else { return false; }
- }
-
- private UDPData RecordUDPData(byte[] bytes, IPEndPoint remoteEP, int taskID)
+ private UDPData RecordUDPData(byte[] bytes, IPEndPoint remoteEP, DateTime time, int taskID)
{
var remoteAddress = remoteEP.Address.ToString();
var remotePort = remoteEP.Port;
@@ -422,26 +380,25 @@ public class UDPServer
Port = remotePort,
TaskID = taskID,
Data = bytes,
- DateTime = DateTime.Now,
+ DateTime = time,
HasRead = false,
};
- using (udpData.AcquireWriteLock())
+
+ lock (udpData)
{
- // Record UDP Receive Data
- if (udpData.ContainsKey($"{remoteAddress}-{taskID}") &&
- udpData.TryGetValue($"{remoteAddress}-{taskID}", out var dataQueue))
+ var key = $"{remoteAddress}-{taskID}";
+ var dataQueue = udpData.GetOrAdd(key, _ => new ConcurrentQueue());
+ dataQueue.Enqueue(data);
+
+ // 对队列进行一次按时间排序
+ if (dataQueue.Count > 0)
{
- dataQueue.Enqueue(data);
- logger.Debug($"Test Lock dataQueue.Count = {dataQueue.Count}");
- }
- else
- {
- var queue = new Queue();
- queue.Enqueue(data);
- udpData.Add($"{remoteAddress}-{taskID}", queue);
- logger.Trace("Receive data from new client");
+ var sorted = dataQueue.OrderBy(d => d.DateTime).ToList();
+ udpData.TryUpdate(key, new ConcurrentQueue(sorted), dataQueue);
}
+
+ PrintAllData();
}
return data;
@@ -451,7 +408,7 @@ public class UDPServer
/// 输出UDP Data到log中
///
/// UDP数据
- public void PrintData(UDPData data)
+ public string PrintData(UDPData data)
{
var bytes = data.Data;
var sign = bytes[0];
@@ -489,6 +446,11 @@ public class UDPServer
// logger.Debug($"Receive Data from {data.Address}:{data.Port} at {data.DateTime.ToString()}:");
// logger.Debug($" Original Data : {BitConverter.ToString(bytes).Replace("-", " ")}");
// if (recvData.Length != 0) logger.Debug($" Decoded Data : {recvData}");
+ return $@"
+ Receive Data from {data.Address}:{data.Port} at {data.DateTime.ToString()}:
+ Original Data : {BitConverter.ToString(bytes).Replace("-", " ")}
+ Decoded Data : {recvData}
+ ";
}
///
@@ -497,16 +459,13 @@ public class UDPServer
/// void
public void PrintAllData()
{
- using (udpData.AcquireReadLock())
- {
- // logger.Debug("Ready Data:");
+ logger.Debug("Ready Data:");
- foreach (var ip in udpData)
+ foreach (var kvp in udpData)
+ {
+ foreach (var data in kvp.Value)
{
- foreach (var data in ip.Value)
- {
- // logger.Debug(data.ToString());
- }
+ logger.Debug(PrintData(data));
}
}
}
@@ -517,37 +476,48 @@ public class UDPServer
/// IP地址
/// [TODO:parameter]
/// 无
- public async Task ClearUDPData(string ipAddr, int taskID)
+ public void ClearUDPData(string ipAddr, int taskID)
{
- using (await udpData.AcquireWriteLockAsync())
+ var key = $"{ipAddr}-{taskID}";
+ if (udpData.TryGetValue(key, out var dataQueue))
{
- if (udpData.ContainsKey($"{ipAddr}-{taskID}") &&
- udpData.TryGetValue($"{ipAddr}-{taskID}", out var dataQueue) &&
- dataQueue.Count > 0)
- {
- dataQueue.Clear();
- }
+ // 清空队列的最有效方式是替换为新的队列
+ udpData.TryUpdate(key, new ConcurrentQueue(), dataQueue);
}
}
-
///
/// Start UDP Server
///
/// None
public void Start()
{
+ this.isRunning = true;
try
{
- this.listener.BeginReceive(new AsyncCallback(ReceiveHandler), null);
+ foreach (var client in listeners)
+ {
+ Task.Run(async () =>
+ {
+ while (this.isRunning)
+ {
+ try
+ {
+ UdpReceiveResult result = await client.ReceiveAsync();
+ ReceiveHandler(result.Buffer, result.RemoteEndPoint, DateTime.Now);
+ }
+ catch (Exception ex)
+ {
+ Console.WriteLine($"Error: {ex.Message}");
+ }
+ }
+ });
+ }
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
- }
- finally
- {
- this.isRunning = true;
+ this.isRunning = false;
}
}
@@ -557,8 +527,12 @@ public class UDPServer
/// None
public void Stop()
{
- this.listener.Close();
+ foreach (var item in listeners)
+ {
+ item.Close();
+ }
this.isRunning = false;
+
}
}
diff --git a/src/APIClient.ts b/src/APIClient.ts
index 2bd17a3..8c88e3b 100644
--- a/src/APIClient.ts
+++ b/src/APIClient.ts
@@ -1,3470 +1,4147 @@
-//----------------------
-//
-// Generated using the NSwag toolchain v14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
-//
-//----------------------
-
-/* tslint:disable */
-/* eslint-disable */
-// ReSharper disable InconsistentNaming
-
-export class VideoStreamClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * 获取 HTTP 视频流服务状态
- * @return 服务状态信息
- */
- getStatus(): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/Status";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetStatus(_response);
- });
- }
-
- protected processGetStatus(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取 HTTP 视频流信息
- * @return 流信息
- */
- getStreamInfo(): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/StreamInfo";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetStreamInfo(_response);
- });
- }
-
- protected processGetStreamInfo(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 配置摄像头连接参数
- * @param config 摄像头配置
- * @return 配置结果
- */
- configureCamera(config: CameraConfigRequest): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/ConfigureCamera";
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(config);
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processConfigureCamera(_response);
- });
- }
-
- protected processConfigureCamera(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = resultData400 !== undefined ? resultData400 : null;
-
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取当前摄像头配置
- * @return 摄像头配置信息
- */
- getCameraConfig(): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/CameraConfig";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetCameraConfig(_response);
- });
- }
-
- protected processGetCameraConfig(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 控制 HTTP 视频流服务开关
- * @param enabled (optional) 是否启用服务
- * @return 操作结果
- */
- setEnabled(enabled: boolean | undefined): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/SetEnabled?";
- if (enabled === null)
- throw new Error("The parameter 'enabled' cannot be null.");
- else if (enabled !== undefined)
- url_ += "enabled=" + encodeURIComponent("" + enabled) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSetEnabled(_response);
- });
- }
-
- protected processSetEnabled(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 测试 HTTP 视频流连接
- * @return 连接测试结果
- */
- testConnection(): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/TestConnection";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processTestConnection(_response);
- });
- }
-
- protected processTestConnection(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 设置视频流分辨率
- * @param request 分辨率配置请求
- * @return 设置结果
- */
- setResolution(request: ResolutionConfigRequest): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/Resolution";
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(request);
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSetResolution(_response);
- });
- }
-
- protected processSetResolution(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = resultData400 !== undefined ? resultData400 : null;
-
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = resultData500 !== undefined ? resultData500 : null;
-
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取当前分辨率
- * @return 当前分辨率信息
- */
- getCurrentResolution(): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/Resolution";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetCurrentResolution(_response);
- });
- }
-
- protected processGetCurrentResolution(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = resultData500 !== undefined ? resultData500 : null;
-
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取支持的分辨率列表
- * @return 支持的分辨率列表
- */
- getSupportedResolutions(): Promise {
- let url_ = this.baseUrl + "/api/VideoStream/SupportedResolutions";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetSupportedResolutions(_response);
- });
- }
-
- protected processGetSupportedResolutions(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = resultData500 !== undefined ? resultData500 : null;
-
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class BsdlParserClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * [TODO:description]
- * @return [TODO:return]
- */
- getBoundaryLogicalPorts(): Promise {
- let url_ = this.baseUrl + "/api/BsdlParser/GetBoundaryLogicalPorts";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/octet-stream"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetBoundaryLogicalPorts(_response);
- });
- }
-
- protected processGetBoundaryLogicalPorts(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200 || status === 206) {
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
- if (fileName) {
- fileName = decodeURIComponent(fileName);
- } else {
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
- }
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class DataClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * 用户登录,获取 JWT 令牌
- * @param name (optional) 用户名
- * @param password (optional) 用户密码
- * @return JWT 令牌字符串
- */
- login(name: string | undefined, password: string | undefined): Promise {
- let url_ = this.baseUrl + "/api/Data/Login?";
- if (name === null)
- throw new Error("The parameter 'name' cannot be null.");
- else if (name !== undefined)
- url_ += "name=" + encodeURIComponent("" + name) + "&";
- if (password === null)
- throw new Error("The parameter 'password' cannot be null.");
- else if (password !== undefined)
- url_ += "password=" + encodeURIComponent("" + password) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processLogin(_response);
- });
- }
-
- protected processLogin(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ProblemDetails.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 测试用户认证,需携带有效 JWT
- * @return 认证成功信息
- */
- testAuth(): Promise {
- let url_ = this.baseUrl + "/api/Data/TestAuth";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processTestAuth(_response);
- });
- }
-
- protected processTestAuth(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 测试管理员用户认证,需携带有效 JWT
- * @return 认证成功信息
- */
- testAdminAuth(): Promise {
- let url_ = this.baseUrl + "/api/Data/TestAdminAuth";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processTestAdminAuth(_response);
- });
- }
-
- protected processTestAdminAuth(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取当前用户信息
- * @return 用户信息,包括ID、用户名、邮箱和板卡ID
- */
- getUserInfo(): Promise {
- let url_ = this.baseUrl + "/api/Data/GetUserInfo";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetUserInfo(_response);
- });
- }
-
- protected processGetUserInfo(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = UserInfo.fromJS(resultData200);
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ProblemDetails.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 注册新用户
- * @param name (optional) 用户名(不超过255个字符)
- * @param email (optional) 邮箱地址
- * @param password (optional) 用户密码
- * @return 操作结果,成功返回 true,失败返回错误信息
- */
- signUpUser(name: string | undefined, email: string | undefined, password: string | undefined): Promise {
- let url_ = this.baseUrl + "/api/Data/SignUpUser?";
- if (name === null)
- throw new Error("The parameter 'name' cannot be null.");
- else if (name !== undefined)
- url_ += "name=" + encodeURIComponent("" + name) + "&";
- if (email === null)
- throw new Error("The parameter 'email' cannot be null.");
- else if (email !== undefined)
- url_ += "email=" + encodeURIComponent("" + email) + "&";
- if (password === null)
- throw new Error("The parameter 'password' cannot be null.");
- else if (password !== undefined)
- url_ += "password=" + encodeURIComponent("" + password) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSignUpUser(_response);
- });
- }
-
- protected processSignUpUser(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ProblemDetails.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取一个空闲的实验板(普通用户权限)
- * @param durationHours (optional) 绑定持续时间(小时),默认为1小时
- */
- getAvailableBoard(durationHours: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/Data/GetAvailableBoard?";
- if (durationHours === null)
- throw new Error("The parameter 'durationHours' cannot be null.");
- else if (durationHours !== undefined)
- url_ += "durationHours=" + encodeURIComponent("" + durationHours) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetAvailableBoard(_response);
- });
- }
-
- protected processGetAvailableBoard(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Board.fromJS(resultData200);
- return result200;
- });
- } else if (status === 404) {
- return response.text().then((_responseText) => {
- let result404: any = null;
- let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result404 = ProblemDetails.fromJS(resultData404);
- return throwException("A server side error occurred.", status, _responseText, _headers, result404);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 解除当前用户绑定的实验板(普通用户权限)
- */
- unbindBoard(): Promise {
- let url_ = this.baseUrl + "/api/Data/UnbindBoard";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUnbindBoard(_response);
- });
- }
-
- protected processUnbindBoard(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ProblemDetails.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 用户根据实验板ID获取实验板信息(普通用户权限)
- * @param id (optional)
- */
- getBoardByID(id: string | undefined): Promise {
- let url_ = this.baseUrl + "/api/Data/GetBoardByID?";
- if (id === null)
- throw new Error("The parameter 'id' cannot be null.");
- else if (id !== undefined)
- url_ += "id=" + encodeURIComponent("" + id) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetBoardByID(_response);
- });
- }
-
- protected processGetBoardByID(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = Board.fromJS(resultData200);
- return result200;
- });
- } else if (status === 404) {
- return response.text().then((_responseText) => {
- let result404: any = null;
- let resultData404 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result404 = ProblemDetails.fromJS(resultData404);
- return throwException("A server side error occurred.", status, _responseText, _headers, result404);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 新增板子(管理员权限)
- * @param name (optional)
- * @param ipAddr (optional)
- * @param port (optional)
- */
- addBoard(name: string | undefined, ipAddr: string | undefined, port: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/Data/AddBoard?";
- if (name === null)
- throw new Error("The parameter 'name' cannot be null.");
- else if (name !== undefined)
- url_ += "name=" + encodeURIComponent("" + name) + "&";
- if (ipAddr === null)
- throw new Error("The parameter 'ipAddr' cannot be null.");
- else if (ipAddr !== undefined)
- url_ += "ipAddr=" + encodeURIComponent("" + ipAddr) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processAddBoard(_response);
- });
- }
-
- protected processAddBoard(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ProblemDetails.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 删除板子(管理员权限)
- * @param id (optional)
- */
- deleteBoard(id: string | undefined): Promise {
- let url_ = this.baseUrl + "/api/Data/DeleteBoard?";
- if (id === null)
- throw new Error("The parameter 'id' cannot be null.");
- else if (id !== undefined)
- url_ += "id=" + encodeURIComponent("" + id) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "DELETE",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processDeleteBoard(_response);
- });
- }
-
- protected processDeleteBoard(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ProblemDetails.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取全部板子(管理员权限)
- */
- getAllBoards(): Promise {
- let url_ = this.baseUrl + "/api/Data/GetAllBoards";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetAllBoards(_response);
- });
- }
-
- protected processGetAllBoards(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(Board.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class DDSClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * [TODO:description]
- * @param address (optional) [TODO:parameter]
- * @param port (optional) [TODO:parameter]
- * @param channelNum (optional) [TODO:parameter]
- * @param waveNum (optional) [TODO:parameter]
- * @return [TODO:return]
- */
- setWaveNum(address: string | undefined, port: number | undefined, channelNum: number | undefined, waveNum: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/DDS/SetWaveNum?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (channelNum === null)
- throw new Error("The parameter 'channelNum' cannot be null.");
- else if (channelNum !== undefined)
- url_ += "channelNum=" + encodeURIComponent("" + channelNum) + "&";
- if (waveNum === null)
- throw new Error("The parameter 'waveNum' cannot be null.");
- else if (waveNum !== undefined)
- url_ += "waveNum=" + encodeURIComponent("" + waveNum) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSetWaveNum(_response);
- });
- }
-
- protected processSetWaveNum(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ArgumentException.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * [TODO:description]
- * @param address (optional) [TODO:parameter]
- * @param port (optional) [TODO:parameter]
- * @param channelNum (optional) [TODO:parameter]
- * @param waveNum (optional) [TODO:parameter]
- * @param step (optional) [TODO:parameter]
- * @return [TODO:return]
- */
- setFreq(address: string | undefined, port: number | undefined, channelNum: number | undefined, waveNum: number | undefined, step: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/DDS/SetFreq?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (channelNum === null)
- throw new Error("The parameter 'channelNum' cannot be null.");
- else if (channelNum !== undefined)
- url_ += "channelNum=" + encodeURIComponent("" + channelNum) + "&";
- if (waveNum === null)
- throw new Error("The parameter 'waveNum' cannot be null.");
- else if (waveNum !== undefined)
- url_ += "waveNum=" + encodeURIComponent("" + waveNum) + "&";
- if (step === null)
- throw new Error("The parameter 'step' cannot be null.");
- else if (step !== undefined)
- url_ += "step=" + encodeURIComponent("" + step) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSetFreq(_response);
- });
- }
-
- protected processSetFreq(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ArgumentException.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * [TODO:description]
- * @param address (optional) [TODO:parameter]
- * @param port (optional) [TODO:parameter]
- * @param channelNum (optional) [TODO:parameter]
- * @param waveNum (optional) [TODO:parameter]
- * @param phase (optional) [TODO:parameter]
- * @return [TODO:return]
- */
- setPhase(address: string | undefined, port: number | undefined, channelNum: number | undefined, waveNum: number | undefined, phase: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/DDS/SetPhase?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (channelNum === null)
- throw new Error("The parameter 'channelNum' cannot be null.");
- else if (channelNum !== undefined)
- url_ += "channelNum=" + encodeURIComponent("" + channelNum) + "&";
- if (waveNum === null)
- throw new Error("The parameter 'waveNum' cannot be null.");
- else if (waveNum !== undefined)
- url_ += "waveNum=" + encodeURIComponent("" + waveNum) + "&";
- if (phase === null)
- throw new Error("The parameter 'phase' cannot be null.");
- else if (phase !== undefined)
- url_ += "phase=" + encodeURIComponent("" + phase) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSetPhase(_response);
- });
- }
-
- protected processSetPhase(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ArgumentException.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class JtagClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * 控制器首页信息
- * @return 控制器描述信息
- */
- index(): Promise {
- let url_ = this.baseUrl + "/api/Jtag";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processIndex(_response);
- });
- }
-
- protected processIndex(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取 JTAG 设备的 ID Code
- * @param address (optional) JTAG 设备地址
- * @param port (optional) JTAG 设备端口
- * @return 设备的 ID Code
- */
- getDeviceIDCode(address: string | undefined, port: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/Jtag/GetDeviceIDCode?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetDeviceIDCode(_response);
- });
- }
-
- protected processGetDeviceIDCode(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 读取 JTAG 设备的状态寄存器
- * @param address (optional) JTAG 设备地址
- * @param port (optional) JTAG 设备端口
- * @return 状态寄存器的原始值、二进制表示和解码值
- */
- readStatusReg(address: string | undefined, port: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/Jtag/ReadStatusReg?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processReadStatusReg(_response);
- });
- }
-
- protected processReadStatusReg(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 上传比特流文件到服务器
- * @param address (optional) 目标设备地址
- * @param file (optional) 比特流文件
- * @return 上传结果
- */
- uploadBitstream(address: string | undefined, file: FileParameter | undefined): Promise {
- let url_ = this.baseUrl + "/api/Jtag/UploadBitstream?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = new FormData();
- if (file === null || file === undefined)
- throw new Error("The parameter 'file' cannot be null.");
- else
- content_.append("file", file.data, file.fileName ? file.fileName : "file");
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUploadBitstream(_response);
- });
- }
-
- protected processUploadBitstream(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = resultData400 !== undefined ? resultData400 : null;
-
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 通过 JTAG 下载比特流文件到 FPGA 设备
- * @param address (optional) JTAG 设备地址
- * @param port (optional) JTAG 设备端口
- * @return 下载结果
- */
- downloadBitstream(address: string | undefined, port: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/Jtag/DownloadBitstream?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processDownloadBitstream(_response);
- });
- }
-
- protected processDownloadBitstream(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = resultData400 !== undefined ? resultData400 : null;
-
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 执行边界扫描,获取所有端口状态
- * @param address (optional) JTAG 设备地址
- * @param port (optional) JTAG 设备端口
- * @return 边界扫描结果
- */
- boundaryScanAllPorts(address: string | undefined, port: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/Jtag/BoundaryScanAllPorts?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processBoundaryScanAllPorts(_response);
- });
- }
-
- protected processBoundaryScanAllPorts(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = resultData400 !== undefined ? resultData400 : null;
-
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 执行逻辑端口边界扫描
- * @param address (optional) JTAG 设备地址
- * @param port (optional) JTAG 设备端口
- * @return 逻辑端口状态字典
- */
- boundaryScanLogicalPorts(address: string | undefined, port: number | undefined): Promise<{ [key: string]: boolean; }> {
- let url_ = this.baseUrl + "/api/Jtag/BoundaryScanLogicalPorts?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processBoundaryScanLogicalPorts(_response);
- });
- }
-
- protected processBoundaryScanLogicalPorts(response: Response): Promise<{ [key: string]: boolean; }> {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (resultData200) {
- result200 = {} as any;
- for (let key in resultData200) {
- if (resultData200.hasOwnProperty(key))
- (result200)![key] = resultData200[key] !== undefined ? resultData200[key] : null;
- }
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve<{ [key: string]: boolean; }>(null as any);
- }
-
- /**
- * 设置 JTAG 时钟速度
- * @param address (optional) JTAG 设备地址
- * @param port (optional) JTAG 设备端口
- * @param speed (optional) 时钟速度 (Hz)
- * @return 设置结果
- */
- setSpeed(address: string | undefined, port: number | undefined, speed: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/Jtag/SetSpeed?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (speed === null)
- throw new Error("The parameter 'speed' cannot be null.");
- else if (speed !== undefined)
- url_ += "speed=" + encodeURIComponent("" + speed) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSetSpeed(_response);
- });
- }
-
- protected processSetSpeed(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status === 401) {
- return response.text().then((_responseText) => {
- let result401: any = null;
- let resultData401 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result401 = ProblemDetails.fromJS(resultData401);
- return throwException("A server side error occurred.", status, _responseText, _headers, result401);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class MatrixKeyClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * 启用矩阵键控制。
- * @param address (optional) 设备的IP地址
- * @param port (optional) 设备的端口号
- * @return 返回操作结果的状态码
- */
- enabelMatrixKey(address: string | undefined, port: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/MatrixKey/EnabelMatrixKey?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processEnabelMatrixKey(_response);
- });
- }
-
- protected processEnabelMatrixKey(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 禁用矩阵键控制。
- * @param address (optional) 设备的IP地址
- * @param port (optional) 设备的端口号
- * @return 返回操作结果的状态码
- */
- disableMatrixKey(address: string | undefined, port: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/MatrixKey/DisableMatrixKey?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processDisableMatrixKey(_response);
- });
- }
-
- protected processDisableMatrixKey(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 设置矩阵键的状态。
- * @param address (optional) 设备的IP地址
- * @param port (optional) 设备的端口号
- * @param keyStates 矩阵键的状态数组,长度应为16
- * @return 返回操作结果的状态码
- */
- setMatrixKeyStatus(address: string | undefined, port: number | undefined, keyStates: boolean[]): Promise {
- let url_ = this.baseUrl + "/api/MatrixKey/SetMatrixKeyStatus?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(keyStates);
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSetMatrixKeyStatus(_response);
- });
- }
-
- protected processSetMatrixKeyStatus(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class PowerClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * [TODO:description]
- * @param address (optional) [TODO:parameter]
- * @param port (optional) [TODO:parameter]
- * @param enable (optional) [TODO:parameter]
- * @return [TODO:return]
- */
- setPowerOnOff(address: string | undefined, port: number | undefined, enable: boolean | undefined): Promise {
- let url_ = this.baseUrl + "/api/Power/SetPowerOnOff?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (enable === null)
- throw new Error("The parameter 'enable' cannot be null.");
- else if (enable !== undefined)
- url_ += "enable=" + encodeURIComponent("" + enable) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSetPowerOnOff(_response);
- });
- }
-
- protected processSetPowerOnOff(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class RemoteUpdateClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * 上传远程更新比特流文件
- * @param address (optional) 设备地址
- * @param goldenBitream (optional) 黄金比特流文件
- * @param bitstream1 (optional) 比特流文件1
- * @param bitstream2 (optional) 比特流文件2
- * @param bitstream3 (optional) 比特流文件3
- * @return 上传结果
- */
- uploadBitstreams(address: string | undefined, goldenBitream: FileParameter | null | undefined, bitstream1: FileParameter | null | undefined, bitstream2: FileParameter | null | undefined, bitstream3: FileParameter | null | undefined): Promise {
- let url_ = this.baseUrl + "/api/RemoteUpdate/UploadBitstream?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = new FormData();
- if (goldenBitream !== null && goldenBitream !== undefined)
- content_.append("goldenBitream", goldenBitream.data, goldenBitream.fileName ? goldenBitream.fileName : "goldenBitream");
- if (bitstream1 !== null && bitstream1 !== undefined)
- content_.append("bitstream1", bitstream1.data, bitstream1.fileName ? bitstream1.fileName : "bitstream1");
- if (bitstream2 !== null && bitstream2 !== undefined)
- content_.append("bitstream2", bitstream2.data, bitstream2.fileName ? bitstream2.fileName : "bitstream2");
- if (bitstream3 !== null && bitstream3 !== undefined)
- content_.append("bitstream3", bitstream3.data, bitstream3.fileName ? bitstream3.fileName : "bitstream3");
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUploadBitstreams(_response);
- });
- }
-
- protected processUploadBitstreams(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ArgumentException.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 远程更新单个比特流文件
- * @param address (optional) 设备地址
- * @param port (optional) 设备端口
- * @param bitstreamNum (optional) 比特流位号
- */
- updateBitstream(address: string | undefined, port: number | undefined, bitstreamNum: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/RemoteUpdate/DownloadBitstream?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (bitstreamNum === null)
- throw new Error("The parameter 'bitstreamNum' cannot be null.");
- else if (bitstreamNum !== undefined)
- url_ += "bitstreamNum=" + encodeURIComponent("" + bitstreamNum) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processUpdateBitstream(_response);
- });
- }
-
- protected processUpdateBitstream(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ArgumentException.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 下载多个比特流文件
- * @param address (optional) 设备地址
- * @param port (optional) 设备端口
- * @param bitstreamNum (optional) 比特流编号
- * @return 总共上传比特流的数量
- */
- downloadMultiBitstreams(address: string | undefined, port: number | undefined, bitstreamNum: number | null | undefined): Promise {
- let url_ = this.baseUrl + "/api/RemoteUpdate/DownloadMultiBitstreams?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (bitstreamNum !== undefined && bitstreamNum !== null)
- url_ += "bitstreamNum=" + encodeURIComponent("" + bitstreamNum) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processDownloadMultiBitstreams(_response);
- });
- }
-
- protected processDownloadMultiBitstreams(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ArgumentException.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 热复位比特流文件
- * @param address (optional) 设备地址
- * @param port (optional) 设备端口
- * @param bitstreamNum (optional) 比特流编号
- * @return 操作结果
- */
- hotResetBitstream(address: string | undefined, port: number | undefined, bitstreamNum: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/RemoteUpdate/HotResetBitstream?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (bitstreamNum === null)
- throw new Error("The parameter 'bitstreamNum' cannot be null.");
- else if (bitstreamNum !== undefined)
- url_ += "bitstreamNum=" + encodeURIComponent("" + bitstreamNum) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processHotResetBitstream(_response);
- });
- }
-
- protected processHotResetBitstream(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ArgumentException.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * [TODO:description]
- * @param address (optional) [TODO:parameter]
- * @param port (optional) [TODO:parameter]
- * @return [TODO:return]
- */
- getFirmwareVersion(address: string | undefined, port: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/RemoteUpdate/GetFirmwareVersion?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetFirmwareVersion(_response);
- });
- }
-
- protected processGetFirmwareVersion(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status === 400) {
- return response.text().then((_responseText) => {
- let result400: any = null;
- let resultData400 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result400 = ArgumentException.fromJS(resultData400);
- return throwException("A server side error occurred.", status, _responseText, _headers, result400);
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- let result500: any = null;
- let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result500 = Exception.fromJS(resultData500);
- return throwException("A server side error occurred.", status, _responseText, _headers, result500);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class TutorialClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * 获取所有可用的教程目录
- * @return 教程目录列表
- */
- getTutorials(): Promise {
- let url_ = this.baseUrl + "/api/Tutorial";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetTutorials(_response);
- });
- }
-
- protected processGetTutorials(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class UDPClient {
- private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
- private baseUrl: string;
- protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
-
- constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
- this.http = http ? http : window as any;
- this.baseUrl = baseUrl ?? "http://localhost:5000";
- }
-
- /**
- * 页面
- */
- index(): Promise {
- let url_ = this.baseUrl + "/api/UDP";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processIndex(_response);
- });
- }
-
- protected processIndex(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- result200 = resultData200 !== undefined ? resultData200 : null;
-
- return result200;
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 发送字符串
- * @param address (optional) IPV4 或者 IPV6 地址
- * @param port (optional) 设备端口号
- * @param text (optional) 发送的文本
- * @return 发送成功
- */
- sendString(address: string | undefined, port: number | undefined, text: string | undefined): Promise {
- let url_ = this.baseUrl + "/api/UDP/SendString?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (text === null)
- throw new Error("The parameter 'text' cannot be null.");
- else if (text !== undefined)
- url_ += "text=" + encodeURIComponent("" + text) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSendString(_response);
- });
- }
-
- protected processSendString(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("\u53d1\u9001\u5931\u8d25", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 发送二进制数据
- * @param address (optional) IPV4 或者 IPV6 地址
- * @param port (optional) 设备端口号
- * @param bytes (optional) 16进制文本
- */
- sendBytes(address: string | undefined, port: number | undefined, bytes: string | undefined): Promise {
- let url_ = this.baseUrl + "/api/UDP/SendBytes?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (bytes === null)
- throw new Error("The parameter 'bytes' cannot be null.");
- else if (bytes !== undefined)
- url_ += "bytes=" + encodeURIComponent("" + bytes) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSendBytes(_response);
- });
- }
-
- protected processSendBytes(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 发送地址包
- * @param address (optional) IP地址
- * @param port (optional) UDP 端口号
- * @param opts 地址包选项
- */
- sendAddrPackage(address: string | undefined, port: number | undefined, opts: SendAddrPackOptions): Promise {
- let url_ = this.baseUrl + "/api/UDP/SendAddrPackage?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- const content_ = JSON.stringify(opts);
-
- let options_: RequestInit = {
- body: content_,
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSendAddrPackage(_response);
- });
- }
-
- protected processSendAddrPackage(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 发送数据包
- * @param address (optional) IP地址
- * @param port (optional) UDP 端口号
- * @param data (optional) 16进制数据
- */
- sendDataPackage(address: string | undefined, port: number | undefined, data: string | undefined): Promise {
- let url_ = this.baseUrl + "/api/UDP/SendDataPackage?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (port === null)
- throw new Error("The parameter 'port' cannot be null.");
- else if (port !== undefined)
- url_ += "port=" + encodeURIComponent("" + port) + "&";
- if (data === null)
- throw new Error("The parameter 'data' cannot be null.");
- else if (data !== undefined)
- url_ += "data=" + encodeURIComponent("" + data) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "POST",
- headers: {
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processSendDataPackage(_response);
- });
- }
-
- protected processSendDataPackage(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- return;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-
- /**
- * 获取指定IP地址接收的数据列表
- * @param address (optional) IP地址
- * @param taskID (optional) 任务ID
- */
- getRecvDataArray(address: string | undefined, taskID: number | undefined): Promise {
- let url_ = this.baseUrl + "/api/UDP/GetRecvDataArray?";
- if (address === null)
- throw new Error("The parameter 'address' cannot be null.");
- else if (address !== undefined)
- url_ += "address=" + encodeURIComponent("" + address) + "&";
- if (taskID === null)
- throw new Error("The parameter 'taskID' cannot be null.");
- else if (taskID !== undefined)
- url_ += "taskID=" + encodeURIComponent("" + taskID) + "&";
- url_ = url_.replace(/[?&]$/, "");
-
- let options_: RequestInit = {
- method: "GET",
- headers: {
- "Accept": "application/json"
- }
- };
-
- return this.http.fetch(url_, options_).then((_response: Response) => {
- return this.processGetRecvDataArray(_response);
- });
- }
-
- protected processGetRecvDataArray(response: Response): Promise {
- const status = response.status;
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
- if (status === 200) {
- return response.text().then((_responseText) => {
- let result200: any = null;
- let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
- if (Array.isArray(resultData200)) {
- result200 = [] as any;
- for (let item of resultData200)
- result200!.push(UDPData.fromJS(item));
- }
- else {
- result200 = null;
- }
- return result200;
- });
- } else if (status === 500) {
- return response.text().then((_responseText) => {
- return throwException("A server side error occurred.", status, _responseText, _headers);
- });
- } else if (status !== 200 && status !== 204) {
- return response.text().then((_responseText) => {
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
- });
- }
- return Promise.resolve(null as any);
- }
-}
-
-export class Exception implements IException {
- message!: string;
- innerException?: Exception | undefined;
- source?: string | undefined;
- stackTrace?: string | undefined;
-
- constructor(data?: IException) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
- }
- }
-
- init(_data?: any) {
- if (_data) {
- this.message = _data["Message"];
- this.innerException = _data["InnerException"] ? Exception.fromJS(_data["InnerException"]) : undefined;
- this.source = _data["Source"];
- this.stackTrace = _data["StackTrace"];
- }
- }
-
- static fromJS(data: any): Exception {
- data = typeof data === 'object' ? data : {};
- let result = new Exception();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- data["Message"] = this.message;
- data["InnerException"] = this.innerException ? this.innerException.toJSON() : undefined;
- data["Source"] = this.source;
- data["StackTrace"] = this.stackTrace;
- return data;
- }
-}
-
-export interface IException {
- message: string;
- innerException?: Exception | undefined;
- source?: string | undefined;
- stackTrace?: string | undefined;
-}
-
-/** 摄像头配置请求模型 */
-export class CameraConfigRequest implements ICameraConfigRequest {
- /** 摄像头地址 */
- address!: string;
- /** 摄像头端口 */
- port!: number;
-
- constructor(data?: ICameraConfigRequest) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
- }
- }
-
- init(_data?: any) {
- if (_data) {
- this.address = _data["address"];
- this.port = _data["port"];
- }
- }
-
- static fromJS(data: any): CameraConfigRequest {
- data = typeof data === 'object' ? data : {};
- let result = new CameraConfigRequest();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- data["address"] = this.address;
- data["port"] = this.port;
- return data;
- }
-}
-
-/** 摄像头配置请求模型 */
-export interface ICameraConfigRequest {
- /** 摄像头地址 */
- address: string;
- /** 摄像头端口 */
- port: number;
-}
-
-/** 分辨率配置请求模型 */
-export class ResolutionConfigRequest implements IResolutionConfigRequest {
- /** 宽度 */
- width!: number;
- /** 高度 */
- height!: number;
-
- constructor(data?: IResolutionConfigRequest) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
- }
- }
-
- init(_data?: any) {
- if (_data) {
- this.width = _data["width"];
- this.height = _data["height"];
- }
- }
-
- static fromJS(data: any): ResolutionConfigRequest {
- data = typeof data === 'object' ? data : {};
- let result = new ResolutionConfigRequest();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- data["width"] = this.width;
- data["height"] = this.height;
- return data;
- }
-}
-
-/** 分辨率配置请求模型 */
-export interface IResolutionConfigRequest {
- /** 宽度 */
- width: number;
- /** 高度 */
- height: number;
-}
-
-export class ProblemDetails implements IProblemDetails {
- type?: string | undefined;
- title?: string | undefined;
- status?: number | undefined;
- detail?: string | undefined;
- instance?: string | undefined;
- extensions!: { [key: string]: any; };
-
- [key: string]: any;
-
- constructor(data?: IProblemDetails) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
- }
- if (!data) {
- this.extensions = {};
- }
- }
-
- init(_data?: any) {
- if (_data) {
- for (var property in _data) {
- if (_data.hasOwnProperty(property))
- this[property] = _data[property];
- }
- this.type = _data["type"];
- this.title = _data["title"];
- this.status = _data["status"];
- this.detail = _data["detail"];
- this.instance = _data["instance"];
- if (_data["extensions"]) {
- this.extensions = {} as any;
- for (let key in _data["extensions"]) {
- if (_data["extensions"].hasOwnProperty(key))
- (this.extensions)![key] = _data["extensions"][key];
- }
- }
- }
- }
-
- static fromJS(data: any): ProblemDetails {
- data = typeof data === 'object' ? data : {};
- let result = new ProblemDetails();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- for (var property in this) {
- if (this.hasOwnProperty(property))
- data[property] = this[property];
- }
- data["type"] = this.type;
- data["title"] = this.title;
- data["status"] = this.status;
- data["detail"] = this.detail;
- data["instance"] = this.instance;
- if (this.extensions) {
- data["extensions"] = {};
- for (let key in this.extensions) {
- if (this.extensions.hasOwnProperty(key))
- (data["extensions"])[key] = (this.extensions)[key];
- }
- }
- return data;
- }
-}
-
-export interface IProblemDetails {
- type?: string | undefined;
- title?: string | undefined;
- status?: number | undefined;
- detail?: string | undefined;
- instance?: string | undefined;
- extensions: { [key: string]: any; };
-
- [key: string]: any;
-}
-
-/** [TODO:description] */
-export class UserInfo implements IUserInfo {
- /** 用户的唯一标识符 */
- id!: string;
- /** 用户的名称 */
- name!: string;
- /** 用户的电子邮箱 */
- eMail!: string;
- /** 用户关联的板卡ID */
- boardID!: string;
- /** 用户绑定板子的过期时间 */
- boardExpireTime?: Date | undefined;
-
- constructor(data?: IUserInfo) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
- }
- }
-
- init(_data?: any) {
- if (_data) {
- this.id = _data["id"];
- this.name = _data["name"];
- this.eMail = _data["eMail"];
- this.boardID = _data["boardID"];
- this.boardExpireTime = _data["boardExpireTime"] ? new Date(_data["boardExpireTime"].toString()) : undefined;
- }
- }
-
- static fromJS(data: any): UserInfo {
- data = typeof data === 'object' ? data : {};
- let result = new UserInfo();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- data["id"] = this.id;
- data["name"] = this.name;
- data["eMail"] = this.eMail;
- data["boardID"] = this.boardID;
- data["boardExpireTime"] = this.boardExpireTime ? this.boardExpireTime.toISOString() : undefined;
- return data;
- }
-}
-
-/** [TODO:description] */
-export interface IUserInfo {
- /** 用户的唯一标识符 */
- id: string;
- /** 用户的名称 */
- name: string;
- /** 用户的电子邮箱 */
- eMail: string;
- /** 用户关联的板卡ID */
- boardID: string;
- /** 用户绑定板子的过期时间 */
- boardExpireTime?: Date | undefined;
-}
-
-/** FPGA 板子类,表示板子信息 */
-export class Board implements IBoard {
- /** FPGA 板子的唯一标识符 */
- id!: string;
- /** FPGA 板子的名称 */
- boardName!: string;
- /** FPGA 板子的IP地址 */
- ipAddr!: string;
- /** FPGA 板子的通信端口 */
- port!: number;
- /** FPGA 板子的当前状态 */
- status!: BoardStatus;
- /** 占用该板子的用户的唯一标识符 */
- occupiedUserID!: string;
- /** 占用该板子的用户的用户名 */
- occupiedUserName?: string | undefined;
- /** FPGA 板子的固件版本号 */
- firmVersion!: string;
-
- constructor(data?: IBoard) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
- }
- }
-
- init(_data?: any) {
- if (_data) {
- this.id = _data["id"];
- this.boardName = _data["boardName"];
- this.ipAddr = _data["ipAddr"];
- this.port = _data["port"];
- this.status = _data["status"];
- this.occupiedUserID = _data["occupiedUserID"];
- this.occupiedUserName = _data["occupiedUserName"];
- this.firmVersion = _data["firmVersion"];
- }
- }
-
- static fromJS(data: any): Board {
- data = typeof data === 'object' ? data : {};
- let result = new Board();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- data["id"] = this.id;
- data["boardName"] = this.boardName;
- data["ipAddr"] = this.ipAddr;
- data["port"] = this.port;
- data["status"] = this.status;
- data["occupiedUserID"] = this.occupiedUserID;
- data["occupiedUserName"] = this.occupiedUserName;
- data["firmVersion"] = this.firmVersion;
- return data;
- }
-}
-
-/** FPGA 板子类,表示板子信息 */
-export interface IBoard {
- /** FPGA 板子的唯一标识符 */
- id: string;
- /** FPGA 板子的名称 */
- boardName: string;
- /** FPGA 板子的IP地址 */
- ipAddr: string;
- /** FPGA 板子的通信端口 */
- port: number;
- /** FPGA 板子的当前状态 */
- status: BoardStatus;
- /** 占用该板子的用户的唯一标识符 */
- occupiedUserID: string;
- /** 占用该板子的用户的用户名 */
- occupiedUserName?: string | undefined;
- /** FPGA 板子的固件版本号 */
- firmVersion: string;
-}
-
-/** FPGA 板子状态枚举 */
-export enum BoardStatus {
- Busy = 0,
- Available = 1,
-}
-
-export class SystemException extends Exception implements ISystemException {
-
- constructor(data?: ISystemException) {
- super(data);
- }
-
- init(_data?: any) {
- super.init(_data);
- }
-
- static fromJS(data: any): SystemException {
- data = typeof data === 'object' ? data : {};
- let result = new SystemException();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- super.toJSON(data);
- return data;
- }
-}
-
-export interface ISystemException extends IException {
-}
-
-export class ArgumentException extends SystemException implements IArgumentException {
- declare message: string;
- paramName?: string | undefined;
-
- constructor(data?: IArgumentException) {
- super(data);
- }
-
- init(_data?: any) {
- super.init(_data);
- if (_data) {
- this.message = _data["Message"];
- this.paramName = _data["ParamName"];
- }
- }
-
- static fromJS(data: any): ArgumentException {
- data = typeof data === 'object' ? data : {};
- let result = new ArgumentException();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- data["Message"] = this.message;
- data["ParamName"] = this.paramName;
- super.toJSON(data);
- return data;
- }
-}
-
-export interface IArgumentException extends ISystemException {
- message: string;
- paramName?: string | undefined;
-}
-
-/** Package options which to send address to read or write */
-export class SendAddrPackOptions implements ISendAddrPackOptions {
- /** 突发类型 */
- burstType!: BurstType;
- /** 任务ID */
- commandID!: number;
- /** 标识写入还是读取 */
- isWrite!: boolean;
- /** 突发长度:0是32bits,255是32bits x 256 */
- burstLength!: number;
- /** 目标地址 */
- address!: number;
-
- constructor(data?: ISendAddrPackOptions) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
- }
- }
-
- init(_data?: any) {
- if (_data) {
- this.burstType = _data["burstType"];
- this.commandID = _data["commandID"];
- this.isWrite = _data["isWrite"];
- this.burstLength = _data["burstLength"];
- this.address = _data["address"];
- }
- }
-
- static fromJS(data: any): SendAddrPackOptions {
- data = typeof data === 'object' ? data : {};
- let result = new SendAddrPackOptions();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- data["burstType"] = this.burstType;
- data["commandID"] = this.commandID;
- data["isWrite"] = this.isWrite;
- data["burstLength"] = this.burstLength;
- data["address"] = this.address;
- return data;
- }
-}
-
-/** Package options which to send address to read or write */
-export interface ISendAddrPackOptions {
- /** 突发类型 */
- burstType: BurstType;
- /** 任务ID */
- commandID: number;
- /** 标识写入还是读取 */
- isWrite: boolean;
- /** 突发长度:0是32bits,255是32bits x 256 */
- burstLength: number;
- /** 目标地址 */
- address: number;
-}
-
-/** Package Burst Type */
-export enum BurstType {
- FixedBurst = 0,
- ExtendBurst = 1,
-}
-
-/** UDP接受数据包格式 */
-export class UDPData implements IUDPData {
- /** 接受到的时间 */
- dateTime!: Date;
- /** 发送来源的IP地址 */
- address!: string;
- /** 发送来源的端口号 */
- port!: number;
- /** 任务ID */
- taskID!: number;
- /** 接受到的数据 */
- data!: string;
- /** 是否被读取过 */
- hasRead!: boolean;
-
- constructor(data?: IUDPData) {
- if (data) {
- for (var property in data) {
- if (data.hasOwnProperty(property))
- (this)[property] = (data)[property];
- }
- }
- }
-
- init(_data?: any) {
- if (_data) {
- this.dateTime = _data["dateTime"] ? new Date(_data["dateTime"].toString()) : undefined;
- this.address = _data["address"];
- this.port = _data["port"];
- this.taskID = _data["taskID"];
- this.data = _data["data"];
- this.hasRead = _data["hasRead"];
- }
- }
-
- static fromJS(data: any): UDPData {
- data = typeof data === 'object' ? data : {};
- let result = new UDPData();
- result.init(data);
- return result;
- }
-
- toJSON(data?: any) {
- data = typeof data === 'object' ? data : {};
- data["dateTime"] = this.dateTime ? this.dateTime.toISOString() : undefined;
- data["address"] = this.address;
- data["port"] = this.port;
- data["taskID"] = this.taskID;
- data["data"] = this.data;
- data["hasRead"] = this.hasRead;
- return data;
- }
-}
-
-/** UDP接受数据包格式 */
-export interface IUDPData {
- /** 接受到的时间 */
- dateTime: Date;
- /** 发送来源的IP地址 */
- address: string;
- /** 发送来源的端口号 */
- port: number;
- /** 任务ID */
- taskID: number;
- /** 接受到的数据 */
- data: string;
- /** 是否被读取过 */
- hasRead: boolean;
-}
-
-export interface FileParameter {
- data: any;
- fileName: string;
-}
-
-export interface FileResponse {
- data: Blob;
- status: number;
- fileName?: string;
- headers?: { [name: string]: any };
-}
-
-export class ApiException extends Error {
- message: string;
- status: number;
- response: string;
- headers: { [key: string]: any; };
- result: any;
-
- constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {
- super();
-
- this.message = message;
- this.status = status;
- this.response = response;
- this.headers = headers;
- this.result = result;
- }
-
- protected isApiException = true;
-
- static isApiException(obj: any): obj is ApiException {
- return obj.isApiException === true;
- }
-}
-
-function throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {
- if (result !== null && result !== undefined)
- throw result;
- else
- throw new ApiException(message, status, response, headers, null);
+//----------------------
+//
+// Generated using the NSwag toolchain v14.3.0.0 (NJsonSchema v11.2.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
+//
+//----------------------
+
+/* tslint:disable */
+/* eslint-disable */
+// ReSharper disable InconsistentNaming
+
+export class VideoStreamClient {
+ private http: { fetch(url: RequestInfo, init?: RequestInit): Promise };
+ private baseUrl: string;
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined = undefined;
+
+ constructor(baseUrl?: string, http?: { fetch(url: RequestInfo, init?: RequestInit): Promise }) {
+ this.http = http ? http : window as any;
+ this.baseUrl = baseUrl ?? "http://localhost:5000";
+ }
+
+ /**
+ * 获取 HTTP 视频流服务状态
+ * @return 服务状态信息
+ */
+ getStatus(): Promise {
+ let url_ = this.baseUrl + "/api/VideoStream/Status";
+ url_ = url_.replace(/[?&]$/, "");
+
+ let options_: RequestInit = {
+ method: "GET",
+ headers: {
+ "Accept": "application/json"
+ }
+ };
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processGetStatus(_response);
+ });
+ }
+
+ protected processGetStatus(response: Response): Promise {
+ const status = response.status;
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
+ if (status === 200) {
+ return response.text().then((_responseText) => {
+ let result200: any = null;
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
+ result200 = resultData200 !== undefined ? resultData200 : null;
+
+ return result200;
+ });
+ } else if (status === 500) {
+ return response.text().then((_responseText) => {
+ let result500: any = null;
+ let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
+ result500 = Exception.fromJS(resultData500);
+ return throwException("A server side error occurred.", status, _responseText, _headers, result500);
+ });
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then((_responseText) => {
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
+ });
+ }
+ return Promise.resolve(null as any);
+ }
+
+ /**
+ * 获取 HTTP 视频流信息
+ * @return 流信息
+ */
+ getStreamInfo(): Promise {
+ let url_ = this.baseUrl + "/api/VideoStream/StreamInfo";
+ url_ = url_.replace(/[?&]$/, "");
+
+ let options_: RequestInit = {
+ method: "GET",
+ headers: {
+ "Accept": "application/json"
+ }
+ };
+
+ return this.http.fetch(url_, options_).then((_response: Response) => {
+ return this.processGetStreamInfo(_response);
+ });
+ }
+
+ protected processGetStreamInfo(response: Response): Promise {
+ const status = response.status;
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
+ if (status === 200) {
+ return response.text().then((_responseText) => {
+ let result200: any = null;
+ let resultData200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
+ result200 = resultData200 !== undefined ? resultData200 : null;
+
+ return result200;
+ });
+ } else if (status === 500) {
+ return response.text().then((_responseText) => {
+ let result500: any = null;
+ let resultData500 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
+ result500 = Exception.fromJS(resultData500);
+ return throwException("A server side error occurred.", status, _responseText, _headers, result500);
+ });
+ } else if (status !== 200 && status !== 204) {
+ return response.text().then((_responseText) => {
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
+ });
+ }
+ return Promise.resolve(null as any);
+ }
+
+ /**
+ * 配置摄像头连接参数
+ * @param config 摄像头配置
+ * @return 配置结果
+ */
+ configureCamera(config: CameraConfigRequest): Promise