MeshManagerApi class

This class is used to expose Nordic's APIs and handle a mesh network.

It listens to all native events and distribute it to broadcast Streams that should in turn be listened by plugin consumer.

Constructors

MeshManagerApi()

Properties

hashCode int
The hash code for this object.
no setterinherited
meshNetwork IMeshNetwork?
The currently loaded IMeshNetwork or null
no setter
onConfigAppKeyStatus Stream<ConfigAppKeyStatusData>
no setter
onConfigBeaconStatus Stream<ConfigBeaconStatus>
no setter
onConfigCompositionDataStatus Stream<ConfigCompositionDataStatusData>
no setter
onConfigDefaultTtlStatus Stream<ConfigDefaultTtlStatus>
no setter
onConfigKeyRefreshPhaseStatus Stream<ConfigKeyRefreshPhaseStatus>
no setter
onConfigModelAppStatus Stream<ConfigModelAppStatusData>
no setter
onConfigModelPublicationStatus Stream<ConfigModelPublicationStatus>
no setter
onConfigModelSubscriptionStatus Stream<ConfigModelSubscriptionStatus>
no setter
onConfigNetworkTransmitStatus Stream<ConfigNetworkTransmitStatus>
no setter
onConfigNodeResetStatus Stream<ConfigNodeResetStatus>
no setter
onDoozScenarioEpochStatus Stream<DoozEpochStatusData>
no setter
onDoozScenarioStatus Stream<DoozScenarioStatusData>
no setter
onGenericLevelStatus Stream<GenericLevelStatusData>
no setter
onGenericOnOffStatus Stream<GenericOnOffStatusData>
no setter
onLightCtlStatus Stream<LightCtlStatusData>
no setter
onLightHslStatus Stream<LightHslStatusData>
no setter
onLightLightnessStatus Stream<LightLightnessStatusData>
no setter
onMeshPduCreated Stream<List<int>>
no setter
onNetworkImported Stream<IMeshNetwork>
no setter
onNetworkLoaded Stream<IMeshNetwork>
no setter
onNetworkUpdated Stream<IMeshNetwork>
no setter
onProvisioningCompleted Stream<MeshProvisioningCompletedData>
no setter
onProvisioningFailed Stream<MeshProvisioningStatusData>
no setter
onProvisioningStateChanged Stream<MeshProvisioningStatusData>
no setter
onV2MagicLevelGetStatus Stream<MagicLevelGetStatusData>
no setter
onV2MagicLevelSetStatus Stream<MagicLevelSetStatusData>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendProvisioningPdu Stream<SendProvisioningPduData>
no setter

Methods

