iotile / iotile/coretools

[iotile-sensorgraph] pod1m_vibe.sgf compiled output doesn't work

Open
#898 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Would be useful to have the following done:
- [ ] Provide a warning that the number of nodes is too high
- [ ] Figure a way to better optimize the nodes.

The issue manifested as the following:

When piping the snippet into the `sensor_graph` proxy below:
```
disable
clear
reset
add_node "(system input 3 always) => counter 1025 using copy_latest_a"
add_node "(system input 5 always) => counter 1026 using copy_latest_a"
add_node "(input 1 always) => unbuffered 1024 using copy_latest_a"
add_node "(system input 1538 when value == 0) => unbuffered 1025 using copy_latest_a"
add_node "(system input 1538 when value == 1) => unbuffered 1028 using copy_latest_a"
add_node "(system input 1024 always) => unbuffered 1032 using copy_latest_a"
add_node "(system input 1025 always) => unbuffered 1037 using copy_latest_a"
add_node "(system input 1026 always) => unbuffered 1038 using copy_latest_a"
add_node "(unbuffered 1024 always) => output 32 using copy_latest_a"
add_node "(unbuffered 1025 always) => constant 1 using copy_latest_a"
add_node "(unbuffered 1025 when count == 1 && constant 1024 always) => unbuffered 1026 using call_rpc"
add_node "(unbuffered 1025 when count == 1 && constant 1025 always) => unbuffered 1027 using call_rpc"
add_node "(unbuffered 1028 always) => constant 1 using copy_latest_a"
add_node "(unbuffered 1028 when count == 1 && constant 1026 always) => unbuffered 1029 using call_rpc"
add_node "(unbuffered 1028 when count == 1 && constant 1027 always) => unbuffered 1030 using call_rpc"
add_node "(constant 1036 always && unbuffered 1037 when value == 8) => constant 1035 using copy_latest_a"
add_node "(constant 1037 always && unbuffered 1038 when value == 8) => constant 1035 using copy_latest_a"
add_node "(unbuffered 1032 always && constant 1 when value == 1) => unbuffered 1031 using copy_latest_a"
add_node "(counter 1026 always && constant 1 when value == 1) => counter 1028 using copy_latest_a"
add_node "(counter 1025 always && constant 1035 when value == 1) => counter 1031 using copy_latest_a"
add_node "(unbuffered 1031 when count == 1 && constant 1028 always) => unbuffered 1034 using call_rpc"
add_node "(counter 1028 when count >= 1 && constant 1030 always) => unbuffered 1035 using call_rpc"
add_node "(counter 1028 when count >= 1 && constant 1031 always) => output 34 using call_rpc"
add_node "(counter 1028 when count >= 1 && constant 1032 always) => output 33 using call_rpc"
add_node "(counter 1028 when count >= 1) => counter 1030 using copy_latest_a"
add_node "(counter 1031 when count >= 1 && constant 1039 always) => unbuffered 18 using call_rpc"
add_node "(counter 1031 when count >= 1 && constant 1040 always) => unbuffered 1039 using call_rpc"
add_node "(counter 1031 when count >= 1 && constant 1041 always) => unbuffered 15 using call_rpc"
add_node "(counter 1031 when count >= 1) => counter 1033 using copy_latest_a"
add_node "(counter 1030 when count == 1 && constant 1033 always) => output 35 using call_rpc"
add_node "(counter 1030 when count == 1 && constant 1034 always) => unbuffered 1036 using call_rpc"
add_node "(counter 1033 when count == 1 && constant 1042 always) => unbuffered 22 using call_rpc"
add_node "(counter 1033 when count == 1 && constant 1043 always) => unbuffered 25 using call_rpc"
add_streamer 'all outputs' 'controller' False hashedlist telegram
add_streamer 'all system outputs' 'controller' False hashedlist telegram --withother 0
add_streamer 'all system buffered' 'controller' False hashedlist telegram --withother 0
add_streamer 'unbuffered 18' 'controller' True individual telegram
add_streamer 'unbuffered 15' 'controller' True individual telegram
add_streamer 'unbuffered 22' 'controller' True individual telegram
add_streamer 'unbuffered 25' 'controller' True individual telegram
set_constant 'constant 1' 0
set_constant 'constant 1024' 819253
set_constant 'constant 1025' 532494
set_constant 'constant 1026' 819254
set_constant 'constant 1027' 532494
set_constant 'constant 1028' 819254
set_constant 'constant 1030' 950272
set_constant 'constant 1031' 950275
set_constant 'constant 1032' 950274
set_constant 'constant 1033' 950273
set_constant 'constant 1034' 819252
set_constant 'constant 1035' 0
set_constant 'constant 1036' 1
set_constant 'constant 1037' 0
set_constant 'constant 1039' 819203
set_constant 'constant 1040' 950272
set_constant 'constant 1041' 950275
set_constant 'constant 1042' 950274
set_constant 'constant 1043' 950273
persist
back
test_interface
set_version app 2055 --version '1.0'
back
config_database
clear_variables
set_variable 'controller' 8192 uint32_t 1
set_variable 'controller' 8193 uint32_t 0
set_variable 'controller' 8194 uint32_t 900
set_variable 'slot 2' 32768 uint16_t 20
set_variable 'slot 2' 32773 uint8_t 2
set_variable 'slot 2' 32774 uint8_t 1
set_variable 'slot 2' 32777 uint32_t 3
set_variable 'slot 2' 32776 uint8_t 0
back
reset
```

