Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pycomm3 Python 3.6 #40

Open
wants to merge 48 commits into
base: master
Choose a base branch
from
Open

Pycomm3 Python 3.6 #40

wants to merge 48 commits into from

Conversation

jmbinette
Copy link

No description provided.

bpaterni and others added 30 commits May 6, 2017 16:18
convert values to bytes
updated for python3
Python3 support for SLC
* not sure if struct.unpack() is necessary, but direct comparison seems
  to work for now
small changes to base class to better support generic cip drivers
fix error in multirequest write
Fix read_array functionality in Python 3.5
Changed readme to add command for Pip for the Pycomm3 Fork.
Exception handling has changed a bit in python 3. when using exception as E, it no longer has the attribute e.message. now the message string is fully in e.

This is a bandaid fix that I did when editing the file during error checking. It may not be the correct way to do it.

I saw this when I was forcibly disconnecting the script after a c.open was called. Here is the log bit that called out this section and caused my script to not auto reconnect.


     File "C:\Python36\lib\site-packages\pycomm\cip\cip_base.py", line 867, in close
    error_string += "Error on close() -> session Err: %s" % e.message
AttributeError: 'CommError' object has no attribute 'message'
Bandaid fix for exception error handling in python 3
fixed issue with udt name field not being parsed correctly
…ag in a udt

added caching to the struct/template/udt values instead of reading them every time
ottowayi and others added 18 commits May 2, 2019 21:29
truncate strings on write to string length
fixed issue when reading/writing some characters in strings
added option to read a string with a known length. this can be used to read the full length of the string DATA array, without reading the .LEN. It removes any null chars from the result.
…ogix's implementation.

Enabled by setting `client.attribs['large forward open'] = True`
This may break the direction connection stuff. I have not tested it beyond my use case.
Confirmed working on L62 v20 and L74 v31 using Python 3.7
Improvements for get_tag_list, string reading/writing, and support for Extended Forward Open
…ically, this will do a single read of the base tag but will show individual results for the requested bits

added support to `write_tag` for the _Read Modify Write Tag Service_ to allow writing bits of integers w/o needing to read the current value first and calculating the new value.  The multi-tag write function was broken as well, I believe this fixed it.
fixed issue when parsing bits of ints in UDTs (udt.int.0)
Fixed issue in v31 with getting the UDT data type name in get_tag_list
Turns out there was a queued PR from  ottowayi that I'd forgotten to merge, both the `I_DATA_TYPE` and `from collections import defaultdict` fixes were in that PR. I'll still merge this PR for the `.gitignore` addition. Thanks
@pcnate
Copy link

pcnate commented Jul 8, 2019

seems that the build targets for this for traviscl are 3.2 and 3.3 which are not installed/available. I tested my PR against 3.7.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants