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
|
||||
case "GetRelayOutputs":
|
||||
return &device.GetRelayOutputs{}, nil
|
||||
case "GetDigitalInputs":
|
||||
return &device.GetDigitalInputs{}, nil
|
||||
case "SetRelayOutputSettings":
|
||||
return &device.SetRelayOutputSettings{}, nil
|
||||
case "SetRelayOutputState":
|
||||
|
@@ -341,6 +341,15 @@ func (_ *GetRelayOutputsFunction) Response() interface{} {
|
||||
return &GetRelayOutputsResponse{}
|
||||
}
|
||||
|
||||
type GetDigitalInputsFunction struct{}
|
||||
|
||||
func (_ *GetDigitalInputsFunction) Request() interface{} {
|
||||
return &GetDigitalInputs{}
|
||||
}
|
||||
func (_ *GetDigitalInputsFunction) Response() interface{} {
|
||||
return &GetDigitalInputsResponse{}
|
||||
}
|
||||
|
||||
type GetRemoteDiscoveryModeFunction struct{}
|
||||
|
||||
func (_ *GetRemoteDiscoveryModeFunction) Request() interface{} {
|
||||
|
@@ -683,6 +683,14 @@ type GetRelayOutputsResponse struct {
|
||||
RelayOutputs onvif.RelayOutput
|
||||
}
|
||||
|
||||
type GetDigitalInputs struct {
|
||||
XMLName string `xml:"tmd:GetDigitalInputs"`
|
||||
}
|
||||
|
||||
type GetDigitalInputsResponse struct {
|
||||
DigitalInputs onvif.DigitalInput
|
||||
}
|
||||
|
||||
type SetRelayOutputSettings struct {
|
||||
XMLName string `xml:"tds:SetRelayOutputSettings"`
|
||||
RelayOutputToken onvif.ReferenceToken `xml:"tds:RelayOutputToken"`
|
||||
|
@@ -341,6 +341,15 @@ func (_ *GetRelayOutputsFunction) Response() interface{} {
|
||||
return &GetRelayOutputsResponse{}
|
||||
}
|
||||
|
||||
type GetDigitalInputsFunction struct{}
|
||||
|
||||
func (_ *GetDigitalInputsFunction) Request() interface{} {
|
||||
return &GetDigitalInputs{}
|
||||
}
|
||||
func (_ *GetDigitalInputsFunction) Response() interface{} {
|
||||
return &GetDigitalInputsResponse{}
|
||||
}
|
||||
|
||||
type GetRemoteDiscoveryModeFunction struct{}
|
||||
|
||||
func (_ *GetRemoteDiscoveryModeFunction) Request() interface{} {
|
||||
|
@@ -683,6 +683,14 @@ type GetRelayOutputsResponse struct {
|
||||
RelayOutputs onvif.RelayOutput
|
||||
}
|
||||
|
||||
type GetDigitalInputs struct {
|
||||
XMLName string `xml:"tmd:GetDigitalInputs"`
|
||||
}
|
||||
|
||||
type GetDigitalInputsResponse struct {
|
||||
DigitalInputs onvif.DigitalInput
|
||||
}
|
||||
|
||||
type SetRelayOutputSettings struct {
|
||||
XMLName string `xml:"tds:SetRelayOutputSettings"`
|
||||
RelayOutputToken onvif.ReferenceToken `xml:"tds:RelayOutputToken"`
|
||||
|
@@ -166,6 +166,7 @@ type QueryExpression QueryExpressionType
|
||||
|
||||
// TopicExpressionType struct for wsnt:TopicExpression
|
||||
type TopicExpressionType struct { //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
|
||||
Dialect xsd.String `xml:"Dialect,attr"`
|
||||
TopicKinds xsd.String `xml:",chardata"`
|
||||
}
|
||||
|
||||
|
@@ -72,6 +72,7 @@ var DeviceFunctionMap = map[string]Function{
|
||||
GetNetworkProtocols: &device.GetNetworkProtocolsFunction{},
|
||||
GetPkcs10Request: &device.GetPkcs10RequestFunction{},
|
||||
GetRelayOutputs: &device.GetRelayOutputsFunction{},
|
||||
GetDigitalInputs: &device.GetDigitalInputsFunction{},
|
||||
GetRemoteDiscoveryMode: &device.GetRemoteDiscoveryModeFunction{},
|
||||
GetRemoteUser: &device.GetRemoteUserFunction{},
|
||||
GetScopes: &device.GetScopesFunction{},
|
||||
|
1
names.go
1
names.go
@@ -75,6 +75,7 @@ const (
|
||||
GetNetworkProtocols = "GetNetworkProtocols"
|
||||
GetPkcs10Request = "GetPkcs10Request"
|
||||
GetRelayOutputs = "GetRelayOutputs"
|
||||
GetDigitalInputs = "GetDigitalInputs"
|
||||
GetRemoteDiscoveryMode = "GetRemoteDiscoveryMode"
|
||||
GetRemoteUser = "GetRemoteUser"
|
||||
GetScopes = "GetScopes"
|
||||
|
@@ -1839,6 +1839,17 @@ type RelayOutputSettings struct {
|
||||
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
|
||||
type RelayIdleState xsd.String
|
||||
|
||||
|
Reference in New Issue
Block a user