{"action":"created","issue":{"url":"https://api.github.com/repos/automatak/dnp3/issues/142","labels_url":"https://api.github.com/repos/automatak/dnp3/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/automatak/dnp3/issues/142/comments","events_url":"https://api.github.com/repos/automatak/dnp3/issues/142/events","html_url":"https://github.com/automatak/dnp3/issues/142","id":129516588,"number":142,"title":"Command fail","user":{"login":"alex529","id":5837346,"avatar_url":"https://avatars.githubusercontent.com/u/5837346?v=3","gravatar_id":"","url":"https://api.github.com/users/alex529","html_url":"https://github.com/alex529","followers_url":"https://api.github.com/users/alex529/followers","following_url":"https://api.github.com/users/alex529/following{/other_user}","gists_url":"https://api.github.com/users/alex529/gists{/gist_id}","starred_url":"https://api.github.com/users/alex529/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex529/subscriptions","organizations_url":"https://api.github.com/users/alex529/orgs","repos_url":"https://api.github.com/users/alex529/repos","events_url":"https://api.github.com/users/alex529/events{/privacy}","received_events_url":"https://api.github.com/users/alex529/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-28T17:20:19Z","updated_at":"2016-01-28T18:53:56Z","closed_at":null,"body":"When an ICommandCollection colection is created from a CommandSet and nothing is added to it the DirectOperate comand will fail with the fallwing message:\r\n \r\ninfo: Summary: FAILURE_INTERNAL_ERROR\r\n Header: 1  Index: 3  State: INIT Status: UNDEFINED\r\n\r\n```\r\nopendnp3::CommandSet commands;\r\nauto& aod64 = commands.StartHeader<opendnp3::AnalogOutputDouble64>();// this will make the command fail\r\nauto& crb = commands.StartHeader<opendnp3::ControlRelayOutputBlock>();\r\nopendnp3::ControlRelayOutputBlock crob{opendnp3::ControlCode::LATCH_OFF};\r\ncrobs.push_back(std::make_pair(crob, dp.index));\r\nmaster->DirectOperate(std::move(commands), callback);\r\n```\r\n\r\nI'm not sure if this is buy design or it's a bug but its not documented anywh"},"comment":{"url":"https://api.github.com/repos/automatak/dnp3/issues/comments/176336130","html_url":"https://github.com/automatak/dnp3/issues/142#issuecomment-176336130","issue_url":"https://api.github.com/repos/automatak/dnp3/issues/142","id":176336130,"user":{"login":"jadamcrain","id":305813,"avatar_url":"https://avatars.githubusercontent.com/u/305813?v=3","gravatar_id":"","url":"https://api.github.com/users/jadamcrain","html_url":"https://github.com/jadamcrain","followers_url":"https://api.github.com/users/jadamcrain/followers","following_url":"https://api.github.com/users/jadamcrain/following{/other_user}","gists_url":"https://api.github.com/users/jadamcrain/gists{/gist_id}","starred_url":"https://api.github.com/users/jadamcrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jadamcrain/subscriptions","organizations_url":"https://api.github.com/users/jadamcrain/orgs","repos_url":"https://api.github.com/users/jadamcrain/repos","events_url":"https://api.github.com/users/jadamcrain/events{/privacy}","received_events_url":"https://api.github.com/users/jadamcrain/received_events","type":"User","site_admin":false},"created_at":"2016-01-28T18:53:56Z","updated_at":"2016-01-28T18:53:56Z","body":"Sounds like we should just ignore any empty headers in the CommandSet. The outstation will explicitly refuse to parse requests with a header count of zero.\r\n\r\nWill investigate before next release candidate."}}