{"action":"created","issue":{"url":"https://api.github.com/repos/modelica/Modelica_DeviceDrivers/issues/151","repository_url":"https://api.github.com/repos/modelica/Modelica_DeviceDrivers","labels_url":"https://api.github.com/repos/modelica/Modelica_DeviceDrivers/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/modelica/Modelica_DeviceDrivers/issues/151/comments","events_url":"https://api.github.com/repos/modelica/Modelica_DeviceDrivers/issues/151/events","html_url":"https://github.com/modelica/Modelica_DeviceDrivers/issues/151","id":187589705,"number":151,"title":"Optional forward output package in communication sinks","user":{"login":"tbeu","id":5444067,"avatar_url":"https://avatars.githubusercontent.com/u/5444067?v=3","gravatar_id":"","url":"https://api.github.com/users/tbeu","html_url":"https://github.com/tbeu","followers_url":"https://api.github.com/users/tbeu/followers","following_url":"https://api.github.com/users/tbeu/following{/other_user}","gists_url":"https://api.github.com/users/tbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/tbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbeu/subscriptions","organizations_url":"https://api.github.com/users/tbeu/orgs","repos_url":"https://api.github.com/users/tbeu/repos","events_url":"https://api.github.com/users/tbeu/events{/privacy}","received_events_url":"https://api.github.com/users/tbeu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-06T21:15:35Z","updated_at":"2016-11-12T20:20:59Z","closed_at":null,"body":"I again was faced with issue #81 and I noticed that if the communication sinks (i.e., SharedMemoryWrite, UDPSend, SerialPortSend, LCMSend, SoftingCAN.SoftingWriteMessage and SocketCAN.WriteMessage) optionally forward the output package, it could be used to solve the multiple sender issue (#122).\r\n\r\nThis is a demonstrating patch for LCMSend only ...\r\n```diff\r\n--- a/Modelica_DeviceDrivers/Blocks/Communication.mo\r\n+++ b/Modelica_DeviceDrivers/Blocks/Communication.mo\r\n@@ -454,10 +454,16 @@ sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev lo\r\n       annotation (Dialog(group=\"Outgoing data\", enable=provider==LCMProvider.UDPM));\r\n     parameter String channel_send=\"\" \"Channel name\"\r\n       annotation (Dialog(group=\"Outgoing data\"));\r\n+    parameter Boolean forwardPackage = false\r\n+      \"true, if input package is forwarded as output package\" annotation(Dialog(group=\"Outgoing data\"), choices(checkBox=true));\r\n     Interfaces.PackageIn pkgIn annotation (Placement(transformation(\r\n           extent={{-20,-20},{20,20}},\r\n           rotation=270,\r\n           origin={-108,0})));\r\n+    Interfaces.PackageOut pkgOut(pkg = pkgIn.pkg, trigger = pkgIn.trigger, dummy = dummy) if forwardPackage annotation (Placement(transformation(\r\n+          extent={{-20,-20},{20,20}},\r\n+          rotation=90,\r\n+          origin={108,0})));\r\n   protected\r\n     parameter Integer receiver = 0 \"Set to be a sender port\";\r\n     LCM lcm = LCM(\r\n```\r\n... with multiple LCMSend on the same serial package.\r\n![lcm](https://cloud.githubusercontent.com/assets/5444067/20041751/3e49a2d0-a46e-11e6-87e3-00ebe1a2c4f2.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/modelica/Modelica_DeviceDrivers/issues/comments/260145886","html_url":"https://github.com/modelica/Modelica_DeviceDrivers/issues/151#issuecomment-260145886","issue_url":"https://api.github.com/repos/modelica/Modelica_DeviceDrivers/issues/151","id":260145886,"user":{"login":"tbeu","id":5444067,"avatar_url":"https://avatars.githubusercontent.com/u/5444067?v=3","gravatar_id":"","url":"https://api.github.com/users/tbeu","html_url":"https://github.com/tbeu","followers_url":"https://api.github.com/users/tbeu/followers","following_url":"https://api.github.com/users/tbeu/following{/other_user}","gists_url":"https://api.github.com/users/tbeu/gists{/gist_id}","starred_url":"https://api.github.com/users/tbeu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbeu/subscriptions","organizations_url":"https://api.github.com/users/tbeu/orgs","repos_url":"https://api.github.com/users/tbeu/repos","events_url":"https://api.github.com/users/tbeu/events{/privacy}","received_events_url":"https://api.github.com/users/tbeu/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T20:20:59Z","updated_at":"2016-11-12T20:20:59Z","body":"I am also not sure how strongly this feature is requested by users. Probably none. For LCMSend the above example worked indeed, when tested. I only noticed by accident when once again stumbling across #81 (with every test of the communication examples I do). Hence, it is not of high priority for me, though #81 is really awkward."}}
{"actor":{"display_login":"tbeu"}}