Add procedure to Message_Manager for module's to register themselves.
This procedure supplies them with a Module_Mailbox with several capabilities:
The only way to read the module's messages is with one
of these boxes.
The only (expected) way for modules to send messages is
by using a mailbox. The mailbox will ensure the message is
sent from the correct address.
Additionally, Messages are now passed around with access types
and mailboxes have a queue size determined per module.
I changed as many of the modules as I could to use Mailboxes. Transport modules will require further consideration because they receive messages from outside the domain and similarly can't register mailboxes for them to be "sent" from. Perhaps Transport Modules should be a special component, different than modules? Maybe Modules and Transport Modules should implement different predefined interfaces? For now, I will leave the depreciated Route_Message functions publicly visible and mark them depreciated.
The tests pass but note that the SPARK analysis isn't complete. I'm not all the way though the refactor, just marking a milestone here.
Add Mailboxes
Add procedure to Message_Manager for module's to register themselves. This procedure supplies them with a Module_Mailbox with several capabilities:
I changed as many of the modules as I could to use Mailboxes. Transport modules will require further consideration because they receive messages from outside the domain and similarly can't register mailboxes for them to be "sent" from. Perhaps Transport Modules should be a special component, different than modules? Maybe Modules and Transport Modules should implement different predefined interfaces? For now, I will leave the depreciated Route_Message functions publicly visible and mark them depreciated.
The tests pass but note that the SPARK analysis isn't complete. I'm not all the way though the refactor, just marking a milestone here.