This project has moved and is read-only. For the latest updates, please go here.

Re: Overwriting custom adapter files

Jun 22, 2012 at 5:43 PM

Hi,

I was wondering whether there is a more effective way of replacing compiled adapter files in the openPDC folder, other than stopping OpenPDC from services.msc and closing the manager itself. I noticed from the latest v1.5 release preview, even stopping openPDC from services.msc will not allow me to overwrite the files, so what I do instead is reboot the PC and quickly paste the file before openPDC is initialized in the background--this is too time-consuming considering the fact that I need to test my custom code several times before getting it right.

I would appreciate anyone's response, thanks!

Noah

Jun 29, 2012 at 9:54 PM

Once a .NET application loads an assembly (i.e., a DLL) into a application domain it cannot be unloaded - this is by design. You options are to change the file name and possibly namespace so that the next assembly can be loaded.

We are adding a feature to the 1.5 version that will allow you to load an assembly into its own application domain such that once the adapter was unloaded the app domain would shutdown, it hence the DLL could be replaced - however there is a cost: speed.

Once you load an assembly into its own application domain all data has be marshalled from one domain to another - not an issue for most apps, but since the openPDC is managing data at 30 times per second this can make things slow down and get backed-up...

If you are processing SCADA speed data you might be OK - otherwise there's not an easy answer...

Hope that helps...


Thanks!
Ritchie

Jun 29, 2012 at 10:59 PM

I see. At the development phase I don't think the speed would matter, as long as it's proceeding as expected.

Thank you again!

Noah