{"action":"created","comment":{"url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/comments/24372169","id":24372169,"diff_hunk":"@@ -0,0 +1,324 @@\n+/*\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation; either version 2 of the License, or\n+ * (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU Library General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n+ *\n+ * OpenLightingDevice.cpp\n+ * The Open Lighting USB Device.\n+ * Copyright (C) 2015 Simon Newton\n+ */\n+\n+#include \"tools/ja-rule/OpenLightingDevice.h\"\n+\n+#include <libusb.h>\n+\n+#include <string.h>\n+\n+#include <ola/Callback.h>\n+#include <ola/Clock.h>\n+#include <ola/Constants.h>\n+#include <ola/DmxBuffer.h>\n+#include <ola/Logging.h>\n+#include <ola/base/Array.h>\n+#include <ola/io/SelectServer.h>\n+#include <ola/strings/Format.h>\n+#include <ola/thread/Mutex.h>\n+\n+#include <memory>\n+#include <string>\n+\n+using std::auto_ptr;\n+using std::cout;\n+using std::string;\n+\n+using ola::Clock;\n+using ola::NewCallback;\n+using ola::NewSingleCallback;\n+using ola::TimeInterval;\n+using ola::TimeStamp;\n+using ola::io::SelectServer;\n+using ola::thread::Mutex;\n+using ola::thread::MutexLocker;\n+\n+static const uint8_t kInEndpoint = 0x81;\n+static const uint8_t kOutEndpoint = 0x01;\n+static const unsigned int kTimeout = 1000;\n+\n+namespace {\n+\n+void InTransferCompleteHandler(struct libusb_transfer *transfer) {\n+  OpenLightingDevice *sender = static_cast<OpenLightingDevice*>(\n+      transfer->user_data);\n+  return sender->_InTransferComplete();\n+}\n+\n+void OutTransferCompleteHandler(struct libusb_transfer *transfer) {\n+  OpenLightingDevice *sender = static_cast<OpenLightingDevice*>(\n+      transfer->user_data);\n+  return sender->_OutTransferComplete();\n+}\n+}  // namespace\n+\n+\n+OpenLightingDevice::OpenLightingDevice(SelectServer* ss, libusb_device* device)\n+  : m_ss(ss),\n+    m_device(device),\n+    m_handle(NULL),\n+    m_out_transfer(libusb_alloc_transfer(0)),\n+    m_out_in_progress(false),\n+    m_in_transfer(libusb_alloc_transfer(0)),\n+    m_in_in_progress(false) {\n+}\n+\n+OpenLightingDevice::~OpenLightingDevice() {\n+  {\n+    MutexLocker locker(&m_out_mutex);\n+    if (m_out_in_progress) {\n+      OLA_INFO << \"cancel m_out_transfer\";\n+      libusb_cancel_transfer(m_out_transfer);\n+    }\n+  }\n+\n+  {\n+    MutexLocker locker(&m_in_mutex);\n+    if (m_in_in_progress) {\n+      OLA_INFO << \"cancel m_in_transfer\";\n+      libusb_cancel_transfer(m_in_transfer);\n+    }\n+  }\n+\n+  OLA_INFO << \"Waiting for out to complete\";\n+  while (true) {\n+    MutexLocker locker(&m_out_mutex);\n+    if (!m_out_in_progress) {\n+      break;\n+    }\n+  }\n+\n+  OLA_INFO << \"Waiting for in to complete\";\n+  while (true) {\n+    MutexLocker locker(&m_in_mutex);\n+    if (!m_in_in_progress) {\n+      break;\n+    }\n+  }\n+\n+  if (m_out_transfer) {\n+    libusb_free_transfer(m_out_transfer);\n+  }\n+\n+  if (m_in_transfer) {\n+    libusb_free_transfer(m_in_transfer);\n+  }\n+\n+  if (m_handle) {\n+    libusb_close(m_handle);\n+    m_handle = NULL;\n+  }\n+}\n+\n+bool OpenLightingDevice::Init() {\n+  int r = libusb_open(m_device, &m_handle);\n+  if (r != 0) {\n+    OLA_WARN << \"Failed to open device: \" << libusb_error_name(r);\n+    return false;\n+  }\n+\n+  r = libusb_claim_interface(m_handle, 0);\n+  if (r) {\n+    OLA_WARN << \"Failed to claim interface: 0\";\n+    libusb_close(m_handle);\n+    return false;\n+  }\n+  return true;\n+}\n+\n+bool OpenLightingDevice::SendMessage(Command command,\n+                                     const uint8_t *data,\n+                                     unsigned int size) {\n+  if (size > MAX_PAYLOAD_SIZE) {\n+    OLA_WARN << \"Message exceeds max payload size\";\n+    return false;\n+  }\n+\n+  MutexLocker locker(&m_out_mutex);\n+  if (m_out_in_progress) {\n+    OLA_WARN << \"TX in progress, dropping message\";\n+    return false;\n+  }\n+\n+  unsigned int offset = 0;\n+  m_out_buffer[0] = SOF_IDENTIFIER;\n+  m_out_buffer[1] = static_cast<uint8_t>(command & 0xff);\n+  m_out_buffer[2] = static_cast<uint8_t>(command >> 8);\n+  m_out_buffer[3] = static_cast<uint8_t>(size & 0xff);\n+  m_out_buffer[4] = static_cast<uint8_t>(size >> 8);\n+  offset += 5;\n+\n+  if (size > 0) {\n+    memcpy(m_out_buffer + offset, data, size);\n+    offset += size;\n+  }\n+  m_out_buffer[offset++] = EOF_IDENTIFIER;\n+\n+  if (offset % USB_PACKET_SIZE == 0)  {\n+    // We need to pad the message so that the transfer completes on the\n+    // Device side. We could use LIBUSB_TRANSFER_ADD_ZERO_PACKET instead but\n+    // that isn't avaiable on all platforms.\n+    m_out_buffer[offset++] = 0;\n+  }\n+\n+  libusb_fill_bulk_transfer(m_out_transfer, m_handle, kOutEndpoint,\n+                            m_out_buffer, offset,\n+                            OutTransferCompleteHandler,\n+                            static_cast<void*>(this),\n+                            kTimeout);\n+\n+  Clock clock;\n+  clock.CurrentTime(&m_out_sent_time);\n+  OLA_INFO << \"TX: Sending \" << offset << \" bytes\";\n+\n+  int r = libusb_submit_transfer(m_out_transfer);\n+\n+  if (r) {\n+    OLA_WARN << \"Failed to submit out transfer: \" << libusb_error_name(r);\n+    return false;\n+  }\n+\n+  m_out_in_progress = true;\n+  locker.Release();\n+  // Submit the In transfer here to reduce the latency.\n+  SubmitInTransfer();\n+  return true;\n+}\n+\n+void OpenLightingDevice::_OutTransferComplete() {\n+  if (m_out_transfer->status == LIBUSB_TRANSFER_COMPLETED) {\n+    if (m_out_transfer->actual_length != m_out_transfer->length) {\n+      OLA_WARN << \"Only sent \" << m_out_transfer->actual_length << \" / \"\n+               << m_out_transfer->length << \" bytes\";\n+    }\n+  }\n+  {\n+    MutexLocker locker(&m_out_mutex);\n+    m_out_in_progress = false;\n+  }\n+}\n+\n+void OpenLightingDevice::_InTransferComplete() {\n+  TimeStamp now;\n+  Clock clock;\n+  clock.CurrentTime(&now);\n+  OLA_INFO << \"Command completed in \" << (now - m_out_sent_time)\n+           << \", status is \" << libusb_error_name(m_in_transfer->status);\n+\n+  if (m_in_transfer->status == LIBUSB_TRANSFER_COMPLETED) {\n+    // Ownership of the buffer is transferred to the HandleData method,\n+    // running on the SS thread.\n+    m_ss->Execute(\n+        NewSingleCallback(\n+          this, &OpenLightingDevice::HandleData,\n+          reinterpret_cast<const uint8_t*>(m_in_transfer->buffer),\n+          static_cast<unsigned int>(m_in_transfer->actual_length)));\n+  } else {\n+    delete[] m_in_transfer->buffer;\n+  }\n+\n+  {\n+    MutexLocker locker(&m_out_mutex);\n+    m_in_in_progress = false;\n+  }\n+}\n+\n+bool OpenLightingDevice::SubmitInTransfer() {\n+  MutexLocker locker(&m_in_mutex);\n+  if (m_in_in_progress) {\n+    OLA_WARN << \"Reading already pending\";\n+    return true;\n+  }\n+\n+\n+  uint8_t* rx_buffer = new uint8_t[IN_BUFFER_SIZE];\n+  libusb_fill_bulk_transfer(m_in_transfer, m_handle, kInEndpoint,\n+                            rx_buffer, IN_BUFFER_SIZE,\n+                            InTransferCompleteHandler,\n+                            static_cast<void*>(this),\n+                            kTimeout);\n+\n+  Clock clock;\n+  clock.CurrentTime(&m_send_in_time);\n+  int r = libusb_submit_transfer(m_in_transfer);\n+  if (r) {\n+    OLA_WARN << \"Failed to submit input transfer: \" << libusb_error_name(r);\n+    return false;\n+  }\n+\n+  m_in_in_progress = true;\n+  return true;\n+}\n+\n+void OpenLightingDevice::HandleData(const uint8_t* data, unsigned int size) {\n+  class ArrayDeleter {\n+   public:\n+    explicit ArrayDeleter(const uint8_t* data) : m_data(data) {}\n+    ~ArrayDeleter() { delete[] m_data; }\n+   private:\n+    const uint8_t* m_data;\n+  };\n+\n+  ArrayDeleter deleter(data);\n+\n+  // Right now we assume that the device only sends a single message at a time.\n+  // If this ever change from a message model to more of a stream model we'll","path":"tools/ja-rule/OpenLightingDevice.cpp","position":282,"original_position":282,"commit_id":"3cbc3c4e70632769a02d7ac0334ca88067ac1d17","original_commit_id":"3cbc3c4e70632769a02d7ac0334ca88067ac1d17","user":{"login":"peternewman","id":6216436,"avatar_url":"https://avatars.githubusercontent.com/u/6216436?v=3","gravatar_id":"","url":"https://api.github.com/users/peternewman","html_url":"https://github.com/peternewman","followers_url":"https://api.github.com/users/peternewman/followers","following_url":"https://api.github.com/users/peternewman/following{/other_user}","gists_url":"https://api.github.com/users/peternewman/gists{/gist_id}","starred_url":"https://api.github.com/users/peternewman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peternewman/subscriptions","organizations_url":"https://api.github.com/users/peternewman/orgs","repos_url":"https://api.github.com/users/peternewman/repos","events_url":"https://api.github.com/users/peternewman/events{/privacy}","received_events_url":"https://api.github.com/users/peternewman/received_events","type":"User","site_admin":false},"body":"SPaG changes","created_at":"2015-02-09T22:32:16Z","updated_at":"2015-02-09T22:32:16Z","html_url":"https://github.com/OpenLightingProject/ola/pull/627#discussion_r24372169","pull_request_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/627","_links":{"self":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/comments/24372169"},"html":{"href":"https://github.com/OpenLightingProject/ola/pull/627#discussion_r24372169"},"pull_request":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/627"}}},"pull_request":{"url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/627","id":28939680,"html_url":"https://github.com/OpenLightingProject/ola/pull/627","diff_url":"https://github.com/OpenLightingProject/ola/pull/627.diff","patch_url":"https://github.com/OpenLightingProject/ola/pull/627.patch","issue_url":"https://api.github.com/repos/OpenLightingProject/ola/issues/627","number":627,"state":"open","locked":false,"title":"Add the first iteration of the Ja Rule testing tool.","user":{"login":"nomis52","id":4355332,"avatar_url":"https://avatars.githubusercontent.com/u/4355332?v=3","gravatar_id":"","url":"https://api.github.com/users/nomis52","html_url":"https://github.com/nomis52","followers_url":"https://api.github.com/users/nomis52/followers","following_url":"https://api.github.com/users/nomis52/following{/other_user}","gists_url":"https://api.github.com/users/nomis52/gists{/gist_id}","starred_url":"https://api.github.com/users/nomis52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomis52/subscriptions","organizations_url":"https://api.github.com/users/nomis52/orgs","repos_url":"https://api.github.com/users/nomis52/repos","events_url":"https://api.github.com/users/nomis52/events{/privacy}","received_events_url":"https://api.github.com/users/nomis52/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-09T17:28:08Z","updated_at":"2015-02-09T22:32:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"66d3b945622b00de2acabf1265cedbe8c2748a84","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/627/commits","review_comments_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/627/comments","review_comment_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls/comments/{number}","comments_url":"https://api.github.com/repos/OpenLightingProject/ola/issues/627/comments","statuses_url":"https://api.github.com/repos/OpenLightingProject/ola/statuses/3cbc3c4e70632769a02d7ac0334ca88067ac1d17","head":{"label":"nomis52:master","ref":"master","sha":"3cbc3c4e70632769a02d7ac0334ca88067ac1d17","user":{"login":"nomis52","id":4355332,"avatar_url":"https://avatars.githubusercontent.com/u/4355332?v=3","gravatar_id":"","url":"https://api.github.com/users/nomis52","html_url":"https://github.com/nomis52","followers_url":"https://api.github.com/users/nomis52/followers","following_url":"https://api.github.com/users/nomis52/following{/other_user}","gists_url":"https://api.github.com/users/nomis52/gists{/gist_id}","starred_url":"https://api.github.com/users/nomis52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomis52/subscriptions","organizations_url":"https://api.github.com/users/nomis52/orgs","repos_url":"https://api.github.com/users/nomis52/repos","events_url":"https://api.github.com/users/nomis52/events{/privacy}","received_events_url":"https://api.github.com/users/nomis52/received_events","type":"User","site_admin":false},"repo":{"id":15822023,"name":"ola","full_name":"nomis52/ola","owner":{"login":"nomis52","id":4355332,"avatar_url":"https://avatars.githubusercontent.com/u/4355332?v=3","gravatar_id":"","url":"https://api.github.com/users/nomis52","html_url":"https://github.com/nomis52","followers_url":"https://api.github.com/users/nomis52/followers","following_url":"https://api.github.com/users/nomis52/following{/other_user}","gists_url":"https://api.github.com/users/nomis52/gists{/gist_id}","starred_url":"https://api.github.com/users/nomis52/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nomis52/subscriptions","organizations_url":"https://api.github.com/users/nomis52/orgs","repos_url":"https://api.github.com/users/nomis52/repos","events_url":"https://api.github.com/users/nomis52/events{/privacy}","received_events_url":"https://api.github.com/users/nomis52/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nomis52/ola","description":"The Open Lighting Architecture","fork":true,"url":"https://api.github.com/repos/nomis52/ola","forks_url":"https://api.github.com/repos/nomis52/ola/forks","keys_url":"https://api.github.com/repos/nomis52/ola/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nomis52/ola/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nomis52/ola/teams","hooks_url":"https://api.github.com/repos/nomis52/ola/hooks","issue_events_url":"https://api.github.com/repos/nomis52/ola/issues/events{/number}","events_url":"https://api.github.com/repos/nomis52/ola/events","assignees_url":"https://api.github.com/repos/nomis52/ola/assignees{/user}","branches_url":"https://api.github.com/repos/nomis52/ola/branches{/branch}","tags_url":"https://api.github.com/repos/nomis52/ola/tags","blobs_url":"https://api.github.com/repos/nomis52/ola/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nomis52/ola/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nomis52/ola/git/refs{/sha}","trees_url":"https://api.github.com/repos/nomis52/ola/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nomis52/ola/statuses/{sha}","languages_url":"https://api.github.com/repos/nomis52/ola/languages","stargazers_url":"https://api.github.com/repos/nomis52/ola/stargazers","contributors_url":"https://api.github.com/repos/nomis52/ola/contributors","subscribers_url":"https://api.github.com/repos/nomis52/ola/subscribers","subscription_url":"https://api.github.com/repos/nomis52/ola/subscription","commits_url":"https://api.github.com/repos/nomis52/ola/commits{/sha}","git_commits_url":"https://api.github.com/repos/nomis52/ola/git/commits{/sha}","comments_url":"https://api.github.com/repos/nomis52/ola/comments{/number}","issue_comment_url":"https://api.github.com/repos/nomis52/ola/issues/comments/{number}","contents_url":"https://api.github.com/repos/nomis52/ola/contents/{+path}","compare_url":"https://api.github.com/repos/nomis52/ola/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nomis52/ola/merges","archive_url":"https://api.github.com/repos/nomis52/ola/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nomis52/ola/downloads","issues_url":"https://api.github.com/repos/nomis52/ola/issues{/number}","pulls_url":"https://api.github.com/repos/nomis52/ola/pulls{/number}","milestones_url":"https://api.github.com/repos/nomis52/ola/milestones{/number}","notifications_url":"https://api.github.com/repos/nomis52/ola/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nomis52/ola/labels{/name}","releases_url":"https://api.github.com/repos/nomis52/ola/releases{/id}","created_at":"2014-01-11T12:21:27Z","updated_at":"2015-02-09T17:32:07Z","pushed_at":"2015-02-09T17:32:07Z","git_url":"git://github.com/nomis52/ola.git","ssh_url":"git@github.com:nomis52/ola.git","clone_url":"https://github.com/nomis52/ola.git","svn_url":"https://github.com/nomis52/ola","homepage":null,"size":16797,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OpenLightingProject:master","ref":"master","sha":"8c3bd7fef8e3108201cef56fe983bd96a81a16c9","user":{"login":"OpenLightingProject","id":6199314,"avatar_url":"https://avatars.githubusercontent.com/u/6199314?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenLightingProject","html_url":"https://github.com/OpenLightingProject","followers_url":"https://api.github.com/users/OpenLightingProject/followers","following_url":"https://api.github.com/users/OpenLightingProject/following{/other_user}","gists_url":"https://api.github.com/users/OpenLightingProject/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenLightingProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenLightingProject/subscriptions","organizations_url":"https://api.github.com/users/OpenLightingProject/orgs","repos_url":"https://api.github.com/users/OpenLightingProject/repos","events_url":"https://api.github.com/users/OpenLightingProject/events{/privacy}","received_events_url":"https://api.github.com/users/OpenLightingProject/received_events","type":"Organization","site_admin":false},"repo":{"id":15233168,"name":"ola","full_name":"OpenLightingProject/ola","owner":{"login":"OpenLightingProject","id":6199314,"avatar_url":"https://avatars.githubusercontent.com/u/6199314?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenLightingProject","html_url":"https://github.com/OpenLightingProject","followers_url":"https://api.github.com/users/OpenLightingProject/followers","following_url":"https://api.github.com/users/OpenLightingProject/following{/other_user}","gists_url":"https://api.github.com/users/OpenLightingProject/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenLightingProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenLightingProject/subscriptions","organizations_url":"https://api.github.com/users/OpenLightingProject/orgs","repos_url":"https://api.github.com/users/OpenLightingProject/repos","events_url":"https://api.github.com/users/OpenLightingProject/events{/privacy}","received_events_url":"https://api.github.com/users/OpenLightingProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenLightingProject/ola","description":"The Open Lighting Architecture","fork":false,"url":"https://api.github.com/repos/OpenLightingProject/ola","forks_url":"https://api.github.com/repos/OpenLightingProject/ola/forks","keys_url":"https://api.github.com/repos/OpenLightingProject/ola/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenLightingProject/ola/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenLightingProject/ola/teams","hooks_url":"https://api.github.com/repos/OpenLightingProject/ola/hooks","issue_events_url":"https://api.github.com/repos/OpenLightingProject/ola/issues/events{/number}","events_url":"https://api.github.com/repos/OpenLightingProject/ola/events","assignees_url":"https://api.github.com/repos/OpenLightingProject/ola/assignees{/user}","branches_url":"https://api.github.com/repos/OpenLightingProject/ola/branches{/branch}","tags_url":"https://api.github.com/repos/OpenLightingProject/ola/tags","blobs_url":"https://api.github.com/repos/OpenLightingProject/ola/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenLightingProject/ola/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenLightingProject/ola/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenLightingProject/ola/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenLightingProject/ola/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenLightingProject/ola/languages","stargazers_url":"https://api.github.com/repos/OpenLightingProject/ola/stargazers","contributors_url":"https://api.github.com/repos/OpenLightingProject/ola/contributors","subscribers_url":"https://api.github.com/repos/OpenLightingProject/ola/subscribers","subscription_url":"https://api.github.com/repos/OpenLightingProject/ola/subscription","commits_url":"https://api.github.com/repos/OpenLightingProject/ola/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenLightingProject/ola/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenLightingProject/ola/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenLightingProject/ola/issues/comments/{number}","contents_url":"https://api.github.com/repos/OpenLightingProject/ola/contents/{+path}","compare_url":"https://api.github.com/repos/OpenLightingProject/ola/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenLightingProject/ola/merges","archive_url":"https://api.github.com/repos/OpenLightingProject/ola/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenLightingProject/ola/downloads","issues_url":"https://api.github.com/repos/OpenLightingProject/ola/issues{/number}","pulls_url":"https://api.github.com/repos/OpenLightingProject/ola/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenLightingProject/ola/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenLightingProject/ola/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenLightingProject/ola/labels{/name}","releases_url":"https://api.github.com/repos/OpenLightingProject/ola/releases{/id}","created_at":"2013-12-16T18:06:52Z","updated_at":"2015-02-08T21:37:50Z","pushed_at":"2015-02-08T21:37:48Z","git_url":"git://github.com/OpenLightingProject/ola.git","ssh_url":"git@github.com:OpenLightingProject/ola.git","clone_url":"https://github.com/OpenLightingProject/ola.git","svn_url":"https://github.com/OpenLightingProject/ola","homepage":"https://www.openlighting.org/ola/","size":21023,"stargazers_count":67,"watchers_count":67,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":40,"mirror_url":null,"open_issues_count":73,"forks":40,"open_issues":73,"watchers":67,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/627"},"html":{"href":"https://github.com/OpenLightingProject/ola/pull/627"},"issue":{"href":"https://api.github.com/repos/OpenLightingProject/ola/issues/627"},"comments":{"href":"https://api.github.com/repos/OpenLightingProject/ola/issues/627/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/627/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/OpenLightingProject/ola/pulls/627/commits"},"statuses":{"href":"https://api.github.com/repos/OpenLightingProject/ola/statuses/3cbc3c4e70632769a02d7ac0334ca88067ac1d17"}}}}