{"action":"closed","issue":{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/issues/275","labels_url":"https://api.github.com/repos/ibarysevich/FITtoGIT/issues/275/labels{/name}","comments_url":"https://api.github.com/repos/ibarysevich/FITtoGIT/issues/275/comments","events_url":"https://api.github.com/repos/ibarysevich/FITtoGIT/issues/275/events","html_url":"https://github.com/ibarysevich/FITtoGIT/issues/275","id":64882149,"number":275,"title":"Need user function that can pull bits out of an integer value","user":{"login":"ibarysevich","id":11526993,"avatar_url":"https://avatars.githubusercontent.com/u/11526993?v=3","gravatar_id":"","url":"https://api.github.com/users/ibarysevich","html_url":"https://github.com/ibarysevich","followers_url":"https://api.github.com/users/ibarysevich/followers","following_url":"https://api.github.com/users/ibarysevich/following{/other_user}","gists_url":"https://api.github.com/users/ibarysevich/gists{/gist_id}","starred_url":"https://api.github.com/users/ibarysevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ibarysevich/subscriptions","organizations_url":"https://api.github.com/users/ibarysevich/orgs","repos_url":"https://api.github.com/users/ibarysevich/repos","events_url":"https://api.github.com/users/ibarysevich/events{/privacy}","received_events_url":"https://api.github.com/users/ibarysevich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/labels/prj:Collector","name":"prj:Collector","color":"ededed"},{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/labels/sev:4_Medium_no_workaround","name":"sev:4_Medium_no_workaround","color":"ededed"},{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/labels/status:fixed","name":"status:fixed","color":"ededed"},{"url":"https://api.github.com/repos/ibarysevich/FITtoGIT/labels/type:bug","name":"type:bug","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-28T01:12:23Z","updated_at":"2015-03-28T01:32:35Z","closed_at":"2015-03-28T01:32:35Z","body":"Found in: 3.7.9; Date Entered: Dec 16 2011; Entered By: jhartley; [1]For some devices digital point data comes bit-packed into an integer. In the Modbus protocol configuration we can pull out such information directly in the point configuration but we have no equivalent capability in the BACnet native-point configuration or any other protocol. Have a function bit[[Point Name] n] where n is the bit offset would allow us to work around this shortcoming quite generally.   Also for a protocol like BACnet there are cases where the same 16 points of data is available as a single analog value or as 16 binary values. Querying the analog value and parsing in our code reduces the polling time by a factor of 16. [2]The bit.bsh user function was installed manually in the field for Wells Fargo Menomonee Falls. Worked great I also created some unit tests for the function in the protocol project. Now both are checked into HEAD."}}