use enum for state in EmbeddedChannel