{"action":"created","issue":{"url":"https://api.github.com/repos/edgexfoundry/device-sdk-go/issues/67","repository_url":"https://api.github.com/repos/edgexfoundry/device-sdk-go","labels_url":"https://api.github.com/repos/edgexfoundry/device-sdk-go/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/edgexfoundry/device-sdk-go/issues/67/comments","events_url":"https://api.github.com/repos/edgexfoundry/device-sdk-go/issues/67/events","html_url":"https://github.com/edgexfoundry/device-sdk-go/issues/67","id":365169762,"node_id":"MDU6SXNzdWUzNjUxNjk3NjI=","number":67,"title":"Add param member to CommandRequest and remove from ProtocolDriver.HandleCommands","user":{"login":"tonyespy","id":5264713,"node_id":"MDQ6VXNlcjUyNjQ3MTM=","avatar_url":"https://avatars3.githubusercontent.com/u/5264713?v=4","gravatar_id":"","url":"https://api.github.com/users/tonyespy","html_url":"https://github.com/tonyespy","followers_url":"https://api.github.com/users/tonyespy/followers","following_url":"https://api.github.com/users/tonyespy/following{/other_user}","gists_url":"https://api.github.com/users/tonyespy/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyespy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyespy/subscriptions","organizations_url":"https://api.github.com/users/tonyespy/orgs","repos_url":"https://api.github.com/users/tonyespy/repos","events_url":"https://api.github.com/users/tonyespy/events{/privacy}","received_events_url":"https://api.github.com/users/tonyespy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-09-29T21:48:53Z","updated_at":"2018-10-05T12:15:01Z","closed_at":null,"author_association":"MEMBER","body":"The ProtocolDriver HandleCommands function has a parameter called 'params' which is used to pass command actuation parameters to the protocol specific code. Currently if the 'set/put' form of the command endpoint is called, this parameter is the corresponding JSON passed to the endpoint. It was suggested instead that we should parse this JSON and add a new parms field to the CommandRequest struct to simply the work the ProtocolDriver has to perform.\r\n"},"comment":{"url":"https://api.github.com/repos/edgexfoundry/device-sdk-go/issues/comments/427344870","html_url":"https://github.com/edgexfoundry/device-sdk-go/issues/67#issuecomment-427344870","issue_url":"https://api.github.com/repos/edgexfoundry/device-sdk-go/issues/67","id":427344870,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzM0NDg3MA==","user":{"login":"cloudxxx8","id":11695863,"node_id":"MDQ6VXNlcjExNjk1ODYz","avatar_url":"https://avatars1.githubusercontent.com/u/11695863?v=4","gravatar_id":"","url":"https://api.github.com/users/cloudxxx8","html_url":"https://github.com/cloudxxx8","followers_url":"https://api.github.com/users/cloudxxx8/followers","following_url":"https://api.github.com/users/cloudxxx8/following{/other_user}","gists_url":"https://api.github.com/users/cloudxxx8/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudxxx8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudxxx8/subscriptions","organizations_url":"https://api.github.com/users/cloudxxx8/orgs","repos_url":"https://api.github.com/users/cloudxxx8/repos","events_url":"https://api.github.com/users/cloudxxx8/events{/privacy}","received_events_url":"https://api.github.com/users/cloudxxx8/received_events","type":"User","site_admin":false},"created_at":"2018-10-05T12:15:01Z","updated_at":"2018-10-05T12:15:01Z","author_association":"MEMBER","body":"@tonyespy  and @iain-anderson, to leverage \"CommandResult\" for put command, it should look like the following:\r\n```\r\nHandlePutCommands(addr models.Addressable, reqs []CommandRequest, params map[string]CommandResult) error\r\n```\r\n\r\nHowever, the type name of CommandResult looks weird here.  Do you have any idea to rename this struct?  May we rename it to CommandValue or CommandParameter? This struct could be used generally.  In this case, the API might look like:\r\n\r\n```\r\nHandleGetCommands(addr models.Addressable, reqs []CommandRequest) ([]CommandValue, error)\r\n\r\nHandlePutCommands(addr models.Addressable, reqs []CommandRequest, params map[string]CommandValue) error\r\n```"}}
{"actor":{"display_login":"cloudxxx8"}}