import gsmlib.GSMC0 as C0
import matplotlib.pyplot as plt

import numpy as np
import gsmlib.splibs as sp
import gsmlib.Burst as Burst
import gsmlib.burstfile as burstfile
from ctypes import *
import constant
import gsmlib.clib as clib
import gsmlib.SB as SB
import gsmlib.NB as NB
import gsmlib.convCode as convCode
import gsmlib.interleave as interleave
import time

class GSMClibTest:
	def __init__(self):
		self.c0 = C0.GSMC0()
		self.c0.initSCH()
		#self.c0.initBCCH()
		#self.c0.initCCCH(range(0,9))
		self.c0.initFACCH([5,6,7])
		#c0.initSDCCH(range(1),[1])

		self.lib = CDLL(constant.c_temp_dir+'libcgsm.so')
		self.acc = clib.clib(self.lib)
		for bcch in self.c0.bcch:
			bcch.setLib(self.lib)
		for ccch in self.c0.ccch:
			ccch.setLib(self.lib)
		
		file = "../../../temp/log"