createScoreMSENode function
Future
createScoreMSENode(
- dynamic type,
- dynamic path
)
Implementation
Future createScoreMSENode(var type, var path) async {
await Storage.controller!
.addOrUpdate(NodeImpl(Storage.geigerIndicatorUUID,'',':$type'));
await Storage.controller!
.addOrUpdate(NodeImpl('data','' ,':$type:' + Storage.geigerIndicatorUUID));
Node scoreMSENode =
NodeImpl(':'+path, ':$type:' + Storage.geigerIndicatorUUID + ':data');
//create node keys: UserScore, ImplementRecommendations
NodeValue geigerScore =
NodeValueImpl('GEIGER_score', '0'); //add node name (name of threat)
await scoreMSENode.addOrUpdateValue(geigerScore);
NodeValue location = NodeValueImpl('location', '');
await scoreMSENode.addOrUpdateValue(location);
NodeValue sector = NodeValueImpl('sector', '0');
await scoreMSENode.addOrUpdateValue(sector);
NodeValue associatedProfiles = NodeValueImpl('associatedProfiles', '0');
await scoreMSENode.addOrUpdateValue(associatedProfiles);
geigerScore.setDescription('GEIGER user score');
await Storage.controller!.addOrUpdate(scoreMSENode);
}