diff --git a/deviceio.go b/deviceio.go index cdc7924..0184f8a 100644 --- a/deviceio.go +++ b/deviceio.go @@ -144,16 +144,16 @@ type DigitalInputConfigurationOptions struct { // VideoOutputConfiguration represents a video output configuration. type VideoOutputConfiguration struct { - Token string - Name string - UseCount int - OutputToken string + Token string + Name string + UseCount int + OutputToken string ForcePersistence bool } // VideoOutputConfigurationOptions represents video output configuration options. type VideoOutputConfigurationOptions struct { - Name StringRange + Name StringRange OutputTokensAvailable []string } @@ -165,10 +165,10 @@ type StringRange struct { // RelayOutputOptions represents relay output configuration options. type RelayOutputOptions struct { - Token string - Mode []RelayMode - DelayTimes []string - Discrete bool + Token string + Mode []RelayMode + DelayTimes []string + Discrete bool } // getDeviceIOEndpoint returns the device IO endpoint. @@ -818,18 +818,18 @@ func (c *Client) SetVideoOutputConfiguration(ctx context.Context, config *VideoO endpoint := c.getDeviceIOEndpoint() type VideoOutputConfigurationXML struct { - Token string `xml:"token,attr"` - Name string `xml:"tt:Name"` - UseCount int `xml:"tt:UseCount"` - OutputToken string `xml:"tt:OutputToken"` + Token string `xml:"token,attr"` + Name string `xml:"tt:Name"` + UseCount int `xml:"tt:UseCount"` + OutputToken string `xml:"tt:OutputToken"` } type SetVideoOutputConfiguration struct { - XMLName xml.Name `xml:"tmd:SetVideoOutputConfiguration"` - Xmlns string `xml:"xmlns:tmd,attr"` - XmlnsTT string `xml:"xmlns:tt,attr"` - Configuration VideoOutputConfigurationXML `xml:"tmd:Configuration"` - ForcePersistence bool `xml:"tmd:ForcePersistence"` + XMLName xml.Name `xml:"tmd:SetVideoOutputConfiguration"` + Xmlns string `xml:"xmlns:tmd,attr"` + XmlnsTT string `xml:"xmlns:tt,attr"` + Configuration VideoOutputConfigurationXML `xml:"tmd:Configuration"` + ForcePersistence bool `xml:"tmd:ForcePersistence"` } type SetVideoOutputConfigurationResponse struct { diff --git a/event.go b/event.go index 540f2f4..85809fc 100644 --- a/event.go +++ b/event.go @@ -86,27 +86,27 @@ type Topic struct { // EventBrokerConfig represents an event broker configuration. type EventBrokerConfig struct { - Address string - TopicPrefix string - UserName string - Password string - CertificateID string - PublishFilter string - QoS int - Status string + Address string + TopicPrefix string + UserName string + Password string + CertificateID string + PublishFilter string + QoS int + Status string CertPathValidation bool - MetadataFilter string + MetadataFilter string } // EventProperties represents the event properties of the device. type EventProperties struct { - TopicNamespaceLocation []string - FixedTopicSet bool - TopicSet TopicSet - TopicExpressionDialects []string - MessageContentFilterDialects []string + TopicNamespaceLocation []string + FixedTopicSet bool + TopicSet TopicSet + TopicExpressionDialects []string + MessageContentFilterDialects []string ProducerPropertiesFilterDialects []string - MessageContentSchemaLocation []string + MessageContentSchemaLocation []string } // getEventEndpoint returns the event endpoint, falling back to the default endpoint if not set. @@ -540,13 +540,13 @@ func (c *Client) GetEventProperties(ctx context.Context) (*EventProperties, erro } type GetEventPropertiesResponse struct { - XMLName xml.Name `xml:"GetEventPropertiesResponse"` - TopicNamespaceLocation []string `xml:"TopicNamespaceLocation"` - FixedTopicSet bool `xml:"FixedTopicSet"` - TopicExpressionDialect []string `xml:"TopicExpressionDialect"` - MessageContentFilterDialect []string `xml:"MessageContentFilterDialect"` - ProducerPropertiesFilterDialect []string `xml:"ProducerPropertiesFilterDialect"` - MessageContentSchemaLocation []string `xml:"MessageContentSchemaLocation"` + XMLName xml.Name `xml:"GetEventPropertiesResponse"` + TopicNamespaceLocation []string `xml:"TopicNamespaceLocation"` + FixedTopicSet bool `xml:"FixedTopicSet"` + TopicExpressionDialect []string `xml:"TopicExpressionDialect"` + MessageContentFilterDialect []string `xml:"MessageContentFilterDialect"` + ProducerPropertiesFilterDialect []string `xml:"ProducerPropertiesFilterDialect"` + MessageContentSchemaLocation []string `xml:"MessageContentSchemaLocation"` } req := GetEventProperties{ @@ -599,8 +599,8 @@ func (c *Client) AddEventBroker(ctx context.Context, config *EventBrokerConfig) } type AddEventBroker struct { - XMLName xml.Name `xml:"tev:AddEventBroker"` - Xmlns string `xml:"xmlns:tev,attr"` + XMLName xml.Name `xml:"tev:AddEventBroker"` + Xmlns string `xml:"xmlns:tev,attr"` EventBrokerConfig EventBrokerConfigXML `xml:"tev:EventBrokerConfig"` } @@ -776,4 +776,3 @@ func splitSpaceSeparated(s string) []string { return result } - diff --git a/event_test.go b/event_test.go index 97b7f4d..c4e5963 100644 --- a/event_test.go +++ b/event_test.go @@ -736,4 +736,3 @@ func TestSetEventEndpoint(t *testing.T) { t.Errorf("Expected event endpoint %s, got %s", newEndpoint, endpoint) } } - diff --git a/examples/test-event-deviceio/main.go b/examples/test-event-deviceio/main.go index 685b8e2..165f508 100644 --- a/examples/test-event-deviceio/main.go +++ b/examples/test-event-deviceio/main.go @@ -233,4 +233,3 @@ func testDeviceIOService(ctx context.Context, client *onvif.Client) { } } } -