\App\IqrfNetModule\ModelsTrConfigManager

Tool for managing TR configuration

Summary

Methods
Properties
Constants
__construct()
read()
write()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

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

Constructor

Parameters

\App\IqrfNetModule\Models\ApiRequest request

JSON API request

\App\IqrfNetModule\Models\WebSocketClient wsClient

WebSocket client

Returns

read()

read(  address) : mixed||string|int

Reads TR's configuration

Parameters

address

Device address to read the configuration from

Throws

\App\IqrfNetModule\Models\DpaErrorException
\App\IqrfNetModule\Models\EmptyResponseException
\App\IqrfNetModule\Models\JsonException
\App\IqrfNetModule\Models\UserErrorException

Returns

mixed||string|int —

API request and response

write()

write(  address, mixed||string|int  config = []) : mixed||string|int

Writes TR's configuration

Parameters

address

Device address to write the configuration to

mixed||string|int config

New TR configuration

Throws

\App\IqrfNetModule\Models\DpaErrorException
\App\IqrfNetModule\Models\EmptyResponseException
\App\IqrfNetModule\Models\JsonException
\App\IqrfNetModule\Models\UserErrorException

Returns

mixed||string|int —

DPA request and response