mirror of
https://github.com/kerberos-io/onvif.git
synced 2025-10-06 00:06:52 +08:00
inputs method added
This commit is contained in:
@@ -201,6 +201,8 @@ func getDeviceStructByName(name string) (interface{}, error) {
|
|||||||
return &device.SetClientCertificateMode{}, nil
|
return &device.SetClientCertificateMode{}, nil
|
||||||
case "GetRelayOutputs":
|
case "GetRelayOutputs":
|
||||||
return &device.GetRelayOutputs{}, nil
|
return &device.GetRelayOutputs{}, nil
|
||||||
|
case "GetDigitalInputs":
|
||||||
|
return &device.GetDigitalInputs{}, nil
|
||||||
case "SetRelayOutputSettings":
|
case "SetRelayOutputSettings":
|
||||||
return &device.SetRelayOutputSettings{}, nil
|
return &device.SetRelayOutputSettings{}, nil
|
||||||
case "SetRelayOutputState":
|
case "SetRelayOutputState":
|
||||||
|
@@ -341,6 +341,15 @@ func (_ *GetRelayOutputsFunction) Response() interface{} {
|
|||||||
return &GetRelayOutputsResponse{}
|
return &GetRelayOutputsResponse{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetDigitalInputsFunction struct{}
|
||||||
|
|
||||||
|
func (_ *GetDigitalInputsFunction) Request() interface{} {
|
||||||
|
return &GetDigitalInputs{}
|
||||||
|
}
|
||||||
|
func (_ *GetDigitalInputsFunction) Response() interface{} {
|
||||||
|
return &GetDigitalInputsResponse{}
|
||||||
|
}
|
||||||
|
|
||||||
type GetRemoteDiscoveryModeFunction struct{}
|
type GetRemoteDiscoveryModeFunction struct{}
|
||||||
|
|
||||||
func (_ *GetRemoteDiscoveryModeFunction) Request() interface{} {
|
func (_ *GetRemoteDiscoveryModeFunction) Request() interface{} {
|
||||||
|
@@ -683,6 +683,14 @@ type GetRelayOutputsResponse struct {
|
|||||||
RelayOutputs onvif.RelayOutput
|
RelayOutputs onvif.RelayOutput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetDigitalInputs struct {
|
||||||
|
XMLName string `xml:"tmd:GetDigitalInputs"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetDigitalInputsResponse struct {
|
||||||
|
DigitalInputs onvif.DigitalInput
|
||||||
|
}
|
||||||
|
|
||||||
type SetRelayOutputSettings struct {
|
type SetRelayOutputSettings struct {
|
||||||
XMLName string `xml:"tds:SetRelayOutputSettings"`
|
XMLName string `xml:"tds:SetRelayOutputSettings"`
|
||||||
RelayOutputToken onvif.ReferenceToken `xml:"tds:RelayOutputToken"`
|
RelayOutputToken onvif.ReferenceToken `xml:"tds:RelayOutputToken"`
|
||||||
|
@@ -341,6 +341,15 @@ func (_ *GetRelayOutputsFunction) Response() interface{} {
|
|||||||
return &GetRelayOutputsResponse{}
|
return &GetRelayOutputsResponse{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetDigitalInputsFunction struct{}
|
||||||
|
|
||||||
|
func (_ *GetDigitalInputsFunction) Request() interface{} {
|
||||||
|
return &GetDigitalInputs{}
|
||||||
|
}
|
||||||
|
func (_ *GetDigitalInputsFunction) Response() interface{} {
|
||||||
|
return &GetDigitalInputsResponse{}
|
||||||
|
}
|
||||||
|
|
||||||
type GetRemoteDiscoveryModeFunction struct{}
|
type GetRemoteDiscoveryModeFunction struct{}
|
||||||
|
|
||||||
func (_ *GetRemoteDiscoveryModeFunction) Request() interface{} {
|
func (_ *GetRemoteDiscoveryModeFunction) Request() interface{} {
|
||||||
|
@@ -683,6 +683,14 @@ type GetRelayOutputsResponse struct {
|
|||||||
RelayOutputs onvif.RelayOutput
|
RelayOutputs onvif.RelayOutput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetDigitalInputs struct {
|
||||||
|
XMLName string `xml:"tmd:GetDigitalInputs"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetDigitalInputsResponse struct {
|
||||||
|
DigitalInputs onvif.DigitalInput
|
||||||
|
}
|
||||||
|
|
||||||
type SetRelayOutputSettings struct {
|
type SetRelayOutputSettings struct {
|
||||||
XMLName string `xml:"tds:SetRelayOutputSettings"`
|
XMLName string `xml:"tds:SetRelayOutputSettings"`
|
||||||
RelayOutputToken onvif.ReferenceToken `xml:"tds:RelayOutputToken"`
|
RelayOutputToken onvif.ReferenceToken `xml:"tds:RelayOutputToken"`
|
||||||
|
@@ -166,6 +166,7 @@ type QueryExpression QueryExpressionType
|
|||||||
|
|
||||||
// TopicExpressionType struct for wsnt:TopicExpression
|
// TopicExpressionType struct for wsnt:TopicExpression
|
||||||
type TopicExpressionType struct { //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
|
type TopicExpressionType struct { //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
|
||||||
|
Dialect xsd.String `xml:"Dialect,attr"`
|
||||||
TopicKinds xsd.String `xml:",chardata"`
|
TopicKinds xsd.String `xml:",chardata"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -72,6 +72,7 @@ var DeviceFunctionMap = map[string]Function{
|
|||||||
GetNetworkProtocols: &device.GetNetworkProtocolsFunction{},
|
GetNetworkProtocols: &device.GetNetworkProtocolsFunction{},
|
||||||
GetPkcs10Request: &device.GetPkcs10RequestFunction{},
|
GetPkcs10Request: &device.GetPkcs10RequestFunction{},
|
||||||
GetRelayOutputs: &device.GetRelayOutputsFunction{},
|
GetRelayOutputs: &device.GetRelayOutputsFunction{},
|
||||||
|
GetDigitalInputs: &device.GetDigitalInputsFunction{},
|
||||||
GetRemoteDiscoveryMode: &device.GetRemoteDiscoveryModeFunction{},
|
GetRemoteDiscoveryMode: &device.GetRemoteDiscoveryModeFunction{},
|
||||||
GetRemoteUser: &device.GetRemoteUserFunction{},
|
GetRemoteUser: &device.GetRemoteUserFunction{},
|
||||||
GetScopes: &device.GetScopesFunction{},
|
GetScopes: &device.GetScopesFunction{},
|
||||||
|
1
names.go
1
names.go
@@ -75,6 +75,7 @@ const (
|
|||||||
GetNetworkProtocols = "GetNetworkProtocols"
|
GetNetworkProtocols = "GetNetworkProtocols"
|
||||||
GetPkcs10Request = "GetPkcs10Request"
|
GetPkcs10Request = "GetPkcs10Request"
|
||||||
GetRelayOutputs = "GetRelayOutputs"
|
GetRelayOutputs = "GetRelayOutputs"
|
||||||
|
GetDigitalInputs = "GetDigitalInputs"
|
||||||
GetRemoteDiscoveryMode = "GetRemoteDiscoveryMode"
|
GetRemoteDiscoveryMode = "GetRemoteDiscoveryMode"
|
||||||
GetRemoteUser = "GetRemoteUser"
|
GetRemoteUser = "GetRemoteUser"
|
||||||
GetScopes = "GetScopes"
|
GetScopes = "GetScopes"
|
||||||
|
@@ -1839,6 +1839,17 @@ type RelayOutputSettings struct {
|
|||||||
IdleState RelayIdleState `xml:"IdleState"`
|
IdleState RelayIdleState `xml:"IdleState"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type DigitalInput struct {
|
||||||
|
Token ReferenceToken `xml:"token,attr"`
|
||||||
|
IdleState InputIdleState `xml:"IdleState,attr"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO:enumeration
|
||||||
|
type InputToken xsd.String
|
||||||
|
|
||||||
|
// TODO:enumeration
|
||||||
|
type InputIdleState xsd.String
|
||||||
|
|
||||||
// TODO:enumeration
|
// TODO:enumeration
|
||||||
type RelayIdleState xsd.String
|
type RelayIdleState xsd.String
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user