Coder Social home page Coder Social logo

hcnetsdk-go's Introduction

hcnetsdk-go

海康网络HCNetSDK二次封装的Go库.

go get github.com/lkqm/hcnetsdk-go

示例

// Get Device Time
func main() {
	userId, err := hcnetsdk.Login(ip, port, user, password)
	if err != nil {
		fmt.Printf("Login device error: %s", err)
		return
	}
	date, err := hcnetsdk.GetDeviceTime(userId)
	if err != nil {
		fmt.Printf("Get device time error: %s", err)
		return
	}
	fmt.Printf("Current device time: %s", date)
}

提示: 依赖于cgo调用海康提供动态库, 需要安装c编译环境, windows下推荐使用MinGW.

特性

  • 登录 (Login)
  • 注销 (Logout)
  • 执行操作 (DoAction)
  • 获取错误 (LastError)
  • 布防 (SetupAlarm)
  • 透传 (PassThrough)
  • 设备配置 (GetNvrConfig, SetNvrConfig)
  • 修改密码 (ModifyPassword)
  • ...

hcnetsdk-go's People

Contributors

lkqm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

hcnetsdk-go's Issues

咨询一下问题,不懂这个怎么在windows使用

HKDevice.go: invalid #cgo line: #cgo LDFLAGS 需要根据不同的平台修改 hcnetsdk(linux) / HCNETSDK(Windows)
我修改这个变量后呢,它依然提示这个。

// #cgo LDFLAGS 需要根据不同的平台修改 hcnetsdk(linux) / HCNETSDK(Windows)
/*
#cgo CFLAGS: -I../../include
#cgo LDFLAGS: -L$../../build -lHCCore.dll -lhpr.dll -lHCNETSDK.dll
不知道是不是这样修改呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.