switch (state & 0x0f) {
    case FWD_S1:
        .
        .
        break;
    .
    .
    default:
        // Stopped - just wait for a running state.
        ;
}