Multiple on all measumerent under one one monitor

hello all,
how can I have two on all measurements under one monitor?
I am trying to do something like this, but only the first on all Measurement works while the second one does not, what do I have to fix?

monitor xxx(){
 action onload(){
  monitor.subscribe(Measurement.SUBSCRIBE_CHANNEL);
  on all Measurement(type=MEASUREMENT_TYPE_A) as measurement
  {
  ...code...
  }
  monitor.subscribe(Measurement.SUBSCRIBE_CHANNEL);
  on all Measurement(type=MEASUREMENT_TYPE_B) as measurement
  {
  ...code...
  }
 }
}

The second call to subscribe() is unnecessary. Otherwise, I can see no error in your code. The first listener should trigger for each Measurement received with a type of MEASUREMENT_TYPE_A and the second should trigger if a Measurement has instead a type of MEASUREMENT_TYPE_B. Are you sure that you are using the correct value for MEASUREMENT_TYPE_B and you are successfully creating measurements of this second type?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.