Sensor

open class Sensor : CoatyObject

A Sensor is an instrument that observes a property or phenomenon with the goal of producing an estimate of the value of the property. It groups a collection of Observations measuring the same ObservedProperty.

Class registration.

  • Undocumented

    Declaration

    Swift

    open override class var objectType: String { get }

Attributes.

  • The description of the Sensor.

    Declaration

    Swift

    public var description: String
  • The Sensor encodingType allows clients to know how to interpret metadata’s value. Currently the API defines two common Sensor metadata encodingTypes. Most sensor manufacturers provide their sensor datasheets in a PDF format. As a result, PDF is a Sensor encodingType supported by SensorThings API. The second Sensor encodingType is SensorML.

    Most common encoding types can be accessed using SensorEncodingTypes static properties.

    Declaration

    Swift

    public var encodingType: String
  • The detailed description of the Sensor or system. The metadata type is defined by encodingType. Must be JSON encodable/decodable. Specific parameters extraction should performed by the user who knows how this JSON is structured

    Declaration

    Swift

    public var metadata: AnyCodable
  • The unit of measurement of the datastream, matching UCUM convention.

    Note

    When a Datastream does not have a unit of measurement (e.g., a truth observation type), the corresponding unitOfMeasurement properties SHALL have nil values. The unitOfMeasurement itself, however, cannot be nil.

    Declaration

    Swift

    public var unitOfMeasurement: UnitOfMeasurement
  • The type of Observation (with unique result type), which is used by service to encode observations.

    Declaration

    Swift

    public var observationType: ObservationType
  • The spatial bounding box of the spatial extent of all FeaturesOfInterest that belong to the Observations associated with this Sensor. (optional)

    Declaration

    Swift

    public var observedArea: Polygon?
  • The temporal interval of the phenomenon times of all observations belonging to this Sensor. (optional)

    The ISO 8601 standard string can be created using the static function toLocalTimeIntervalIsoString in the CoatyTimeInterval class.

    Declaration

    Swift

    public var phenomenonTime: CoatyTimeInterval?
  • The temporal interval of the result times of all observations belonging to this Sensor. (optional)

    The ISO 8601 standard string can be created using the static function toLocalTimeIntervalIsoString in the CoatyTimeInterval class.

    Declaration

    Swift

    public var resultTime: CoatyTimeInterval?
  • The Observations of a Sensor SHALL observe the same ObservedProperty. The Observations of different Sensors MAY observe the same ObservedProperty.

    Declaration

    Swift

    public var observedProperty: ObservedProperty

Initializers

Codable methods

  • Undocumented

    Declaration

    Swift

    required public init(from decoder: Decoder) throws
  • Undocumented

    Declaration

    Swift

    override public func encode(to encoder: Encoder) throws