hiklib

package module
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 3 Imported by: 4

README

hiklib

Go wrapper for hikvision sdk

https://sheff.online/post/hikvision-go/

Documentation

Index

Constants

View Source
const COMM_ALARM int = 0x1100 //8000 Upload alarm message
View Source
const COMM_ALARM_V30 int = 0x4000 //9000 upload alarm message
View Source
const COMM_DEV_STATUS_CHANGED int = 0x7000 //Device status change alarm upload

Variables

View Source
var Listeners []OnMsg

Functions

func HikCaptureImage

func HikCaptureImage(user int, byStartChan int, imagePath string) int

HCaptureImage - capture image

func HikFormatDisk added in v0.0.4

func HikFormatDisk(user int, disk int) int

HikFormatDisk - format disks

func HikLogout

func HikLogout(user int)

HikLogout - disconnect from camera

func HikOnAlarm

func HikOnAlarm(user int, alarmPort int, f OnMsg)

C.OnAlarm(C.int(user), C.int(*alarmParam))

func HikOnAlarmV30

func HikOnAlarmV30(user int, alarmPort int, f OnMsg)

C.OnAlarmV30(C.int(user), C.int(*alarmParam))

func HikReboot

func HikReboot(user int) int

int HReboot(int user);

func HikSaveFile

func HikSaveFile(userId int, srcfile string, destfile string) int

int HSaveFile(int userId, char *srcfile, char *destfile);

func HikTest

func HikTest()

func HikVersion

func HikVersion() string

HikVersion - hikvision sdk version

Types

type AlarmItem

type AlarmItem struct {
	IP        string
	Command   int
	AlarmType int
}

type DevInfo

type DevInfo struct {
	SSerialNumber string // Device serial No.
	ByDiskNum     int    // Number of HDDs
	ByDVRType     int    // Device type
	ByZeroChanNum int    // Number of channel-zero
	ByStartChan   int    // Start No. of analog channel, which starts from 1.
	ByChanNum     int    // Number of channels
	ByStartDChan  int    // Start No. of digital channel, 0-no digital channel (e.g., DVR, network camera).
	ByDChanNum    int    // Number of digital channels
}

func HikLogin

func HikLogin(ip string, port int, user, pass string) (int, DevInfo)

HikLogin - connect and login to camera

func HikLoginLog added in v0.0.10

func HikLoginLog(ip string, port int, user, pass string, loglevel int) (int, DevInfo)

type MotionArea

type MotionArea struct {
	X float32
	Y float32
	W float32
	H float32
}

type MotionAreas

type MotionAreas struct {
	Areas []MotionArea
}

func HikMotionArea

func HikMotionArea(lUserID int, chno int) (int, MotionAreas)

HMotionArea - motion area.

type MotionVideo

type MotionVideo struct {
	Filename   string
	Size       int64
	From_year  int
	From_month int
	From_day   int
	From_hour  int
	From_min   int
	From_sec   int
	To_year    int
	To_month   int
	To_day     int
	To_hour    int
	To_min     int
	To_sec     int
}

type MotionVideos

type MotionVideos struct {
	Videos []MotionVideo
	Count  int
}

func HikListVideo

func HikListVideo(lUserID int, chno int) (int, MotionVideos)

HListVideo - list video

type OnMsg

type OnMsg func(item AlarmItem)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL