This commit is contained in:
George Palanjyan
2018-04-04 20:47:32 +03:00
2 changed files with 158 additions and 521 deletions

View File

@@ -17,7 +17,7 @@ const WSDL = "http://www.onvif.org/ver20/ptz/wsdl"
//PTZ main types //PTZ main types
type GetServiceCapabilities struct { type GetServiceCapabilities struct {
XMLName string `xml:"wsdl:GetServiceCapabilities"`
} }
@@ -28,7 +28,7 @@ type GetServiceCapabilitiesResponse struct {
type GetNodes struct { type GetNodes struct {
XMLName string `xml:"wsdl:GetNodes"`
} }
@@ -39,7 +39,8 @@ type GetNodesResponse struct {
type GetNode struct { type GetNode struct {
NodeToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetNode"`
NodeToken onvif.ReferenceToken `xml:"wsdl:NodeToken"`
} }
@@ -51,8 +52,8 @@ type GetNodeResponse struct {
type GetConfiguration struct { type GetConfiguration struct {
PTZConfigurationToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetConfiguration"`
ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
} }
@@ -63,7 +64,7 @@ type GetConfigurationResponse struct {
type GetConfigurations struct { type GetConfigurations struct {
XMLName string `xml:"wsdl:GetConfigurations"`
} }
@@ -74,8 +75,9 @@ type GetConfigurationsResponse struct {
type SetConfiguration struct { type SetConfiguration struct {
PTZConfiguration onvif.PTZConfiguration XMLName string `xml:"wsdl:SetConfiguration"`
ForcePersistence xsd.Boolean PTZConfiguration onvif.PTZConfiguration `xml:"wsdl:PTZConfiguration"`
ForcePersistence xsd.Boolean `xml:"wsdl:ForcePersistence"`
} }
@@ -86,7 +88,8 @@ type SetConfigurationResponse struct {
type GetConfigurationOptions struct { type GetConfigurationOptions struct {
ConfigurationToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetConfigurationOptions"`
ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
} }
@@ -98,8 +101,9 @@ type GetConfigurationOptionsResponse struct {
type SendAuxiliaryCommand struct { type SendAuxiliaryCommand struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:SendAuxiliaryCommand"`
AuxiliaryData onvif.AuxiliaryData ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
AuxiliaryData onvif.AuxiliaryData `xml:"wsdl:AuxiliaryData"`
} }
@@ -111,8 +115,8 @@ type SendAuxiliaryCommandResponse struct {
type GetPresets struct { type GetPresets struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetPresets"`
ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
} }
@@ -123,10 +127,10 @@ type GetPresetsResponse struct {
type SetPreset struct { type SetPreset struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:SetPreset"`
PresetName string ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
PresetToken onvif.ReferenceToken PresetName xsd.String `xml:"wsdl:PresetName"`
PresetToken onvif.ReferenceToken `xml:"wsdl:PresetToken"`
} }
@@ -137,8 +141,9 @@ type SetPresetResponse struct {
type RemovePreset struct { type RemovePreset struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:RemovePreset"`
PresetToken onvif.ReferenceToken ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
PresetToken onvif.ReferenceToken `xml:"wsdl:PresetToken"`
} }
@@ -149,9 +154,10 @@ type RemovePresetResponse struct {
type GotoPreset struct { type GotoPreset struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GotoPreset"`
PresetToken onvif.ReferenceToken ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
Speed onvif.PTZSpeed PresetToken onvif.ReferenceToken `xml:"wsdl:PresetToken"`
Speed onvif.PTZSpeed `xml:"wsdl:Speed"`
} }
@@ -162,8 +168,9 @@ type GotoPresetResponse struct {
type GotoHomePosition struct { type GotoHomePosition struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GotoHomePosition"`
Speed onvif.PTZSpeed ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
Speed onvif.PTZSpeed `xml:"wsdl:Speed"`
} }
@@ -174,8 +181,8 @@ type GotoHomePositionResponse struct {
type SetHomePosition struct { type SetHomePosition struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:SetHomePosition"`
ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
} }
@@ -185,9 +192,10 @@ type SetHomePositionResponse struct {
type ContinuousMove struct { type ContinuousMove struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:ContinuousMove"`
Velocity onvif.PTZSpeed ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
Timeout xsd.Duration Velocity onvif.PTZSpeed `xml:"wsdl:Velocity"`
Timeout xsd.Duration `xml:"wsdl:Timeout"`
} }
@@ -198,9 +206,10 @@ type ContinuousMoveResponse struct {
type RelativeMove struct { type RelativeMove struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:RelativeMove"`
Translation onvif.PTZVector ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
Speed onvif.PTZSpeed Translation onvif.PTZVector `xml:"wsdl:Translation"`
Speed onvif.PTZSpeed `xml:"wsdl:Speed"`
} }
@@ -211,8 +220,8 @@ type RelativeMoveResponse struct {
type GetStatus struct { type GetStatus struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetStatus"`
ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
} }
@@ -223,9 +232,10 @@ type GetStatusResponse struct {
type AbsoluteMove struct { type AbsoluteMove struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:AbsoluteMove"`
Position onvif.PTZVector ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
Speed onvif.PTZSpeed Position onvif.PTZVector `xml:"wsdl:Position"`
Speed onvif.PTZSpeed `xml:"wsdl:Speed"`
} }
@@ -236,11 +246,12 @@ type AbsoluteMoveResponse struct {
type GeoMove struct { type GeoMove struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GeoMove"`
Target onvif.GeoLocation ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
Speed onvif.PTZSpeed Target onvif.GeoLocation `xml:"wsdl:Target"`
AreaHeight xsd.Float Speed onvif.PTZSpeed `xml:"wsdl:Speed"`
AreaWidth xsd.Float AreaHeight xsd.Float `xml:"wsdl:AreaHeight"`
AreaWidth xsd.Float `xml:"wsdl:AreaWidth"`
} }
@@ -251,9 +262,10 @@ type GeoMoveResponse struct {
type Stop struct { type Stop struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:Stop"`
PanTilt xsd.Boolean ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
Zoom xsd.Boolean PanTilt xsd.Boolean `xml:"wsdl:PanTilt"`
Zoom xsd.Boolean `xml:"wsdl:Zoom"`
} }
@@ -264,8 +276,8 @@ type StopResponse struct {
type GetPresetTours struct { type GetPresetTours struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetPresetTours"`
ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
} }
@@ -276,8 +288,9 @@ type GetPresetToursResponse struct {
type GetPresetTour struct { type GetPresetTour struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetPresetTour"`
PresetTourToken onvif.ReferenceToken ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
PresetTourToken onvif.ReferenceToken `xml:"wsdl:PresetTourToken"`
} }
@@ -289,8 +302,9 @@ type GetPresetTourResponse struct {
type GetPresetTourOptions struct { type GetPresetTourOptions struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetPresetTourOptions"`
PresetTourToken onvif.ReferenceToken ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
PresetTourToken onvif.ReferenceToken `xml:"wsdl:PresetTourToken"`
} }
@@ -302,7 +316,8 @@ type GetPresetTourOptionsResponse struct {
type CreatePresetTour struct { type CreatePresetTour struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:CreatePresetTour"`
ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
} }
@@ -314,8 +329,9 @@ type CreatePresetTourResponse struct {
type ModifyPresetTour struct { type ModifyPresetTour struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:ModifyPresetTour"`
PresetTour onvif.PresetTour ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
PresetTour onvif.PresetTour `xml:"wsdl:PresetTour"`
} }
@@ -326,9 +342,10 @@ type ModifyPresetTourResponse struct {
type OperatePresetTour struct { type OperatePresetTour struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:OperatePresetTour"`
PresetTourToken onvif.ReferenceToken ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
Operation onvif.PTZPresetTourOperation PresetTourToken onvif.ReferenceToken `xml:"onvif:PresetTourToken"`
Operation onvif.PTZPresetTourOperation `xml:"onvif:Operation"`
} }
@@ -339,8 +356,9 @@ type OperatePresetTourResponse struct {
type RemovePresetTour struct { type RemovePresetTour struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:RemovePresetTour"`
PresetTourToken onvif.ReferenceToken ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
PresetTourToken onvif.ReferenceToken `xml:"wsdl:PresetTourToken"`
} }
@@ -351,7 +369,8 @@ type RemovePresetTourResponse struct {
type GetCompatibleConfigurations struct { type GetCompatibleConfigurations struct {
ProfileToken onvif.ReferenceToken XMLName string `xml:"wsdl:GetCompatibleConfigurations"`
ProfileToken onvif.ReferenceToken `xml:"wsdl:ProfileToken"`
} }

View File

@@ -54,8 +54,8 @@ type IntRange struct {
} }
type FloatRange struct { type FloatRange struct {
Min float64 Min float64 `xml:"onvif:Min"`
Max float64 Max float64 `xml:"onvif:Max"`
} }
type OSDConfiguration struct { type OSDConfiguration struct {
@@ -468,24 +468,7 @@ type IPAddress struct {
IPv6Address IPv6Address `xml:"onvif:IPv6Address"` IPv6Address IPv6Address `xml:"onvif:IPv6Address"`
} }
type IPType int type IPType xsd.String
func (ipType IPType) String() string {
names := [...]string{
"IPv4",
"IPv6",
}
if ipType < IPV4 || ipType > IPV6 {
return "Unknown"
}
return names[ipType]
}
const (
IPV4 IPType = iota
IPV6
)
type IPv4Address xsd.Token type IPv4Address xsd.Token
@@ -550,23 +533,23 @@ type PTZConfiguration struct {
MoveRamp int `xml:"MoveRamp,attr"` MoveRamp int `xml:"MoveRamp,attr"`
PresetRamp int `xml:"PresetRamp,attr"` PresetRamp int `xml:"PresetRamp,attr"`
PresetTourRamp int `xml:"PresetTourRamp,attr"` PresetTourRamp int `xml:"PresetTourRamp,attr"`
NodeToken ReferenceToken NodeToken ReferenceToken `xml:"onvif:NodeToken"`
DefaultAbsolutePantTiltPositionSpace xsd.AnyURI DefaultAbsolutePantTiltPositionSpace xsd.AnyURI `xml:"onvif:DefaultAbsolutePantTiltPositionSpace"`
DefaultAbsoluteZoomPositionSpace xsd.AnyURI DefaultAbsoluteZoomPositionSpace xsd.AnyURI `xml:"onvif:DefaultAbsoluteZoomPositionSpace"`
DefaultRelativePanTiltTranslationSpace xsd.AnyURI DefaultRelativePanTiltTranslationSpace xsd.AnyURI `xml:"onvif:DefaultRelativePanTiltTranslationSpace"`
DefaultRelativeZoomTranslationSpace xsd.AnyURI DefaultRelativeZoomTranslationSpace xsd.AnyURI `xml:"onvif:DefaultRelativeZoomTranslationSpace"`
DefaultContinuousPanTiltVelocitySpace xsd.AnyURI DefaultContinuousPanTiltVelocitySpace xsd.AnyURI `xml:"onvif:DefaultContinuousPanTiltVelocitySpace"`
DefaultContinuousZoomVelocitySpace xsd.AnyURI DefaultContinuousZoomVelocitySpace xsd.AnyURI `xml:"onvif:DefaultContinuousZoomVelocitySpace"`
DefaultPTZSpeed PTZSpeed DefaultPTZSpeed PTZSpeed `xml:"onvif:DefaultPTZSpeed"`
DefaultPTZTimeout xsd.Duration DefaultPTZTimeout xsd.Duration `xml:"onvif:DefaultPTZTimeout"`
PanTiltLimits PanTiltLimits PanTiltLimits PanTiltLimits `xml:"onvif:PanTiltLimits"`
ZoomLimits ZoomLimits ZoomLimits ZoomLimits `xml:"onvif:ZoomLimits"`
Extension PTZConfigurationExtension Extension PTZConfigurationExtension `xml:"onvif:Extension"`
} }
type PTZSpeed struct { type PTZSpeed struct {
PanTilt Vector2D PanTilt Vector2D `xml:"onvif:PanTilt"`
Zoom Vector1D Zoom Vector1D `xml:"onvif:Zoom"`
} }
type Vector2D struct { type Vector2D struct {
@@ -581,50 +564,46 @@ type Vector1D struct {
} }
type PanTiltLimits struct { type PanTiltLimits struct {
Range Space2DDescription Range Space2DDescription `xml:"onvif:Range"`
} }
type Space2DDescription struct { type Space2DDescription struct {
URI xsd.AnyURI URI xsd.AnyURI `xml:"onvif:URI"`
XRange FloatRange XRange FloatRange `xml:"onvif:XRange"`
YRange FloatRange YRange FloatRange `xml:"onvif:YRange"`
} }
type ZoomLimits struct { type ZoomLimits struct {
Range Space1DDescription Range Space1DDescription `xml:"onvif:Range"`
} }
type Space1DDescription struct { type Space1DDescription struct {
URI xsd.AnyURI URI xsd.AnyURI `xml:"onvif:URI"`
XRange FloatRange XRange FloatRange `xml:"onvif:XRange"`
} }
type PTZConfigurationExtension struct { type PTZConfigurationExtension struct {
PTControlDirection PTControlDirection PTControlDirection PTControlDirection `xml:"onvif:PTControlDirection"`
Extension PTZConfigurationExtension2 Extension PTZConfigurationExtension2 `xml:"onvif:Extension"`
} }
type PTControlDirection struct { type PTControlDirection struct {
EFlip EFlip EFlip EFlip `xml:"onvif:EFlip"`
Reverse Reverse Reverse Reverse `xml:"onvif:Reverse"`
Extension PTControlDirectionExtension Extension PTControlDirectionExtension `xml:"onvif:Extension"`
} }
type EFlip struct { type EFlip struct {
Mode EFlipMode Mode EFlipMode `xml:"onvif:Mode"`
} }
type EFlipMode struct { type EFlipMode xsd.String
EFlipMode string
}
type Reverse struct { type Reverse struct {
Mode ReverseMode Mode ReverseMode `xml:"onvif:Mode"`
} }
type ReverseMode struct { type ReverseMode xsd.String
ReverseMode string
}
type PTControlDirectionExtension xsd.AnyType type PTControlDirectionExtension xsd.AnyType
@@ -981,10 +960,7 @@ type PTZPresetTourSupported struct {
Extension PTZPresetTourSupportedExtension Extension PTZPresetTourSupportedExtension
} }
type PTZPresetTourOperation struct { type PTZPresetTourOperation xsd.String
Operation string
}
type PTZPresetTourSupportedExtension xsd.AnyType type PTZPresetTourSupportedExtension xsd.AnyType
type PTZNodeExtension2 xsd.AnyType type PTZNodeExtension2 xsd.AnyType
@@ -1037,8 +1013,8 @@ type PTZPreset struct {
} }
type PTZVector struct { type PTZVector struct {
PanTilt Vector2D PanTilt Vector2D `xml:"onvif:PanTilt"`
Zoom Vector1D Zoom Vector1D `xml:"onvif:Zoom"`
} }
type PTZStatus struct { type PTZStatus struct {
@@ -1065,36 +1041,34 @@ type GeoLocation struct {
type PresetTour struct { type PresetTour struct {
Token ReferenceToken `xml:"token,attr"` Token ReferenceToken `xml:"token,attr"`
Name Name Name Name `xml:"onvif:Name"`
Status PTZPresetTourStatus Status PTZPresetTourStatus `xml:"onvif:Status"`
AutoStart xsd.Boolean AutoStart xsd.Boolean `xml:"onvif:AutoStart"`
StartingCondition PTZPresetTourStartingCondition StartingCondition PTZPresetTourStartingCondition `xml:"onvif:StartingCondition"`
TourSpot PTZPresetTourSpot TourSpot PTZPresetTourSpot `xml:"onvif:TourSpot"`
Extension PTZPresetTourExtension Extension PTZPresetTourExtension `xml:"onvif:Extension"`
} }
type PTZPresetTourStatus struct { type PTZPresetTourStatus struct {
State PTZPresetTourState State PTZPresetTourState `xml:"onvif:State"`
CurrentTourSpot PTZPresetTourSpot CurrentTourSpot PTZPresetTourSpot `xml:"onvif:CurrentTourSpot"`
Extension PTZPresetTourStatusExtension Extension PTZPresetTourStatusExtension `xml:"onvif:Extension"`
} }
type PTZPresetTourState struct { type PTZPresetTourState xsd.String
State string
}
type PTZPresetTourSpot struct { type PTZPresetTourSpot struct {
PresetDetail PTZPresetTourPresetDetail PresetDetail PTZPresetTourPresetDetail `xml:"onvif:PresetDetail"`
Speed PTZSpeed Speed PTZSpeed `xml:"onvif:Speed"`
StayTime xsd.Duration StayTime xsd.Duration `xml:"onvif:StayTime"`
Extension PTZPresetTourSpotExtension Extension PTZPresetTourSpotExtension `xml:"onvif:Extension"`
} }
type PTZPresetTourPresetDetail struct { type PTZPresetTourPresetDetail struct {
PresetToken ReferenceToken PresetToken ReferenceToken `xml:"onvif:PresetToken"`
Home xsd.Boolean Home xsd.Boolean `xml:"onvif:Home"`
PTZPosition PTZVector PTZPosition PTZVector `xml:"onvif:PTZPosition"`
TypeExtension PTZPresetTourTypeExtension TypeExtension PTZPresetTourTypeExtension `xml:"onvif:TypeExtension"`
} }
type PTZPresetTourTypeExtension xsd.AnyType type PTZPresetTourTypeExtension xsd.AnyType
@@ -1105,15 +1079,13 @@ type PTZPresetTourStatusExtension xsd.AnyType
type PTZPresetTourStartingCondition struct { type PTZPresetTourStartingCondition struct {
RandomPresetOrder xsd.Boolean `xml:"RandomPresetOrder,attr"` RandomPresetOrder xsd.Boolean `xml:"RandomPresetOrder,attr"`
RecurringTime int RecurringTime xsd.Int `xml:"onvif:RecurringTime"`
RecurringDuration xsd.Duration RecurringDuration xsd.Duration `xml:"onvif:RecurringDuration"`
Direction PTZPresetTourDirection Direction PTZPresetTourDirection `xml:"onvif:Direction"`
Extension PTZPresetTourStartingConditionExtension Extension PTZPresetTourStartingConditionExtension `xml:"onvif:Extension"`
} }
type PTZPresetTourDirection struct { type PTZPresetTourDirection xsd.String
Direction string
}
type PTZPresetTourStartingConditionExtension xsd.AnyType type PTZPresetTourStartingConditionExtension xsd.AnyType
@@ -1156,23 +1128,7 @@ type OnvifVersion struct {
Minor int Minor int
} }
type SetDateTimeType int type SetDateTimeType xsd.String
func (setDateTimeType SetDateTimeType) String() string {
names := [...]string{
"Manual",
"NTP",
}
if setDateTimeType < MANUAL || setDateTimeType > NTP {
return "Unknown"
}
return names[setDateTimeType]
}
const (
MANUAL SetDateTimeType = iota
NTP
)
type TimeZone struct { type TimeZone struct {
@@ -1223,41 +1179,9 @@ type Scope struct {
ScopeItem xsd.AnyURI ScopeItem xsd.AnyURI
} }
type ScopeDefinition int type ScopeDefinition xsd.String
func (scopeDefinition ScopeDefinition) String() string { type DiscoveryMode xsd.String
names := [...]string{
"Fixed",
"Configurable",
}
if scopeDefinition < FIXED || scopeDefinition > CONFIGURABLE {
return "Unknown"
}
return names[scopeDefinition]
}
const (
FIXED ScopeDefinition = iota
CONFIGURABLE
)
type DiscoveryMode int
func (discoveryMode DiscoveryMode) String() string {
names := [...]string{
"Discoverable",
"NonDiscoverable",
}
if discoveryMode < DISCOVERABLE || discoveryMode > NONDISCOVERABLE {
return "Unknown"
}
return names[discoveryMode]
}
const (
DISCOVERABLE DiscoveryMode = iota
NONDISCOVERABLE
)
type NetworkHost struct { type NetworkHost struct {
Type NetworkHostType `xml:"onvif:Type"` Type NetworkHostType `xml:"onvif:Type"`
@@ -1267,25 +1191,7 @@ type NetworkHost struct {
Extension NetworkHostExtension `xml:"onvif:Extension"` Extension NetworkHostExtension `xml:"onvif:Extension"`
} }
type NetworkHostType int type NetworkHostType xsd.String
func (networkHostType NetworkHostType) String() string {
names := [...]string{
"IPv4",
"IPv6",
"DNS",
}
if networkHostType < IPv4 || networkHostType > DNS {
return "Unknown"
}
return names[networkHostType]
}
const (
IPv4 NetworkHostType = iota
IPv6
DNS
)
type NetworkHostExtension xsd.String type NetworkHostExtension xsd.String
@@ -1302,59 +1208,11 @@ type User struct {
Extension UserExtension `xml:"onvif:Extension"` Extension UserExtension `xml:"onvif:Extension"`
} }
type UserLevel int type UserLevel xsd.String
func (userLevel UserLevel) String() string {
names := [...]string{
"Administrator",
"Operator",
"User",
"Anonymous",
"Extended",
}
if userLevel < ADMINISTRATOR || userLevel > EXTENDED_USER_LEVEL {
return "Unknown"
}
return names[userLevel]
}
const (
ADMINISTRATOR UserLevel = iota
OPERATOR
USER
ANONYMOUS
EXTENDED_USER_LEVEL
)
type UserExtension xsd.String type UserExtension xsd.String
type CapabilityCategory int type CapabilityCategory xsd.String
func (capabilityCategory CapabilityCategory) String() string {
names := [...] string {
"All",
"Analytics",
"Device",
"Events",
"Imaging",
"Media",
"PTZ",
}
if capabilityCategory < ALL || capabilityCategory > PTZ {
return "Unknown"
}
return names[capabilityCategory]
}
const (
ALL CapabilityCategory = iota
ANALYTICS
DEVICE
EVENTS
IMAGING
MEDIA
PTZ
)
type Capabilities struct { type Capabilities struct {
Analytics AnalyticsCapabilities Analytics AnalyticsCapabilities
@@ -1591,24 +1449,7 @@ type DynamicDNSInformation struct {
} }
//TODO: enumeration //TODO: enumeration
type DynamicDNSType int type DynamicDNSType xsd.String
func (dynamicDNSType DynamicDNSType) String() string {
names := [...]string{
"Allow",
"Deny",
}
if dynamicDNSType < NOUPDATE || dynamicDNSType > SERVERUPDATES {
return "Unknown"
}
return names[dynamicDNSType]
}
const (
NOUPDATE DynamicDNSType = iota
CLIENTUPDATES
SERVERUPDATES
)
type DynamicDNSInformationExtension xsd.AnyType type DynamicDNSInformationExtension xsd.AnyType
@@ -1646,23 +1487,7 @@ type NetworkInterfaceConnectionSetting struct {
} }
//TODO: enum //TODO: enum
type Duplex int type Duplex xsd.String
func (duplex Duplex) String() string {
names := [...]string{
"Allow",
"Deny",
}
if duplex < FULL || duplex > HALF {
return "Unknown"
}
return names[duplex]
}
const (
FULL Duplex = iota
HALF
)
type NetworkInterfaceExtension struct { type NetworkInterfaceExtension struct {
InterfaceType IANA_IfTypes InterfaceType IANA_IfTypes
@@ -1704,77 +1529,17 @@ type Dot11PSKPassphrase xsd.String
type Dot11PSK xsd.HexBinary type Dot11PSK xsd.HexBinary
//TODO: enumeration //TODO: enumeration
type Dot11Cipher int type Dot11Cipher xsd.String
func (dot11Cipher Dot11Cipher) String() string {
names := [...]string{
"CCMP",
"TKIP",
"Any",
"Extended",
}
if dot11Cipher < CCMP || dot11Cipher > EXTENDED_CIPHER {
return "Unknown"
}
return names[dot11Cipher]
}
const (
CCMP Dot11Cipher = iota
TKIP
ANY_CIPHER
EXTENDED_CIPHER
)
//TODO: enumeration //TODO: enumeration
type Dot11SecurityMode int type Dot11SecurityMode xsd.String
func (dot11SecurityMode Dot11SecurityMode) String() string {
names := [...]string{
"None",
"WEP",
"PSK",
"Dot1X",
"Extended",
}
if dot11SecurityMode < NONE_SECURITY_MODE || dot11SecurityMode > EXTENDED_SECURITY_MODE {
return "Unknown"
}
return names[dot11SecurityMode]
}
const (
NONE_SECURITY_MODE Dot11SecurityMode = iota
WEP
PSK
DOT1X
EXTENDED_SECURITY_MODE
)
//TODO: restrictions //TODO: restrictions
type NetworkInterfaceConfigPriority xsd.Integer type NetworkInterfaceConfigPriority xsd.Integer
//TODO: enumeration //TODO: enumeration
type Dot11StationMode int type Dot11StationMode xsd.String
func (dot11StationMode Dot11StationMode) String() string {
names := [...]string{
"Ad-hoc",
"Infrastructure",
"Extended",
}
if dot11StationMode < ADHOC || dot11StationMode > EXTENDED_STATION_MODE {
return "Unknown"
}
return names[dot11StationMode]
}
const (
ADHOC Dot11StationMode = iota
INFRASTRUCTURE
EXTENDED_STATION_MODE
)
//TODO: restrictions //TODO: restrictions
@@ -1805,27 +1570,7 @@ type PrefixedIPv6Address struct {
} }
//TODO: enumeration //TODO: enumeration
type IPv6DHCPConfiguration int type IPv6DHCPConfiguration xsd.String
func (ipv6DHCPConfiguration IPv6DHCPConfiguration) String() string {
names := [...]string{
"Auto",
"Stateful",
"Stateless",
"Off",
}
if ipv6DHCPConfiguration < AUTO || ipv6DHCPConfiguration > OFF {
return "Unknown"
}
return names[ipv6DHCPConfiguration]
}
const (
AUTO IPv6DHCPConfiguration = iota
STATEFUL
STATELESS
OFF
)
type IPv4NetworkInterface struct { type IPv4NetworkInterface struct {
Enabled xsd.Boolean Enabled xsd.Boolean
@@ -1884,26 +1629,7 @@ type NetworkProtocol struct {
type NetworkProtocolExtension xsd.AnyType type NetworkProtocolExtension xsd.AnyType
//TODO: enumeration //TODO: enumeration
type NetworkProtocolType int type NetworkProtocolType xsd.String
func (networkProtocolType NetworkProtocolType) String() string {
names := [...]string{
"HTTP",
"HTTPS",
"RTSP",
}
if networkProtocolType < HTTP || networkProtocolType > RTSP {
return "Unknown"
}
return names[networkProtocolType]
}
const (
HTTP NetworkProtocolType = iota
HTTPS
RTSP
)
type NetworkGateway struct { type NetworkGateway struct {
IPv4Address IPv4Address IPv4Address IPv4Address
@@ -1926,7 +1652,7 @@ type NetworkZeroConfigurationExtension2 xsd.AnyType
type IPAddressFilter struct { type IPAddressFilter struct {
Type string `xml:"onvif:Type"` Type IPAddressFilterType `xml:"onvif:Type"`
IPv4Address PrefixedIPv4Address `xml:"onvif:IPv4Address,omitempty"` IPv4Address PrefixedIPv4Address `xml:"onvif:IPv4Address,omitempty"`
IPv6Address PrefixedIPv6Address `xml:"onvif:IPv6Address,omitempty"` IPv6Address PrefixedIPv6Address `xml:"onvif:IPv6Address,omitempty"`
Extension IPAddressFilterExtension `xml:"onvif:Extension,omitempty"` Extension IPAddressFilterExtension `xml:"onvif:Extension,omitempty"`
@@ -1935,23 +1661,7 @@ type IPAddressFilter struct {
type IPAddressFilterExtension xsd.AnyType type IPAddressFilterExtension xsd.AnyType
//TODO: enumeration //TODO: enumeration
type IPAddressFilterType int type IPAddressFilterType xsd.String
func (ipAddressFilterType IPAddressFilterType) String() string {
names := [...]string{
"Allow",
"Deny",
}
if ipAddressFilterType < ALLOW || ipAddressFilterType > DENY {
return "Unknown"
}
return names[ipAddressFilterType]
}
const (
ALLOW IPAddressFilterType = iota
DENY
)
//TODO: attribite <xs:attribute ref="xmime:contentType" use="optional"/> //TODO: attribite <xs:attribute ref="xmime:contentType" use="optional"/>
@@ -1982,62 +1692,14 @@ type RelayOutputSettings struct {
} }
//TODO:enumeration //TODO:enumeration
type RelayIdleState int type RelayIdleState xsd.String
func (relayIdleState RelayIdleState) String() string {
names := [...]string{
"closed",
"open",
}
if relayIdleState < CLOSED || relayIdleState > OPEN {
return "Unknown"
}
return names[relayIdleState]
}
const (
CLOSED RelayIdleState = iota
OPEN
)
//TODO: enumeration //TODO: enumeration
type RelayMode int type RelayMode xsd.String
func (relayMode RelayMode) String() string {
names := [...]string{
"Monostable",
"Bistable",
}
if relayMode < MONOSTABLE || relayMode > BISTABLE {
return "Unknown"
}
return names[relayMode]
}
const (
MONOSTABLE RelayMode = iota
BISTABLE
)
//TODO: enumeration //TODO: enumeration
type RelayLogicalState int type RelayLogicalState xsd.String
func (relayLogicalState RelayLogicalState) String() string {
names := [...]string{
"active",
"inactive",
}
if relayLogicalState < ACTIVE || relayLogicalState > INACTIVE {
return "Unknown"
}
return names[relayLogicalState]
}
const (
ACTIVE RelayLogicalState = iota
INACTIVE
)
type CertificateWithPrivateKey struct { type CertificateWithPrivateKey struct {
CertificateID xsd.Token `xml:"onvif:CertificateID"` CertificateID xsd.Token `xml:"onvif:CertificateID"`
@@ -2113,31 +1775,7 @@ type Dot11Status struct {
} }
//TODO: enumeration //TODO: enumeration
type Dot11SignalStrength int type Dot11SignalStrength xsd.String
func (dot11SignalStrength Dot11SignalStrength) String() string {
names := [...]string{
"None",
"Very Bad",
"Bad",
"Good",
"Very Good",
"Extended",
}
if dot11SignalStrength < NONE || dot11SignalStrength > EXTENDED_SIGNAL_STRENGHT {
return "Unknown"
}
return names[dot11SignalStrength]
}
const (
NONE Dot11SignalStrength = iota
VERYBAD
BAD
GOOD
VERYGOOD
EXTENDED_SIGNAL_STRENGHT
)
type Dot11AvailableNetworks struct { type Dot11AvailableNetworks struct {
@@ -2153,27 +1791,7 @@ type Dot11AvailableNetworks struct {
type Dot11AvailableNetworksExtension xsd.AnyType type Dot11AvailableNetworksExtension xsd.AnyType
//TODO: enumeration //TODO: enumeration
type Dot11AuthAndMangementSuite int type Dot11AuthAndMangementSuite xsd.String
func (dot11AuthAndMangementSuite Dot11AuthAndMangementSuite) String() string {
names := [...]string{
"None",
"Dot1X",
"PSK",
"Extended",
}
if dot11AuthAndMangementSuite < NONE_DOT11_SUITE || dot11AuthAndMangementSuite > EXTENDED_DOT11_SUITE {
return "Unknown"
}
return names[dot11AuthAndMangementSuite]
}
const (
NONE_DOT11_SUITE Dot11AuthAndMangementSuite = iota
DOT1X_DOT11_SUITE
PSK_DOT11_SUITE
EXTENDED_DOT11_SUITE
)
type SystemLogUriList struct { type SystemLogUriList struct {
SystemLog SystemLogUri SystemLog SystemLogUri