\Iqrf\Repository\Entities\Metadata SensorData

SensorData metadata entity

Summary

Methods
Properties
Constants
__construct
fromApiResponse
jsonSerialize
properties
range
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Properties

$properties

$properties : array

Type

array<string|int, mixed>

$range

$range : ?\Iqrf\Repository\Entities\Metadata\SensorRange

Type

SensorRange|null

Methods

__construct()

__construct(string[]  $properties = [], \Iqrf\Repository\Entities\Metadata\SensorRange|null  $range = null) : mixed

Constructs SensorData metadata object.

Parameters

string[] $properties

Array of keywords representing additional properties of a sensor.

\Iqrf\Repository\Entities\Metadata\SensorRange|null $range

Lower and upper bounds of measurable values.

Returns

mixed —

fromApiResponse()

fromApiResponse(array{properties?: string[], range?: array{from?: float, to?: float}}  $response) : \Iqrf\Repository\Entities\Metadata\SensorData

Parses the provided response data into a SensorData object

Parameters

array{properties?: string[], range?: array{from?: float, to?: float}} $response

API response body

Returns

\Iqrf\Repository\Entities\Metadata\SensorData —

The parsed SensorData object

jsonSerialize()

jsonSerialize() : array{properties?: string[], range?: array{from?: float, to?: float}}

Serializes ActionRecord entity into JSON

Returns

array{properties?: string[], range?: array{from?: float, to?: float}} —

JSON-serialized ActionRecord entity