\Iqrf\Repository\EntitiesQuantity

Quantity entity

Summary

Methods
Properties
Constants
__construct()
fromApiResponse()
jsonSerialize()
$id
$name
$iqrfName
$shortName
$unit
$decimalPlaces
$frcs
$helpPage
$idValue
$width
$idDriver
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : string

Type

string

$name

$name : string

Type

string

$iqrfName

$iqrfName : string

Type

string

$shortName

$shortName : string

Type

string

$unit

$unit : string|null

Type

string|null

$decimalPlaces

$decimalPlaces : int

Type

int

$frcs

$frcs : array

Type

array

$helpPage

$helpPage : string

Type

string

$idValue

$idValue : int

Type

int

$width

$width : int

Type

int

$idDriver

$idDriver : string

Type

string

Methods

__construct()

__construct(string  $id, string  $name, string  $iqrfName, string  $shortName, string|null  $unit, int  $decimalPlaces, int[]  $frcs, string  $helpPage, int  $idValue, int  $width, string  $idDriver) : mixed

Constructor

Parameters

string $id

Quantity identifier string

string $name

Quantity name

string $iqrfName

Quantity IQRF name

string $shortName

Quantity short name

string|null $unit

Unit of measurement

int $decimalPlaces

Decimal places of measured value

int[] $frcs

Implemented FRC commands

string $helpPage

Help page URI

int $idValue

Quantity ID (IQRF Standard Sensor Type)

int $width

Data width

string $idDriver

JS driver member name

Returns

mixed —

fromApiResponse()

fromApiResponse(array{id: string, name: string, iqrfName: string, shortName: string, unit: string, decimalPlaces: int, frcs: int[], helpPage: string, idValue: int, width: int, idDriver: string}  $response) : \Iqrf\Repository\Entities\Quantity

Creates a new Quantity entity from API response

Parameters

array{id: string, name: string, iqrfName: string, shortName: string, unit: string, decimalPlaces: int, frcs: int[], helpPage: string, idValue: int, width: int, idDriver: string} $response

API response body

Returns

\Iqrf\Repository\Entities\Quantity —

Quantity entity

jsonSerialize()

jsonSerialize() : array{id: string, name: string, iqrfName: string, shortName: string, unit: string|null, decimalPlaces: int, frcs: int[], helpPage: string, idValue: int, width: int, idDriver: string}

Serializes the Quantity entity into JSON

Returns

array{id: string, name: string, iqrfName: string, shortName: string, unit: string|null, decimalPlaces: int, frcs: int[], helpPage: string, idValue: int, width: int, idDriver: string} —

JSON serialized Quantity entity