#SNMP - Simple GET - c#

I've been looking at #SNMP, which seems to be the most complete SNMP library in C#. However, I find that the documentation is quite lacking, merely pointing to the source code, which is completely void of comments :-)
Now I'm not a professional developer so this probably comes from me, and surely professional developers can make sense of a complex API by just looking at non-commented code. So I'm looking of a simple implementation of "Get the value of the specified OID."
Would anybody be able to provide the sheer minimum code required to poll equipments using that lib?

It seems that a more adequate lib to use is SNMP Sharp Net. It's much better documented with a full range of examples, and more features than #SNMP it seems.

Related

How to do ebMS3 AS4 messaging from C# client application

I am looking out for developing a C# application which posts message to a ebMS3 platform using AS4. I am new to this area. Could anyone please help? Is there any third party libraries to do this easily? If not, how we post messages using AS4 from a c# solution.
I have just implemented our own AS4 solution, and it is hard task to accomplish. Especially because .NET does not support SOAP with attachments out of the box. And there is a lot background knowledge you need to know about - all the different specifications AS4 is based on. I have not been able to find an AS4 API written in .NET without it being a standalone solution as well...
First thing is to understand AS4, and a good place to start is this blog:
https://www.codit.eu/blog/2016/02/03/as4-for-dummies-part-ii-messaging-overview/
And then you will have to understand most of the EBMS3 specification:
http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/core/ebms_core-3.0-spec.html
That being said - it is not impossible.
I have been looking at the AS4.NET framework as Sander talks about, and it is well-written and a very good starting point for exchanging AS4 messages. I have used it as a test-endpoint.
So unless you need to incorporate AS4 directly into an existing product (which we needed to), I can only recommend using AS4.NET.
AS4.NET is also open source (and e-SENS profile conformant), so you can have a look at their code-base and let you inspire by the hard parts in AS4.
For the MIME parts I can recommend Mimekit: https://github.com/jstedfast/MimeKit
And for some of the encryption/signing stuff Bouncycastle is great: http://www.bouncycastle.org/csharp/
Not sure whether it can be used as a library, but for a project within the European Commission an open source .NET based AS4 implementation was developed. You can find it here in the EC's code repository. I don't know if there is any support on this, so if that is important you should probably consider another implementation. A list of solutions tested by the EC for conformance with their own profile of AS4 is available here (or if that link doesn't work by searching for "as4 conformance tested implementations")
Note that most are standalone applications which you connect to for executing the AS4 message exchange. Most offer different integration options, so you should be able to integrate it into your solution.

Classification Library

I need to test various famous classification methods like kNN, ID3 and ... on a huge data-set of a project, and choose one for future use.
I have no limitation on language but performance and readable code both in learning and classification phase are very important.
therefore, I'm looking for a good library with following features:
includes various classification methods
high performance
easily usable
any suggestions?
You shuold take a look at PyBrain, a great machine learning module for Python. Can't tell you much about it, because I never really used it (just read about it and looked at several projects solved with it), but it seems to be very good.
You may also want to take a look at this list of Python machine learning modules:
http://web.media.mit.edu/~stefie10/technical/pythonml.html
Or at this SO question:
Is there a recommended package for machine learning in Python?
Try scikit learn - it is written in python and has variety classifiers and also metods for testing them.
Take a look at RapidMiner which comes with a Java-API and graphical tools for data mining. The community edition is free, I think.
I used the predecessor of this tool/library as a student but do not have professional experience with it, though.

Microsoft Media Foundation Transform (MFT) with C#?

Does anyone know if Microsoft MFTs for Win7 can be written in C#? If so, is there any book or website that would help me in this.
MFTs can definitely be written in C#. Maybe checkt out the managed wrapper around the MF Api´s at sourceforge. it´s more or less just a managed definition of interfaces and GUIDs for COM interaction that can be used within .NET. just implemented the right interfaces, see here.
However, i find some parts a little bit tricky (e.g. rate control), but depending on the type of MFT you want to create you maybe don´t need to deal with that.
The MF Team blog could help:
http://blogs.msdn.com/mf/default.aspx
The team started posting in November of 2009.

Base Class Library

I am new to C#, C++ and .Net.
I am currently returning to programming from a stint in Networking and Cisco engineering. I used to program on IBM mainframes etc using Cobol, assembler, easytrieve, Rexx and clist etc so the command syntax is reasonably familiar to me as are programming standards and structures.
However I am having quite a bit of trouble getting to grips with the BCL and understanding the various components and what each is designed for and which is best to use in various situations, and in fact how some are actually used and coded.
I am often scratching my head wondering how the code came about from the descriptions I have found about the BCL components. Basically how to use them and code them seems to be a black art with no intuitive means at all.
So my question is, apart from the msdn library, which I am finding to be a bit over complicated for my current needs, is there any good reference book, site, pdf that can give me a reasonable description, usage notes etc of the most commonly used .NET components such as System.IO etc ?
I have read a few book on C# etc and have found a small program that does part of what I need to do in a project I have, requiring acces to devices via RS-232 ports, but when decoding the program I find myself wondering why the person used the components he did and how would I know which components I should use when I make the changes I need to and add in the extra code that I require and how do I actually use these components when I do find them ?
I do realise a lot of this will be down to plain old experience, but a helping hand in the right direction would really help a lot.
Many thanks, George.
C# 3.0 in a Nutshell is good for this, as is Accelerated C# 2008. I think I'd personally recommend Nutshell more.
Note that the next edition of Nutshell is being prepared - but I don't know what the timeframe is. (I'm sure there'll be a slew of books for .NET 4.0.)
(Note of bias: I'm a tech reviewer for C# 4.0 in a Nutshell, so I'm clearly not 100% impartial.)
I often use Google in preference to the standard Help, there are often better examples out there.

Windows development for hardcore Java guy

I'm a little ashamed for asking this, because, you know, I've been very anti-MS for a long time. I have been fortunate enough as to make a living outside Visual Studio. As I grown older there are "some" things I would like to try, and to be very honest, this Q&A site has inspired me and I realize that VS and Windows Development doesn't suck that much. Hey, after all C# was designed after Java, and now Java is copying back some features from the child language. And Windows vista is the first decent version since windows came to light.
Anyway, to any +3,000 user in the audience, you may delete all the above crap and keep the following:
Do you have, links, resources, tutorial aimed to learn Windows development coming from strong Java background?
I'm very interested in Windows manipulation (that is the actual window, the frame, get the name, get foremost app etc., resize it programatically, etc.) and in Windows Search API among other minor API's. My interest after all is to integrate them with my Java apps through JNI or JNA.
I've read many tutorials and links over the MSDN, and I actually understand the API it self. I've grabbed a copy of C# and C++ Express and actually got some basic samples running.
My problem is I don't get the big picture of the whole architecture (because, well, it is big). The classes have hundreds of methods, and it not that clear to me who calls them. (I had this same opinion when I first look at the Java's Javadoc API.) I don't know some basic common objects, for instance HWCD (or something like that) that it turned out to be the very window handler, but every single tutorial I read give that for granted (as if WHCD or what ever it is, was a very descriptive name).
I don't know exactly the difference between Win32, COM, COM+, DCOM, Windows SDK ADO, and some other technologies. I mean, I know them at some degree and by common sense, but while reading the tutorials or the API I get confused. I've tried to grab some "beginner" tutorials, but they are aimed for absolute 0 programmers using Visual Basic (yiak! , THAT was the main reason I kept away from MS for so many years in first place.)
I do understand .NET framework, managed code, unmanaged code, C# basics, CLR and related stuff, because well, they are SO similar to the Java platform that it is almost transparent.
So, after all my rants and honest opinions about MS development:
What's the best way to learn Windows Development for a non absolute beginner (in programming) but absolute new to Windows APIs itself? What would be a good path?
The Petzold is your new best friend, and MSDN is your new Javadocs. Make sure you have a good understanding of C before you dive into it though. The Forger has a great beginner tutorial too if you're interested. A great place to hang out while learning is #WinProg on efnet irc, plenty of win32 gurus ready to help.
I'm going to suggest an alternate path (with less resistance). Have you looked at WPF yet? It's the new GUI toolkit that lets you create sexy interfaces (like those found in Vista).
That may be enough to keep you interested while easing into more advanced development. From there you can jump into the jungle of the Win APIs (if you choose).
Just a thought, as that path would be more interesting for me. Your mileage may vary, of course.
I strongly recommend getting yourself a copy of "Win32 Programming". It explains the basic DNA of WINDOWS - and this is valid if you are programming with the old C++ win32, the new C# WinForms and also the future Windows Presentation Foundation.
In a nutshell, a Windows program consists of a WinMain. When first started the app registers its window class with the system, initializes and then starts a message loop which continues till WM_QUIT is encountered. The system (OS) keeps pumping messages like keyboard or mouse click etc to the message Q of the application. In Windows, at any point of time there is only one active Window - so the OS knows whom to send the message to.
Well things like these are described in detail in the above book.
COM (COM+, DCOM) are not really related to Windows. When Word, Excel became popular and it was required to be able to access Excel from Word (viceversa) they came up with the AcitveX technology which is kind of the root for COM etc. You can get started with "Essential COM" by Don Box.
One warning: in the Microsoft world, there are two ways to program - to go the boiler plate way (write everything yourself) or use frameworks (MFC, ATL-COM....). It is recommended to do a bit of boiler plate so that you know the basics.
Having made the same conversion a year ago I can say that there's a lot of literature specifically for learning c# from a Java background. This was my first into which I found really useful for learning the important differences / features of C#:
C# from a Java developer's perspective
And there are also books which may be worth a look at (google 'c# for java programmers'). As JohnT said MSDN library is the equivalent of JavaDocs API, but I found it really frustrating to use. The best way to learn is to grab a copy of Visual Studio express and start playing around. Use intellisense to explore classes and methods. Find a small program you wrote in Java and try to reproduce it in C#. Start with simple problems, use google to solve them. You'll find it hard for the first week, but trust me, it will come to you surprisingly quickly!

Categories

Resources