DangerousGoodsRestrictionElement
public struct DangerousGoodsRestrictionElement : HorizonElement
HorizonElement
that contains data about a dangerous goods restriction.
To receive such elements in the HorizonSnapshot
, specify HorizonElementType
.dangerousGoodsRestrictionType
in the HorizonOptions
that you register with the HorizonEngine
:
let horizonOptions = HorizonOptions(
id: UUID(),
elementTypes: [.dangerousGoodsRestrictionType],
...
)
Type of the element. Used to filter elements by type.
Declaration
Swift
public let elementType: HorizonElementType
End offset on the HorizonPath
.
Declaration
Swift
public let endOffset: Measurement<UnitLength>
The unique ID of the horizon element.
Declaration
Swift
public let id: Int
Creates an instance of DangerousGoodsRestrictionElement
.
Declaration
Swift
public init(
id: Int,
pathID: Int,
startOffset: Measurement<UnitLength>,
endOffset: Measurement<UnitLength>,
restrictions: [RestrictionData]
)
Parameters
id
|
Identifier of this element. |
pathID
|
Identifier of the path this element belongs to. |
startOffset
|
Start offset on the path. |
endOffset
|
End offset on the path. |
restrictions
|
A list of dangerous goods restrictions. |
Identifier of the HorizonPath
to which this element belongs.
Declaration
Swift
public let pathID: Int
Data for a single dangerous goods restriction.
See moreDeclaration
Swift
public struct RestrictionData : Equatable
A list of dangerous goods RestrictionData
.
Declaration
Swift
public let restrictions: [RestrictionData]
Supported dangerous goods restriction types.
See moreDeclaration
Swift
public enum RestrictionType : Equatable
Start offset on the HorizonPath
.
Declaration
Swift
public let startOffset: Measurement<UnitLength>