from awlsim.common.cython_support cimport *
from awlsim.core.cpu cimport *

cdef class Counter(object):
	cdef public S7CPU cpu
	cdef public uint32_t index
	cdef public _Bool prevVKE_FR
	cdef public _Bool prevVKE_S
	cdef public _Bool prevVKE_ZV
	cdef public _Bool prevVKE_ZR
	cdef public uint16_t counter

	cdef _Bool get(self)
	cdef uint16_t getValueBin(self)
	cdef uint16_t getValueBCD(self)
	cdef setValueBCD(self, uint16_t bcd)
	cdef set(self, _Bool VKE)
	cdef void reset(self)
	cdef void run_FR(self, _Bool VKE)
	cdef void run_ZV(self, _Bool VKE)
	cdef void run_ZR(self, _Bool VKE)