The following errors are created.
```
(SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) HardwareError: Error adding node to sensor graph
Additional Information:
code: 2147713036
(SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) (SensorGraph) HardwareError: Error pushing reading to stream
Additional Information:
code: 2147647489
(SensorGraph) (SensorGraph) (NRF52832Controller) (ControllerTest) (ControllerTest) (NRF52832Controller) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (ConfigDatabase) (NRF52832Controller) Resetting, takes at least 2 seconds
```
And it seems like the number of allowable nodes has been exceeded.

However, this snippet that was generated in the past on a POD-1M + vibration worked:
```
disable
clear
reset
add_node "(system input 3 always && constant 1035 when value == 1) => counter 1031 using copy_latest_a"
add_node "(system input 5 always && constant 1 when value == 1) => counter 1028 using copy_latest_a"
add_node "(input 1 always) => unbuffered 1024 using copy_latest_a"
add_node "(system input 1538 when value == 0) => unbuffered 1025 using copy_latest_a"
add_node "(system input 1538 when value == 1) => unbuffered 1028 using copy_latest_a"
add_node "(system input 1024 always) => unbuffered 1032 using copy_latest_a"
add_node "(system input 1025 always) => unbuffered 1037 using copy_latest_a"
add_node "(system input 1026 always) => unbuffered 1038 using copy_latest_a"
add_node "(unbuffered 1024 always) => output 32 using copy_latest_a"
add_node "(unbuffered 1025 always) => constant 1 using copy_latest_a"
add_node "(unbuffered 1025 when count == 1 && constant 1024 always) => unbuffered 1026 using call_rpc"
add_node "(unbuffered 1025 when count == 1 && constant 1025 always) => unbuffered 1027 using call_rpc"
add_node "(unbuffered 1028 always) => constant 1 using copy_latest_a"
add_node "(unbuffered 1028 when count == 1 && constant 1026 always) => unbuffered 1029 using call_rpc"
add_node "(unbuffered 1028 when count == 1 && constant 1027 always) => unbuffered 1030 using call_rpc"
add_node "(constant 1036 always && unbuffered 1037 when value == 8) => constant 1035 using copy_latest_a"
add_node "(constant 1037 always && unbuffered 1038 when value == 8) => constant 1035 using copy_latest_a"
add_node "(unbuffered 1032 always && constant 1 when value == 1) => unbuffered 1031 using copy_latest_a"
add_node "(unbuffered 1031 when count == 1 && constant 1028 always) => unbuffered 1034 using call_rpc"
add_node "(counter 1028 when count >= 1 && constant 1030 always) => unbuffered 1035 using call_rpc"
add_node "(counter 1028 when count >= 1 && constant 1031 always) => output 34 using call_rpc"
add_node "(counter 1028 when count >= 1 && constant 1032 always) => output 33 using call_rpc"
add_node "(counter 1028 when count >= 1) => counter 1030 using copy_latest_a"
add_node "(counter 1031 when count >= 1 && constant 1039 always) => unbuffered 18 using call_rpc"
add_node "(counter 1031 when count >= 1 && constant 1040 always) => unbuffered 1039 using call_rpc"
add_node "(counter 1031 when count >= 1 && constant 1041 always) => unbuffered 15 using call_rpc"
add_node "(counter 1031 when count >= 1) => counter 1033 using copy_latest_a"
add_node "(counter 1030 when count == 1 && constant 1033 always) => output 35 using call_rpc"
add_node "(counter 1030 when count == 1 && constant 1034 always) => unbuffered 1036 using call_rpc"
add_node "(counter 1033 when count == 1 && constant 1042 always) => unbuffered 22 using call_rpc"
add_node "(counter 1033 when count == 1 && constant 1043 always) => unbuffered 25 using call_rpc"
add_streamer 'all outputs' 'controller' False hashedlist telegram
add_streamer 'all system outputs' 'controller' False hashedlist telegram --withother 0
add_streamer 'all system buffered' 'controller' False hashedlist telegram --withother 0
add_streamer 'unbuffered 18' 'controller' True individual telegram
add_streamer 'unbuffered 15' 'controller' True individual telegram
add_streamer 'unbuffered 22' 'controller' True individual telegram
add_streamer 'unbuffered 25' 'controller' True individual telegram
set_constant 'constant 1' 0
set_constant 'constant 1024' 819253
set_constant 'constant 1025' 532494
set_constant 'constant 1026' 819254
set_constant 'constant 1027' 532494
set_constant 'constant 1028' 819254
set_constant 'constant 1030' 950272
set_constant 'constant 1031' 950275
set_constant 'constant 1032' 950274
set_constant 'constant 1033' 950273
set_constant 'constant 1034' 819252
set_constant 'constant 1035' 1
set_constant 'constant 1036' 1
set_constant 'constant 1037' 0
set_constant 'constant 1039' 819203
set_constant 'constant 1040' 950272
set_constant 'constant 1041' 950275
set_constant 'constant 1042' 950274
set_constant 'constant 1043' 950273
persist
back
test_interface
set_version app 2055 --version '1.0'
back
config_database
clear_variables
set_variable 'controller' 8192 uint32_t 1
set_variable 'controller' 8193 uint32_t 0
set_variable 'controller' 8194 uint32_t 900
set_variable 'controller' 8197 uint8_t 1
set_variable 'slot 2' 32768 uint16_t 20
set_variable 'slot 2' 32773 uint8_t 2
set_variable 'slot 2' 32774 uint8_t 1
set_variable 'slot 2' 32777 uint32_t 3
set_variable 'slot 2' 32776 uint8_t 0
back
reset
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.