Yyt.Abp.HwSdk
English Version
Overview
Yyt.Abp.HwSdk is a library that provides the functionality to simplify the integration of SDC camera devices and LVS video storage devices in the HWSdk protocol for .NET applications,Version 1.0.2 added support for net8. Built with a modular architecture, it enables seamless integration into your existing projects. Maintained and supported by Patrick.Z, it streamlines routine development configurations in .NET applications and takes over heavy, tedious workloads for you.
Why Choose Yyt.Abp.HwSdk?
- Minimal Dependencies: Lightweight design with few external dependencies, keeps your project lean and efficient.
- Secure by Design: Security is prioritized from the design phase to reduce potential vulnerabilities.
- Highly Extensible: Easy to extend and customize to meet your specific business requirements.
- Battle-Tested: Proven stable and reliable through validation in multiple production projects.
Core Features
- SDC Camera Integration: Simplifies integration with SDC camera devices
- LVS Video Storage Integration: Simplifies integration with LVS video storage devices
- PTZ Control: Complete PTZ control capabilities including preset positions, cruises, guard positions, and home positions
- Video Management: Video recording query, download, playback, and control
- IVS Device Support: Support for IVS intelligent video surveillance devices
Code Integration Example
namespace Demo.HttpApi.Host
{
[DependsOn(
typeof(HwSdkModule)
)]
public class DemoHttpApiHostModule : AbpModule
{
// config service & other
}
}
Code Usage Example
public class DemoService : IDemoService
{
private readonly IIvsDeviceService _ivsDeviceService;
public DemoService(IIvsDeviceService ivsDeviceService)
{
_ivsDeviceService = ivsDeviceService;
}
public async Task<ServiceResult<string>> QueryAnyData(QueryDataInput input)
{
return await _ivsDeviceService.DeviceReboot(input);
}
}
Configuration Example
appsettings.json:
{
"Redis": {
"Configuration": "*.*.*.*:**,password="
},
"AppControllerConfig": {
"ControllerFirstPrefix": "yyt",
"ControllerSecondPrefix": ""
},
"ImagePath": {
"Web": "/file",
"Mobile": "/file"
}
}
API Capability Documentation
SdcPtz PTZ Control
| Method |
Path |
Description |
| POST |
/sdc/ptz/capability/iaas |
Query device PTZ basic capabilities |
| POST |
/sdc/ptz/capability/business |
Query device PTZ business capabilities |
| POST |
/sdc/ptz/ctrl |
PTZ control |
| POST |
/sdc/ptz/ctrl/mult |
PTZ arbitrary direction control (virtual joystick, gun-ball linkage, etc.) |
| POST |
/sdc/ptz/preset/add |
Add preset position |
| POST |
/sdc/ptz/preset/delete |
Delete preset position |
| POST |
/sdc/ptz/preset/update |
Update preset position |
| POST |
/sdc/ptz/presetFreezeStatus/set |
Set preset position freeze status |
| POST |
/sdc/ptz/preset/list |
Query preset positions |
| POST |
/sdc/ptz/presetFreezeStatus |
Query preset position freeze status |
| POST |
/sdc/ptz/cruises/add |
Add cruise path |
| POST |
/sdc/ptz/cruises/delete |
Delete cruise path |
| POST |
/sdc/ptz/cruises/update |
Update cruise path |
| POST |
/sdc/ptz/cruises/list |
Query cruise path list |
| POST |
/sdc/ptz/cruises/info |
Query cruise path details |
| GET |
/sdc/ptz/guardPosition |
Query guard position parameters |
| POST |
/sdc/ptz/guardPosition/set |
Set guard position parameters |
| GET |
/sdc/ptz/home |
Query Home position status |
| POST |
/sdc/ptz/home/set |
Set Home position status |
| GET |
/sdc/ptz/currentLocation |
Get PTZ current position |
| POST |
/sdc/ptz/currentLocation/set |
Set PTZ current position |
| GET |
/sdc/ptz/status |
Get PTZ status |
| POST |
/sdc/ptz/scanShow/set |
Set pattern scan OSD display |
| GET |
/sdc/ptz/relativeLocation |
Get PTZ zero coordinate |
| POST |
/sdc/ptz/relativeLocation/set |
Set PTZ zero coordinate |
SdcVideo Video Files
| Method |
Path |
Description |
| POST |
/sdc/video/records/list |
Query video files |
| POST |
/sdc/video/records/dowload |
Download video files |
| POST |
/sdc/video/records/dowload/stop |
Stop downloading video files |
| POST |
/sdc/video/records/play |
Play video files |
| POST |
/sdc/video/records/stopPlay |
Stop playing video files |
| POST |
/sdc/video/records/play/ctroller |
Playback control for video files |
IvsPtz PTZ Control
| Method |
Path |
Description |
| POST |
/ivs/ptz/ptzCap |
Query if device supports PTZ |
| POST |
/ivs/ptz/ptzInfo |
Query PTZ current information |
| POST |
/ivs/ptz/ctrl |
PTZ control |
| POST |
/ivs/ptz/ctrl/lock |
PTZ control with locked PTZ user info |
| POST |
/ivs/ptz/preset/add |
Add preset position |
| POST |
/ivs/ptz/preset/delete |
Delete preset position |
| POST |
/ivs/ptz/preset/update |
Update preset position |
| POST |
/ivs/ptz/preset/list |
Query preset positions |
| POST |
/ivs/ptz/cruises/add |
Add cruise path |
| POST |
/ivs/ptz/cruises/delete |
Delete cruise path |
| POST |
/ivs/ptz/cruises/update |
Update cruise path |
| POST |
/ivs/ptz/cruises/list |
Query cruise path list |
| POST |
/ivs/ptz/cruises/info |
Query cruise path details |
| POST |
/ivs/ptz/guardPositions |
Query guard position parameters |
| POST |
/ivs/ptz/guardPosition/set |
Set guard position parameters |
| POST |
/ivs/ptz/guardPosition/delete |
Delete guard position parameters |
IvsVideo IVS Video Files
| Method |
Path |
Description |
| POST |
/ivs/video/record/status |
Query video recording status |
| POST |
/ivs/video/record/status/mult |
Batch query video recording status |
| POST |
/ivs/video/records/list |
Query video file list |
| POST |
/ivs/video/getRtspUrl |
Live/Video/Audio (RTSP pull mode) |
| POST |
/ivs/video/getRtspUrl/simple |
Live/Video/Audio |
| POST |
/ivs/video/realPlay |
Start real-time viewing |
| POST |
/ivs/video/realPlay/stop |
Stop real-time viewing |
| POST |
/ivs/video/playBack |
Start video playback |
| POST |
/ivs/video/playBack/stop |
Stop video playback |
| POST |
/ivs/video/playBack/pause |
Pause video playback |
| POST |
/ivs/video/playBack/resume |
Resume video playback |
| POST |
/ivs/video/playBack/speed |
Set video playback speed |
| POST |
/ivs/video/playBack/time |
Set platform video playback time |
| POST |
/ivs/video/records |
Query video file list |
| POST |
/ivs/video/download |
Download video files by time |
| POST |
/ivs/video/download/getPos |
Query video download progress |
| POST |
/ivs/video/download/stop |
Stop video download |
Chinese Version
概述
Yyt.Abp.HwSdk 提供了简化 .Net 程序对接 hwsdk 协议中的 sdc 摄像头设备、lvs 录像存储设备功能,Version 1.0.2 增加了对net8的支持。代码采用了 Module 模块化设计,能无缝集成到项目中。该库由 Patrick.Z 提供支持,简化了 .Net 应用程序中的日常开发配置工作,为您分担繁重的工作。
为什么选择 Yyt.Abp.HwSdk?
- 极少依赖:轻量级设计,外部依赖少,保持项目精简高效
- 设计安全:从设计阶段就优先考虑安全性,减少潜在漏洞
- 可扩展定制:易于扩展和定制,满足特定业务需求
- 久经沙场:经过多个生产项目验证,稳定可靠
核心功能
- SDC 摄像头集成:简化与 SDC 摄像头设备的集成
- LVS 录像存储集成:简化与 LVS 录像存储设备的集成
- 云台控制:完整的云台控制能力,包括预置位、巡航、守望、Home 位置等
- 录像管理:录像查询、下载、回放和控制
- IVS 设备支持:支持 IVS 智能视频监控设备
代码模块集成示例
namespace Demo.HttpApi.Host
{
[DependsOn(
typeof(HwSdkModule)
)]
public class DemoHttpApiHostModule : AbpModule
{
// config service & other
}
}
代码调用示例
public class DemoService : IDemoService
{
private readonly IIvsDeviceService _ivsDeviceService;
public DemoService(IIvsDeviceService ivsDeviceService)
{
_ivsDeviceService = ivsDeviceService;
}
public async Task<ServiceResult<string>> QueryAnyData(QueryDataInput input)
{
return await _ivsDeviceService.DeviceReboot(input);
}
}
配置示例
appsettings.json:
{
"Redis": {
"Configuration": "*.*.*.*:**,password="
},
"AppControllerConfig": {
"ControllerFirstPrefix": "yyt",
"ControllerSecondPrefix": ""
},
"ImagePath": {
"Web": "/file",
"Mobile": "/file"
}
}
API 能力接口文档
SdcPtz 云台控制
| 方法 |
路径 |
说明 |
| POST |
/sdc/ptz/capability/iaas |
查询设备的云台基础能力 |
| POST |
/sdc/ptz/capability/business |
查询设备的云台业务能力 |
| POST |
/sdc/ptz/ctrl |
云台控制 |
| POST |
/sdc/ptz/ctrl/mult |
云台任意方向控制(虚拟摇杆、枪球联动等场景) |
| POST |
/sdc/ptz/preset/add |
预置位添加 |
| POST |
/sdc/ptz/preset/delete |
预置位删除 |
| POST |
/sdc/ptz/preset/update |
预置位修改 |
| POST |
/sdc/ptz/presetFreezeStatus/set |
设置预置位冻结状态 |
| POST |
/sdc/ptz/preset/list |
查询预置位 |
| POST |
/sdc/ptz/presetFreezeStatus |
查询预置位冻结状态 |
| POST |
/sdc/ptz/cruises/add |
巡航轨迹添加 |
| POST |
/sdc/ptz/cruises/delete |
巡航轨迹删除 |
| POST |
/sdc/ptz/cruises/update |
巡航轨迹修改 |
| POST |
/sdc/ptz/cruises/list |
查询巡航轨迹列表 |
| POST |
/sdc/ptz/cruises/info |
查询巡航轨迹详情 |
| GET |
/sdc/ptz/guardPosition |
查询守望参数 |
| POST |
/sdc/ptz/guardPosition/set |
设置守望参数 |
| GET |
/sdc/ptz/home |
查询 Home 位置状态 |
| POST |
/sdc/ptz/home/set |
设置 Home 位置状态 |
| GET |
/sdc/ptz/currentLocation |
获取云台当前位置 |
| POST |
/sdc/ptz/currentLocation/set |
设置云台当前位置 |
| GET |
/sdc/ptz/status |
获取云台状态 |
| POST |
/sdc/ptz/scanShow/set |
设置花样扫描 OSD 显示 |
| GET |
/sdc/ptz/relativeLocation |
获取云台零坐标 |
| POST |
/sdc/ptz/relativeLocation/set |
设置云台零坐标 |
SdcVideo 录像文件
| 方法 |
路径 |
说明 |
| POST |
/sdc/video/records/list |
查询录像文件 |
| POST |
/sdc/video/records/dowload |
下载录像文件 |
| POST |
/sdc/video/records/dowload/stop |
停止下载录像文件 |
| POST |
/sdc/video/records/play |
播放录像文件 |
| POST |
/sdc/video/records/stopPlay |
停止播放录像文件 |
| POST |
/sdc/video/records/play/ctroller |
播放控制录像文件 |
IvsPtz 云台控制
| 方法 |
路径 |
说明 |
| POST |
/ivs/ptz/ptzCap |
查询设备是否支持云台 |
| POST |
/ivs/ptz/ptzInfo |
查询云台当前信息 |
| POST |
/ivs/ptz/ctrl |
云台控制 |
| POST |
/ivs/ptz/ctrl/lock |
云台控制带锁定云台的用户信息 |
| POST |
/ivs/ptz/preset/add |
预置位添加 |
| POST |
/ivs/ptz/preset/delete |
预置位删除 |
| POST |
/ivs/ptz/preset/update |
预置位修改 |
| POST |
/ivs/ptz/preset/list |
查询预置位 |
| POST |
/ivs/ptz/cruises/add |
巡航轨迹添加 |
| POST |
/ivs/ptz/cruises/delete |
巡航轨迹删除 |
| POST |
/ivs/ptz/cruises/update |
巡航轨迹修改 |
| POST |
/ivs/ptz/cruises/list |
查询巡航轨迹列表 |
| POST |
/ivs/ptz/cruises/info |
查询巡航轨迹详情 |
| POST |
/ivs/ptz/guardPositions |
查询守望参数 |
| POST |
/ivs/ptz/guardPosition/set |
设置守望参数 |
| POST |
/ivs/ptz/guardPosition/delete |
删除守望参数 |
IvsVideo IVS 录像文件
| 方法 |
路径 |
说明 |
| POST |
/ivs/video/record/status |
查询录像状态 |
| POST |
/ivs/video/record/status/mult |
批量获取录像状态 |
| POST |
/ivs/video/records/list |
查询录像文件列表 |
| POST |
/ivs/video/getRtspUrl |
实况/录像/语音(RTSP 拉流模式) |
| POST |
/ivs/video/getRtspUrl/simple |
实况/录像/语音 |
| POST |
/ivs/video/realPlay |
开始实时浏览 |
| POST |
/ivs/video/realPlay/stop |
停止实时浏览 |
| POST |
/ivs/video/playBack |
开始录像回放 |
| POST |
/ivs/video/playBack/stop |
停止录像回放 |
| POST |
/ivs/video/playBack/pause |
暂停录像回放 |
| POST |
/ivs/video/playBack/resume |
恢复录像回放 |
| POST |
/ivs/video/playBack/speed |
设置录像回放速度 |
| POST |
/ivs/video/playBack/time |
设置平台录像回放时间 |
| POST |
/ivs/video/records |
查询录像文件列表 |
| POST |
/ivs/video/download |
按时间下载录像文件 |
| POST |
/ivs/video/download/getPos |
查询下载录像文件进度 |
| POST |
/ivs/video/download/stop |
停止下载录像文件 |
Document Version: v1.0
Created Date: July 2026
Author: Patrick.Z