encoderstate defines