{"action":"created","issue":{"url":"https://api.github.com/repos/acplt/open62541/issues/253","labels_url":"https://api.github.com/repos/acplt/open62541/issues/253/labels{/name}","comments_url":"https://api.github.com/repos/acplt/open62541/issues/253/comments","events_url":"https://api.github.com/repos/acplt/open62541/issues/253/events","html_url":"https://github.com/acplt/open62541/issues/253","id":79439461,"number":253,"title":"State of Subscription implementation","user":{"login":"ichrispa","id":2773265,"avatar_url":"https://avatars.githubusercontent.com/u/2773265?v=3","gravatar_id":"","url":"https://api.github.com/users/ichrispa","html_url":"https://github.com/ichrispa","followers_url":"https://api.github.com/users/ichrispa/followers","following_url":"https://api.github.com/users/ichrispa/following{/other_user}","gists_url":"https://api.github.com/users/ichrispa/gists{/gist_id}","starred_url":"https://api.github.com/users/ichrispa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ichrispa/subscriptions","organizations_url":"https://api.github.com/users/ichrispa/orgs","repos_url":"https://api.github.com/users/ichrispa/repos","events_url":"https://api.github.com/users/ichrispa/events{/privacy}","received_events_url":"https://api.github.com/users/ichrispa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/acplt/open62541/labels/work%20in%20progress","name":"work in progress","color":"009800"},{"url":"https://api.github.com/repos/acplt/open62541/labels/work%20item","name":"work item","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-05-22T12:37:21Z","updated_at":"2015-05-22T17:42:28Z","closed_at":null,"body":"Greetings,\r\n\r\nthe development branch now has support for subscriptions (Create, Delete) and monitoring (Add, Delete) as well as publish. All three are in a very rudimentary form, as there is currently no Event system in place. As far as necessary changes go, I advise reading the FIXME tags in `Service_Publish()`.\r\n\r\nFor reference, the heavy lifting of the current implementation is handled by two functions:\r\n`void MonitoredItem_QueuePushDataValue(UA_MonitoredItem *monitoredItem)` is called to copy a monitored Attribute into the queue. The function will not copy data if the monitoringIntervall is not reached or the value has not changed. This method should be called by an event system.\r\n`void Subscription_updateNotifications(UA_Subscription *subscription)` will scan all monitored Item queues, compile them into a notificationMessage list and clear the queues. The top message of these messages is send on a publish request. This method should be delegated to a timed work thread.\r\n\r\nCurrently as a workaround all monitoredItems are being updated when a publish request is received, then all subscriptions are asked to compile their messages. The top message is then sent. I tested this using both 'servertime' (dynamic value) and 'the answer' (static value).\r\n\r\nI would leave active this ticket as a work item to remind me that subscriptions are not ready yet. However I urgently need to switch the development focus to methodcalls for now.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/acplt/open62541/issues/comments/104724169","html_url":"https://github.com/acplt/open62541/issues/253#issuecomment-104724169","issue_url":"https://api.github.com/repos/acplt/open62541/issues/253","id":104724169,"user":{"login":"ichrispa","id":2773265,"avatar_url":"https://avatars.githubusercontent.com/u/2773265?v=3","gravatar_id":"","url":"https://api.github.com/users/ichrispa","html_url":"https://github.com/ichrispa","followers_url":"https://api.github.com/users/ichrispa/followers","following_url":"https://api.github.com/users/ichrispa/following{/other_user}","gists_url":"https://api.github.com/users/ichrispa/gists{/gist_id}","starred_url":"https://api.github.com/users/ichrispa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ichrispa/subscriptions","organizations_url":"https://api.github.com/users/ichrispa/orgs","repos_url":"https://api.github.com/users/ichrispa/repos","events_url":"https://api.github.com/users/ichrispa/events{/privacy}","received_events_url":"https://api.github.com/users/ichrispa/received_events","type":"User","site_admin":false},"created_at":"2015-05-22T17:42:28Z","updated_at":"2015-05-22T17:42:28Z","body":"Compiles and runs perfectly ^^ This is the first time I ever monitored ServerTime for more than 7 seconds at a time - glorious :)\r\n\r\n@Stasik0 can you confirm that subscriptions are working now?"}}