mirror of
https://github.com/kerberos-io/onvif.git
synced 2025-10-29 18:21:55 +08:00
Some improvements at Device.go. Adding WS security
This commit is contained in:
30
Device.go
30
Device.go
@@ -15,8 +15,34 @@ import (
|
||||
"github.com/yakovlevdmv/goonvif/Media"
|
||||
"github.com/yakovlevdmv/goonvif/PTZ"
|
||||
"errors"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type DeviceType int
|
||||
|
||||
const (
|
||||
NVD DeviceType = iota
|
||||
NVS
|
||||
NVA
|
||||
NVT
|
||||
)
|
||||
|
||||
func (devType DeviceType) String() string {
|
||||
stringRepresentation := []string {
|
||||
"NetworkVideoDisplay",
|
||||
"NetworkVideoStorage",
|
||||
"NetworkVideoAnalytics",
|
||||
"NetworkVideoTransmitter",
|
||||
}
|
||||
i := uint8(devType)
|
||||
switch {
|
||||
case i <= uint8(NVT):
|
||||
return stringRepresentation[i]
|
||||
default:
|
||||
return strconv.Itoa(int(i))
|
||||
}
|
||||
}
|
||||
|
||||
//deviceInfo struct contains general information about ONVIF device
|
||||
type deviceInfo struct {
|
||||
Manufacturer string
|
||||
@@ -42,6 +68,10 @@ type device struct {
|
||||
|
||||
}
|
||||
|
||||
func getAvailableDevicesAtEthernet(interfaceName string) {
|
||||
|
||||
}
|
||||
|
||||
//NewDevice function construct a ONVIF Device entity
|
||||
func NewDevice() *device {
|
||||
return &device{}
|
||||
|
||||
Reference in New Issue
Block a user