[
{
"id": "98bb3798.d90928",
"type": "tab",
"label": "IMU dashboard",
"disabled": false,
"info": "# Basic flow to start with STM32CubeMonitor."
},
{
"id": "8381c865.236028",
"type": "subflow",
"name": "Single value",
"info": "The 'single value' subflow allows to :\r\n * Filter Data to extract only one variable after the \"processing node\" step .\r\n * Modify the message to fit with standard widgets such as gauges.\r\n * Limit the number of messages to a maximum of 10 msg per second.\r\n\r\n### **Input**\r\n\r\nThe subflow 'single value' takes in input the `msg.payload`\r\nfrom the processing output. All the messages sent by the processing node have the same structure.\r\n\r\n \"payload\": {\r\n \"groupname\": \"Snapshot2\",\r\n \"variabledata\": [\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n },\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n },\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n }\r\n ],\r\n \"variablename\": \"int2\"\r\n }\r\n }\r\n\r\n### **Filter on selected variable**\r\nSeveral messages are sent by the processing node for each variable, so the first step of this 'single value' subflow is to filter and keep only messages related to the selected variable.\r\nThe 'filter variable' node will only keep messages with the right `variablename` key.\r\n\r\n### **Extract duplets table**\r\n\r\nThe received message is an Object containing {groupname, variabledata[array], variablename}. \r\nThe array contains two variables :\r\n - `y` the value \r\n - `x` the time\r\n\r\nA single message contains multiple pairs of values extract at a regular time interval.\r\nThe time interval depends on the acquisition frequency.\r\nWith the 'change' node and the `set` property, the `msg.payload` is set to \r\n`msg.payload.variabledata`, only the data variable array is set into msg.payload.\r\n\r\n \"payload\": {\r\n \"variabledata\": [\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n },\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n },\r\n {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n }\r\n ]\r\n }\r\n\r\n### **Split duplets table**\r\n\r\nThe data variable array is split with a length of one in smaller objects by the 'split' node.\r\nEach new object contains two subvariables : `y` and `x`.\r\n\r\n \"payload\": {\r\n \"y\": \"9\",\r\n \"x\": \"1567509421459\"\r\n }\r\n\r\n\r\n### **Limit the number of messages**\r\n\r\nThe 'delay' node allows to limit the maximum number of message per second.\r\nIn the 'single value' subflow, one message is extracted per second.\r\n\r\n>_Be careful, a dashboard saturation risk exists if too many messages are received per second._\r\n\r\n### **Extract only y values**\r\n\r\nThe `msg.payload` is set to `msg.payload.y` with the `set` property. \r\nOnly `y` variable is set into msg.payload as single value.\r\n\r\n \"payload\": { \r\n \"y\": \"9\" \r\n }\r\n\r\n### **Output** \r\n\r\nSome widgets such as the gauge and the text node are using the `msg.payload` property. \r\nThe output node is linked to a gauge that allows to see the evolution \r\nof the `y` variable as a function of time.\r\n\r\n\r\n\r\n\r\n### **Details**\r\n\r\nNote : The debug node allows to see clearly and easily the \r\nmessage at the node output. \r\n\r\n\r\n> More details on [Node-Red][nr]\r\n[nr]: https://nodered.org/docs/user-guide/editor/workspace/subflows\r\n\r\n\r\n-------\r\n\r\n",
"category": "",
"in": [
{
"x": 40,
"y": 60,
"wires": [
{
"id": "3c5ffe0d.9063b2"
}
]
}
],
"out": [
{
"x": 780,
"y": 140,
"wires": [
{
"id": "66397fd3.d8111",
"port": 0
}
]
}
],
"env": [
{
"name": "varfilter",
"type": "str",
"value": ""
}
],
"color": "#DDAA99"
},
{
"id": "3e22d2e2.f780fe",
"type": "subflow",
"name": "Subflow 2",
"info": "",
"category": "",
"in": [
{
"x": 40,
"y": 160,
"wires": [
{
"id": "7e64eeec.9ed4a"
},
{
"id": "bcc2f210.3e9f3"
},
{
"id": "3ec3a9f9.8ce516"
}
]
}
],
"out": [
{
"x": 680,
"y": 100,
"wires": [
{
"id": "7e64eeec.9ed4a",
"port": 0
}
]
},
{
"x": 680,
"y": 160,
"wires": [
{
"id": "bcc2f210.3e9f3",
"port": 0
}
]
},
{
"x": 680,
"y": 280,
"wires": [
{
"id": "3ec3a9f9.8ce516",
"port": 0
}
]
}
],
"env": [
{
"name": "some_var",
"type": "str",
"value": ""
}
],
"color": "#DDAA99"
},
{
"id": "f9c34dde.1e2f4",
"type": "ui_group",
"z": "",
"name": " IMU H0BR4 Hexabitz module data acquisition",
"tab": "17d09b07.741a55",
"order": 1,
"disp": true,
"width": 22,
"collapse": false
},
{
"id": "17d09b07.741a55",
"type": "ui_tab",
"z": "",
"name": "IMU",
"icon": "dashboard",
"disabled": false,
"hidden": false
},
{
"id": "abdac593.c94498",
"type": "exe-config",
"z": "",
"name": "Hala",
"exefile": "C:\\Users\\HalaMummo\\Desktop\\H0BR4x\\STM32CubeIDE\\Debug\\H0BR4.elf",
"exefolder": "C:\\Users\\HalaMummo\\Desktop\\H0BR4x\\STM32CubeIDE\\Debug",
"exevariablelist": [
{
"address": "0x0801d934",
"name": "aAPBAHBPrescTable[0]",
"type": 1
},
{
"address": "0x200013a8",
"name": "acceptedMsg",
"type": 3
},
{
"address": "0x0801cbbc",
"name": "actSnipCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cbb0",
"name": "actSnipCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cbb4",
"name": "actSnipCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cbb8",
"name": "actSnipCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x20000af4",
"name": "AddBcastPayload",
"type": 1
},
{
"address": "0x0801cbcc",
"name": "addbuttonCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cbc0",
"name": "addbuttonCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cbc4",
"name": "addbuttonCommandDefinition.pcHelpString",
"type": 5,
"checked": false
},
{
"address": "0x0801cbc8",
"name": "addbuttonCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x20000af8",
"name": "arrayPortsDir[0]",
"type": 3
},
{
"address": "0x20006580",
"name": "Ax",
"type": 9,
"checked": false
},
{
"address": "0x20006584",
"name": "Ay",
"type": 9,
"checked": false
},
{
"address": "0x20006588",
"name": "Az",
"type": 9,
"checked": false
},
{
"address": "0x20001388",
"name": "BackEndTaskHandle",
"type": 5
},
{
"address": "0x20000afe",
"name": "bcastID",
"type": 1
},
{
"address": "0x20000b00",
"name": "bcastRoutes[0]",
"type": 3
},
{
"address": "0x0801cbdc",
"name": "bootloaderUpdateCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cbd0",
"name": "bootloaderUpdateCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cbd4",
"name": "bootloaderUpdateCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cbd8",
"name": "bootloaderUpdateCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x20000b32",
"name": "bootStatus",
"type": 1
},
{
"address": "0x20006698",
"name": "BOS.buttons.debounce",
"type": 3
},
{
"address": "0x2000669d",
"name": "BOS.buttons.maxInterClickTime",
"type": 1
},
{
"address": "0x2000669c",
"name": "BOS.buttons.minInterClickTime",
"type": 1
},
{
"address": "0x2000669a",
"name": "BOS.buttons.singleClickTime",
"type": 3
},
{
"address": "0x200066a0",
"name": "BOS.clibaudrate",
"type": 5
},
{
"address": "0x200066ad",
"name": "BOS.date.day",
"type": 1
},
{
"address": "0x200066ae",
"name": "BOS.date.month",
"type": 1
},
{
"address": "0x200066ac",
"name": "BOS.date.weekday",
"type": 1
},
{
"address": "0x200066b0",
"name": "BOS.date.year",
"type": 3
},
{
"address": "0x200066a4",
"name": "BOS.daylightsaving",
"type": 1
},
{
"address": "0x200066b3",
"name": "BOS.disableCLI",
"type": 1
},
{
"address": "0x200066a5",
"name": "BOS.hourformat",
"type": 1
},
{
"address": "0x200066b2",
"name": "BOS.overrun",
"type": 1
},
{
"address": "0x2000669e",
"name": "BOS.response",
"type": 1
},
{
"address": "0x200066ab",
"name": "BOS.time.ampm",
"type": 1
},
{
"address": "0x200066aa",
"name": "BOS.time.hours",
"type": 1
},
{
"address": "0x200066a9",
"name": "BOS.time.minutes",
"type": 1
},
{
"address": "0x200066a6",
"name": "BOS.time.msec",
"type": 3
},
{
"address": "0x200066a8",
"name": "BOS.time.seconds",
"type": 1
},
{
"address": "0x2000669f",
"name": "BOS.trace",
"type": 2
},
{
"address": "0x20000000",
"name": "BOS_default.buttons.debounce",
"type": 3
},
{
"address": "0x20000005",
"name": "BOS_default.buttons.maxInterClickTime",
"type": 1
},
{
"address": "0x20000004",
"name": "BOS_default.buttons.minInterClickTime",
"type": 1
},
{
"address": "0x20000002",
"name": "BOS_default.buttons.singleClickTime",
"type": 3
},
{
"address": "0x20000008",
"name": "BOS_default.clibaudrate",
"type": 5
},
{
"address": "0x20000015",
"name": "BOS_default.date.day",
"type": 1
},
{
"address": "0x20000016",
"name": "BOS_default.date.month",
"type": 1
},
{
"address": "0x20000014",
"name": "BOS_default.date.weekday",
"type": 1
},
{
"address": "0x20000018",
"name": "BOS_default.date.year",
"type": 3
},
{
"address": "0x2000000c",
"name": "BOS_default.daylightsaving",
"type": 1
},
{
"address": "0x2000001b",
"name": "BOS_default.disableCLI",
"type": 1
},
{
"address": "0x2000000d",
"name": "BOS_default.hourformat",
"type": 1
},
{
"address": "0x2000001a",
"name": "BOS_default.overrun",
"type": 1
},
{
"address": "0x20000006",
"name": "BOS_default.response",
"type": 1
},
{
"address": "0x20000013",
"name": "BOS_default.time.ampm",
"type": 1
},
{
"address": "0x20000012",
"name": "BOS_default.time.hours",
"type": 1
},
{
"address": "0x20000011",
"name": "BOS_default.time.minutes",
"type": 1
},
{
"address": "0x2000000e",
"name": "BOS_default.time.msec",
"type": 3
},
{
"address": "0x20000010",
"name": "BOS_default.time.seconds",
"type": 1
},
{
"address": "0x20000007",
"name": "BOS_default.trace",
"type": 2
},
{
"address": "0x20000af5",
"name": "BOS_initialized",
"type": 1
},
{
"address": "0x20006620",
"name": "BOS_var_reg[0]",
"type": 5
},
{
"address": "0x0801cbec",
"name": "bridgeCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cbe0",
"name": "bridgeCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cbe4",
"name": "bridgeCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cbe8",
"name": "bridgeCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x20000b34",
"name": "broadcastResponse[0]",
"type": 1
},
{
"address": "0x20000b40",
"name": "button[0].events",
"type": 1
},
{
"address": "0x20000b3a",
"name": "button[0].pressedX1Sec",
"type": 1
},
{
"address": "0x20000b3b",
"name": "button[0].pressedX2Sec",
"type": 1
},
{
"address": "0x20000b3c",
"name": "button[0].pressedX3Sec",
"type": 1
},
{
"address": "0x20000b3d",
"name": "button[0].releasedY1Sec",
"type": 1
},
{
"address": "0x20000b3e",
"name": "button[0].releasedY2Sec",
"type": 1
},
{
"address": "0x20000b3f",
"name": "button[0].releasedY3Sec",
"type": 1
},
{
"address": "0x20000b38",
"name": "button[0].state",
"type": 1
},
{
"address": "0x20000b39",
"name": "button[0].type",
"type": 1
},
{
"address": "0x20000af6",
"name": "CLI_LOW_Baudrate_Flag",
"type": 1
},
{
"address": "0x20001758",
"name": "cOutputBuffer[0]",
"type": 2
},
{
"address": "0x20001304",
"name": "crcBuffer[0]",
"type": 1
},
{
"address": "0x20000cfc",
"name": "cRxedChar",
"type": 2
},
{
"address": "0x20001384",
"name": "DataVar",
"type": 3
},
{
"address": "0x0801cbfc",
"name": "dateCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cbf0",
"name": "dateCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cbf4",
"name": "dateCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cbf8",
"name": "dateCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x20000d34",
"name": "dblCounter[0]",
"type": 1
},
{
"address": "0x0801cc0c",
"name": "defaultCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cc00",
"name": "defaultCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cc04",
"name": "defaultCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cc08",
"name": "defaultCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x200013ac",
"name": "defaultTaskHandle",
"type": 5
},
{
"address": "0x20000d3b",
"name": "delayButtonStateReset",
"type": 1
},
{
"address": "0x0801cc1c",
"name": "delSnipCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cc10",
"name": "delSnipCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cc14",
"name": "delSnipCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cc18",
"name": "delSnipCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x2000133c",
"name": "dmaStreamCount[0]",
"type": 5
},
{
"address": "0x20001354",
"name": "dmaStreamDst[0]",
"type": 5
},
{
"address": "0x2000136c",
"name": "dmaStreamTotal[0]",
"type": 5
},
{
"address": "0x2000004a",
"name": "dstGroupID",
"type": 1
},
{
"address": "0x0801cc2c",
"name": "flashsizeCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cc20",
"name": "flashsizeCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cc24",
"name": "flashsizeCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cc28",
"name": "flashsizeCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x0801cc50",
"name": "getCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cc44",
"name": "getCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cc48",
"name": "getCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cc4c",
"name": "getCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x0801cc60",
"name": "groupCommandDefinition.cExpectedNumberOfParameters",
"type": 2
},
{
"address": "0x0801cc54",
"name": "groupCommandDefinition.pcCommand",
"type": 5
},
{
"address": "0x0801cc58",
"name": "groupCommandDefinition.pcHelpString",
"type": 5
},
{
"address": "0x0801cc5c",
"name": "groupCommandDefinition.pxCommandInterpreter",
"type": 5
},
{
"address": "0x20000da4",
"name": "groupModules[0]",
"type": 3
},
{
"address": "0x2000658c",
"name": "gx",
"type": 9,
"checked": false
},
{
"address": "0x20006590",
"name": "gy",
"type": 9,
"checked": false
},
{
"address": "0x20006594",
"name": "gz",
"type": 9,
"checked": false
},
{
"address": "0x200013bc",
"name": "H0BR4_accX",
"type": 9
},
{
"address": "0x200013c0",
"name": "H0BR4_accY",
"type": 9
},
{
"address": "0x200013c4",
"name": "H0BR4_accZ",
"type": 9
},
{
"address": "0x200013c8",
"name": "H0BR4_gyroX",
"type": 9
},
{
"address": "0x200013cc",
"name": "H0BR4_gyroY",
"type": 9
},
{
"address": "0x200013d0",
"name": "H0BR4_gyroZ",
"type": 9
},
{
"address": "0x200013d4",
"name": "H0BR4_magX",
"type": 6
},
{
"address": "0x200013d8",
"name": "H0BR4_magY",
"type": 6
},
{
"address": "0x200013dc",
"name": "H0BR4_magZ",
"type": 6
},
{
"address": "0x200013e0",
"name": "H0BR4_temp",
"type": 9
},
{
"address": "0x20006a5c",
"name": "hcrc.Init.CRCLength",
"type": 5
},
{
"address": "0x20006a55",
"name": "hcrc.Init.DefaultInitValueUse",
"type": 1
},
{
"address": "0x20006a54",
"name": "hcrc.Init.DefaultPolynomialUse",
"type": 1
},
{
"address": "0x20006a58",
"name": "hcrc.Init.GeneratingPolynomial",
"type": 5
},
{
"address": "0x20006a60",
"name": "hcrc.Init.InitValue",
"type": 5
},
{
"address": "0x20006a64",
"name": "hcrc.Init.InputDataInversionMode",
"type": 5
},
{
"address": "0x20006a68",
"name": "hcrc.Init.OutputDataInversionMode",
"type": 5
},
{
"address": "0x20006a70",
"name": "hcrc.InputDataFormat",
"type": 5
},
{
"address": "0x20006a50",
"name": "hcrc.Instance",
"type": 5
},
{
"address": "0x20006a6c",
"name": "hcrc.Lock",
"type": 2
},
{
"address": "0x20006a6d",
"name": "hcrc.State",
"type": 2
},
{
"address": "0x20006aac",
"name": "hi2c2.ErrorCode",
"type": 5
},
{
"address": "0x20006aa4",
"name": "hi2c2.hdmarx",
"type": 5
},
{
"address": "0x20006aa0",
"name": "hi2c2.hdmatx",
"type": 5
},
{
"address": "0x20006a80",
"name": "hi2c2.Init.AddressingMode",
"type": 5
},
{
"address": "0x20006a84",
"name": "hi2c2.Init.DualAddressMode",
"type": 5
},
{
"address": "0x20006a90",
"name": "hi2c2.Init.GeneralCallMode",
"type": 5
},
{
"address": "0x20006a94",
"name": "hi2c2.Init.NoStretchMode",
"type": 5
},
{
"address": "0x20006a7c",
"name": "hi2c2.Init.OwnAddress1",
"type": 5
},
{
"address": "0x20006a88",
"name": "hi2c2.Init.OwnAddress2",
"type": 5
},
{
"address": "0x20006a8c",
"name": "hi2c2.Init.OwnAddress2Masks",
"type": 5
},
{
"address": "0x20006a78",
"name": "hi2c2.Init.Timing",
"type": 5
},
{
"address": "0x20006a74",
"name": "hi2c2.Instance",
"type": 5
},
{
"address": "0x20006aa8",
"name": "hi2c2.Lock",
"type": 2
},
{
"address": "0x20006a98",
"name": "hi2c2.pBuffPtr",
"type": 5
},
{
"address": "0x20006aa9",
"name": "hi2c2.State",
"type": 2
},
{
"address": "0x20006a9e",
"name": "hi2c2.XferCount",
"type": 3
},
{
"address": "0x20006a9c",
"name": "hi2c2.XferSize",
"type": 3
},
{
"address": "0x200066cc",
"name": "htim14.Channel",
"type": 2
},
{
"address": "0x200066d0",
"name": "htim14.hdma[0]",
"type": 5
},
{
"address": "0x200066c4",
"name": "htim14.Init.ClockDivision",
"type": 5
},
{
"address": "0x200066bc",
"name": "htim14.Init.CounterMode",
"type": 5
},
{
"address": "0x200066c0",
"name": "htim14.Init.Period",
"type": 5
},
{
"address": "0x200066b8",
"name": "htim14.Init.Prescaler",
"type": 5
},
{
"address": "0x200066c8",
"name": "htim14.Init.RepetitionCounter",
"type": 5
},
{
"address": "0x200066b4",
"name": "htim14.Instance",
"type": 5
},
{
"address": "0x200066ec",
"name": "htim14.Lock",
"type": 2
},
{
"address": "0x200066ed",
"name": "htim14.State",
"type": 2
},
{
"address": "0x200065fc",
"name": "htim15.Channel",
"type": 2
},
{
"address": "0x20006600",
"name": "htim15.hdma[0]",
"type": 5
},
{
"address": "0x200065f4",
"name": "htim15.Init.ClockDivision",
"type": 5
},
{
"address": "0x200065ec",
"name": "htim15.Init.CounterMode",
"type": 5
},
...
This file has been truncated, please download it to see its full contents.
Comments
Please log in or sign up to comment.