Hey,
I'm trying to use a trap receiver which retrieves all traps for an element.
Including TrapInfo:
using Skyline.DataMiner.Library.Protocol.Snmp.Trap;
But compilation failed:
(9,25): error CS0234: The type or namespace name 'Library' does not exist in the namespace 'Skyline.DataMiner' (are you missing an assembly reference?) (24,13): error CS0246: The type or namespace name 'TrapInfo' could not be found (are you missing a using directive or an assembly reference?)
So what is the correct namespace?
Hi Miguel,
I’m directly testing with a new device. It’s a Siemens SPS which can only send traps.
Hi Stefan
I assume you are using DIS? As that namespace is part of the Class Library.
To make sure that the Class Library is generated (default QA63000) you need to enable it in the settings of DIS.
Hi Michiel,
yes I’m using DIS. I just updated the version for my VS 2015 and now the checkbox is like in your picture. But the error is still there. Not in DIS but in the log of my element:
2022/02/17 13:14:41.258|SLProtocol – 7400 – NEA3 Test|28000|CManagedScript::Load|ERR|-1|Compilation failed for QAction 25
(9,25): error CS0234: The type or namespace name ‘Library’ does not exist in the namespace ‘Skyline.DataMiner’ (are you missing an assembly reference?)
(24,13): error CS0246: The type or namespace name ‘TrapInfo’ could not be found (are you missing a using directive or an assembly reference?)
(24,29): error CS0103: The name ‘TrapInfo’ does not exist in the current context
(29,13): error CS0246: The type or namespace name ‘TrapInfoVariableBinding’ could not be found (are you missing a using directive or an assembly reference?)
(30,13): error CS0246: The type or namespace name ‘TrapInfoVariableBinding’ could not be found (are you missing a using directive or an assembly reference?)
What I’m also not understanding here, I just copy the xml file to the DMA. So there is no library code in it.
Could you check if QA63000 is generated? If not, then under the DIS menu > Protocol, you’ll find the option to ‘Generate Class Library Code’. This should trigger the generation. And if it is not generated by that, then you can look in the Output window in VS (Show output from: DIS – Class Library) to see if any errors are being shown there.
In case you are using the ‘Protocol as a Solution’ way of developing, do note that just copying the xml is not correct. The best way is to make use of the Publish button. If you want to manually copy-paste the protocol, when rightclicking, you have the option ‘Copy Protocol to Clipboard’. This will give the fully filled in xml in your clipboard.
I have tried it with the publish method but I still get “One or more class library packages contain errors.” failure. Does it fail when integrationid, vendor or deviceid is not correct? I have still some XX inside because it’s in developing.
Could you check what I mentioned in this comment?https://community.dataminer.services/question/using-trapinfo/answer/83750/#/comment/4116
It seems that there is an issue with the generation of the Class Library, so any errors should be mentioned there.
Hi Stefan,
To further help with your question, can you include the driver version of the generic trap receiver driver that you are using for tests?