| Listing 3. Pseudo-code of the controller. |
| while (True): |
| <query the OneM2M for the status of ROADM devices> |
| for every device: |
| if malfunctioning is detected: |
| <see connections of device> |
| for every broken connection: |
| <prepare message for the OneM2M> |
| <send message> |