{"action":"created","issue":{"url":"https://api.github.com/repos/volkszaehler/libsml/issues/7","labels_url":"https://api.github.com/repos/volkszaehler/libsml/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/volkszaehler/libsml/issues/7/comments","events_url":"https://api.github.com/repos/volkszaehler/libsml/issues/7/events","html_url":"https://github.com/volkszaehler/libsml/issues/7","id":53686590,"number":7,"title":"no case 0x55 in sml_value_to_double() ?","user":{"login":"devZer0","id":3506105,"avatar_url":"https://avatars.githubusercontent.com/u/3506105?v=3","gravatar_id":"","url":"https://api.github.com/users/devZer0","html_url":"https://github.com/devZer0","followers_url":"https://api.github.com/users/devZer0/followers","following_url":"https://api.github.com/users/devZer0/following{/other_user}","gists_url":"https://api.github.com/users/devZer0/gists{/gist_id}","starred_url":"https://api.github.com/users/devZer0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devZer0/subscriptions","organizations_url":"https://api.github.com/users/devZer0/orgs","repos_url":"https://api.github.com/users/devZer0/repos","events_url":"https://api.github.com/users/devZer0/events{/privacy}","received_events_url":"https://api.github.com/users/devZer0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-07T21:48:13Z","updated_at":"2015-01-08T19:33:43Z","closed_at":null,"body":"thread: http://volkszaehler.org/pipermail/volkszaehler-dev/2015-January/004049.html\r\n\r\nis this possibly a bug , that libsml does not seem to handle value->type 0x55 ? \r\n\r\n\r\nfrom the mail conversation:\r\n\r\naccording to \r\nhttps://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Publikationen/TechnischeRichtlinien/TR03109/TR-03109-1_Anlage_Feinspezifikation_Drahtgebundene_LMN-Schnittstelle_Teilb.pdf\r\nand\r\nhttp://wiki.volkszaehler.org/hardware/channels/meters/power/edl-ehz/emh-ehz-h1\r\n \r\nthe value to interpret after \"0x55\" is \"Integer32\"\r\n \r\n77070100100700FF 01 01 621B 52FF 55 FFFFFF47  0177078181C78\r\n \r\nlet`s convert that to  int32 :\r\n \r\nhttp://www.binaryconvert.com/result_signed_int.html?hexadecimal=FFFFFF47  (netter converter, btw)\r\n \r\nresult:\r\n-185 !\r\n \r\nApparently, your parser does not work correctly (note: the reporter does not use libslm)\r\n \r\nthe following makes me curious, as there is no \"case\" 0x55    return ...int32   ?\r\nShouldn`t it return int32 for 0x55, too?\r\n\r\nhttps://github.com/dailab/libsml/blob/master/sml/src/sml_value.c\r\n \r\ndouble sml_value_to_double(sml_value *value) {\r\nswitch (value->type) {\r\ncase 0x51: return *value->data.int8; break;\r\ncase 0x52: return *value->data.int16; break;\r\ncase 0x54: return *value->data.int32; break;\r\ncase 0x58: return *value->data.int64; break;\r\ncase 0x61: return *value->data.uint8; break;\r\ncase 0x62: return *value->data.uint16; break;\r\ncase 0x64: return *value->data.uint32; break;\r\ncase 0x68: return *value->data.uint64; break;\r\n \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/volkszaehler/libsml/issues/comments/69235114","html_url":"https://github.com/volkszaehler/libsml/issues/7#issuecomment-69235114","issue_url":"https://api.github.com/repos/volkszaehler/libsml/issues/7","id":69235114,"user":{"login":"andig","id":184815,"avatar_url":"https://avatars.githubusercontent.com/u/184815?v=3","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T19:33:43Z","updated_at":"2015-01-08T19:33:43Z","body":"> einfach mal ein patch\r\n\r\n+1\r\n\r\nIst es nur die Zeile?\r\n\r\n    case 0x55: return *value->data.int32; break;"}}