/*
 * elements.h
 *
 *  Created on: 08-04-2014
 *      Author: Krzysztof Jakubczyk
 */

#ifndef ELEMENTS_H_
#define ELEMENTS_H_

#include "klapacz.h"
#include "relay_out.h"
#include "bin_in.h"
#include "nand.h"
#include "and.h"
#include "nor.h"
#include "or.h"
#include "xor.h"
#include "not.h"
#include "tz.h"
#include "tp.h"
#include "analog_in.h"
#include "valf_gt.h"
#include "e_filtr1h.h"
#include "ov_1ph.h"
#include "sr.h"
#include "under_1ph.h"
#include "event.h"
#include "events_reg.h"
#include "rec_bin.h"
#include "rec_an.h"
#include "dfr.h"
#include "edge_det.h"
#include "measurand.h"
#include "led.h"
#include "leds_drv.h"
#include "virt_in.h"
#include "virt_in_drv.h"
#include "dfr_drv.h"
#include "e_filtr2h.h"
#include "e_filtr3h.h"
#include "e_filtr5h.h"
#include "e_avg.h"
#include "e_avg_1t.h"
#include "e_avg_dt.h"
#include "pow.h"
#include "e_rms.h"
#include "e_rms_1t.h"
#include "e_addvec.h"
#include "e_subvec.h"
#include "e_mulvec.h"
#include "e_mulcon.h"
#include "e_sc_p.h"
#include "e_sc_n.h"
#include "e_sc_z.h"
#include "e_mem1.h"
#include "e_cu.h"
#include "e_f.h"
#include "e_du.h"
#include "e_df_3f.h"
#include "e_df_dt.h"
#include "e_df_dt_3f.h"
#include "e_du_dt.h"
#include "e_filtr1h_2T.h"
#include "e_pq_1f.h"
#include "e_pq_3f.h"
#include "e_pq_A.h"
#include "R_67N_LWN.h"
#include "u_fail.h"
#include "i_fail.h"
#include "ps.h"
#include "l_comm.h"
#include "ov_3ph.h"
#include "under_3ph.h"
#include "bank_sel.h"
#include "rec_float.h"
#include "sck.h"
#include "e_f_3f.h"
#include "pkw.h"
#include "log_state.h"
#include "spz_3f.h"
#include "dev_ctrl.h"
#include "e_phi.h"
#include "mul_float.h"
#include "and8.h"
#include "or8.h"
#include "CBR.h"
#include "sqrt.h"
#include "cfg_state.h"
#include "mux_float.h"
#include "e_filtr2h_1khz.h"
#include "sum_float.h"
#include "ZDistA.h"
#include "ZDistL.h"
#include "ZDistS.h"
#include "e_mem.h"
#include "Diff.h"
#include "Diff_1.h"
#include "Diff_2.h"
#include "demux8.h"
#include "LMZ.h"
#include "ddr.h"
#include "ddr_drv.h"
#include "ov_1ph2h.h"
#include "ov_3ph2h.h"
#include "zzr.h"
#include "an_gen.h"
#include "kier_pr.h"
#include "chka.h"
#include "mux_bin.h"
#include "hr_3ph2h.h"
#include "21g.h"
#include "counter.h"
#include "const_flt.h"
#include "chka_ieee.h"
#include "R_67N_LWN2.h"
#include "eth.h"
#include "mkstream.h"
#include "destream.h"
#include "R87L.h"
#include "and4.h"
#include "or4.h"
#include "cnt.h"
#include "c37_94.h"
#include "sum_flt_3f.h"
#include "sum_e_3f.h"
#include "cap_comp.h"
#include "s_demux.h"
#include "out_drv.h"
#include "ov_3ph2h_slow.h"
#include "tz_8.h"
#include "mki7.h"
#include "goose.h"
#include "rec_buf.h"
#include "sv.h"
#include "goose_drv.h"
#include "goose_out.h"
#include "RNT.h"
#include "nr_zacz.h"
#include "prog_czas.h"
#include "r_freq.h"
#include "dec_month.h"
#include "mux_t.h"
#include "lacz.h"
#include "LRW.h"
#include "comp_s.h"
#include "ps2.h"
#include "ZDistA_komp.h"
#include "ZDistL_komp.h"
#include "spz_3f_2.h"
#include "s_demux2.h"
#include "eth_ench.h"
#include "eth_demux.h"
#include "R87L_8.h"
#include "mki7_2.h"
#include "Diff_1_bis.h"
#include "od_bl.h"
#include "log_wyl.h"

#define EVENT_FUN_ID		19

#define REC_BIN_FUN_ID		21
#define REC_AN_FUN_ID		22
#define REC_FLOAT_FUN_ID	66
#define REC_BUF_FUN_ID		122
#define DFR_FUN_ID			23
#define DDR_FUN_ID			91
#define LED_FUN_ID			26
#define BUZZER_FUN_ID		27
#define VIRT_IN_FUN_ID		20
#define REL_OUT_FUN_ID		2
#define GOOSE_FUN_ID		121
#define GOOSE_OUT_FUN_ID	126
#define SV_FUN_ID			123
#define GOOSE_DRV_FUN_ID	125

#define LEDS_DRV_FUN_ID		65534
#define EVENTS_REG_FUN_ID	65533
#define VIRT_IN_DRV_FUN_ID	65532
#define DFR_DRV_FUN_ID		65531
#define DDR_DRV_FUN_ID		65530
#define AN_GEN_FUN_ID		65529
#define OUT_DRV_FUN_ID		65528

#define EOF_ELEMENT			0xFFFF
#define NULL 				0

struct element_info
{
	u16 id;
	int (*initlog_ptr)(void*,void*);
	void (*fun_main_ptr)(void*,void*);
	void (*fun_100hz_ptr)(void*,void*);
	void (*fun_20hz_ptr)(void*,void*);
	u32 args_size;
	u32 log_size;
};

extern /*const*/ struct element_info log_elements[];

#endif /* ELEMENTS_H_ */
