CameraAvStreamManagementTrait.ViewportStruct

class CameraAvStreamManagementTrait.ViewportStruct : ClusterStruct


Used as the type for the viewport attribute, allowing control over which part of the camera's image is being streamed or processed. The viewport is defined as these coordinates:

(x1,y1) (x2,y1)
(x1,y2) (x2,y2)

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

ViewportStruct(x1: UShort, y1: UShort, x2: UShort, y2: UShort)

Creates the ViewportStruct class.

Public functions

open StructDescriptor

Returns the descriptor for the struct.

open Any?

Returns the value of the field for the given tag ID.

Public properties

UShort

Represents the x-coordinate of the left corners of the viewport.

UShort

Represents the x-coordinate of the right corners of the viewport.

UShort

Represents the y-coordinate of the top corners of the viewport.

UShort

Represents the y-coordinate of the bottom corners of the viewport.

Public constructors

ViewportStruct

ViewportStruct(x1: UShort, y1: UShort, x2: UShort, y2: UShort)

Creates the ViewportStruct class.

Public functions

getDescriptor

@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor

Returns the descriptor for the struct.

getFieldValueById

@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?

Returns the value of the field for the given tag ID.

Public properties

x1

val x1UShort

Represents the x-coordinate of the left corners of the viewport.

x2

val x2UShort

Represents the x-coordinate of the right corners of the viewport.

y1

val y1UShort

Represents the y-coordinate of the top corners of the viewport.

y2

val y2UShort

Represents the y-coordinate of the bottom corners of the viewport.