fix compilation error, test decode, don't test encode, add packet class