cachedProvisionedMeshNodeUuid() Future<String?>
A method that will return a mesh node uuid during provisioning process or null
cleanProvisioningData() Future<void>
This method reset the unprovisioned nodes cache.
deprovision(ProvisionedMeshNode meshNode) Future<ConfigNodeResetStatus>
Will try to deprovision the specified ProvisionedMeshNode by sending ConfigNodeReset message via the unicast address.
dispose() → void
Should be called to clear all resources used by this class
doozScenarioEpochSet(int address, int tzData, int epoch, int correlation, {int command = 15, int io = 0, int unused = 0, int? extra, int keyIndex = 0}) Future<DoozEpochStatusData?>
Will send a DoozEpochSet message (0x8220).
doozScenarioSet(int address, int scenarioId, int correlation, {int command = 0, int io = 0, bool isActive = true, int unused = 0, int value = 0, int transition = 0, int startAt = 0x7F, int duration = 0x7F, int daysInWeek = 0x7F, int? extra, int keyIndex = 0}) Future<DoozScenarioStatusData?>
Will send a DoozScenarioSet message (0x8219). Defaults to a scenario that apply a level 0 (OFF cmd with lights).
exportMeshNetwork() Future<String?>
Exports full mesh network to a JSON String.
getDefaultTtl(int address) Future<ConfigDefaultTtlStatus>
Will send a ConfigDefaultTtlGet message to the given address.
getDeviceUuid(List<int> serviceData) String
getNetworkTransmitSettings(int address) Future<ConfigNetworkTransmitStatus>
Will send a ConfigNetworkTransmitGet message to the given address.
getPublicationSettings(int elementAddress, int modelIdentifier) Future<ConfigModelPublicationStatus>
Will send a ConfigModelPublicationGet message to the given elementAddress.
getSequenceNumber(ProvisionedMeshNode node) Future<int>
A method to get the sequence number of a given mesh node
getSNBeacon(int address) Future<ConfigBeaconStatus>
Will get the current beacon configuration
handleNotifications(int mtu, List<int> pdu) Future<void>
Handles notifications received by the client.
handleWriteCallbacks(int mtu, List<int> pdu) Future<void>
Must be called to handle sent data.
identifyNode(String serviceUuid) Future<void>
Identifies the node that is to be provisioned.
importMeshNetworkJson(String json) Future<MeshNetwork>
Starts an asynchronous task that imports a network from the mesh configuration db json
isAdvertisedWithNodeIdentity(List<int> serviceData) Future<bool>
Checks if the node is advertising with Node Identity
isAdvertisingWithNetworkIdentity(List<int> serviceData) Future<bool>
Checks if the node is advertising with Network Identity
keyRefreshPhaseGet({int address = 0xFFFF, int netKeyIndex = 0}) Future<ConfigKeyRefreshPhaseStatus>
Will send a ConfigKeyRefreshPhaseGet message to the given address.
keyRefreshPhaseSet({int address = 0xFFFF, int netKeyIndex = 0, int transition = useNewKeys}) Future<ConfigKeyRefreshPhaseStatus>
Will send a ConfigKeyRefreshPhaseSet message to the given address.
loadMeshNetwork() Future<MeshNetwork>
Loads the mesh network from the local database.
networkIdMatches(List<int> serviceData) Future<bool>
Checks if the generated network ids match. The network ID contained in the service data would be checked against a network id of each network key.
nodeIdentityMatches(List<int> serviceData) Future<bool>
Checks if the node identity matches
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
provisioning(UnprovisionedMeshNode meshNode) Future<void>
Provision the given meshNode.
resetMeshNetwork() Future<void>
This method will clear the provisioned nodes, reset the sequence number and generate new network with new provisioning data.
sendConfigAppKeyAdd(int dest) Future<void>
Will send a ConfigAppKeyAdd message to the given dest.
sendConfigCompositionDataGet(int dest) Future<void>
Will send a ConfigCompositionDataGet message to the given dest.
sendConfigModelAppBind(int nodeId, int elementId, int modelId, {int appKeyIndex = 0}) Future<ConfigModelAppStatusData>
Will send a ConfigModelAppBind message to the given nodeId.
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}) Future<ConfigModelPublicationStatus>
Will send a ConfigModelPublicationSet message to the given elementAddress.
sendConfigModelSubscriptionAdd(int elementAddress, int subscriptionAddress, int modelIdentifier) Future<ConfigModelSubscriptionStatus>
Will send a ConfigModelSubscriptionAdd message to the given elementAddress.
sendConfigModelSubscriptionDelete(int elementAddress, int subscriptionAddress, int modelIdentifier) Future<ConfigModelSubscriptionStatus>
Will send a ConfigModelSubscriptionDelete message to the given elementAddress.
sendConfigModelSubscriptionDeleteAll(int elementAddress, int modelIdentifier) Future<void>
Will send a ConfigModelSubscriptionDeleteAll message to the given elementAddress.
sendGenericLevelGet(int address, {int keyIndex = 0}) Future<GenericLevelStatusData>
Will send a GenericLevelGet message to the given address.
sendGenericLevelSet(int address, int level, {int keyIndex = 0, int transitionStep = 0, int transitionResolution = 0, int delay = 0}) Future<GenericLevelStatusData>
Will send a GenericLevelSet message to the given address.
sendGenericOnOffSet(int address, bool value, int sequenceNumber, {int keyIndex = 0, int transitionStep = 0, int transitionResolution = 0, int delay = 0}) Future<GenericOnOffStatusData>
Will send a GenericLevelOnOff message to the given address.
sendLightCtl(int address, int lightness, int temperature, int lightDeltaUV, int sequenceNumber, {int keyIndex = 0}) Future<LightCtlStatusData>
Will send a LightCtlSet message to the given address.
sendLightHsl(int address, int lightness, int hue, int saturation, int sequenceNumber, {int keyIndex = 0}) Future<LightHslStatusData>
Will send a LightHslSet message to the given address.
sendLightLightness(int address, int lightness, int sequenceNumber, {int keyIndex = 0}) Future<LightLightnessStatusData>
Will send a LightLightnessSet message to the given address.
sendV2MagicLevelGet(int address, int io, int index, int correlation, {int keyIndex = 0}) Future<MagicLevelGetStatusData>
Will send a MagicLevelGet message to the given address.
sendV2MagicLevelSet(int address, int io, int index, int value, int correlation, {int keyIndex = 0}) Future<MagicLevelSetStatusData>
Will send a MagicLevelSet message to the given address.
setDefaultTtl(int address, int ttl) Future<ConfigDefaultTtlStatus>
Will send a ConfigDefaultTtlSet message to the given address.
setMtu(int mtuSize) Future<void>
Notify native side about the current mtu size
setNetworkTransmitSettings(int address, int transmitCount, int transmitIntervalSteps) Future<ConfigNetworkTransmitStatus>
Will send a ConfigNetworkTransmitSet message to the given address.
setSequenceNumber(ProvisionedMeshNode node, int seqNum) Future<void>
A method to set the sequence number of a given mesh node
setSNBeacon({int address = 0xFFFF, bool enable = false}) Future<ConfigBeaconStatus>
Will set the beacon configuration.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

revokeOldKeys → const int
useNewKeys → const int