Git Product home page Git Product logo

Comments (10)

ritchiecarroll avatar ritchiecarroll commented on May 23, 2024

Could be an issue with the dependencies. I would suggest referencing the GSF assemblies (e.g., GSF.Core.dll and GSF.TimeSeries.dll) that were installed with the openHistorian in your adapter project and rebuilding - this way you are using the same assemblies as the openHistorian that will be using your adapter.

from openhistorian.

wwang72 avatar wwang72 commented on May 23, 2024

Richie,
Yes, I was doing the way you suggested. I used the assemblies in the openHistorian V2.2.2.0 to build my adapter and tried to run this adapter on openHistorian V2.2.0.
Ferriad

from openhistorian.

ritchiecarroll avatar ritchiecarroll commented on May 23, 2024

Perhaps the function is throwing an exception? Have you checked the ErrorLog.txt? Have you tried (1) putting code in a try / catch, or (2) attaching to process with a debug build with a break point in the initialize function? Can I see a copy of your Initialize function?

from openhistorian.

wwang72 avatar wwang72 commented on May 23, 2024

Actually, I haven't written a try/catch clause. The thing I wrote is a process percentage log in the Initialize() function. I debugged the code in Project Alpha, all the break points were hit, it ran well, and it reached 100% success. However, in openHistorian, even the 10% success was not even reached. Here is the code:

public override void Initialize()
{

        base.Initialize();

       
        OnStatusMessage("Initialized Event Trigger Completed");
    }

from openhistorian.

ritchiecarroll avatar ritchiecarroll commented on May 23, 2024

That's a big initialize function. One quick thing jumps out, what is the m_eventRecordFilePath set to?

Note that by default the openHistorian gets installed with the NT SERVICE\openHistorian local user account and this account has almost zero rights to the system - actually the only rights it has at all are those granted by the installer, e.g., read/write access to the installation folder.

If your folder path is anywhere else on the system, the NT SERVICE\openHistorian user will not have needed rights. To give the user rights to another folder you will need to right click on the folder and go to security to edit rights available to the user...

Thanks,
Ritchie

from openhistorian.

wwang72 avatar wwang72 commented on May 23, 2024

Ritchie,
The m_eventRecordFilePath is set to the {$installation folder}/event_log.txt. One thing to mention is- we use the same log method in our other adapters, however, they can write log successfully.

from openhistorian.

ritchiecarroll avatar ritchiecarroll commented on May 23, 2024

The best suggestion I have is to compile the adapter in debug mode, copy the DLL and the associated PDB file into the openHistorian installation folder. Then while running Visual Studio as administrator, attach to the openHistorian process, i.e., from VS menu select "Debug > Attach to Process" and find openHistorian.exe. Once attached put a break point in the Initialize function and step through code to see what the issue might be.

from openhistorian.

wwang72 avatar wwang72 commented on May 23, 2024

Ritchie,
the issue has been resolved. I tested the adapter code and there was indeed a bug in the Initialize. When I fixed the bug, and the code was running well on the openHistorian V2.2.2.0 Debug mode. Then, I moved it to the openHistorian V2.2.2.0 installation folder and tried again. This time, the console suggested that 'the adapter .dll was used by another program'. Here is the error image:
image
Then, I tried to remove the action adapter on openHistorian Manager, restart the openHistorain service, reaname the adapter .dll file, and add the action adapter back to the openHistorian Manager, the issue was revolved.
Not sure if it was related to the naming of the adapters because I updated that .dll file for serveral times and did not change its name.
Thanks for the reply! You are awesome.
Ferriad

from openhistorian.

ritchiecarroll avatar ritchiecarroll commented on May 23, 2024

Great! Glad this is working.

from openhistorian.

wwang72 avatar wwang72 commented on May 23, 2024

from openhistorian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.