sendConfigModelAppBind method
Will send a ConfigModelAppBind message to the given nodeId
.
Implementation
Future<ConfigModelAppStatusData> sendConfigModelAppBind(int nodeId, int elementId, int modelId,
{int appKeyIndex = 0}) async {
final status = _onConfigModelAppStatusController.stream.firstWhere(
(element) =>
element.elementAddress == elementId && element.modelId == modelId && element.appKeyIndex == appKeyIndex,
orElse: () => const ConfigModelAppStatusData(-1, -1, -1),
);
await _methodChannel.invokeMethod('sendConfigModelAppBind', {
'nodeId': nodeId,
'elementId': elementId,
'modelId': modelId,
'appKeyIndex': appKeyIndex,
});
return status;
}