/*
 * config.h
 *
 *  Created on: 12-01-2021
 *      Author: kjakubczyk
 */

#ifndef CONFIG_H_
#define CONFIG_H_

#define MAX_LOG_ELEMENTS		1050+10+20 // max logman elements // 20 dodano 26.08.2024 przy TZL

#define LOOP_CYCLE_MS			2  	// how many ms between main logman loops
#define SAMPLES_PER_MS			4  	// samples per ms -> 3 = 3kHz
#define MAIN_FREQ_PERIOD_MS		20
#define SAMPLES_INTERPOLATION 	1   // middle samples config in DFR => 0=sample_duplication, 1=linear interpolation, 2=NAN between
									// WARNING! linear interpolation needs disable extmem caching for DFR in app.cfg

#define IEC61850_ACTIVE			1 	// activate IEC61850 recv GOOSE/SV
#define SV_I_CARD_ADDR			14
#define SV_U_CARD_ADDR			15
#define SV_WAIT_LOOP_CYCLES		1 	// delay by x main loop cycles to wait for SV samples
#if IEC61850_ACTIVE==1
#define IEC61850_MIN_FR_SIZE	64
#define GOOSE_MAX_FR_SIZE		1100//bylo 1024 przed KAE
#define GOOSE_MAX_FR_OUT_SIZE	256
#define GOOSE_QUEUE_DEPTH		16
#define SV_MIN_FR_SIZE			64
#define SV_MAX_FR_SIZE			256
#define SV_QUEUE_DEPTH			16
#else
#define IEC61850_MIN_FR_SIZE	1
#define GOOSE_MAX_FR_SIZE		1
#define GOOSE_QUEUE_DEPTH		1
#define SV_MIN_FR_SIZE			1
#define SV_MAX_FR_SIZE			1
#define SV_QUEUE_DEPTH			1
#endif


#endif /* CONFIG_H_ */
