\Iqrf\Repository\Entities\Metadata DpaCommand

DpaCommand metadata entity

Summary

Methods
Properties
Constants
__construct
fromApiResponse
jsonSerialize
pnum
pcmd
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

$pnum

$pnum : int

Type

int

$pcmd

$pcmd : int

Type

int

Methods

__construct()

__construct(int  $pnum, int  $pcmd) : mixed

Constructs DpaCommand metadata object.

Parameters

int $pnum

An integer value identifying a peripheral.

int $pcmd

An integer value specifying a peripheral command.

Returns

mixed —

fromApiResponse()

fromApiResponse(array{pnum: int, pcmd: int}  $response) : \Iqrf\Repository\Entities\Metadata\DpaCommand

Parses the provided response data into a DpaCommand object

Parameters

array{pnum: int, pcmd: int} $response

API response body

Throws

\InvalidArgumentException

Thrown if required properties are missing

Returns

\Iqrf\Repository\Entities\Metadata\DpaCommand —

The parsed DpaCommand object

jsonSerialize()

jsonSerialize() : array{pnum: int, pcmd: int}

Serializes the DpaCommand entity into JSON

Returns

array{pnum: int, pcmd: int} —

JSON-serialized DpaCommand data