EyesWeb XMI Forum
http://forum.eyesweb.infomus.org/

multiple reading
http://forum.eyesweb.infomus.org/viewtopic.php?f=25&t=414
Page 1 of 1

Author:  dubc [ 12 Aug 2009, 19:14 ]
Post subject:  multiple reading

Hi all,
I am working towards a patch that will detect a fall. At the moment i hav a patch that gives a warning if the x value from the Shimmer goes below a certain value i.e. the subject is at a certain angle. code to create this block is:
double d = _pInInPin1->GetValue();
CSTR str = "WARNING THE USER HAS FALLEN";

if(d < 1800)
_pOutOutPin1->SetValue(str);
_pOutOutPin1->SetCreationTime(_clockPtr->GetTime());

I want to have a block that will constantly read in the value and maybe store it in an array or list of some kind and compare it to see when there was a sudden change.
The input seems to only be read once if i use double for input pin and i can work on that value but i want values to be constantly input in the block. i was trying using a MatrixDouble as the type for input pin but i am having trouble getting the values to the output pin.


Can anyone help with this?
i would be very grateful, Thanks, Aidan.

Author:  paolo [ 26 Nov 2009, 15:41 ]
Post subject:  Re: multiple reading

You can use DoubleMatrix or a TimeSeries as input (e.g., sampleddata).
Otherwise, you can store the data inside your block and generate the output only when the event your are detecting occurs.

Paolo

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/