ipc

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	// contains filtered or unexported fields
}

Connector 使用SIAPI协议和海康威视NVR通信,使用onvif和ipc通信

func NewConnector

func NewConnector(logger log.Logger) *Connector

func (*Connector) AddChannel

func (c *Connector) AddChannel() error

AddChannel 添加IPC设备到某一个通道 todo

func (*Connector) AddDevice

func (c *Connector) AddDevice(sn, xaddr, username, password string) error

AddDevice 添加设备,sn为不重复的任意值 xaddr onvif地址 username onvif用户名 password onvif密码

func (*Connector) Destroy

func (c *Connector) Destroy() error

func (*Connector) Discovery

func (c *Connector) Discovery() (devices []SearchedDevice, err error)

Discovery 发现ipc设备

func (*Connector) GetStreamUrl

func (c *Connector) GetStreamUrl(xaddr, username, password string) (url string, err error)

func (*Connector) Initialize

func (c *Connector) Initialize() error

func (*Connector) RemoveChannel

func (c *Connector) RemoveChannel() error

RemoveChannel 从NVR中移除通道 todo

func (*Connector) RemoveDevice

func (c *Connector) RemoveDevice(sn string) error

type InputProxyChannel

type InputProxyChannel struct {
	XmlName                   xml.Name                  `xml:"InputProxyChannel"`
	ID                        string                    `xml:"id"`
	Name                      string                    `xml:"name"`
	SourceInputPortDescriptor SourceInputPortDescriptor `xml:"sourceInputPortDescriptor"`
}

type SearchedDevice

type SearchedDevice struct {
	ID    string `json:"id"`
	Name  string `json:"version"`
	XAddr string `json:"xaddr"`
	Host  string `json:"host"`
}

type SourceInputPortDescriptor

type SourceInputPortDescriptor struct {
	ID                   string `json:"id"`
	Name                 string `json:"name"`
	AdminProtocol        string `xml:"adminProtocol" json:"admin-protocol"`
	AddressingFormatType string `xml:"addressingFormatType" json:"addressing_format_type"`
	IPAddress            string `xml:"ipAddress,omitempty" json:"ip_address"`
	ManagePortNo         int    `xml:"managePortNo" json:"manage_port_no"`
	SrcInputPort         string `xml:"srcInputPort"`
	UserName             string `xml:"userName" json:"user_name"`
	Password             string `xml:"password" json:"password"`
	SerialNumber         string `xml:"serialNumber" json:"serial_number"`
}

Jump to

Keyboard shortcuts

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