{"action":"created","comment":{"url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/comments/27356498","id":27356498,"diff_hunk":"@@ -0,0 +1,97 @@\n+package com.testingtech.playits.canfilter;\n+\n+import java.io.IOException;\n+\n+import org.etsi.ttcn.tci.BooleanValue;\n+import org.etsi.ttcn.tci.CharstringValue;\n+import org.etsi.ttcn.tci.IntegerValue;\n+\n+import com.testingtech.ttcn.annotation.ExternalFunction;\n+import com.testingtech.ttcn.tri.AnnotationsExternalFunctionPlugin;\n+import com.testingtech.util.UUID;\n+\n+@ExternalFunction.Definitions(Car2XControlExternalFunctionProvider.class)\n+public class Car2XControlExternalFunctionProvider extends\n+    AnnotationsExternalFunctionPlugin {\n+\n+  private static Process process;\n+  private static String processId;\n+\n+  /**\n+   * Starts a CAN filter service process with specified host and port\n+   * \n+   * @param host\n+   *            host name\n+   * @param portNumber\n+   *            port\n+   * @return process id\n+   */\n+  @ExternalFunction(name = \"start_Filter\", module = \"Car2X_Control\")\n+  public CharstringValue start_Filter(CharstringValue host,\n+      IntegerValue portNumber) {\n+    return start_Filter(\n+        // CANFilterService.class.getCanonicalName()\n+        \"com.testingtech.playits.canfilter.CANFilterService\",\n+        new String[] { host.getString(),\n+            String.valueOf(portNumber.getInt()) });\n+  }\n+\n+  private CharstringValue start_Filter(String mainClass, String[] parameters) {\n+    if (process != null && process.isAlive()) {\n+      return newCharstringValue(processId);\n+    }\n+    processId = UUID.randomUUID().toString();\n+\n+    logInfo(\"Starting \" + mainClass + \" with parameters: \\\"\"\n+        + join(parameters, \"\\\" \\\"\") + \"\\\"\");\n+\n+    try {\n+      process = Runtime.getRuntime().exec(\"java -classpath build/CANFilter;libs/java-json.jar \"\n+              + mainClass + \" \" + join(parameters, \" \"));\n+\n+      new StreamForwarder(process.getInputStream(), System.out)\n+          .start();\n+      new StreamForwarder(process.getErrorStream(), System.err)\n+          .start();\n+    } catch (IOException e) {\n+      logError(\"Could not start CAN filter service: \" + e.getMessage());","path":"TTCN3_Project/CANFilterControl/com/testingtech/playits/canfilter/Car2XControlExternalFunctionProvider.java","position":57,"original_position":57,"commit_id":"77928be39706e990860fceef3ecaaeeaed9018f4","original_commit_id":"77928be39706e990860fceef3ecaaeeaed9018f4","user":{"login":"Bragison","id":4232882,"avatar_url":"https://avatars.githubusercontent.com/u/4232882?v=3","gravatar_id":"","url":"https://api.github.com/users/Bragison","html_url":"https://github.com/Bragison","followers_url":"https://api.github.com/users/Bragison/followers","following_url":"https://api.github.com/users/Bragison/following{/other_user}","gists_url":"https://api.github.com/users/Bragison/gists{/gist_id}","starred_url":"https://api.github.com/users/Bragison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bragison/subscriptions","organizations_url":"https://api.github.com/users/Bragison/orgs","repos_url":"https://api.github.com/users/Bragison/repos","events_url":"https://api.github.com/users/Bragison/events{/privacy}","received_events_url":"https://api.github.com/users/Bragison/received_events","type":"User","site_admin":false},"body":"These error message strings should be excluded to a constants class to provide better maintainability.","created_at":"2015-03-29T17:14:04Z","updated_at":"2015-03-29T17:14:04Z","html_url":"https://github.com/TestingTechnologies/Play-ITS-2015/pull/2#discussion_r27356498","pull_request_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/comments/27356498"},"html":{"href":"https://github.com/TestingTechnologies/Play-ITS-2015/pull/2#discussion_r27356498"},"pull_request":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/2","id":31866870,"html_url":"https://github.com/TestingTechnologies/Play-ITS-2015/pull/2","diff_url":"https://github.com/TestingTechnologies/Play-ITS-2015/pull/2.diff","patch_url":"https://github.com/TestingTechnologies/Play-ITS-2015/pull/2.patch","issue_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues/2","number":2,"state":"open","locked":false,"title":"Open xc sim adaption","user":{"login":"aredok","id":6270013,"avatar_url":"https://avatars.githubusercontent.com/u/6270013?v=3","gravatar_id":"","url":"https://api.github.com/users/aredok","html_url":"https://github.com/aredok","followers_url":"https://api.github.com/users/aredok/followers","following_url":"https://api.github.com/users/aredok/following{/other_user}","gists_url":"https://api.github.com/users/aredok/gists{/gist_id}","starred_url":"https://api.github.com/users/aredok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aredok/subscriptions","organizations_url":"https://api.github.com/users/aredok/orgs","repos_url":"https://api.github.com/users/aredok/repos","events_url":"https://api.github.com/users/aredok/events{/privacy}","received_events_url":"https://api.github.com/users/aredok/received_events","type":"User","site_admin":false},"body":"@Bragison please review\r\n@chrisdamm and @kretzschi please check out the changes in the test adapter configuration, ttcn3 module parameters and ttcn3 setup / teardown functions. Added Car2xControl.ttcn3 to start and stop CAN filter service (java process) automatically at every test case run.","created_at":"2015-03-24T20:32:02Z","updated_at":"2015-03-29T17:14:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f14243108d4279303df0ba6b5fa2f8ac0b7a6c9","assignee":{"login":"Bragison","id":4232882,"avatar_url":"https://avatars.githubusercontent.com/u/4232882?v=3","gravatar_id":"","url":"https://api.github.com/users/Bragison","html_url":"https://github.com/Bragison","followers_url":"https://api.github.com/users/Bragison/followers","following_url":"https://api.github.com/users/Bragison/following{/other_user}","gists_url":"https://api.github.com/users/Bragison/gists{/gist_id}","starred_url":"https://api.github.com/users/Bragison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Bragison/subscriptions","organizations_url":"https://api.github.com/users/Bragison/orgs","repos_url":"https://api.github.com/users/Bragison/repos","events_url":"https://api.github.com/users/Bragison/events{/privacy}","received_events_url":"https://api.github.com/users/Bragison/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/2/commits","review_comments_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/2/comments","review_comment_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues/2/comments","statuses_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/statuses/77928be39706e990860fceef3ecaaeeaed9018f4","head":{"label":"TestingTechnologies:OpenXCSimAdaption","ref":"OpenXCSimAdaption","sha":"77928be39706e990860fceef3ecaaeeaed9018f4","user":{"login":"TestingTechnologies","id":2128735,"avatar_url":"https://avatars.githubusercontent.com/u/2128735?v=3","gravatar_id":"","url":"https://api.github.com/users/TestingTechnologies","html_url":"https://github.com/TestingTechnologies","followers_url":"https://api.github.com/users/TestingTechnologies/followers","following_url":"https://api.github.com/users/TestingTechnologies/following{/other_user}","gists_url":"https://api.github.com/users/TestingTechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/TestingTechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TestingTechnologies/subscriptions","organizations_url":"https://api.github.com/users/TestingTechnologies/orgs","repos_url":"https://api.github.com/users/TestingTechnologies/repos","events_url":"https://api.github.com/users/TestingTechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/TestingTechnologies/received_events","type":"Organization","site_admin":false},"repo":{"id":31264841,"name":"Play-ITS-2015","full_name":"TestingTechnologies/Play-ITS-2015","owner":{"login":"TestingTechnologies","id":2128735,"avatar_url":"https://avatars.githubusercontent.com/u/2128735?v=3","gravatar_id":"","url":"https://api.github.com/users/TestingTechnologies","html_url":"https://github.com/TestingTechnologies","followers_url":"https://api.github.com/users/TestingTechnologies/followers","following_url":"https://api.github.com/users/TestingTechnologies/following{/other_user}","gists_url":"https://api.github.com/users/TestingTechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/TestingTechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TestingTechnologies/subscriptions","organizations_url":"https://api.github.com/users/TestingTechnologies/orgs","repos_url":"https://api.github.com/users/TestingTechnologies/repos","events_url":"https://api.github.com/users/TestingTechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/TestingTechnologies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TestingTechnologies/Play-ITS-2015","description":"ITS Student Project at FU-Berlin Winter Semester 2014-2015","fork":false,"url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015","forks_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/forks","keys_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/teams","hooks_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/hooks","issue_events_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues/events{/number}","events_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/events","assignees_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/assignees{/user}","branches_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/branches{/branch}","tags_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/tags","blobs_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/statuses/{sha}","languages_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/languages","stargazers_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/stargazers","contributors_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/contributors","subscribers_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/subscribers","subscription_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/subscription","commits_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/contents/{+path}","compare_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/merges","archive_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/downloads","issues_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues{/number}","pulls_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls{/number}","milestones_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/milestones{/number}","notifications_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/labels{/name}","releases_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/releases{/id}","created_at":"2015-02-24T14:53:18Z","updated_at":"2015-02-27T12:53:45Z","pushed_at":"2015-03-29T17:12:46Z","git_url":"git://github.com/TestingTechnologies/Play-ITS-2015.git","ssh_url":"git@github.com:TestingTechnologies/Play-ITS-2015.git","clone_url":"https://github.com/TestingTechnologies/Play-ITS-2015.git","svn_url":"https://github.com/TestingTechnologies/Play-ITS-2015","homepage":null,"size":3494,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"TestingTechnologies:master","ref":"master","sha":"bc7c67d5265f078bed0fecc260e92ee7c44c5ada","user":{"login":"TestingTechnologies","id":2128735,"avatar_url":"https://avatars.githubusercontent.com/u/2128735?v=3","gravatar_id":"","url":"https://api.github.com/users/TestingTechnologies","html_url":"https://github.com/TestingTechnologies","followers_url":"https://api.github.com/users/TestingTechnologies/followers","following_url":"https://api.github.com/users/TestingTechnologies/following{/other_user}","gists_url":"https://api.github.com/users/TestingTechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/TestingTechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TestingTechnologies/subscriptions","organizations_url":"https://api.github.com/users/TestingTechnologies/orgs","repos_url":"https://api.github.com/users/TestingTechnologies/repos","events_url":"https://api.github.com/users/TestingTechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/TestingTechnologies/received_events","type":"Organization","site_admin":false},"repo":{"id":31264841,"name":"Play-ITS-2015","full_name":"TestingTechnologies/Play-ITS-2015","owner":{"login":"TestingTechnologies","id":2128735,"avatar_url":"https://avatars.githubusercontent.com/u/2128735?v=3","gravatar_id":"","url":"https://api.github.com/users/TestingTechnologies","html_url":"https://github.com/TestingTechnologies","followers_url":"https://api.github.com/users/TestingTechnologies/followers","following_url":"https://api.github.com/users/TestingTechnologies/following{/other_user}","gists_url":"https://api.github.com/users/TestingTechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/TestingTechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TestingTechnologies/subscriptions","organizations_url":"https://api.github.com/users/TestingTechnologies/orgs","repos_url":"https://api.github.com/users/TestingTechnologies/repos","events_url":"https://api.github.com/users/TestingTechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/TestingTechnologies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TestingTechnologies/Play-ITS-2015","description":"ITS Student Project at FU-Berlin Winter Semester 2014-2015","fork":false,"url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015","forks_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/forks","keys_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/teams","hooks_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/hooks","issue_events_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues/events{/number}","events_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/events","assignees_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/assignees{/user}","branches_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/branches{/branch}","tags_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/tags","blobs_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/refs{/sha}","trees_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/statuses/{sha}","languages_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/languages","stargazers_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/stargazers","contributors_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/contributors","subscribers_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/subscribers","subscription_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/subscription","commits_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/commits{/sha}","git_commits_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/git/commits{/sha}","comments_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/comments{/number}","issue_comment_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues/comments{/number}","contents_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/contents/{+path}","compare_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/merges","archive_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/downloads","issues_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues{/number}","pulls_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls{/number}","milestones_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/milestones{/number}","notifications_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/labels{/name}","releases_url":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/releases{/id}","created_at":"2015-02-24T14:53:18Z","updated_at":"2015-02-27T12:53:45Z","pushed_at":"2015-03-29T17:12:46Z","git_url":"git://github.com/TestingTechnologies/Play-ITS-2015.git","ssh_url":"git@github.com:TestingTechnologies/Play-ITS-2015.git","clone_url":"https://github.com/TestingTechnologies/Play-ITS-2015.git","svn_url":"https://github.com/TestingTechnologies/Play-ITS-2015","homepage":null,"size":3494,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/2"},"html":{"href":"https://github.com/TestingTechnologies/Play-ITS-2015/pull/2"},"issue":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues/2"},"comments":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/TestingTechnologies/Play-ITS-2015/statuses/77928be39706e990860fceef3ecaaeeaed9018f4"}}}}