update codes and finsh all msg definations