Packet writer improvement
parameter can now have different type, only allow integer and enums, same sign
added runtimecheck for max value