Skip to main content

IKeyManager

interface IKeyManager

Description: Key management class, providing related APIs for setting, obtaining and controlling

method getValue

fun <Result> getValue(
key: AutelKey<Result>,
callback: CommonCallbacks.CompletionCallbackWithParam<Result>
)

Description: Get a single attribute

Input parameters: key: the requested AutelKey object callback: the interface that responds to the callback

Output parameters: None。

Related parameters: None。

method getValueList

fun getValueList(
keyList: List<AutelKey<*>>,
callback: CommonCallbacks.CompletionCallbackWithParam<List<*>>
)

Description: Get multiple attributes

Input parameters: keyList: AutelKey collection requested callback: the interface that responds to the callback

Output parameters: None。

Related parameters: None。

method setValue

fun <Param> setValue(
key: AutelKey<Param>,
param: Param,
callback: CommonCallbacks.CompletionCallback?
)

Description: Set a single property

Input parameters: key: the requested AutelKey object param: request parameter callback: the interface that responds to the callback

Output parameters: None。

Related parameters: None。

method setFrequencyReport

fun <Param> setFrequencyReport(
key: AutelKey<Param>,
param: Param
)

Description: Set fixed frequency report

Input parameters: key: the requested AutelKey object param: request parameter

Output parameters: None。

Related parameters: None。

method setValueList

fun setValueList(
keyList: List<AutelKey<Any>>,
paramList: List<Any>,
callback: CommonCallbacks.CompletionCallbackWithParam<List<*>>?
)

Description: Set multiple properties

Input parameters: keyList: AutelKey collection requested paramList: request parameter collection callback: the interface that responds to the callback

Output parameters: None。

Related parameters: None。

method performAction

fun <Param, Result> performAction(
key: AutelKey.ActionKey<Param, Result>,
param: Param? = null,
callback: CommonCallbacks.CompletionCallbackWithParam<Result>?
)

Description: Event Request

Input parameters: key: the requested ActionKey object param: request parameters callback: the interface that responds to the callback

Output parameters: None。

Related parameters: None。

method performAction2

fun <Param> performAction2(
key: AutelKey.ActionKey<Param, Int>,
param: Param? = null,
callback: CommonCallbacks.CompletionCallbackWithParam<Int>?
)

Description: Event Request 2

Input parameters: key: the requested ActionKey object param: request parameters callback: the interface that responds to the callback

Output parameters: None。

Related parameters: None。

method listen

fun <Result> listen(
key: AutelKey<Result>,
callback: CommonCallbacks.KeyListener<Result>
)

Description: Add the reported listener

Input parameters: key: the requested AutelKey object callback: listener for response callback

Output parameters: None。

Related parameters: None。

method cancelListen

fun <Result> cancelListen(key: AutelKey<Result>, callback: CommonCallbacks.KeyListener<Result>?)

Description: Cancel the reported monitoring

Input parameters: key: the requested AutelKey object callback: listener for response callback

Output parameters: None。

Related parameters: None。

method removeAllListen

fun removeAllListen()

Description: Remove all monitors

Input parameters: None.

Output parameters: None.

Related parameters: None.

method resetAllKeyStatesMap

fun resetAllKeyStatesMap()

Description: Reset the state cache Map of all keys

Input parameters: None.

Output parameters: None.

Related parameters: None.