about signal data type

Making & changing hardware drivers in Acquisition Server
Post Reply
siavash82ir
Posts: 3
Joined: Mon Jan 14, 2019 1:57 pm
Contact:

about signal data type

Post by siavash82ir »


طراحی سایت سئو سایت ثبت دامنه طراحی سایت فروشگاهی طراحی سایت احتشامیه طراحی سایت آزادی طراحی سایت ایرانشهر طراحی سایت جمالزاده طراحی سایت قلهک طراحی سایت محمودیه طراحی سایت دروس طراحی سایت نخجوان طراحی سایت امامزاده قاسم طراحی سایت شرکتی بلیط هواپیما هاست لینوکس طراحی سایت شرکتی تبلیغات گوگل طراحی سایت صنعتی طراحی سایت پزشکی طراحی سایت ارزان طراحی سایت بیمارستان طراحی سایت زعفرانیه طراحی سایت هفت تیر طراحی سایت انقلاب طراحی سایت امیرآباد طراحی سایت بازار طراحی سایت امانیه هاست طراحی سایت مدرسه طراحی سایت هتل طراحی سایت رستوران طراحی سایت املاک طراحی سایت زعفرانیه طراحی سایت دیباجی طراحی سایت ازگل طراحی سایت لواسان طراحی سایت کریمخان طراحی سایت تجریش طراحی سایت دانشگاه طراحی سایت سازمانی طراحی سایت کلینیک طراحی سایت آموزشگاه طراحی سایت آژانس مسافرتی طراحی لوگو طراحی سایت الهیه طراحی سایت میرداماد طراحی سایت اقدسیه طراحی سایت فرمانیه طراحی سایت نیاوران طراحی سایت ولنجک طراحی سایت سعادت آباد طراحی سایت قیطریه

hi friends
I am developping a driver and I just encountered something curious :
in the Designer, the type of signal samples is float64, so I though no precision would be lost if the driver acquires double precision data.
But in the driver, the buffer that has to be filled with these samples and sent to the callback function contains float32 samples.
I'm not sure but it seems to me that samples are cast from float32 to float64 in ovpCGenericNetworkAcquisition.cpp.
Why this choice ?
If a simple precision is enough, why are samples transformed into float64 in the Designer ?

Thanks
Last edited by siavash82ir on Mon Nov 04, 2019 9:55 am, edited 3 times in total.

snehalpatil2391
Posts: 3
Joined: Tue Feb 26, 2019 6:45 am

Re: about signal data type

Post by snehalpatil2391 »

For your first .apply example, you should try printing out the output of the to_numeric call each time and the data type. What you will find is that the numeric types will not match (you have uint64, int64, and float). In this case, we just collate the outputs together into an array-like (we have no idea that the function being used is to_numeric, so precision is moot), leading to the forced casting of float64.

Of the four examples, only your last one I would consider a bug. When we coerce, we should not crash because any "bad" elements are replaced with NaN. That means we need to catch OverflowError somewhere in the implementation.

Post Reply