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

Unable To Record Tag History #82

Open
Yuvaraj-22 opened this issue Feb 24, 2020 · 0 comments
Open

Unable To Record Tag History #82

Yuvaraj-22 opened this issue Feb 24, 2020 · 0 comments

Comments

@Yuvaraj-22
Copy link

Yuvaraj-22 commented Feb 24, 2020

Hi Perry
I tried to take the log of tag history but log file some_file.hst is not updating
After that i have done the below modifications in files.py

def _append( self, msg, encoding=None ):
    """Appends the raw msg str (which should contain a newline) to the file (open if
    necessary).  Raises an exception on any failure.

    The default encoding is 'ascii'; no non-ASCII UTF-8 symbols allowed in the provided string.

    """
    if not self.f:
        assert self.open(), "Could not open file %s for writing" % self.path
    self.f.write( msg.encode( encoding or 'ascii' ))
    self.f.flush()

$ python -m cpppo.server.enip.historize some_file.hst SCADA=INT[10]
$ python -m cpppo.server.enip.client 'SCADA[0-3]=0, 1, 2, 3'

Now I am getting Tag logs

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

No branches or pull requests

1 participant