#pragma once
#include <cstdio>
#include <iostream>
#include <vector>
#include "sdu.h"
#include "Xgem.h"

class HLend {

public:
	float getTest(void);
	HLend(int16_t _BWmapLength = 0);
	int16_t getBWmapLength() { return BWmapLength; }
private:
	int16_t BWmapLength = -1;  //realně 11 bitový
	unsigned char PloamCount;  //realně 8 bitový
	//int16_t HEC;  //realně 11 bitový
};

class AllocStruc {

public:
	AllocStruc(int16_t _AllocId, uint8_t _Flags, uint16_t _StartTime, uint16_t _GrantSize);
	int16_t getAllocId() { return AllocId; }
	uint16_t getFlags() { return Flags; }
	uint16_t getStartTime() { return StartTime; }
	uint16_t getGrantSize() { return GrantSize; }
private:
	int16_t AllocId = -1;	
	uint8_t Flags = 0;	
	uint16_t StartTime = 0;	
	uint16_t GrantSize = 0;
	//bool Fwi;	
	//uint8_t BurstProfile = -1;	
	//int16_t HEC = -1; 
};

class BWmap {

public:
	BWmap::BWmap(std::vector<AllocStruc> _allocStrucs);
	BWmap::BWmap();
private:
	std::vector<AllocStruc>  allocStrucs;
};

class PloamMess {

public:
	PloamMess::PloamMess(int16_t _message);
private:
	int16_t message;

};

class PloamD {

public:
	PloamD::PloamD(std::vector<PloamMess>  _allocStrucs);
	PloamD::PloamD();
private:
	std::vector<PloamMess>  allocStrucs;	
};

class DXgtcHeader {
	

public:	
	DXgtcHeader::DXgtcHeader(HLend &_hLend, std::vector<AllocStruc> _bwmap);
	DXgtcHeader::DXgtcHeader();
	HLend getHLend() { return hLend; }
	std::vector<AllocStruc> getBwmap() { return bwmap; }
private:
	HLend hLend;
	std::vector<AllocStruc> bwmap;
	//PloamD ploamD;
};

class DXgtcFrame {
	

public:
	
	DXgtcFrame::DXgtcFrame(DXgtcHeader _dXgtcHeader, std::vector<Xgem> _naklad);
	DXgtcFrame::DXgtcFrame();

	DXgtcHeader getdXgtcHeader() { return dXgtcHeader; }
	void setdXgtcHeader(DXgtcHeader _dXgtcHeader) { dXgtcHeader = _dXgtcHeader; }

	std::vector<Xgem> getNaklad() { return naklad; }

private:
	DXgtcHeader dXgtcHeader;
	std::vector<Xgem> naklad;
};