{"action":"created","issue":{"url":"https://api.github.com/repos/OpenAutomationTechnologies/openPOWERLINK_V2/issues/344","repository_url":"https://api.github.com/repos/OpenAutomationTechnologies/openPOWERLINK_V2","labels_url":"https://api.github.com/repos/OpenAutomationTechnologies/openPOWERLINK_V2/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/OpenAutomationTechnologies/openPOWERLINK_V2/issues/344/comments","events_url":"https://api.github.com/repos/OpenAutomationTechnologies/openPOWERLINK_V2/issues/344/events","html_url":"https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/pull/344","id":313184176,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgwNzk4MDcz","number":344,"title":"[TASK] Unify default ami module implementation","user":{"login":"sebhub","id":932056,"node_id":"MDQ6VXNlcjkzMjA1Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/932056?v=4","gravatar_id":"","url":"https://api.github.com/users/sebhub","html_url":"https://github.com/sebhub","followers_url":"https://api.github.com/users/sebhub/followers","following_url":"https://api.github.com/users/sebhub/following{/other_user}","gists_url":"https://api.github.com/users/sebhub/gists{/gist_id}","starred_url":"https://api.github.com/users/sebhub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebhub/subscriptions","organizations_url":"https://api.github.com/users/sebhub/orgs","repos_url":"https://api.github.com/users/sebhub/repos","events_url":"https://api.github.com/users/sebhub/events{/privacy}","received_events_url":"https://api.github.com/users/sebhub/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"zelenkaj","id":3468920,"node_id":"MDQ6VXNlcjM0Njg5MjA=","avatar_url":"https://avatars3.githubusercontent.com/u/3468920?v=4","gravatar_id":"","url":"https://api.github.com/users/zelenkaj","html_url":"https://github.com/zelenkaj","followers_url":"https://api.github.com/users/zelenkaj/followers","following_url":"https://api.github.com/users/zelenkaj/following{/other_user}","gists_url":"https://api.github.com/users/zelenkaj/gists{/gist_id}","starred_url":"https://api.github.com/users/zelenkaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zelenkaj/subscriptions","organizations_url":"https://api.github.com/users/zelenkaj/orgs","repos_url":"https://api.github.com/users/zelenkaj/repos","events_url":"https://api.github.com/users/zelenkaj/events{/privacy}","received_events_url":"https://api.github.com/users/zelenkaj/received_events","type":"User","site_admin":false},"assignees":[{"login":"zelenkaj","id":3468920,"node_id":"MDQ6VXNlcjM0Njg5MjA=","avatar_url":"https://avatars3.githubusercontent.com/u/3468920?v=4","gravatar_id":"","url":"https://api.github.com/users/zelenkaj","html_url":"https://github.com/zelenkaj","followers_url":"https://api.github.com/users/zelenkaj/followers","following_url":"https://api.github.com/users/zelenkaj/following{/other_user}","gists_url":"https://api.github.com/users/zelenkaj/gists{/gist_id}","starred_url":"https://api.github.com/users/zelenkaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zelenkaj/subscriptions","organizations_url":"https://api.github.com/users/zelenkaj/orgs","repos_url":"https://api.github.com/users/zelenkaj/repos","events_url":"https://api.github.com/users/zelenkaj/events{/privacy}","received_events_url":"https://api.github.com/users/zelenkaj/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-04-11T06:03:19Z","updated_at":"2018-06-22T08:40:50Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/OpenAutomationTechnologies/openPOWERLINK_V2/pulls/344","html_url":"https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/pull/344","diff_url":"https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/pull/344.diff","patch_url":"https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/pull/344.patch"},"body":"There is no need to provide big-endian and little-endian implementations\r\nfor the ami module.\r\n\r\nIt was tested on a big-endian and little-endian target with the\r\nfollowing test function:\r\n\r\n    #include <common/ami.h>\r\n\r\n    #include <assert.h>\r\n    #include <string.h>\r\n\r\n    void\r\n    test_ami(void)\r\n    {\r\n        static const UINT8 le[8] =\r\n            { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };\r\n        static const UINT8 be[8] =\r\n            { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01 };\r\n        UINT8 v8;\r\n        UINT16 v16;\r\n        UINT32 v32;\r\n        UINT64 v64;\r\n        UINT8 buf[8];\r\n\r\n        ami_setUint8Le(buf, 0x01);\r\n        assert(memcmp(buf, le, 1) == 0);\r\n        v8 = ami_getUint8Le(buf);\r\n        assert(v8 == 0x01);\r\n\r\n        ami_setUint8Be(buf, v8);\r\n        assert(memcmp(buf, &be[7], 1) == 0);\r\n        v8 = ami_getUint8Be(buf);\r\n        assert(v8 == 0x01);\r\n\r\n        ami_setUint16Le(buf, 0x0201);\r\n        assert(memcmp(buf, le, 2) == 0);\r\n        v16 = ami_getUint16Le(buf);\r\n        assert(v16 == 0x0201);\r\n\r\n        ami_setUint16Be(buf, v16);\r\n        assert(memcmp(buf, &be[6], 2) == 0);\r\n        v16 = ami_getUint16Be(buf);\r\n        assert(v16 == 0x0201);\r\n\r\n        ami_setUint24Le(buf, 0x030201);\r\n        assert(memcmp(buf, le, 3) == 0);\r\n        v32 = ami_getUint24Le(buf);\r\n        assert(v32 == 0x030201);\r\n\r\n        ami_setUint24Be(buf, v32);\r\n        assert(memcmp(buf, &be[5], 3) == 0);\r\n        v32 = ami_getUint24Be(buf);\r\n        assert(v32 == 0x030201);\r\n\r\n        ami_setUint32Le(buf, 0x04030201);\r\n        assert(memcmp(buf, le, 4) == 0);\r\n        v32 = ami_getUint32Le(buf);\r\n        assert(v32 == 0x04030201);\r\n\r\n        ami_setUint32Be(buf, v32);\r\n        assert(memcmp(buf, &be[4], 4) == 0);\r\n        v32 = ami_getUint32Be(buf);\r\n        assert(v32 == 0x04030201);\r\n\r\n        ami_setUint40Le(buf, 0x0504030201);\r\n        assert(memcmp(buf, le, 5) == 0);\r\n        v64 = ami_getUint40Le(buf);\r\n        assert(v64 == 0x0504030201);\r\n\r\n        ami_setUint40Be(buf, v64);\r\n        assert(memcmp(buf, &be[3], 5) == 0);\r\n        v64 = ami_getUint40Be(buf);\r\n        assert(v64 == 0x0504030201);\r\n\r\n        ami_setUint48Le(buf, 0x060504030201);\r\n        assert(memcmp(buf, le, 6) == 0);\r\n        v64 = ami_getUint48Le(buf);\r\n        assert(v64 == 0x060504030201);\r\n\r\n        ami_setUint48Be(buf, v64);\r\n        assert(memcmp(buf, &be[2], 6) == 0);\r\n        v64 = ami_getUint48Be(buf);\r\n        assert(v64 == 0x060504030201);\r\n\r\n        ami_setUint56Le(buf, 0x07060504030201);\r\n        assert(memcmp(buf, le, 7) == 0);\r\n        v64 = ami_getUint56Le(buf);\r\n        assert(v64 == 0x07060504030201);\r\n\r\n        ami_setUint56Be(buf, v64);\r\n        assert(memcmp(buf, &be[1], 7) == 0);\r\n        v64 = ami_getUint56Be(buf);\r\n        assert(v64 == 0x07060504030201);\r\n\r\n        ami_setUint64Le(buf, 0x0807060504030201);\r\n        assert(memcmp(buf, le, 8) == 0);\r\n        v64 = ami_getUint64Le(buf);\r\n        assert(v64 == 0x0807060504030201);\r\n\r\n        ami_setUint64Be(buf, v64);\r\n        assert(memcmp(buf, &be[0], 8) == 0);\r\n        v64 = ami_getUint64Be(buf);\r\n        assert(v64 == 0x0807060504030201);\r\n    }"},"comment":{"url":"https://api.github.com/repos/OpenAutomationTechnologies/openPOWERLINK_V2/issues/comments/399368255","html_url":"https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/pull/344#issuecomment-399368255","issue_url":"https://api.github.com/repos/OpenAutomationTechnologies/openPOWERLINK_V2/issues/344","id":399368255,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTM2ODI1NQ==","user":{"login":"zelenkaj","id":3468920,"node_id":"MDQ6VXNlcjM0Njg5MjA=","avatar_url":"https://avatars3.githubusercontent.com/u/3468920?v=4","gravatar_id":"","url":"https://api.github.com/users/zelenkaj","html_url":"https://github.com/zelenkaj","followers_url":"https://api.github.com/users/zelenkaj/followers","following_url":"https://api.github.com/users/zelenkaj/following{/other_user}","gists_url":"https://api.github.com/users/zelenkaj/gists{/gist_id}","starred_url":"https://api.github.com/users/zelenkaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zelenkaj/subscriptions","organizations_url":"https://api.github.com/users/zelenkaj/orgs","repos_url":"https://api.github.com/users/zelenkaj/repos","events_url":"https://api.github.com/users/zelenkaj/events{/privacy}","received_events_url":"https://api.github.com/users/zelenkaj/received_events","type":"User","site_admin":false},"created_at":"2018-06-22T08:40:49Z","updated_at":"2018-06-22T08:40:49Z","author_association":"CONTRIBUTOR","body":"- Please drop test source from commit message\r\n- amile.c is still used in Nios build (modification in stack/build/altera-nios2/common/stackfiles.settings required)\r\n- Create new pull request towards master branch"}}
{"actor":{"display_login":"zelenkaj"}}