DangerousGoodsRestriction
public struct DangerousGoodsRestriction : HorizonElement
Describes dangerous goods restrictions on the horizon element.
This struct holds a horizon element with information regarding dangerous goods restriction. It contains information regarding exact type of dangerous goods restriction and flag indicating whether this restriction is violated with current configuration.
To obtain DangerousGoodsRestriction horizon elements, the integrator must create an instance of HorizonEngine,
register HorizonOptions including elementTypes containing HorizonElementType .dangerousGoodsRestrictionType with a call to HorizonEngine .registerHorizonOptions,
and request a HorizonResult using the previously registered HorizonOptions with a call to
HorizonEngine .generateHorizon.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates a single instance of a horizon element that specifies dangerous goods restrictions.
Declaration
Swift
public init( id: Int, pathID: Int, startOffset: Measurement<UnitLength>, endOffset: Measurement<UnitLength>, restrictions: [RestrictionData] )Parameters
idThe unique ID of the horizon element.
pathIDThe id of the path to which this element belongs.
startOffsetIndicates the start offset along the path this data applies to.
endOffsetIndicates the end offset along the path this data applies to.
restrictionsA list of dangerous goods restrictions.
-
Data for a single dangerous goods restriction.
See moreDeclaration
Swift
public struct RestrictionData
-
Supported dangerous goods restriction types.
See moreDeclaration
Swift
public enum RestrictionType -
The unique ID of the horizon element.
Declaration
Swift
public let id: Int -
The id of the path to which this element belongs.
Declaration
Swift
public let pathID: Int -
Indicates the start offset along the path this data applies to.
Declaration
Swift
public let startOffset: Measurement<UnitLength> -
Indicates the end offset along the path this data applies to.
Declaration
Swift
public let endOffset: Measurement<UnitLength> -
Type of the element used to filter elements by type.
Declaration
Swift
public let elementType: HorizonElementType -
A list of dangerous goods restrictions.
Declaration
Swift
public let restrictions: [RestrictionData]
DangerousGoodsRestriction Structure Reference