forked from use-go/onvif
-
Notifications
You must be signed in to change notification settings - Fork 2
/
types.go
290 lines (228 loc) · 8.3 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
package ptz
//go:generate python3 ../python/gen_commands.py
import (
"github.com/kerberos-io/onvif/xsd"
"github.com/kerberos-io/onvif/xsd/onvif"
)
type Capabilities struct {
EFlip xsd.Boolean `xml:"EFlip,attr"`
Reverse xsd.Boolean `xml:"Reverse,attr"`
GetCompatibleConfigurations xsd.Boolean `xml:"GetCompatibleConfigurations,attr"`
MoveStatus xsd.Boolean `xml:"MoveStatus,attr"`
StatusPosition xsd.Boolean `xml:"StatusPosition,attr"`
}
//PTZ main types
type GetServiceCapabilities struct {
XMLName string `xml:"tptz:GetServiceCapabilities"`
}
type GetServiceCapabilitiesResponse struct {
Capabilities Capabilities
}
type GetNodes struct {
XMLName string `xml:"tptz:GetNodes"`
}
type GetNodesResponse struct {
PTZNode []onvif.PTZNode
}
type GetNode struct {
XMLName string `xml:"tptz:GetNode"`
NodeToken onvif.ReferenceToken `xml:"tptz:NodeToken"`
}
type GetNodeResponse struct {
PTZNode onvif.PTZNode
}
type GetConfiguration struct {
XMLName string `xml:"tptz:GetConfiguration"`
PTZConfigurationToken onvif.ReferenceToken `xml:"tptz:PTZConfigurationToken"`
}
type GetConfigurationResponse struct {
PTZConfiguration onvif.PTZConfiguration
}
type GetConfigurations struct {
XMLName string `xml:"tptz:GetConfigurations"`
}
type GetConfigurationsResponse struct {
PTZConfiguration []onvif.PTZConfiguration
}
type SetConfiguration struct {
XMLName string `xml:"tptz:SetConfiguration"`
PTZConfiguration onvif.PTZConfiguration `xml:"tptz:PTZConfiguration"`
ForcePersistence xsd.Boolean `xml:"tptz:ForcePersistence"`
}
type SetConfigurationResponse struct {
}
type GetConfigurationOptions struct {
XMLName string `xml:"tptz:GetConfigurationOptions"`
ConfigurationToken onvif.ReferenceToken `xml:"tptz:ConfigurationToken"`
}
type GetConfigurationOptionsResponse struct {
PTZConfigurationOptions onvif.PTZConfigurationOptions
}
type SendAuxiliaryCommand struct {
XMLName string `xml:"tptz:SendAuxiliaryCommand"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
AuxiliaryData onvif.AuxiliaryData `xml:"tptz:AuxiliaryData"`
}
type SendAuxiliaryCommandResponse struct {
AuxiliaryResponse onvif.AuxiliaryData
}
type GetPresets struct {
XMLName string `xml:"tptz:GetPresets"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
}
type GetPresetsResponse struct {
Preset []onvif.PTZPreset
}
type SetPreset struct {
XMLName string `xml:"tptz:SetPreset"`
ProfileToken *onvif.ReferenceToken `xml:"tptz:ProfileToken,omitempty"`
PresetName *xsd.String `xml:"tptz:PresetName,omitempty"`
PresetToken *onvif.ReferenceToken `xml:"tptz:PresetToken,omitempty"`
}
type SetPresetResponse struct {
PresetToken onvif.ReferenceToken
}
type RemovePreset struct {
XMLName string `xml:"tptz:RemovePreset"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
PresetToken onvif.ReferenceToken `xml:"tptz:PresetToken"`
}
type RemovePresetResponse struct {
}
type GotoPreset struct {
XMLName string `xml:"tptz:GotoPreset,omitempty"`
ProfileToken *onvif.ReferenceToken `xml:"tptz:ProfileToken,omitempty"`
PresetToken *onvif.ReferenceToken `xml:"tptz:PresetToken,omitempty"`
Speed *onvif.PTZSpeed `xml:"tptz:Speed,omitempty"`
}
type GotoPresetResponse struct {
}
type GotoHomePosition struct {
XMLName string `xml:"tptz:GotoHomePosition"`
ProfileToken *onvif.ReferenceToken `xml:"tptz:ProfileToken,omitempty"`
Speed *onvif.PTZSpeed `xml:"tptz:Speed,omitempty"`
}
type GotoHomePositionResponse struct {
}
type SetHomePosition struct {
XMLName string `xml:"tptz:SetHomePosition"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
}
type SetHomePositionResponse struct {
}
type ContinuousMove struct {
XMLName string `xml:"tptz:ContinuousMove"`
ProfileToken *onvif.ReferenceToken `xml:"tptz:ProfileToken,omitempty"`
Velocity onvif.PTZSpeed `xml:"tptz:Velocity,omitempty"`
Timeout *xsd.Duration `xml:"tptz:Timeout,omitempty"`
}
type ContinuousMoveResponse struct {
}
type RelativeMove struct {
XMLName string `xml:"tptz:RelativeMove"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
Translation Vector `json:",omitempty" xml:"tptz:Translation,omitempty"`
Speed Speed `json:",omitempty" xml:"tptz:Speed,omitempty"`
}
type RelativeMoveResponse struct {
}
type GetStatus struct {
XMLName string `xml:"tptz:GetStatus"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
}
type GetStatusResponse struct {
PTZStatus onvif.PTZStatus
}
type AbsoluteMove struct {
XMLName string `xml:"tptz:AbsoluteMove"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
Position onvif.PTZVector `xml:"tptz:Position"`
Speed onvif.PTZSpeed `xml:"tptz:Speed"`
}
type Vector struct {
PanTilt *onvif.Vector2D `json:",omitempty" xml:"onvif:PanTilt,omitempty"`
Zoom *onvif.Vector1D `json:",omitempty" xml:"onvif:Zoom,omitempty"`
}
type Speed struct {
PanTilt *onvif.Vector2D `json:",omitempty" xml:"onvif:PanTilt,omitempty"`
Zoom *onvif.Vector1D `json:",omitempty" xml:"onvif:Zoom,omitempty"`
}
type AbsoluteMoveResponse struct {
}
type GeoMove struct {
XMLName string `xml:"tptz:GeoMove"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
Target onvif.GeoLocation `xml:"tptz:Target"`
Speed onvif.PTZSpeed `xml:"tptz:Speed"`
AreaHeight xsd.Float `xml:"tptz:AreaHeight"`
AreaWidth xsd.Float `xml:"tptz:AreaWidth"`
}
type GeoMoveResponse struct {
}
type Stop struct {
XMLName string `xml:"tptz:Stop"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
PanTilt xsd.Boolean `xml:"tptz:PanTilt"`
Zoom xsd.Boolean `xml:"tptz:Zoom"`
}
type StopResponse struct {
}
type GetPresetTours struct {
XMLName string `xml:"tptz:GetPresetTours"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
}
type GetPresetToursResponse struct {
PresetTour onvif.PresetTour
}
type GetPresetTour struct {
XMLName string `xml:"tptz:GetPresetTour"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
PresetTourToken onvif.ReferenceToken `xml:"tptz:PresetTourToken"`
}
type GetPresetTourResponse struct {
PresetTour onvif.PresetTour
}
type GetPresetTourOptions struct {
XMLName string `xml:"tptz:GetPresetTourOptions"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
PresetTourToken onvif.ReferenceToken `xml:"tptz:PresetTourToken"`
}
type GetPresetTourOptionsResponse struct {
Options onvif.PTZPresetTourOptions
}
type CreatePresetTour struct {
XMLName string `xml:"tptz:CreatePresetTour"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
}
type CreatePresetTourResponse struct {
PresetTourToken onvif.ReferenceToken
}
type ModifyPresetTour struct {
XMLName string `xml:"tptz:ModifyPresetTour"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
PresetTour onvif.PresetTour `xml:"tptz:PresetTour"`
}
type ModifyPresetTourResponse struct {
}
type OperatePresetTour struct {
XMLName string `xml:"tptz:OperatePresetTour"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
PresetTourToken onvif.ReferenceToken `xml:"onvif:PresetTourToken"`
Operation onvif.PTZPresetTourOperation `xml:"onvif:Operation"`
}
type OperatePresetTourResponse struct {
}
type RemovePresetTour struct {
XMLName string `xml:"tptz:RemovePresetTour"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
PresetTourToken onvif.ReferenceToken `xml:"tptz:PresetTourToken"`
}
type RemovePresetTourResponse struct {
}
type GetCompatibleConfigurations struct {
XMLName string `xml:"tptz:GetCompatibleConfigurations"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
}
type GetCompatibleConfigurationsResponse struct {
PTZConfiguration onvif.PTZConfiguration
}