| Algorithm 1: Dynamic Communication Efficiency Optimization |
| Input: Set of received information blocks |
| Set of battery consumptions |
| Estimated costs and (hardware dependent) |
| Circular buffer with last evaluations |
| Circular buffer with last evaluations |
| Output: Endpoint configuration |
| Calculate for the set of received information blocks , |
| Calculate using the set of battery consumptions , |
| Calculate the mean entropy of the information blocks, Obtain the mean communication efficiency |
| if or endpoint is not configured then |
| for every server pattern do |
| for every cost do |
| Calculate using the proposed mathematical model |
| Obtain using Bayes theorem |
| end for |
| Calculate |
| end for |
| Calculate |
| Insert in |
| if is contained in at least times then |
| if server allows dynamic scheduling then |
| else |
| end if |
| else if is contained in at least times then |
| Estimate using the set of received information blocks |
| if then |
| end if |
| else |
| if is contained in at least times then |
| end if |
| end if |
| Insert in |
| if server allows negotiation then |
| if in at least times then |
| else if in at least times then |
| else |
| if in at least times then |
| end if |
| end if |
| end if |
| end if |