I hope that English will be more comfortable to you

It seems like some type of German signals is more similar to your system than Russian ones. Your signage system is based on main and distant signal types, as it is considered in Germany. Take a look over some of implementations of them (unfortunately, I can't provide you any links) — they may be useful for you as the basis for your own implementation.