rasn_h282/
lib.rs

1#![doc = include_str!("../README.md")]
2#![no_std]
3
4use rasn::prelude::*;
5
6#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
7#[rasn(automatic_tags, identifier = "SEQUENCE")]
8pub struct AnonymousAudioInputsCapabilityAvailableDevices {
9    #[rasn(identifier = "deviceClass")]
10    pub device_class: DeviceClass,
11    #[rasn(identifier = "deviceIdentifier")]
12    pub device_identifier: DeviceID,
13}
14
15impl AnonymousAudioInputsCapabilityAvailableDevices {
16    pub fn new(device_class: DeviceClass, device_identifier: DeviceID) -> Self {
17        Self {
18            device_class,
19            device_identifier,
20        }
21    }
22}
23
24#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
25#[rasn(delegate, size("2..=64"))]
26pub struct AudioInputsCapabilityAvailableDevices(
27    pub SetOf<AnonymousAudioInputsCapabilityAvailableDevices>,
28);
29
30#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
31#[rasn(automatic_tags)]
32pub struct AudioInputsCapability {
33    #[rasn(value("2..=64"), identifier = "numberOfDeviceInputs")]
34    pub number_of_device_inputs: u8,
35    #[rasn(size("2..=64"), identifier = "availableDevices")]
36    pub available_devices: Option<SetOf<AudioInputsCapabilityAvailableDevices>>,
37}
38
39impl AudioInputsCapability {
40    pub fn new(
41        number_of_device_inputs: u8,
42        available_devices: Option<SetOf<AudioInputsCapabilityAvailableDevices>>,
43    ) -> Self {
44        Self {
45            number_of_device_inputs,
46            available_devices,
47        }
48    }
49}
50
51#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
52#[rasn(delegate, value("1..=255"))]
53pub struct AutoSlideDisplayTime(pub u8);
54
55#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
56#[rasn(choice, automatic_tags)]
57pub enum AutoSlideShowControl {
58    Start,
59    Stop,
60    Pause,
61}
62
63#[doc = " 100ths of a degree/sec"]
64#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
65#[rasn(delegate, value("0..=255"))]
66pub struct BackLight(pub u8);
67
68#[doc = " Anonymous SET OF member "]
69#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
70#[rasn(automatic_tags, identifier = "SEQUENCE")]
71pub struct AnonymousCameraFilterCapabilityFilterTextLabel {
72    #[rasn(value("1..=255"), identifier = "filterNumber")]
73    pub filter_number: u8,
74    #[rasn(identifier = "filterTextLabel")]
75    pub filter_text_label: DeviceText,
76}
77
78impl AnonymousCameraFilterCapabilityFilterTextLabel {
79    pub fn new(filter_number: u8, filter_text_label: DeviceText) -> Self {
80        Self {
81            filter_number,
82            filter_text_label,
83        }
84    }
85}
86
87#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
88#[rasn(delegate, size("0..=255"))]
89pub struct CameraFilterCapabilityFilterTextLabel(
90    pub SetOf<AnonymousCameraFilterCapabilityFilterTextLabel>,
91);
92
93#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
94#[rasn(automatic_tags)]
95pub struct CameraFilterCapability {
96    #[rasn(value("2..=255"), identifier = "maxNumberOfFilters")]
97    pub max_number_of_filters: u8,
98    #[rasn(size("0..=255"), identifier = "filterTextLabel")]
99    pub filter_text_label: Option<SetOf<CameraFilterCapabilityFilterTextLabel>>,
100}
101
102impl CameraFilterCapability {
103    pub fn new(
104        max_number_of_filters: u8,
105        filter_text_label: Option<SetOf<CameraFilterCapabilityFilterTextLabel>>,
106    ) -> Self {
107        Self {
108            max_number_of_filters,
109            filter_text_label,
110        }
111    }
112}
113
114#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
115#[rasn(delegate, value("1..=255"))]
116pub struct CameraFilterNumber(pub u8);
117
118#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
119#[rasn(choice, automatic_tags)]
120pub enum CameraFocusedToLimit {
121    Near,
122    Far,
123}
124
125#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
126#[rasn(automatic_tags, identifier = "SEQUENCE")]
127pub struct AnonymousCameraLensCapabilityAccessoryTextLabel {
128    #[rasn(value("1..=255"), identifier = "lensNumber")]
129    pub lens_number: u8,
130    #[rasn(identifier = "lensTextLabel")]
131    pub lens_text_label: DeviceText,
132}
133
134impl AnonymousCameraLensCapabilityAccessoryTextLabel {
135    pub fn new(lens_number: u8, lens_text_label: DeviceText) -> Self {
136        Self {
137            lens_number,
138            lens_text_label,
139        }
140    }
141}
142
143#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
144#[rasn(delegate, size("0..=255"))]
145pub struct CameraLensCapabilityAccessoryTextLabel(
146    pub SetOf<AnonymousCameraLensCapabilityAccessoryTextLabel>,
147);
148
149#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
150#[rasn(automatic_tags)]
151pub struct CameraLensCapability {
152    #[rasn(value("2..=255"), identifier = "maxNumberOfLens")]
153    pub max_number_of_lens: u8,
154    #[rasn(size("0..=255"), identifier = "accessoryTextLabel")]
155    pub accessory_text_label: Option<SetOf<CameraLensCapabilityAccessoryTextLabel>>,
156}
157
158impl CameraLensCapability {
159    pub fn new(
160        max_number_of_lens: u8,
161        accessory_text_label: Option<SetOf<CameraLensCapabilityAccessoryTextLabel>>,
162    ) -> Self {
163        Self {
164            max_number_of_lens,
165            accessory_text_label,
166        }
167    }
168}
169
170#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
171#[rasn(delegate, value("1..=255"))]
172pub struct CameraLensNumber(pub u8);
173
174#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
175#[rasn(delegate, value("1..=18000"))]
176pub struct CameraPanSpeed(pub u16);
177
178#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
179#[rasn(automatic_tags)]
180pub struct CameraPanSpeedCapability {
181    #[rasn(identifier = "maxSpeed")]
182    pub max_speed: CameraPanSpeed,
183    #[rasn(identifier = "minSpeed")]
184    pub min_speed: CameraPanSpeed,
185    #[rasn(identifier = "speedStepSize")]
186    pub speed_step_size: CameraPanSpeed,
187}
188impl CameraPanSpeedCapability {
189    pub fn new(
190        max_speed: CameraPanSpeed,
191        min_speed: CameraPanSpeed,
192        speed_step_size: CameraPanSpeed,
193    ) -> Self {
194        Self {
195            max_speed,
196            min_speed,
197            speed_step_size,
198        }
199    }
200}
201
202#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
203#[rasn(choice, automatic_tags)]
204pub enum CameraPannedToLimit {
205    Left,
206    Right,
207}
208
209/// 100ths of a degree/sec
210#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
211#[rasn(delegate, value("1..=18000"))]
212pub struct CameraTiltSpeed(pub u16);
213
214#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
215#[rasn(automatic_tags)]
216pub struct CameraTiltSpeedCapability {
217    #[rasn(identifier = "maxSpeed")]
218    pub max_speed: CameraTiltSpeed,
219    #[rasn(identifier = "minSpeed")]
220    pub min_speed: CameraTiltSpeed,
221    #[rasn(identifier = "speedStepSize")]
222    pub speed_step_size: CameraTiltSpeed,
223}
224impl CameraTiltSpeedCapability {
225    pub fn new(
226        max_speed: CameraTiltSpeed,
227        min_speed: CameraTiltSpeed,
228        speed_step_size: CameraTiltSpeed,
229    ) -> Self {
230        Self {
231            max_speed,
232            min_speed,
233            speed_step_size,
234        }
235    }
236}
237
238#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
239#[rasn(choice, automatic_tags)]
240pub enum CameraTiltedToLimit {
241    Up,
242    Down,
243}
244
245#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
246#[rasn(choice, automatic_tags)]
247pub enum CameraZoomedToLimit {
248    Telescopic,
249    Wide,
250}
251
252#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
253#[rasn(choice, automatic_tags)]
254pub enum CapabilityID {
255    #[rasn(value("0..=65535"))]
256    Standard(u16),
257    NonStandard(Key),
258}
259
260#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
261#[rasn(automatic_tags)]
262#[non_exhaustive]
263pub struct ConfigureDeviceEventsRequest {
264    #[rasn(identifier = "requestHandle")]
265    pub request_handle: Handle,
266    #[rasn(identifier = "deviceClass")]
267    pub device_class: DeviceClass,
268    #[rasn(identifier = "deviceID")]
269    pub device_id: DeviceID,
270    #[rasn(identifier = "deviceEventIdentifierList")]
271    pub device_event_identifier_list: SetOf<DeviceEventIdentifier>,
272}
273impl ConfigureDeviceEventsRequest {
274    pub fn new(
275        request_handle: Handle,
276        device_class: DeviceClass,
277        device_id: DeviceID,
278        device_event_identifier_list: SetOf<DeviceEventIdentifier>,
279    ) -> Self {
280        Self {
281            request_handle,
282            device_class,
283            device_id,
284            device_event_identifier_list,
285        }
286    }
287}
288
289#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
290#[rasn(choice, automatic_tags)]
291#[non_exhaustive]
292pub enum ConfigureDeviceEventsResponseResult {
293    Successful,
294    RequestDenied,
295    UnknownDevice,
296    DeviceUnavailable,
297    DeviceAttributeError,
298}
299
300#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
301#[rasn(automatic_tags)]
302#[non_exhaustive]
303pub struct ConfigureDeviceEventsResponse {
304    #[rasn(identifier = "requestHandle")]
305    pub request_handle: Handle,
306    pub result: ConfigureDeviceEventsResponseResult,
307}
308impl ConfigureDeviceEventsResponse {
309    pub fn new(request_handle: Handle, result: ConfigureDeviceEventsResponseResult) -> Self {
310        Self {
311            request_handle,
312            result,
313        }
314    }
315}
316
317#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
318#[rasn(choice, automatic_tags)]
319#[non_exhaustive]
320pub enum ControlAttribute {
321    SetDeviceState(DeviceState),
322    SetDeviceDate(DeviceDate),
323    SetDeviceTime(DeviceTime),
324    SetDevicePreset(DevicePreset),
325    SetIrisMode(Mode),
326    SetFocusMode(Mode),
327    SetBackLightMode(Mode),
328    SetPointingMode(PointingToggle),
329    SelectCameraLens(CameraLensNumber),
330    SelectCameraFilter(CameraFilterNumber),
331    GotoHomePosition,
332    SelectExternalLight(SelectExternalLight),
333    ClearCameraLens,
334    SetCameraPanSpeed(CameraPanSpeed),
335    SetCameraTiltSpeed(CameraTiltSpeed),
336    SetBackLight(BackLight),
337    SetWhiteBalance(WhiteBalance),
338    SetWhiteBalanceMode(Mode),
339    CalibrateWhiteBalance,
340    FocusImage,
341    CaptureImage,
342    PanContinuous(PanContinuous),
343    TiltContinuous(TiltContinuous),
344    ZoomContinuous(ZoomContinuous),
345    FocusContinuous(FocusContinuous),
346    SetZoomPosition(SetZoomPosition),
347    SetFocusPosition(SetFocusPosition),
348    SetIrisPosition(SetIrisPosition),
349    SetPanPosition(SetPanPosition),
350    SetTiltPosition(SetTiltPosition),
351    SetZoomMagnification(ZoomMagnification),
352    SetPanView(PanView),
353    SetTiltView(TiltView),
354    SelectSlide(SlideNumber),
355    SelectNextSlide(SelectDirection),
356    PlayAutoSlideShow(AutoSlideShowControl),
357    SetAutoSlideDisplayTime(AutoSlideDisplayTime),
358    ContinuousRewindControl(bool),
359    ContinuousFastForwardControl(bool),
360    SearchBackwardsControl(bool),
361    SearchForwardsControl(bool),
362    Pause(bool),
363    SelectProgram(ProgramNumber),
364    NextProgramSelect(SelectDirection),
365    GotoNormalPlayTimePoint(ProgramDuration),
366    ContinuousPlayBackMode(bool),
367    SetPlaybackSpeed(PlaybackSpeed),
368    Play(bool),
369    SetAudioOutputMute(bool),
370    PlayToNormalPlayTimePoint(ProgramDuration),
371    Record(bool),
372    RecordForDuration(RecordForDuration),
373    ConfigureVideoInputs(DeviceInputs),
374    ConfigureAudioInputs(DeviceInputs),
375    NonStandardControl(NonStandardParameter),
376}
377
378#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
379#[rasn(choice, automatic_tags)]
380pub enum CurrentAudioOutputMute {
381    Mute(bool),
382    Unknown,
383}
384
385#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
386#[rasn(choice, automatic_tags)]
387pub enum CurrentAutoSlideDisplayTime {
388    Time(AutoSlideDisplayTime),
389    Unknown,
390}
391
392#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
393#[rasn(choice, automatic_tags)]
394pub enum CurrentBackLight {
395    BackLight(BackLight),
396    Unknown,
397}
398
399#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
400#[rasn(choice, automatic_tags)]
401pub enum CurrentCameraFilterNumber {
402    LensNumber(CameraFilterNumber),
403    Unknown,
404}
405
406#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
407#[rasn(choice, automatic_tags)]
408pub enum CurrentCameraLensNumber {
409    LensNumber(CameraLensNumber),
410    Unknown,
411}
412
413#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
414#[rasn(choice, automatic_tags)]
415pub enum CurrentCameraPanSpeed {
416    Speed(CameraPanSpeed),
417    Unknown,
418}
419
420#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
421#[rasn(choice, automatic_tags)]
422pub enum CurrentCameraTiltSpeed {
423    Speed(CameraTiltSpeed),
424    Unknown,
425}
426
427#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
428#[rasn(choice, automatic_tags)]
429pub enum CurrentDeviceDateCurrentDay {
430    Day(Day),
431    Unknown,
432}
433
434#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
435#[rasn(choice, automatic_tags)]
436pub enum CurrentDeviceDateCurrentMonth {
437    Month(Month),
438    Unknown,
439}
440
441#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
442#[rasn(choice, automatic_tags)]
443pub enum CurrentDeviceDateCurrentYear {
444    Year(Year),
445    Unknown,
446}
447
448#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
449#[rasn(automatic_tags)]
450pub struct CurrentDeviceDate {
451    #[rasn(identifier = "currentDay")]
452    pub current_day: CurrentDeviceDateCurrentDay,
453    #[rasn(identifier = "currentMonth")]
454    pub current_month: CurrentDeviceDateCurrentMonth,
455    #[rasn(identifier = "currentYear")]
456    pub current_year: CurrentDeviceDateCurrentYear,
457}
458impl CurrentDeviceDate {
459    pub fn new(
460        current_day: CurrentDeviceDateCurrentDay,
461        current_month: CurrentDeviceDateCurrentMonth,
462        current_year: CurrentDeviceDateCurrentYear,
463    ) -> Self {
464        Self {
465            current_day,
466            current_month,
467            current_year,
468        }
469    }
470}
471
472#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
473#[rasn(choice, automatic_tags)]
474pub enum CurrentDevicePreset {
475    Preset(PresetNumber),
476    Unknown,
477}
478
479#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
480#[rasn(choice, automatic_tags)]
481pub enum CurrentDeviceState {
482    DeviceState(DeviceState),
483    Unknown,
484}
485
486#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
487#[rasn(choice, automatic_tags)]
488pub enum CurrentDeviceTimeCurrentHour {
489    Hour(Hour),
490    Unknown,
491}
492
493#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
494#[rasn(choice, automatic_tags)]
495pub enum CurrentDeviceTimeCurrentMinute {
496    Minute(Minute),
497    Unknown,
498}
499
500#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
501#[rasn(automatic_tags)]
502pub struct CurrentDeviceTime {
503    #[rasn(identifier = "currentHour")]
504    pub current_hour: CurrentDeviceTimeCurrentHour,
505    #[rasn(identifier = "currentMinute")]
506    pub current_minute: CurrentDeviceTimeCurrentMinute,
507}
508impl CurrentDeviceTime {
509    pub fn new(
510        current_hour: CurrentDeviceTimeCurrentHour,
511        current_minute: CurrentDeviceTimeCurrentMinute,
512    ) -> Self {
513        Self {
514            current_hour,
515            current_minute,
516        }
517    }
518}
519
520#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
521#[rasn(choice, automatic_tags)]
522pub enum CurrentExternalLight {
523    #[rasn(value("1..=10"))]
524    LightNumber(u8),
525    None,
526    Unknown,
527}
528
529#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
530#[rasn(choice, automatic_tags)]
531pub enum CurrentFocusPosition {
532    FocusPosition(FocusPosition),
533    Unknown,
534}
535
536#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
537#[rasn(choice, automatic_tags)]
538pub enum CurrentIrisPosition {
539    IrisPosition(IrisPosition),
540    Unknown,
541}
542
543#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
544#[rasn(choice, automatic_tags)]
545pub enum CurrentMode {
546    Mode(Mode),
547    Unknown,
548}
549
550#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
551#[rasn(choice, automatic_tags)]
552pub enum CurrentPanPosition {
553    PanPosition(PanPosition),
554    Unknown,
555}
556
557#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
558#[rasn(choice, automatic_tags)]
559pub enum CurrentPlaybackSpeed {
560    Speed(PlaybackSpeed),
561    Unknown,
562}
563
564#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
565#[rasn(choice, automatic_tags)]
566pub enum CurrentPointingMode {
567    Automatic,
568    Manual,
569    Unknown,
570}
571
572#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
573#[rasn(choice, automatic_tags)]
574pub enum CurrentSelectedProgram {
575    Program(ProgramNumber),
576    Unknown,
577}
578
579#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
580#[rasn(choice, automatic_tags)]
581pub enum CurrentSlide {
582    Slide(SlideNumber),
583    Unknown,
584}
585
586#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
587#[rasn(choice, automatic_tags)]
588pub enum CurrentStreamPlayerState {
589    State(StreamPlayerState),
590    Unknown,
591}
592
593#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
594#[rasn(choice, automatic_tags)]
595pub enum CurrentTiltPosition {
596    TiltPosition(TiltPosition),
597    Unknown,
598}
599
600#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
601#[rasn(choice, automatic_tags)]
602pub enum CurrentWhiteBalance {
603    WhiteBalance(WhiteBalance),
604    Unknown,
605}
606
607#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
608#[rasn(choice, automatic_tags)]
609pub enum CurrentZoomPosition {
610    ZoomPosition(ZoomPosition),
611    Unknown,
612}
613
614#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
615#[rasn(delegate, value("1..=31"))]
616pub struct Day(pub u8);
617
618#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
619#[rasn(choice, automatic_tags)]
620#[non_exhaustive]
621pub enum DeviceAttribute {
622    DeviceStateSupported,
623    DeviceDateSupported,
624    DeviceTimeSupported,
625    DevicePresetSupported(DevicePresetCapability),
626    IrisModeSupported,
627    FocusModeSupported,
628    PointingModeSupported,
629    CameraLensSupported(CameraLensCapability),
630    CameraFilterSupported(CameraFilterCapability),
631    HomePositionSupported,
632    ExternalCameraLightSupported(ExternalCameraLightCapability),
633    ClearCameraLensSupported,
634    CameraPanSpeedSupported(CameraPanSpeedCapability),
635    CameraTiltSpeedSupported(CameraTiltSpeedCapability),
636    BackLightModeSupported,
637    BackLightSettingSupported(MaxBacklight),
638    WhiteBalanceSettingSupported(MaxWhiteBalance),
639    WhiteBalanceModeSupported,
640    CalibrateWhiteBalanceSupported,
641    FocusImageSupported,
642    CaptureImageSupported,
643    PanContinuousSupported,
644    TiltContinuousSupported,
645    ZoomContinuousSupported,
646    FocusContinuousSupported,
647    IrisContinuousSupported,
648    ZoomPositionSupported(MinZoomPositionSetSize),
649    FocusPositionSupported(MinFocusPositionStepSize),
650    IrisPositionSupported(MinIrisPositionStepSize),
651    PanPositionSupported(PanPositionCapability),
652    TiltPositionSupported(TiltPositionCapability),
653    ZoomMagnificationSupported(MinZoomMagnificationStepSize),
654    PanViewSupported,
655    TiltViewSupported,
656    SelectSlideSupported(MaxNumberOfSlides),
657    SelectNextSlideSupported,
658    SlideShowModeSupported,
659    PlaySlideShowSupported,
660    SetSlideDisplayTimeSupported(MaxSlideDisplayTime),
661    ContinuousRewindSupported,
662    ContinuousFastForwardSupported,
663    SearchBackwardsSupported,
664    SearchForwardsSupported,
665    PauseSupported,
666    SelectProgramSupported(MaxNumberOfPrograms),
667    NextProgramSupported,
668    GotoNormalPlayTimePointSupported,
669    ReadStreamPlayerStateSupported,
670    ReadProgramDurationSupported,
671    ContinuousPlayBackModeSupported,
672    PlaybackSpeedSupported(PlayBackSpeedCapability),
673    PlaySupported,
674    SetAudioOutputStateSupported,
675    PlayToNormalPlayTimePointSupported,
676    RecordSupported,
677    RecordForDurationSupported,
678    ConfigurableVideoInputsSupported(VideoInputsCapability),
679    VideoInputsSupported(VideoInputsCapability),
680    ConfigurableAudioInputsSupported(AudioInputsCapability),
681    AudioInputsSupported(AudioInputsCapability),
682    DeviceLockStateChangedSupported,
683    DeviceAvailabilityChangedSupported,
684    CameraPannedToLimitSupported,
685    CameraTiltedToLimitSupported,
686    CameraZoomedToLimitSupported,
687    CameraFocusedToLimitSupported,
688    AutoSlideShowFinishedSupported,
689    StreamPlayerStateChangeSupported,
690    StreamPlayerProgramChangeSupported,
691    NonStandardAttributeSupported(NonStandardParameter),
692}
693
694#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
695#[rasn(automatic_tags)]
696#[non_exhaustive]
697pub struct DeviceAttributeRequest {
698    #[rasn(identifier = "requestHandle")]
699    pub request_handle: Handle,
700    #[rasn(identifier = "deviceClass")]
701    pub device_class: DeviceClass,
702    #[rasn(identifier = "deviceID")]
703    pub device_id: DeviceID,
704}
705impl DeviceAttributeRequest {
706    pub fn new(request_handle: Handle, device_class: DeviceClass, device_id: DeviceID) -> Self {
707        Self {
708            request_handle,
709            device_class,
710            device_id,
711        }
712    }
713}
714
715#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
716#[rasn(choice, automatic_tags)]
717#[non_exhaustive]
718pub enum DeviceAttributeResponseResult {
719    Successful,
720    RequestDenied,
721    UnknownDevice,
722}
723
724#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
725#[rasn(automatic_tags)]
726#[non_exhaustive]
727pub struct DeviceAttributeResponse {
728    #[rasn(identifier = "requestHandle")]
729    pub request_handle: Handle,
730    #[rasn(identifier = "deviceAttributeList")]
731    pub device_attribute_list: Option<SetOf<DeviceAttribute>>,
732    pub result: DeviceAttributeResponseResult,
733}
734impl DeviceAttributeResponse {
735    pub fn new(
736        request_handle: Handle,
737        device_attribute_list: Option<SetOf<DeviceAttribute>>,
738        result: DeviceAttributeResponseResult,
739    ) -> Self {
740        Self {
741            request_handle,
742            device_attribute_list,
743            result,
744        }
745    }
746}
747#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
748#[rasn(choice, automatic_tags)]
749pub enum DeviceClass {
750    Camera,
751    Microphone,
752    StreamPlayerRecorder,
753    SlideProjector,
754    LightSource,
755    SourceCombiner,
756    NonStandardDevice(NonStandardIdentifier),
757}
758
759#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
760#[rasn(automatic_tags)]
761#[non_exhaustive]
762pub struct DeviceControlRequest {
763    #[rasn(identifier = "requestHandle")]
764    pub request_handle: Handle,
765    #[rasn(identifier = "deviceClass")]
766    pub device_class: DeviceClass,
767    #[rasn(identifier = "deviceID")]
768    pub device_id: DeviceID,
769    #[rasn(size("1..=8"), identifier = "controlAttributeList")]
770    pub control_attribute_list: SetOf<ControlAttribute>,
771}
772impl DeviceControlRequest {
773    pub fn new(
774        request_handle: Handle,
775        device_class: DeviceClass,
776        device_id: DeviceID,
777        control_attribute_list: SetOf<ControlAttribute>,
778    ) -> Self {
779        Self {
780            request_handle,
781            device_class,
782            device_id,
783            control_attribute_list,
784        }
785    }
786}
787
788#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
789#[rasn(automatic_tags)]
790pub struct DeviceDate {
791    pub day: Day,
792    pub month: Month,
793    pub year: Year,
794}
795impl DeviceDate {
796    pub fn new(day: Day, month: Month, year: Year) -> Self {
797        Self { day, month, year }
798    }
799}
800
801#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
802#[rasn(choice, automatic_tags)]
803#[non_exhaustive]
804pub enum DeviceEvent {
805    DeviceLockChanged(bool),
806    DeviceAvailabilityChanged(bool),
807    CameraPannedToLimit(CameraPannedToLimit),
808    CameraTiltedToLimit(CameraTiltedToLimit),
809    CameraZoomedToLimit(CameraZoomedToLimit),
810    CameraFocusedToLimit(CameraFocusedToLimit),
811    AutoSlideShowFinished,
812    StreamPlayerStateChange(StreamPlayerState),
813    StreamPlayerProgramChange(ProgramNumber),
814    NonStandardEvent(NonStandardParameter),
815}
816
817#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
818#[rasn(choice, automatic_tags)]
819#[non_exhaustive]
820pub enum DeviceEventIdentifier {
821    RequestDeviceLockChanged,
822    RequestDeviceAvailabilityChanged,
823    RequestCameraPannedToLimit,
824    RequestCameraTiltedToLimit,
825    RequestCameraZoomedToLimit,
826    RequestCameraFocusedToLimit,
827    RequestAutoSlideShowFinished,
828    RequestStreamPlayerStateChange,
829    RequestStreamPlayerProgramChange,
830    RequestNonStandardEvent(NonStandardIdentifier),
831}
832
833#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
834#[rasn(automatic_tags)]
835#[non_exhaustive]
836pub struct DeviceEventNotifyIndication {
837    #[rasn(identifier = "deviceClass")]
838    pub device_class: DeviceClass,
839    #[rasn(identifier = "deviceID")]
840    pub device_id: DeviceID,
841    #[rasn(size("1..=8"), identifier = "deviceEventList")]
842    pub device_event_list: SetOf<DeviceEvent>,
843}
844impl DeviceEventNotifyIndication {
845    pub fn new(
846        device_class: DeviceClass,
847        device_id: DeviceID,
848        device_event_list: SetOf<DeviceEvent>,
849    ) -> Self {
850        Self {
851            device_class,
852            device_id,
853            device_event_list,
854        }
855    }
856}
857
858#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
859#[rasn(delegate, value("0..=127"))]
860pub struct DeviceID(pub u8);
861
862#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
863#[rasn(automatic_tags, identifier = "SEQUENCE")]
864pub struct AnonymousDeviceInputsInputDevices {
865    #[rasn(identifier = "deviceClass")]
866    pub device_class: DeviceClass,
867    #[rasn(identifier = "deviceIdentifier")]
868    pub device_identifier: DeviceID,
869}
870impl AnonymousDeviceInputsInputDevices {
871    pub fn new(device_class: DeviceClass, device_identifier: DeviceID) -> Self {
872        Self {
873            device_class,
874            device_identifier,
875        }
876    }
877}
878#[doc = " Inner type "]
879#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
880#[rasn(delegate, size("2..=64"))]
881pub struct DeviceInputsInputDevices(pub SetOf<AnonymousDeviceInputsInputDevices>);
882
883#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
884#[rasn(automatic_tags)]
885pub struct DeviceInputs {
886    #[rasn(size("2..=64"), identifier = "inputDevices")]
887    pub input_devices: SetOf<DeviceInputsInputDevices>,
888}
889
890impl DeviceInputs {
891    pub fn new(input_devices: SetOf<DeviceInputsInputDevices>) -> Self {
892        Self { input_devices }
893    }
894}
895
896#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
897#[rasn(automatic_tags)]
898#[non_exhaustive]
899pub struct DeviceLockEnquireRequest {
900    #[rasn(identifier = "requestHandle")]
901    pub request_handle: Handle,
902    #[rasn(identifier = "deviceClass")]
903    pub device_class: DeviceClass,
904    #[rasn(identifier = "deviceID")]
905    pub device_id: DeviceID,
906}
907impl DeviceLockEnquireRequest {
908    pub fn new(request_handle: Handle, device_class: DeviceClass, device_id: DeviceID) -> Self {
909        Self {
910            request_handle,
911            device_class,
912            device_id,
913        }
914    }
915}
916
917#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
918#[rasn(choice, automatic_tags)]
919#[non_exhaustive]
920pub enum DeviceLockEnquireResponseResult {
921    LockRequired,
922    LockNotRequired,
923    UnknownDevice,
924}
925
926#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
927#[rasn(automatic_tags)]
928#[non_exhaustive]
929pub struct DeviceLockEnquireResponse {
930    #[rasn(identifier = "requestHandle")]
931    pub request_handle: Handle,
932    pub result: DeviceLockEnquireResponseResult,
933}
934impl DeviceLockEnquireResponse {
935    pub fn new(request_handle: Handle, result: DeviceLockEnquireResponseResult) -> Self {
936        Self {
937            request_handle,
938            result,
939        }
940    }
941}
942
943#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
944#[rasn(automatic_tags)]
945#[non_exhaustive]
946pub struct DeviceLockRequest {
947    #[rasn(identifier = "requestHandle")]
948    pub request_handle: Handle,
949    #[rasn(identifier = "deviceClass")]
950    pub device_class: DeviceClass,
951    #[rasn(identifier = "deviceID")]
952    pub device_id: DeviceID,
953    #[rasn(identifier = "lockFlag")]
954    pub lock_flag: bool,
955}
956impl DeviceLockRequest {
957    pub fn new(
958        request_handle: Handle,
959        device_class: DeviceClass,
960        device_id: DeviceID,
961        lock_flag: bool,
962    ) -> Self {
963        Self {
964            request_handle,
965            device_class,
966            device_id,
967            lock_flag,
968        }
969    }
970}
971
972#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
973#[rasn(choice, automatic_tags)]
974#[non_exhaustive]
975pub enum DeviceLockResponseResult {
976    Successful,
977    RequestDenied,
978    UnknownDevice,
979    LockingNotSupported,
980    DeviceAlreadyLocked,
981}
982
983#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
984#[rasn(automatic_tags)]
985#[non_exhaustive]
986pub struct DeviceLockResponse {
987    #[rasn(identifier = "requestHandle")]
988    pub request_handle: Handle,
989    pub result: DeviceLockResponseResult,
990}
991impl DeviceLockResponse {
992    pub fn new(request_handle: Handle, result: DeviceLockResponseResult) -> Self {
993        Self {
994            request_handle,
995            result,
996        }
997    }
998}
999
1000#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1001#[rasn(automatic_tags)]
1002#[non_exhaustive]
1003pub struct DeviceLockTerminatedIndication {
1004    #[rasn(identifier = "deviceClass")]
1005    pub device_class: DeviceClass,
1006    #[rasn(identifier = "deviceID")]
1007    pub device_id: DeviceID,
1008}
1009impl DeviceLockTerminatedIndication {
1010    pub fn new(device_class: DeviceClass, device_id: DeviceID) -> Self {
1011        Self {
1012            device_class,
1013            device_id,
1014        }
1015    }
1016}
1017
1018#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1019#[rasn(choice, automatic_tags)]
1020pub enum DevicePresetMode {
1021    Store,
1022    Activate,
1023}
1024
1025#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1026#[rasn(automatic_tags)]
1027pub struct DevicePreset {
1028    #[rasn(identifier = "presetNumber")]
1029    pub preset_number: PresetNumber,
1030    pub mode: DevicePresetMode,
1031}
1032impl DevicePreset {
1033    pub fn new(preset_number: PresetNumber, mode: DevicePresetMode) -> Self {
1034        Self {
1035            preset_number,
1036            mode,
1037        }
1038    }
1039}
1040
1041#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1042#[rasn(automatic_tags, identifier = "SEQUENCE")]
1043pub struct AnonymousDevicePresetCapabilityPresetCapability {
1044    #[rasn(identifier = "presetNumber")]
1045    pub preset_number: PresetNumber,
1046    #[rasn(identifier = "storeModeSupported")]
1047    pub store_mode_supported: bool,
1048    #[rasn(identifier = "presetTextLabel")]
1049    pub preset_text_label: DeviceText,
1050}
1051impl AnonymousDevicePresetCapabilityPresetCapability {
1052    pub fn new(
1053        preset_number: PresetNumber,
1054        store_mode_supported: bool,
1055        preset_text_label: DeviceText,
1056    ) -> Self {
1057        Self {
1058            preset_number,
1059            store_mode_supported,
1060            preset_text_label,
1061        }
1062    }
1063}
1064
1065#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1066#[rasn(delegate, size("0..=255"))]
1067pub struct DevicePresetCapabilityPresetCapability(
1068    pub SetOf<AnonymousDevicePresetCapabilityPresetCapability>,
1069);
1070
1071#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1072#[rasn(automatic_tags)]
1073pub struct DevicePresetCapability {
1074    #[rasn(identifier = "maxNumber")]
1075    pub max_number: PresetNumber,
1076    #[rasn(size("0..=255"), identifier = "presetCapability")]
1077    pub preset_capability: Option<SetOf<DevicePresetCapabilityPresetCapability>>,
1078}
1079impl DevicePresetCapability {
1080    pub fn new(
1081        max_number: PresetNumber,
1082        preset_capability: Option<SetOf<DevicePresetCapabilityPresetCapability>>,
1083    ) -> Self {
1084        Self {
1085            max_number,
1086            preset_capability,
1087        }
1088    }
1089}
1090
1091#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1092#[rasn(automatic_tags)]
1093#[non_exhaustive]
1094pub struct DeviceProfile {
1095    #[rasn(identifier = "deviceID")]
1096    pub device_id: DeviceID,
1097    #[rasn(identifier = "audioSourceFlag")]
1098    pub audio_source_flag: bool,
1099    #[rasn(identifier = "audioSinkFlag")]
1100    pub audio_sink_flag: bool,
1101    #[rasn(identifier = "videoSourceFlag")]
1102    pub video_source_flag: bool,
1103    #[rasn(identifier = "videoSinkFlag")]
1104    pub video_sink_flag: bool,
1105    #[rasn(identifier = "remoteControlFlag")]
1106    pub remote_control_flag: bool,
1107    #[rasn(value("0..=255"), identifier = "instanceNumber")]
1108    pub instance_number: u8,
1109    #[rasn(identifier = "deviceName")]
1110    pub device_name: Option<TextString>,
1111}
1112impl DeviceProfile {
1113    #[allow(clippy::too_many_arguments)]
1114    pub fn new(
1115        device_id: DeviceID,
1116        audio_source_flag: bool,
1117        audio_sink_flag: bool,
1118        video_source_flag: bool,
1119        video_sink_flag: bool,
1120        remote_control_flag: bool,
1121        instance_number: u8,
1122        device_name: Option<TextString>,
1123    ) -> Self {
1124        Self {
1125            device_id,
1126            audio_source_flag,
1127            audio_sink_flag,
1128            video_source_flag,
1129            video_sink_flag,
1130            remote_control_flag,
1131            instance_number,
1132            device_name,
1133        }
1134    }
1135}
1136
1137#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1138#[rasn(choice, automatic_tags)]
1139pub enum DeviceState {
1140    Active,
1141    Inactive,
1142}
1143
1144#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1145#[rasn(automatic_tags)]
1146#[non_exhaustive]
1147pub struct DeviceStatusEnquireRequest {
1148    #[rasn(identifier = "requestHandle")]
1149    pub request_handle: Handle,
1150    #[rasn(identifier = "deviceClass")]
1151    pub device_class: DeviceClass,
1152    #[rasn(identifier = "deviceID")]
1153    pub device_id: DeviceID,
1154    #[rasn(size("1..=16"), identifier = "statusAttributeIdentifierList")]
1155    pub status_attribute_identifier_list: SetOf<StatusAttributeIdentifier>,
1156}
1157impl DeviceStatusEnquireRequest {
1158    pub fn new(
1159        request_handle: Handle,
1160        device_class: DeviceClass,
1161        device_id: DeviceID,
1162        status_attribute_identifier_list: SetOf<StatusAttributeIdentifier>,
1163    ) -> Self {
1164        Self {
1165            request_handle,
1166            device_class,
1167            device_id,
1168            status_attribute_identifier_list,
1169        }
1170    }
1171}
1172
1173#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1174#[rasn(choice, automatic_tags)]
1175#[non_exhaustive]
1176pub enum DeviceStatusEnquireResponseResult {
1177    Successful,
1178    RequestDenied,
1179    UnknownDevice,
1180    DeviceUnavailable,
1181    DeviceAttributeError,
1182}
1183
1184#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1185#[rasn(automatic_tags)]
1186#[non_exhaustive]
1187pub struct DeviceStatusEnquireResponse {
1188    #[rasn(identifier = "requestHandle")]
1189    pub request_handle: Handle,
1190    #[rasn(size("1..=16"), identifier = "statusAttributeList")]
1191    pub status_attribute_list: Option<SetOf<StatusAttribute>>,
1192    pub result: DeviceStatusEnquireResponseResult,
1193}
1194impl DeviceStatusEnquireResponse {
1195    pub fn new(
1196        request_handle: Handle,
1197        status_attribute_list: Option<SetOf<StatusAttribute>>,
1198        result: DeviceStatusEnquireResponseResult,
1199    ) -> Self {
1200        Self {
1201            request_handle,
1202            status_attribute_list,
1203            result,
1204        }
1205    }
1206}
1207
1208#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1209#[rasn(delegate, size("0..=32"))]
1210pub struct DeviceText(pub OctetString);
1211
1212#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1213#[rasn(automatic_tags)]
1214pub struct DeviceTime {
1215    pub hour: Hour,
1216    pub minute: Minute,
1217}
1218impl DeviceTime {
1219    pub fn new(hour: Hour, minute: Minute) -> Self {
1220        Self { hour, minute }
1221    }
1222}
1223
1224#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1225#[rasn(automatic_tags, identifier = "SEQUENCE")]
1226pub struct AnonymousExternalCameraLightCapabilityLightTextLabel {
1227    #[rasn(value("1..=10"), identifier = "lightNumber")]
1228    pub light_number: u8,
1229    #[rasn(identifier = "lightLabel")]
1230    pub light_label: DeviceText,
1231}
1232impl AnonymousExternalCameraLightCapabilityLightTextLabel {
1233    pub fn new(light_number: u8, light_label: DeviceText) -> Self {
1234        Self {
1235            light_number,
1236            light_label,
1237        }
1238    }
1239}
1240
1241#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1242#[rasn(delegate, size("0..=10"))]
1243pub struct ExternalCameraLightCapabilityLightTextLabel(
1244    pub SetOf<AnonymousExternalCameraLightCapabilityLightTextLabel>,
1245);
1246
1247#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1248#[rasn(automatic_tags)]
1249pub struct ExternalCameraLightCapability {
1250    #[rasn(value("1..=10"), identifier = "maxNumber")]
1251    pub max_number: u8,
1252    #[rasn(size("0..=10"), identifier = "lightTextLabel")]
1253    pub light_text_label: Option<SetOf<ExternalCameraLightCapabilityLightTextLabel>>,
1254}
1255impl ExternalCameraLightCapability {
1256    pub fn new(
1257        max_number: u8,
1258        light_text_label: Option<SetOf<ExternalCameraLightCapabilityLightTextLabel>>,
1259    ) -> Self {
1260        Self {
1261            max_number,
1262            light_text_label,
1263        }
1264    }
1265}
1266
1267#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1268#[rasn(choice, automatic_tags)]
1269pub enum FocusContinuousFocusDirection {
1270    Near,
1271    Far,
1272    Stop,
1273    Continue,
1274}
1275
1276#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1277#[rasn(automatic_tags)]
1278pub struct FocusContinuous {
1279    #[rasn(identifier = "focusDirection")]
1280    pub focus_direction: FocusContinuousFocusDirection,
1281    #[rasn(value("50..=1000"), identifier = "timeOut")]
1282    pub time_out: u16,
1283}
1284impl FocusContinuous {
1285    pub fn new(focus_direction: FocusContinuousFocusDirection, time_out: u16) -> Self {
1286        Self {
1287            focus_direction,
1288            time_out,
1289        }
1290    }
1291}
1292
1293#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1294#[rasn(delegate, value("-127..=127"))]
1295pub struct FocusPosition(pub i8);
1296
1297#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1298#[rasn(delegate, size("4..=255"))]
1299pub struct H221NonStandardIdentifier(pub OctetString);
1300
1301#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1302#[rasn(delegate, value("0..=4294967295"))]
1303pub struct Handle(pub u32);
1304
1305#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1306#[rasn(delegate, value("0..=23"))]
1307pub struct Hour(pub u8);
1308
1309#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1310#[rasn(choice, automatic_tags)]
1311#[non_exhaustive]
1312pub enum IndicationPdu {
1313    SourceChangeEventIndication(SourceChangeEventIndication),
1314    DeviceLockTerminatedIndication(DeviceLockTerminatedIndication),
1315    DeviceEventNotifyIndication(DeviceEventNotifyIndication),
1316    NonStandardIndication(NonStandardPdu),
1317}
1318
1319#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1320#[rasn(choice, automatic_tags)]
1321pub enum IrisContinuousIrisDirection {
1322    Darker,
1323    Lighter,
1324    Stop,
1325    Continue,
1326}
1327
1328#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1329#[rasn(automatic_tags)]
1330pub struct IrisContinuous {
1331    #[rasn(identifier = "irisDirection")]
1332    pub iris_direction: IrisContinuousIrisDirection,
1333    #[rasn(value("50..=1000"), identifier = "timeOut")]
1334    pub time_out: u16,
1335}
1336impl IrisContinuous {
1337    pub fn new(iris_direction: IrisContinuousIrisDirection, time_out: u16) -> Self {
1338        Self {
1339            iris_direction,
1340            time_out,
1341        }
1342    }
1343}
1344#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1345#[rasn(delegate, value("-127..=127"))]
1346pub struct IrisPosition(pub i8);
1347
1348#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1349#[rasn(choice, automatic_tags)]
1350pub enum Key {
1351    Object(ObjectIdentifier),
1352    H221NonStandard(H221NonStandardIdentifier),
1353}
1354
1355#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1356#[rasn(delegate, value("1..=255"))]
1357pub struct MaxBacklight(pub u8);
1358
1359#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1360#[rasn(delegate, value("1..=1023"))]
1361pub struct MaxNumberOfPrograms(pub u16);
1362
1363#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1364#[rasn(delegate, value("1..=1024"))]
1365pub struct MaxNumberOfSlides(pub u16);
1366
1367#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1368#[rasn(delegate, value("1..=255"))]
1369pub struct MaxSlideDisplayTime(pub u8);
1370
1371#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1372#[rasn(delegate, value("1..=255"))]
1373pub struct MaxWhiteBalance(pub u8);
1374
1375#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1376#[rasn(delegate, value("1..=127"))]
1377pub struct MinFocusPositionStepSize(pub u8);
1378
1379#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1380#[rasn(delegate, value("1..=127"))]
1381pub struct MinIrisPositionStepSize(pub u8);
1382
1383#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1384#[rasn(delegate, value("1..=1000"))]
1385pub struct MinZoomMagnificationStepSize(pub u16);
1386
1387#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1388#[rasn(delegate, value("1..=1023"))]
1389pub struct MinZoomPositionSetSize(pub u16);
1390
1391#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1392#[rasn(delegate, value("0..=59"))]
1393pub struct Minute(pub u8);
1394
1395#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1396#[rasn(choice, automatic_tags)]
1397pub enum Mode {
1398    Manual,
1399    Auto,
1400}
1401
1402#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1403#[rasn(delegate, value("1..=12"))]
1404pub struct Month(pub u8);
1405
1406#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1407#[rasn(choice, automatic_tags)]
1408pub enum AnonymousNonCollapsingCapabilitiesApplicationData {
1409    #[rasn(size("0..=127"))]
1410    DeviceList(SetOf<DeviceProfile>),
1411    #[rasn(size("0..=127"))]
1412    StreamList(SetOf<StreamProfile>),
1413}
1414
1415#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1416#[rasn(automatic_tags, identifier = "SEQUENCE")]
1417pub struct AnonymousNonCollapsingCapabilities {
1418    #[rasn(identifier = "capabilityID")]
1419    pub capability_id: CapabilityID,
1420    #[rasn(identifier = "applicationData")]
1421    pub application_data: AnonymousNonCollapsingCapabilitiesApplicationData,
1422}
1423impl AnonymousNonCollapsingCapabilities {
1424    pub fn new(
1425        capability_id: CapabilityID,
1426        application_data: AnonymousNonCollapsingCapabilitiesApplicationData,
1427    ) -> Self {
1428        Self {
1429            capability_id,
1430            application_data,
1431        }
1432    }
1433}
1434
1435#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1436#[rasn(delegate)]
1437pub struct NonCollapsingCapabilities(pub SetOf<AnonymousNonCollapsingCapabilities>);
1438
1439#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1440#[rasn(choice, automatic_tags)]
1441pub enum NonStandardIdentifier {
1442    Object(ObjectIdentifier),
1443    H221NonStandard(H221NonStandardIdentifier),
1444}
1445
1446#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1447#[rasn(automatic_tags)]
1448#[non_exhaustive]
1449pub struct NonStandardPdu {
1450    #[rasn(identifier = "nonStandardData")]
1451    pub non_standard_data: NonStandardParameter,
1452}
1453
1454impl NonStandardPdu {
1455    pub fn new(non_standard_data: NonStandardParameter) -> Self {
1456        Self { non_standard_data }
1457    }
1458}
1459
1460#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1461#[rasn(automatic_tags)]
1462pub struct NonStandardParameter {
1463    pub key: Key,
1464    pub data: OctetString,
1465}
1466impl NonStandardParameter {
1467    pub fn new(key: Key, data: OctetString) -> Self {
1468        Self { key, data }
1469    }
1470}
1471
1472#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1473#[rasn(choice, automatic_tags)]
1474pub enum PanContinuousPanDirection {
1475    Left,
1476    Right,
1477    Stop,
1478    Continue,
1479}
1480
1481#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1482#[rasn(automatic_tags)]
1483pub struct PanContinuous {
1484    #[rasn(identifier = "panDirection")]
1485    pub pan_direction: PanContinuousPanDirection,
1486    #[rasn(value("50..=1000"), identifier = "timeOut")]
1487    pub time_out: u16,
1488}
1489impl PanContinuous {
1490    pub fn new(pan_direction: PanContinuousPanDirection, time_out: u16) -> Self {
1491        Self {
1492            pan_direction,
1493            time_out,
1494        }
1495    }
1496}
1497
1498#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1499#[rasn(delegate, value("-18000..=18000"))]
1500pub struct PanPosition(pub i16);
1501
1502#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1503#[rasn(automatic_tags)]
1504pub struct PanPositionCapability {
1505    #[rasn(value("-18000..=0"), identifier = "maxLeft")]
1506    pub max_left: i16,
1507    #[rasn(value("0..=18000"), identifier = "maxRight")]
1508    pub max_right: u16,
1509    #[rasn(value("1..=18000"), identifier = "minStepSize")]
1510    pub min_step_size: u16,
1511}
1512impl PanPositionCapability {
1513    pub fn new(max_left: i16, max_right: u16, min_step_size: u16) -> Self {
1514        Self {
1515            max_left,
1516            max_right,
1517            min_step_size,
1518        }
1519    }
1520}
1521
1522#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1523#[rasn(delegate, value("-1000..=1000"))]
1524pub struct PanView(pub i16);
1525
1526#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1527#[rasn(automatic_tags)]
1528pub struct PlayBackSpeedCapability {
1529    #[rasn(size("1..=64"), identifier = "multiplierFactors")]
1530    pub multiplier_factors: SetOf<u16>,
1531    #[rasn(size("1..=64"), identifier = "divisorFactors")]
1532    pub divisor_factors: SetOf<u16>,
1533}
1534impl PlayBackSpeedCapability {
1535    pub fn new(multiplier_factors: SetOf<u16>, divisor_factors: SetOf<u16>) -> Self {
1536        Self {
1537            multiplier_factors,
1538            divisor_factors,
1539        }
1540    }
1541}
1542
1543#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1544#[rasn(automatic_tags)]
1545pub struct PlaybackSpeed {
1546    #[rasn(value("10..=1000"), identifier = "scaleFactor")]
1547    pub scale_factor: u16,
1548    #[rasn(identifier = "multiplyFactor")]
1549    pub multiply_factor: bool,
1550}
1551impl PlaybackSpeed {
1552    pub fn new(scale_factor: u16, multiply_factor: bool) -> Self {
1553        Self {
1554            scale_factor,
1555            multiply_factor,
1556        }
1557    }
1558}
1559
1560#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1561#[rasn(choice, automatic_tags)]
1562pub enum PointingToggle {
1563    Manual,
1564    Auto,
1565    Toggle,
1566}
1567
1568#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1569#[rasn(choice, automatic_tags)]
1570pub enum PositioningMode {
1571    Relative,
1572    Absolute,
1573}
1574
1575#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1576#[rasn(delegate, value("1..=255"))]
1577pub struct PresetNumber(pub u8);
1578
1579#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1580#[rasn(automatic_tags)]
1581pub struct ProgramDuration {
1582    #[rasn(value("0..=24"))]
1583    pub hours: u8,
1584    #[rasn(value("0..=59"))]
1585    pub minutes: u8,
1586    #[rasn(value("0..=59"))]
1587    pub seconds: u8,
1588    #[rasn(value("0..=99999"))]
1589    pub microseconds: u32,
1590}
1591impl ProgramDuration {
1592    pub fn new(hours: u8, minutes: u8, seconds: u8, microseconds: u32) -> Self {
1593        Self {
1594            hours,
1595            minutes,
1596            seconds,
1597            microseconds,
1598        }
1599    }
1600}
1601
1602#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1603#[rasn(delegate, value("1..=1023"))]
1604pub struct ProgramNumber(pub u16);
1605
1606#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1607#[rasn(choice, automatic_tags)]
1608pub enum RdcPdu {
1609    Request(RequestPdu),
1610    Response(ResponsePdu),
1611    Indication(IndicationPdu),
1612}
1613
1614#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1615#[rasn(automatic_tags)]
1616pub struct RecordForDuration {
1617    #[rasn(value("0..=24"))]
1618    pub hours: u8,
1619    #[rasn(value("0..=59"))]
1620    pub minutes: u8,
1621    #[rasn(value("0..=59"))]
1622    pub seconds: u8,
1623}
1624
1625impl RecordForDuration {
1626    pub fn new(hours: u8, minutes: u8, seconds: u8) -> Self {
1627        Self {
1628            hours,
1629            minutes,
1630            seconds,
1631        }
1632    }
1633}
1634
1635#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1636#[rasn(choice, automatic_tags)]
1637#[non_exhaustive]
1638pub enum RequestPdu {
1639    SourceSelectRequest(SourceSelectRequest),
1640    SourceEventsRequest(SourceEventsRequest),
1641    DeviceAttributeRequest(DeviceAttributeRequest),
1642    DeviceLockRequest(DeviceLockRequest),
1643    DeviceLockEnquireRequest(DeviceLockEnquireRequest),
1644    DeviceControlRequest(DeviceControlRequest),
1645    DeviceStatusEnquireRequest(DeviceStatusEnquireRequest),
1646    ConfigureDeviceEventsRequest(ConfigureDeviceEventsRequest),
1647    NonStandardRequest(NonStandardPdu),
1648}
1649
1650#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1651#[rasn(choice, automatic_tags)]
1652#[non_exhaustive]
1653pub enum ResponsePdu {
1654    SourceSelectResponse(SourceSelectResponse),
1655    SourceEventsResponse(SourceEventsResponse),
1656    DeviceAttributeResponse(DeviceAttributeResponse),
1657    DeviceLockResponse(DeviceLockResponse),
1658    DeviceLockEnquireResponse(DeviceLockEnquireResponse),
1659    DeviceStatusEnquireResponse(DeviceStatusEnquireResponse),
1660    ConfigureDeviceEventsResponse(ConfigureDeviceEventsResponse),
1661    NonStandardResponse(NonStandardPdu),
1662}
1663
1664#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1665#[rasn(choice, automatic_tags)]
1666pub enum SelectDirection {
1667    Next,
1668    Previous,
1669}
1670
1671#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1672#[rasn(choice, automatic_tags)]
1673pub enum SelectExternalLight {
1674    #[rasn(value("1..=10"))]
1675    LightNumber(u8),
1676    None,
1677}
1678
1679#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1680#[rasn(automatic_tags)]
1681pub struct SetFocusPosition {
1682    #[rasn(identifier = "focusPosition")]
1683    pub focus_position: FocusPosition,
1684    #[rasn(identifier = "positioningMode")]
1685    pub positioning_mode: PositioningMode,
1686}
1687impl SetFocusPosition {
1688    pub fn new(focus_position: FocusPosition, positioning_mode: PositioningMode) -> Self {
1689        Self {
1690            focus_position,
1691            positioning_mode,
1692        }
1693    }
1694}
1695
1696#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1697#[rasn(automatic_tags)]
1698pub struct SetIrisPosition {
1699    #[rasn(identifier = "irisPosition")]
1700    pub iris_position: IrisPosition,
1701    #[rasn(identifier = "positioningMode")]
1702    pub positioning_mode: PositioningMode,
1703}
1704impl SetIrisPosition {
1705    pub fn new(iris_position: IrisPosition, positioning_mode: PositioningMode) -> Self {
1706        Self {
1707            iris_position,
1708            positioning_mode,
1709        }
1710    }
1711}
1712
1713#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1714#[rasn(automatic_tags)]
1715pub struct SetPanPosition {
1716    #[rasn(identifier = "panPosition")]
1717    pub pan_position: PanPosition,
1718    #[rasn(identifier = "positioningMode")]
1719    pub positioning_mode: PositioningMode,
1720}
1721impl SetPanPosition {
1722    pub fn new(pan_position: PanPosition, positioning_mode: PositioningMode) -> Self {
1723        Self {
1724            pan_position,
1725            positioning_mode,
1726        }
1727    }
1728}
1729
1730#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1731#[rasn(automatic_tags)]
1732pub struct SetTiltPosition {
1733    #[rasn(identifier = "tiltPosition")]
1734    pub tilt_position: TiltPosition,
1735    #[rasn(identifier = "positioningMode")]
1736    pub positioning_mode: PositioningMode,
1737}
1738impl SetTiltPosition {
1739    pub fn new(tilt_position: TiltPosition, positioning_mode: PositioningMode) -> Self {
1740        Self {
1741            tilt_position,
1742            positioning_mode,
1743        }
1744    }
1745}
1746
1747#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1748#[rasn(automatic_tags)]
1749pub struct SetZoomPosition {
1750    #[rasn(identifier = "zoomPosition")]
1751    pub zoom_position: ZoomPosition,
1752    #[rasn(identifier = "positioningMode")]
1753    pub positioning_mode: PositioningMode,
1754}
1755impl SetZoomPosition {
1756    pub fn new(zoom_position: ZoomPosition, positioning_mode: PositioningMode) -> Self {
1757        Self {
1758            zoom_position,
1759            positioning_mode,
1760        }
1761    }
1762}
1763
1764#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1765#[rasn(delegate, value("0..=1023"))]
1766pub struct SlideNumber(pub u16);
1767
1768#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1769#[rasn(automatic_tags)]
1770#[non_exhaustive]
1771pub struct SourceChangeEventIndication {
1772    #[rasn(identifier = "deviceClass")]
1773    pub device_class: DeviceClass,
1774    #[rasn(identifier = "deviceID")]
1775    pub device_id: DeviceID,
1776}
1777impl SourceChangeEventIndication {
1778    pub fn new(device_class: DeviceClass, device_id: DeviceID) -> Self {
1779        Self {
1780            device_class,
1781            device_id,
1782        }
1783    }
1784}
1785
1786#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1787#[rasn(automatic_tags)]
1788#[non_exhaustive]
1789pub struct SourceEventsRequest {
1790    #[rasn(identifier = "requestHandle")]
1791    pub request_handle: Handle,
1792    #[rasn(identifier = "streamIdentifier")]
1793    pub stream_identifier: StreamID,
1794    #[rasn(identifier = "sourceEventNotify")]
1795    pub source_event_notify: bool,
1796}
1797impl SourceEventsRequest {
1798    pub fn new(
1799        request_handle: Handle,
1800        stream_identifier: StreamID,
1801        source_event_notify: bool,
1802    ) -> Self {
1803        Self {
1804            request_handle,
1805            stream_identifier,
1806            source_event_notify,
1807        }
1808    }
1809}
1810
1811#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1812#[rasn(choice, automatic_tags)]
1813#[non_exhaustive]
1814pub enum SourceEventsResponseResult {
1815    Successful,
1816    EventsNotSupported,
1817    InvalidStreamID,
1818}
1819
1820#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1821#[rasn(automatic_tags)]
1822#[non_exhaustive]
1823pub struct SourceEventsResponse {
1824    #[rasn(identifier = "requestHandle")]
1825    pub request_handle: Handle,
1826    #[rasn(identifier = "deviceClass")]
1827    pub device_class: DeviceClass,
1828    #[rasn(identifier = "deviceID")]
1829    pub device_id: DeviceID,
1830    pub result: SourceEventsResponseResult,
1831}
1832impl SourceEventsResponse {
1833    pub fn new(
1834        request_handle: Handle,
1835        device_class: DeviceClass,
1836        device_id: DeviceID,
1837        result: SourceEventsResponseResult,
1838    ) -> Self {
1839        Self {
1840            request_handle,
1841            device_class,
1842            device_id,
1843            result,
1844        }
1845    }
1846}
1847
1848#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1849#[rasn(automatic_tags)]
1850#[non_exhaustive]
1851pub struct SourceSelectRequest {
1852    #[rasn(identifier = "requestHandle")]
1853    pub request_handle: Handle,
1854    #[rasn(identifier = "deviceClass")]
1855    pub device_class: DeviceClass,
1856    #[rasn(identifier = "deviceID")]
1857    pub device_id: DeviceID,
1858    #[rasn(identifier = "streamIdentifier")]
1859    pub stream_identifier: StreamID,
1860}
1861impl SourceSelectRequest {
1862    pub fn new(
1863        request_handle: Handle,
1864        device_class: DeviceClass,
1865        device_id: DeviceID,
1866        stream_identifier: StreamID,
1867    ) -> Self {
1868        Self {
1869            request_handle,
1870            device_class,
1871            device_id,
1872            stream_identifier,
1873        }
1874    }
1875}
1876
1877#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1878#[rasn(choice, automatic_tags)]
1879#[non_exhaustive]
1880pub enum SourceSelectResponseResult {
1881    Successful,
1882    RequestDenied,
1883    DeviceUnavailable,
1884    InvalidStreamID,
1885    CurrentDeviceIsLocked,
1886    DeviceIncompatible,
1887}
1888
1889#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1890#[rasn(automatic_tags)]
1891#[non_exhaustive]
1892pub struct SourceSelectResponse {
1893    #[rasn(identifier = "requestHandle")]
1894    pub request_handle: Handle,
1895    pub result: SourceSelectResponseResult,
1896}
1897impl SourceSelectResponse {
1898    pub fn new(request_handle: Handle, result: SourceSelectResponseResult) -> Self {
1899        Self {
1900            request_handle,
1901            result,
1902        }
1903    }
1904}
1905
1906#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1907#[rasn(choice, automatic_tags)]
1908#[non_exhaustive]
1909pub enum StatusAttribute {
1910    CurrentdeviceState(CurrentDeviceState),
1911    CurrentDeviceDate(CurrentDeviceDate),
1912    CurrentDeviceTime(CurrentDeviceTime),
1913    CurrentDevicePreset(CurrentDevicePreset),
1914    CurrentIrisMode(CurrentMode),
1915    CurrentFocusMode(CurrentMode),
1916    CurrentBackLightMode(CurrentMode),
1917    CurrentPointingMode(CurrentPointingMode),
1918    CurrentCameraLens(CurrentCameraLensNumber),
1919    CurrentCameraFilter(CurrentCameraFilterNumber),
1920    CurrentExternalLight(CurrentExternalLight),
1921    CurrentCameraPanSpeed(CurrentCameraPanSpeed),
1922    CurrentCameraTiltSpeed(CurrentCameraTiltSpeed),
1923    CurrentBackLight(CurrentBackLight),
1924    CurrentWhiteBalance(CurrentWhiteBalance),
1925    CurrentWhiteBalanceMode(CurrentMode),
1926    CurrentZoomPosition(CurrentZoomPosition),
1927    CurrentFocusPosition(CurrentFocusPosition),
1928    CurrentIrisPosition(CurrentIrisPosition),
1929    CurrentPanPosition(CurrentPanPosition),
1930    CurrentTiltPosition(CurrentTiltPosition),
1931    CurrentSlide(CurrentSlide),
1932    CurrentAutoSlideDisplayTime(CurrentAutoSlideDisplayTime),
1933    CurrentSelectedProgram(CurrentSelectedProgram),
1934    CurrentstreamPlayerState(CurrentStreamPlayerState),
1935    CurrentProgramDuration(ProgramDuration),
1936    CurrentPlaybackSpeed(CurrentPlaybackSpeed),
1937    CurrentAudioOutputMute(CurrentAudioOutputMute),
1938    ConfigurableVideoInputs(DeviceInputs),
1939    VideoInputs(DeviceInputs),
1940    ConfigurableAudioInputs(DeviceInputs),
1941    AudioInputs(DeviceInputs),
1942    NonStandardStatus(NonStandardParameter),
1943}
1944
1945#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1946#[rasn(choice, automatic_tags)]
1947#[non_exhaustive]
1948pub enum StatusAttributeIdentifier {
1949    GetDeviceState,
1950    GetDeviceDate,
1951    GetDeviceTime,
1952    GetdevicePreset,
1953    GetIrisMode,
1954    GetFocusMode,
1955    GetBacklightMode,
1956    GetPointingMode,
1957    GetCameraLens,
1958    GetCameraFilter,
1959    GetExternalLight,
1960    GetCameraPanSpeed,
1961    GetCameraTiltSpeed,
1962    GetBackLightMode,
1963    GetBackLight,
1964    GetWhiteBalance,
1965    GetWhiteBalanceMode,
1966    GetZoomPosition,
1967    GetFocusPosition,
1968    GetIrisPosition,
1969    GetPanPosition,
1970    GetTiltPosition,
1971    GetSelectedSlide,
1972    GetAutoSlideDisplayTime,
1973    GetSelectedProgram,
1974    GetStreamPlayerState,
1975    GetCurrentProgramDuration,
1976    GetPlaybackSpeed,
1977    GetAudioOutputState,
1978    GetConfigurableVideoInputs,
1979    GetVideoInputs,
1980    GetConfigurableAudioInputs,
1981    GetAudioInputs,
1982    GetNonStandardStatus(NonStandardIdentifier),
1983}
1984
1985#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1986#[rasn(delegate, value("0..=65535"))]
1987pub struct StreamID(pub u16);
1988
1989#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
1990#[rasn(choice, automatic_tags)]
1991pub enum StreamPlayerState {
1992    Playing,
1993    Recording,
1994    PausedOnRecord,
1995    PausedOnPlay,
1996    Rewinding,
1997    FastForwarding,
1998    SearchingForwards,
1999    SearchingBackwards,
2000    Stopped,
2001    ProgramUnavailable,
2002}
2003
2004#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2005#[rasn(automatic_tags)]
2006#[non_exhaustive]
2007pub struct StreamProfile {
2008    #[rasn(identifier = "streamID")]
2009    pub stream_id: StreamID,
2010    #[rasn(identifier = "videoStreamFlag")]
2011    pub video_stream_flag: bool,
2012    #[rasn(identifier = "sourceChangeFlag")]
2013    pub source_change_flag: bool,
2014    #[rasn(identifier = "streamName")]
2015    pub stream_name: Option<TextString>,
2016}
2017impl StreamProfile {
2018    pub fn new(
2019        stream_id: StreamID,
2020        video_stream_flag: bool,
2021        source_change_flag: bool,
2022        stream_name: Option<TextString>,
2023    ) -> Self {
2024        Self {
2025            stream_id,
2026            video_stream_flag,
2027            source_change_flag,
2028            stream_name,
2029        }
2030    }
2031}
2032
2033#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2034#[rasn(delegate, size("0..=255"))]
2035pub struct TextString(pub BmpString);
2036
2037#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2038#[rasn(choice, automatic_tags)]
2039pub enum TiltContinuousTiltDirection {
2040    Up,
2041    Down,
2042    Stop,
2043    Continue,
2044}
2045
2046#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2047#[rasn(automatic_tags)]
2048pub struct TiltContinuous {
2049    #[rasn(identifier = "tiltDirection")]
2050    pub tilt_direction: TiltContinuousTiltDirection,
2051    #[rasn(value("50..=1000"), identifier = "timeOut")]
2052    pub time_out: u16,
2053}
2054impl TiltContinuous {
2055    pub fn new(tilt_direction: TiltContinuousTiltDirection, time_out: u16) -> Self {
2056        Self {
2057            tilt_direction,
2058            time_out,
2059        }
2060    }
2061}
2062
2063#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2064#[rasn(delegate, value("-18000..=18000"))]
2065pub struct TiltPosition(pub i16);
2066
2067#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2068#[rasn(automatic_tags)]
2069pub struct TiltPositionCapability {
2070    #[rasn(value("-18000..=0"), identifier = "maxDown")]
2071    pub max_down: i16,
2072    #[rasn(value("0..=18000"), identifier = "maxUp")]
2073    pub max_up: u16,
2074    #[rasn(value("1..=18000"), identifier = "minStepSize")]
2075    pub min_step_size: u16,
2076}
2077impl TiltPositionCapability {
2078    pub fn new(max_down: i16, max_up: u16, min_step_size: u16) -> Self {
2079        Self {
2080            max_down,
2081            max_up,
2082            min_step_size,
2083        }
2084    }
2085}
2086
2087#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2088#[rasn(delegate, value("-1000..=1000"))]
2089pub struct TiltView(pub i16);
2090#[doc = " Anonymous SET OF member "]
2091#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2092#[rasn(automatic_tags, identifier = "SEQUENCE")]
2093pub struct AnonymousVideoInputsCapabilityAvailableDevices {
2094    #[rasn(identifier = "deviceClass")]
2095    pub device_class: DeviceClass,
2096    #[rasn(identifier = "deviceIdentifier")]
2097    pub device_identifier: DeviceID,
2098}
2099impl AnonymousVideoInputsCapabilityAvailableDevices {
2100    pub fn new(device_class: DeviceClass, device_identifier: DeviceID) -> Self {
2101        Self {
2102            device_class,
2103            device_identifier,
2104        }
2105    }
2106}
2107
2108#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2109#[rasn(delegate, size("2..=64"))]
2110pub struct VideoInputsCapabilityAvailableDevices(
2111    pub SetOf<AnonymousVideoInputsCapabilityAvailableDevices>,
2112);
2113
2114#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2115#[rasn(automatic_tags)]
2116pub struct VideoInputsCapability {
2117    #[rasn(value("2..=64"), identifier = "numberOfDeviceInputs")]
2118    pub number_of_device_inputs: u8,
2119    #[rasn(value("1..=64"), identifier = "numberOfDeviceRows")]
2120    pub number_of_device_rows: u8,
2121    #[rasn(size("2..=64"), identifier = "availableDevices")]
2122    pub available_devices: Option<SetOf<VideoInputsCapabilityAvailableDevices>>,
2123}
2124impl VideoInputsCapability {
2125    pub fn new(
2126        number_of_device_inputs: u8,
2127        number_of_device_rows: u8,
2128        available_devices: Option<SetOf<VideoInputsCapabilityAvailableDevices>>,
2129    ) -> Self {
2130        Self {
2131            number_of_device_inputs,
2132            number_of_device_rows,
2133            available_devices,
2134        }
2135    }
2136}
2137
2138#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2139#[rasn(delegate, value("0..=255"))]
2140pub struct WhiteBalance(pub u8);
2141
2142#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2143#[rasn(delegate, value("1980..=2999"))]
2144pub struct Year(pub u16);
2145
2146#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2147#[rasn(choice, automatic_tags)]
2148pub enum ZoomContinuousZoomDirection {
2149    Telescopic,
2150    Wide,
2151    Stop,
2152    Continue,
2153}
2154
2155#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2156#[rasn(automatic_tags)]
2157pub struct ZoomContinuous {
2158    #[rasn(identifier = "zoomDirection")]
2159    pub zoom_direction: ZoomContinuousZoomDirection,
2160    #[rasn(value("50..=1000"), identifier = "timeOut")]
2161    pub time_out: u16,
2162}
2163impl ZoomContinuous {
2164    pub fn new(zoom_direction: ZoomContinuousZoomDirection, time_out: u16) -> Self {
2165        Self {
2166            zoom_direction,
2167            time_out,
2168        }
2169    }
2170}
2171
2172#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2173#[rasn(delegate, value("10..=1000"))]
2174pub struct ZoomMagnification(pub u16);
2175
2176#[derive(AsnType, Debug, Clone, Decode, Encode, PartialEq, Eq, Hash)]
2177#[rasn(delegate, value("-1023..=1023"))]
2178pub struct ZoomPosition(pub i16);