{"action":"created","issue":{"url":"https://api.github.com/repos/pjkundert/cpppo/issues/12","repository_url":"https://api.github.com/repos/pjkundert/cpppo","labels_url":"https://api.github.com/repos/pjkundert/cpppo/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/pjkundert/cpppo/issues/12/comments","events_url":"https://api.github.com/repos/pjkundert/cpppo/issues/12/events","html_url":"https://github.com/pjkundert/cpppo/issues/12","id":135947447,"number":12,"title":"Please help understanding cpppo library","user":{"login":"jonwolf-ibisa","id":17366073,"avatar_url":"https://avatars.githubusercontent.com/u/17366073?v=3","gravatar_id":"","url":"https://api.github.com/users/jonwolf-ibisa","html_url":"https://github.com/jonwolf-ibisa","followers_url":"https://api.github.com/users/jonwolf-ibisa/followers","following_url":"https://api.github.com/users/jonwolf-ibisa/following{/other_user}","gists_url":"https://api.github.com/users/jonwolf-ibisa/gists{/gist_id}","starred_url":"https://api.github.com/users/jonwolf-ibisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonwolf-ibisa/subscriptions","organizations_url":"https://api.github.com/users/jonwolf-ibisa/orgs","repos_url":"https://api.github.com/users/jonwolf-ibisa/repos","events_url":"https://api.github.com/users/jonwolf-ibisa/events{/privacy}","received_events_url":"https://api.github.com/users/jonwolf-ibisa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-24T04:00:25Z","updated_at":"2016-02-25T01:59:00Z","closed_at":null,"body":"Hi Perry, i've started a project about Ethernet/IP and i've been reading some information about it. \r\n\r\nI need to write a python program using this cpppo library that needs to connect to a server running an Ethernet/IP simulator by Molex in an specific IP address on port 44818.\r\n\r\nUsing an Ethernet/IP object reader I need to validate that I'm connected and I need to show data from the controller, in this case (RSLinx Server), **a first step will be to read and show All Atributtes of the object 0x01 that corresponds to the identity**. (there's an image attached in this post that shows the Molex Ethernet/IP Simulator)\r\n\r\nI saw that the following code could be helpful for what I need:\r\n\r\nfrom cpppo.server.enip import client\r\nfrom cpppo.server.enip.getattr import attribute_operations\r\n\r\nHOST = \"181.49.9.154\"  #this is the IP address running the Ethernet/IP Sim device\r\nTAGS = [\"@4/100/3\"]     # I don't know what this line means, is it like an identity address? \r\n\r\nwith client.connector(host=HOST) as conn:\r\n    for index, descr, op, reply, status, value in conn.synchronous(\r\n        operations=attribute_operations(\r\n            TAGS, route_path=[], send_path='' )):\r\n        print(\": %20s: %s\" % (descr, value))\r\n\r\n**_the output of the code is this:\r\n: Single G_A_S      @0x0004/100/3: None_**\r\n\r\nis this output (: Single G_A_S) an identity or something in the simulator by Molex running in 181.49.9.154?\r\n@0x0004/100/3: None.  I see that I didn't catch anything in @0x0004/100/3 (don't know what it means btw)\r\n\r\nBrowsing the Internet I saw this code that might be helpful on **getting the 0x01** object identity:\r\n\r\nrequest = cpppo.dotdict({'service': 0x01, 'path':{'segment':[{'class':Ix.class_id},{'instance':Ix.instance_id}]}})\r\ngaa     = Ix.request( request )\r\nlog.normal( \"Identity Get Attributes All: %r, data: %s\", gaa, enip.enip_format( request ))\r\n\r\nbut adding this code above to the first set of coding I get an error: request = cpppo.dotdict({'service': 0x01, 'path':{'segment':[{'class':Ix.class_id},{'instance':Ix.instance_id}]}})\r\nNameError: name 'cpppo' is not defined\r\n\r\nI don't know why I'm getting this error with those lines because there is the cpppo.server.enip import \r\n\r\nThanks for taking your time to read this post.\r\n\r\nany help would be really appreciate it!\r\n\r\nThanks again Perry\r\n![ethernet_ip server molex](https://cloud.githubusercontent.com/assets/17366073/13275100/a70c41c0-da83-11e5-99dc-12d592bfe6b7.PNG)\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pjkundert/cpppo/issues/comments/188559304","html_url":"https://github.com/pjkundert/cpppo/issues/12#issuecomment-188559304","issue_url":"https://api.github.com/repos/pjkundert/cpppo/issues/12","id":188559304,"user":{"login":"jonwolf-ibisa","id":17366073,"avatar_url":"https://avatars.githubusercontent.com/u/17366073?v=3","gravatar_id":"","url":"https://api.github.com/users/jonwolf-ibisa","html_url":"https://github.com/jonwolf-ibisa","followers_url":"https://api.github.com/users/jonwolf-ibisa/followers","following_url":"https://api.github.com/users/jonwolf-ibisa/following{/other_user}","gists_url":"https://api.github.com/users/jonwolf-ibisa/gists{/gist_id}","starred_url":"https://api.github.com/users/jonwolf-ibisa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonwolf-ibisa/subscriptions","organizations_url":"https://api.github.com/users/jonwolf-ibisa/orgs","repos_url":"https://api.github.com/users/jonwolf-ibisa/repos","events_url":"https://api.github.com/users/jonwolf-ibisa/events{/privacy}","received_events_url":"https://api.github.com/users/jonwolf-ibisa/received_events","type":"User","site_admin":false},"created_at":"2016-02-25T01:59:00Z","updated_at":"2016-02-25T01:59:00Z","body":"Thank you very much for your help, I'll be taking a look at the documentations."}}