ZoneManagementTrait.TwoDCartesianZoneStruct

class ZoneManagementTrait.TwoDCartesianZoneStruct : ClusterStruct


Encodes all information needed to define a TwoDCartesianZone.

Summary

Nested types

Descriptor enum for this struct's fields.

Public constructors

Creates the TwoDCartesianZoneStruct 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

OptionalValue<String>

The color, in RGB or RGBA, used for attaching a color to the zone definition.

String

A string representing the name of the Zone.

ZoneManagementTrait.ZoneUseEnum

A ZoneUseEnum value representing the purpose of the zone.

List<ZoneManagementTrait.TwoDCartesianVertexStruct>

A list of vertices of type TwoDCartesianVertexStruct.

Public constructors

TwoDCartesianZoneStruct

TwoDCartesianZoneStruct(
    name: String = "",
    use: ZoneManagementTrait.ZoneUseEnum = ZoneUseEnum.Motion,
    vertices: List<ZoneManagementTrait.TwoDCartesianVertexStruct> = emptyList(),
    color: OptionalValue<String> = OptionalValue.absent()
)

Creates the TwoDCartesianZoneStruct 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

color

val colorOptionalValue<String>

The color, in RGB or RGBA, used for attaching a color to the zone definition. This value is informational only and has no effect on the behavior of the zone.

name

val nameString

A string representing the name of the Zone. This is not guaranteed to be unique.

use

val useZoneManagementTrait.ZoneUseEnum

A ZoneUseEnum value representing the purpose of the zone.

vertices

val verticesList<ZoneManagementTrait.TwoDCartesianVertexStruct>

A list of vertices of type TwoDCartesianVertexStruct. These vertices define a simple polygon on the TwoD Cartesian plane, which represents the bounds of the TwoD Cartesian Zone with an implicit connection between the last and first list items.