sendConfigModelPublicationSet method
Will send a ConfigModelPublicationSet message to the given elementAddress
.
Implementation
Future<ConfigModelPublicationStatus> sendConfigModelPublicationSet(
int elementAddress,
int publishAddress,
int modelIdentifier, {
int appKeyIndex = 0,
bool credentialFlag = false,
int publishTtl = 15,
int publicationSteps = 0,
int publicationResolution = 100,
int retransmitCount = 0,
int retransmitIntervalSteps = 0,
}) async {
final status = _onConfigModelPublicationStatusController.stream.firstWhere(
(element) =>
element.elementAddress == elementAddress &&
element.publishAddress == publishAddress &&
element.appKeyIndex == appKeyIndex &&
element.credentialFlag == credentialFlag &&
element.publishTtl == publishTtl &&
element.publicationSteps == publicationSteps &&
element.publicationResolution == publicationResolution &&
element.retransmitCount == retransmitCount &&
element.retransmitIntervalSteps == retransmitIntervalSteps &&
element.modelIdentifier == modelIdentifier,
orElse: () => const ConfigModelPublicationStatus(-1, -1, -1, false, -1, -1, -1, -1, -1, -1, false),
);
await _methodChannel.invokeMethod('sendConfigModelPublicationSet', {
'elementAddress': elementAddress,
'publishAddress': publishAddress,
'appKeyIndex': appKeyIndex,
'credentialFlag': credentialFlag,
'publishTtl': publishTtl,
'publicationSteps': publicationSteps,
'publicationResolution': publicationResolution,
'retransmitCount': retransmitCount,
'retransmitIntervalSteps': retransmitIntervalSteps,
'modelIdentifier': modelIdentifier,
});
return status;
}