\App\IqrfNetModule\ModelsDevicesManager

Tool for showing devices in an IQMESH network

Summary

Methods
Properties
Constants
__construct()
getTable()
getBonded()
getDiscovered()
ping()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
createEmptyTable()
fillTable()
$request
$table
$wsClient
N/A

Properties

$request

$request : \App\IqrfNetModule\Requests\ApiRequest

Type

normal — JSON API request

$table

$table : array

Type

normal — Table with bonded and discovered devices

$wsClient

$wsClient : \App\IqrfNetModule\Models\WebSocketClient

Type

normal — WebSocket client

Methods

__construct()

__construct(\App\IqrfNetModule\Requests\ApiRequest  $request, \App\IqrfNetModule\Models\WebSocketClient  $wsClient) : mixed

Constructor

Parameters

\App\IqrfNetModule\Requests\ApiRequest $request

JSON API request

\App\IqrfNetModule\Models\WebSocketClient $wsClient

WebSocket client

Returns

mixed

getTable()

getTable(int  $base, bool  $ping = false) : array|null

Gets table of devices

Parameters

int $base

Base

bool $ping

Perform ping?

Returns

array|null —

Table of devices

getBonded()

getBonded() : array

Gets bonded devices

Throws

\App\IqrfNetModule\Exceptions\DpaErrorException
\App\IqrfNetModule\Exceptions\EmptyResponseException
\App\IqrfNetModule\Exceptions\UserErrorException
\Nette\Utils\JsonException

Returns

array —

Bonded devices

getDiscovered()

getDiscovered() : array

Gets discovered devices

Throws

\App\IqrfNetModule\Exceptions\DpaErrorException
\App\IqrfNetModule\Exceptions\EmptyResponseException
\App\IqrfNetModule\Exceptions\UserErrorException
\Nette\Utils\JsonException

Returns

array —

Discovered devices

ping()

ping() : array

Perform FRC Ping

Throws

\App\IqrfNetModule\Exceptions\DpaErrorException
\App\IqrfNetModule\Exceptions\EmptyResponseException
\Nette\Utils\JsonException
\App\IqrfNetModule\Exceptions\UserErrorException

Returns

array —

Online devices

createEmptyTable()

createEmptyTable(int  $base) : void

Creates an empty table for devices

Parameters

int $base

Base

fillTable()

fillTable(int  $base, bool  $ping = false) : void

Fills table with devices

Parameters

int $base

Base

bool $ping

Perform ping?

Throws

\App\IqrfNetModule\Exceptions\DpaErrorException
\App\IqrfNetModule\Exceptions\EmptyResponseException
\Nette\Utils\JsonException
\App\IqrfNetModule\Exceptions\UserErrorException