AdvertisingController
Purpose
The AdvertisingController should be used for registering custom advertising messages. Advertising jobs can be added and removed and have a number of slots according to their importance. The AdvertisingController will then schedule all registered advertising messages so that they cannot interfer with the messages from other modules.
Functionality
Advertising messages can either be scheduled or immediate. A scheduled message will be send randomly according to the number of slots interleaved with all other registered advertising messages. An immediate message will stop all other advertising and will send the message for the number of slots given. The job will then be removed automatically.
The advertising controller will automatically use the lowest advertising interval from all registered messages.
If there are two registered advertising messages, each with 5 slots, they will be distributed evenly, each 5 out of a sum of 10 slots. Once another job with 5 slots is registered, each message is sent 1/3 of the time.
The AdvertisingController will also make sure that advertising is restarted once a connection to another device is made.