Cheng Ge

How to apply Library Code into ZSTAR3 example source code

Discussion created by Cheng Ge on Jun 3, 2010
Latest reply on Jun 9, 2010 by Petr Gargulak

Dear ZSTAR3 developer

 

We had some problems when we tried to using the C# language code from ZStar Library in Visual Studio, although it has no problem to run. 
       For example, if we want to change the DataRate of ZStar3 sensor from 30Hz to 120Hz, apply and develop it based on Example Source Code, then how would we do it? 
The related code that been given in library is shown as following: 
      public ZStar3.DataRate DataRate { get; }
      public enum DataRate
      Member                                              Description
DataRate_30Hz        Acceleration data are reading with 30Hz datarate 
DataRate_60Hz        Acceleration data are reading with 60Hz datarate 
DataRate_120Hz      Acceleration data are reading with 120Hz datarate 
In this case, do we need to create private void? and inside of bracket {...} i.e 'get;' does that mean we need to put 'DataRate_60Hz' replace the 'get;' ? (but it still not working properly) 
The similar occurred when we trying to using average filter code from library, i.e
 public int AverageFilterSamples { get; set; }
Again we are very unsure about what to do with 'get; set;', is 'get' in here means import the data? Is 'set' in here means set order value of Filter? And finally how to implement this code in the example source code to make a average filter? We need a guide and help in order to apply these useful code from library wisely. 
So it would be very kind of you if you could let us know how to use and imply the library code into example source code which is written in C# language and a detailed answer would be appreciated.

 

Thank you very much in advance.

Cheng

Outcomes