Documentation ¶
Overview ¶
Package onvif is developed to provide an ONVIF client implementation on Go programming language
Index ¶
- type Device
- func (dev *Device) CreateRequest(method interface{}) *networking.Request
- func (dev *Device) DeltaTime() time.Duration
- func (dev *Device) GetDeviceInfo() DeviceInfo
- func (dev Device) GetEndpoint(endpoint string) (string, error)
- func (dev *Device) GetServices() map[string]string
- func (dev *Device) Inspect(headers map[string]string) (*device.GetCapabilitiesResponse, error)
- func (dev *Device) InspectWithCtx(ctx context.Context, headers map[string]string) (*device.GetCapabilitiesResponse, error)
- func (dev *Device) ReplaceHostToXAddr(u string) (string, error)
- func (dev *Device) UpdateDeltaTime(headers map[string]string) (time.Duration, error)
- func (dev *Device) UpdateDeltaTimeCtx(ctx context.Context, headers map[string]string) (time.Duration, error)
- type DeviceInfo
- type DeviceParams
- type DeviceType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Device ¶
type Device struct {
// contains filtered or unexported fields
}
Device for a new device of onvif and DeviceInfo struct represents an abstract ONVIF device. It contains methods, which helps to communicate with ONVIF device
func GetAvailableDevicesAtSpecificEthernetInterface ¶
GetAvailableDevicesAtSpecificEthernetInterface ...
func NewDevice ¶
func NewDevice(params DeviceParams) *Device
NewDevice function construct a ONVIF Device entity
func (*Device) CreateRequest ¶
func (dev *Device) CreateRequest(method interface{}) *networking.Request
func (*Device) DeltaTime ¶
DeltaTime return delta time between local time and device time (time.Now() - deviceTime).
func (*Device) GetDeviceInfo ¶
func (dev *Device) GetDeviceInfo() DeviceInfo
GetServices return available endpoints
func (Device) GetEndpoint ¶
getEndpoint functions get the target service endpoint in a better way
func (*Device) GetServices ¶
GetServices return available endpoints
func (*Device) InspectWithCtx ¶
func (*Device) ReplaceHostToXAddr ¶
ReplaceHostToXAddr replacing host:port on string to dev.params.Xaddr. NAT needed.
func (*Device) UpdateDeltaTime ¶
type DeviceInfo ¶
type DeviceInfo struct { Manufacturer string Model string FirmwareVersion string SerialNumber string HardwareId string }
DeviceInfo struct contains general information about ONVIF device
type DeviceParams ¶
type DeviceType ¶
type DeviceType int
DeviceType alias for int
const ( NVD DeviceType = iota NVS NVA NVT )
Onvif Device Type
func (DeviceType) String ¶
func (devType DeviceType) String() string