diff --git a/communication.md b/communication.md index 8fdc67fa87547ed300b1546a276dc74a97ea5612..86590f3fe8275db15610772d53608e1b1cde75bd 100644 --- a/communication.md +++ b/communication.md @@ -75,6 +75,54 @@ For example: - roscombridge/dji0/a/ext/unit_info/ALL - roscombridge/dji0/a/ext/tf/op0 +## Unreliable Communication + +Messages not arriving can in some cases be handled on the application level. + +For example to distribute a TST tree to all possible agents we have a service call +TSTDistributeTreeFromUuid.srv: +```bash +string[] units # List of units to distribute to. + # If empty distribute to everybody in possible units +string uuid # Root node node_uuid of the TST to distribute +--- +string com_uuid # Used to check if tree have been distributed. +bool success +int32 error +string reason +``` + +And GetResponse.srv: +```bash +string cuuid # Identifier for the thing we need an response for +--- +bool have_response # True if there is a response +string name +string[] need_response_from # List of units we need response from +string[] have_response_from # List of units we have response from +bool success # If true the thing was OK. +``` + +So we make a service call to distribute the tree and get com_uuid as +response. We use com_uuid in the GetResponse service call to check if +we have gotten a response from every receiver of the tree. + +The actual distribution of the tree is done by sending a TSTDistributeTreeInfo.msg message on a topic: +```bash +string uuid # Use this uuid for confirmation that the tree have been distributed +string sender # Namespace for the sender +string tree_json # The TST tree to distribute +``` + +And the message confirming reception Response.msg: +```bash +string uuid +string cuuid # uuid for the command this is a response to +string responder # Namespace for the responder. +bool success # If true the command was OK. +string fail_reason # If fail, this is if given the reason. +``` + ## UNSTRUCTERED MISC