Hello,
My name is Robin from Intelligent Wave inc. in Japan, and im currently developing a driver for our monitoring solution.
I have been getting the C0234 error when I'm trying to access a precompiled QActions namespace.
Below are a simplified example of how I use the QAction.
<QAction id="9001" encoding="csharp" name="Precompiled QAction Library" options="precompile">
namespace Skyline.Protocol.Library
{
namespace EoM.Alerts
{
public static class Alert
/.../
<QAction id="1" name="Precompiled Code" encoding="csharp" options="precompile" dllImport="[ProtocolName].[ProtocolVersion].QAction.9001.dll">
namespace Skyline.Protocol
{
namespace AlertsTables
{
using System;
using Skyline.DataMiner.Scripting;
using Skyline.Protocol.Library.EoM.Alerts;
/.../
This is where I get the first error and the rest are all related. Am i missing something? I was looking at some examples from Skyline and did very similar naming and refering but still get this error.
If somebody could shine some light on whats going on here, I'd be very thankful.
What is the order that the QActions appear in the driver?
Is it first QAction 9001 then QAction 1?
This help section indicates that first the QAction needs to appear in XML before being referenced by another QAction as that is the order that they're being compiled. In other words in the XML first QAction 9001 needs to appear, then QAction 1 as that one is referring to QAction 9001.
What is the DataMiner version? Do you have remote desktop access to the DataMiner agent (server) where the element is running? If that is the case, would it be possible to check the folder C:Skyline DataMinerProtocolScripts and check if the following file exists: YourDriverName.1.0.0.1.QAction.9001.dll (with “YourDriverName” to be replaced with the name of the driver and “1.0.0.1” to be replaced with the driver version number)
If that dll exists then it means that QAction 9001 compiled, if it doesn’t exist then that QAction 9001 didn’t compile for some reason and you should further look the content of QAction 9001 for issues.
In case you don’t have access to the DataMiner server: are you using DIS to create the driver? Does that indicate any errors when opening the QActions? If you don’t have DIS, do you see any errors when copying the code of QAction 9001 in a new Visual Studio project?
I tried a setup like you’re explaining that import both precompiled qactions and that’s working fine. I have below simple qactions (in that order in xml):
QAction id=”9001″ encoding=”csharp” name=”Precompiled QAction Library” options=”precompile” :
namespace Skyline.Protocol.Library
{
namespace EoM.Alerts
{
public static class Alert
{
public static int Calculate(int a, int b)
{
return a + b;
}
}
}
}
QAction id=”92″ name=”Precompiled Code2″ encoding=”csharp” options=”precompile” dllImport=”[ProtocolName].[ProtocolVersion].QAction.9001.dll” :
namespace Skyline.Protocol
{
namespace AlertsTables
{
using System;
using Skyline.DataMiner.Scripting;
using Skyline.Protocol.Library.EoM.Alerts;
public class CustomTest
{
private int partA;
private int partB;
public CustomTest(int a, int b)
{
partA = a;
partB = b;
}
public int Calc()
{
return Alert.Calculate(partA, partB);
}
}
}
}
QAction id=”9003″ name=”Entering third” encoding=”csharp” triggers=”9003″ dllImport=”[ProtocolName].[ProtocolVersion].QAction.92.dll;[ProtocolName].[ProtocolVersion].QAction.9001.dll”:
using System;
using Skyline.Protocol.AlertsTables;
using Skyline.Protocol.Library.EoM.Alerts;
using Skyline.DataMiner.Scripting;
public class QAction
{
///
/// Change Comm
///
/// Link with Skyline DataMiner
public void Run(SLProtocol protocol)
{
CustomTest test = new CustomTest(1, 2);
int result = test.Calc();
int second = Alert.Calculate(3, 4);
protocol.Log(8,5,”result is ” + Convert.ToString(result) + ” and ” + Convert.ToString(second));
}
}
Triggering 9003 logs the result as expected.
If you’re using DIS then it will probably give a better insight if something is showing errors in the code
Thank you so much for taking the time to answer my question. I managed to solve the issue by simply rename my QActions to the order I wanted them compiled, and keep the order they were presented in.
So formerly named QAction 9001 became 1, 1 became 2 etc. With this the driver is now able to compile.
Edit: the version of the Dataminer agent is DataMiner (9.6.0.0-8690-CU6)
I did find the QAction 9001 being compiled and despite that QAction 1 didnt manage to compile, this led me to believe that the order wasnt only dependent on the order of the xml.
Thank you for the advice. Howerver, the order is as expected, with QAction 9001 being first and QAction 1 as the second. Both have the option “precompiled”, as im trying to use them both in a 3rd QAction, QAction 2. Could this somehow be causing the issue?