Commit 53d04b2f authored by claes's avatar claes

rt_fast remade for linux

parent b9266642
ifndef link_rule_mk
link_rule_mk := 1
link = $(ldxx) $(linkflags) $(domap) -o $(export_exe) \
$(export_obj) $(objects) $(rt_msg_objs) \
$(pwr_obj)/rt_io_user.o\
-lpwr_rt -lpwr_co \
-lpwr_msg_dummy \
-lrpcsvc -lpthread -lm -lrt
endif
This diff is collapsed.
#ifndef rt_dsfast_h
#define rt_dsfast_h
#include <string.h>
#include <vector>
extern "C" {
#include "pwr.h"
#include "pwr_baseclasses.h"
}
/*! \file rt_dsfast.h
\brief Contains the rt_dsfast class. */
/*! \addtogroup rt */
/*@{*/
#define FAST_CURVES 10
#define fast_cNoTrigg 0xffffffff
typedef enum {
fast_mFunction_ManTrigg = 1 << 0, //!< Allow manual trigg.
fast_mFunction_LevelTrigg = 1 << 1, //!< Trigg on level.
fast_mFunction_BeforeTrigg = 1 << 2, //!< Display points before trigg.
fast_mFunction_AlwaysPrepared = 1 << 3, //!< Overwrite old curve as soon as the old is viewed.
fast_mFunction_User = 1 << 4 //!< Curve is handled by the user.
} fast_mFunction;
class fastobject {
public:
fastobject( pwr_tObjid fast_oid) : oid( fast_oid), p(0), trigg(0), time_buffer(0),
old_level(0), stop_index(0), scan_div(0), scan_cnt(0)
{ memset( attributes, 0, sizeof(attributes));
memset( buffers, 0, sizeof(buffers));}
void open( double base_scantime);
void close();
void scan();
private:
pwr_tObjid oid;
pwr_sClass_DsFastCurve *p;
pwr_tBoolean *trigg;
void *attributes[FAST_CURVES];
void *buffers[FAST_CURVES];
void *time_buffer;
pwr_tDlid p_dlid;
pwr_tDlid trigg_dlid;
pwr_tDlid attributes_dlid[FAST_CURVES];
pwr_tDlid buffers_dlid[FAST_CURVES];
pwr_tDlid time_buffer_dlid;
pwr_tUInt32 attributes_size[FAST_CURVES];
pwr_tTime prepare_time;
pwr_tBoolean old_prepare;
pwr_tBoolean old_trigg;
int current_index;
int new_cnt;
pwr_tFloat32 old_level;
int stop_index;
int scan_div;
int scan_cnt;
double scan_base;
};
//! Handling of TrendCurve objects.
/*! ...
*/
class rt_fast {
public:
rt_fast() : fast_cnt(0), scan_time(0.1)
{}
void init( qcom_sQid *qid);
void open();
void close();
void scan();
double scantime() { return scan_time;}
private:
vector<fastobject*> objects;
int fast_cnt;
double scan_time;
};
/*@}*/
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment