Is it possible to implement all 3 zigbee roles in single project?

As the question explained. I want to know if we can implement all three zigbee roles viz, Edge, Router and Co-Ordinator in a single project and can be able to switch them based on runtime variables (calling different functions based on this variable).  This variable can be written by any external app or device.

Is this even possible?

I tried 

CONFIG_ZIGBEE_ROLE_ROUTER=y
CONFIG_ZIGBEE_ROLE_EDGE=y
CONFIG_ZIGBEE_ROLE_COORDINATOR=y
in prj.conf file but throwing up errors. 
Any help is very much appreciated.
Thank you,
Kalyan.
Related