|
Listing 2. Pseudo-code of one of the M ROADM agents. |
|
main(): |
| ... |
| for every connection with other ROADM devices: |
| <subscribe to updates for connection status on the OneM2M > |
| while (True): |
| for every circuit pack: |
|
for every port: |
| if port-direction ==“tx”: |
| <read tx power from device port> |
| else if port-direction ==“rx”: |
| <read rx power from device port> |
| <prepare message for the OneM2M> |
| <send message> |
| <sleep(sleeping-time)> |
| |
| |
|
newSubscriptionUpdate(): |
| <get the body of the update> |
| <process the received information> |
| <compute > |