I'm trying to use CAPL/CANalyzer functions in visual studio. I found some information on how to implement it in the CAPL help menu, but when i try I can't seem to get it to work. Is there any online resource on how to do this?
the Vector knowledgebase is online
Think the best way to start is to open CANalyzer Sample Configurations Folder in My Documents and to find a lot of samples for specific aspects.
There is also lot of information on CANalyzer help-pages, for example in:
.NET Programming ยป Notes for Advanced Users
you can find the reference to which assemblies do you need
If you have a specific problem please provide more information: what you trying to do, what is your expectation and what is going wrong.
I don't think that is possible with CANalyzer. You will need CANoe for this.
Take a look at the feature matrix. On side 6 it says that .net is only available in CANoe. Additionally I think that calls from .net to CAPL are only available for test modules and test units.
In Visual Studio 2017 I often see one or more useful Quick Actions (the yellow lightbulb). Most of these actions are effective tools to refactor my code.
But I don't understand the action "Change signature..." (see screenshot below). It seems to pop up all the time, especially when I select a function/sub call. When I select this action I can rearrange the parameters in the call, even if I have only one parameter in the call (why rearrange one parameter?). I don't find this action useful at all...
I have tried to find an explaination and/or usefulness of this action. Can anyone explain if I'm missing something important? Or is it simply an annoying feature that I have to live with?
Screenshot: The Change signature action as a quick action
Old question, but I found this when I googled the problem.
In my case, this was just a matter of myself being impatient and Visual Studio showing errors prematurely. This suggestion will be made if your method returns a type by definition, but no return value is set.
I'm new here so I will try my best. I want to visualize the Bin packing problem in C++ using First Fit. What I want is to create an initial tournament tree (winner) with external nodes as objects with certain capacity where can I put some bins. After inserting those bins, I want to get the finaly tree.
What I've done so far:
I've got the algorithms running properly but simple (not anything special) in dos
I'm using VS 2015 Community and searched how to visualize binary trees with SDK but had no luck (I'm new to programming so my knowledge isn't the best)
I've searched some other external programs to visualize my tree (yEd, Automatic graph layout and graphical binary trees (but as I checked the last two use only C# )
So here is my questions:
Is there any other programm that I can use to visualize Bin packing problem?
Can I use those programs that I mentioned, to visualize C++ and not in C#?
If it's possible to use SDK to visualize my problem I would really need some guide, or some sort of tutorial how to use it in my case.
Thank you in advance.
P.S. I'm a student and this is a project that I try to do.
I strongly suggest that you use Qt for this.
I know this will be a bit of a steep learning curve. But unfortunately there are no "native" tools from microsoft that offer the same. The microsoft SDK alone will not do. You would need something like Expression Blend. But these tools are mainly for C#.
Although there are alternatives to Qt like Wx and Gtk I suggest you try Qt. It has the following advantages:
it's as close to C++ as it gets
it comes with its own IDE
it fully supports and works together with Visual Studio 2015
it is completely free
it's easy to install and upgrade and automatically finds a Visual Studio installation and uses it
I do write lots of image processing code with lots of different images involved on unmanaged C++ under Visual Studio 2010. I want to be able to watch them almost as easily, as a simple identifier while step-by-step debugging.
My current solution is to use some function which exports image in Matlab console. It is ok, but requires modification to source code, while I want to do it just while debugging. So the best option is just image popping up while hovering containing variable by mouse. But writing some command ExportToMatlab(image) in Command Window is enough. I don't know how to do even this, however.
There is the very similar question "Debugging image rendering in Visual C++, any helpful add-ins?", but it is too old and I found no acceptable answers in that discussion. Some tools are .NET-based (see image below), some requires additional code to be written (that's what I currently am using), and some projects are frozen or unfinished.
I can spend some time on implementing appropriate solution, so links to some good guides on how to customize debugger visualizer in VS are welcome too.
Update
I've created a Visual Studio extension based on Expression Evaluator Add-In. It is available to download from its SourceForge project page, called NativeViewer. Check for description on how to use it.
I can't actually believe that nobody suggested Image Watch yet. It's the most amazing add-in ever. It shows you a view with all your Mat variables (images (gray and color), matrices) while debugging, there's useful stuff like zooming or contrast-stretching and you can even apply more complex functions directly in the plugin in real-time. It makes debugging of any kind of image operations a breeze and it's immensely helpful if you do calculations and linear algebra stuff with your cv::Mat matrices.
Just for history: I've implemented my own solution based on Expression Evaluator Add-In. It doesn't fit well enough, but I was able to implement all what I needed.
Update
I've created a publicly available Visual Studio extension. It is available to download from its SourceForge project page, called NativeViewer. Check for description on how to use it.
A sort of follow up/related question to this.
I'm trying to get a grip on a large code base that has hundreds and hundreds of classes and a large inheritance hierarchy. I want to be able to see the "main veins" of the inheritance hierarchy at a glance - not all the "peripheral" classes that only do some very specific / specialized thing. Visual Studio's "View Class Diagram" makes something that looks like a train and its sprawled horizontally across the screen and isn't very organized. You can't grok it easily.
I've just tried doxygen and graphviz but the results are .. somewhat similar to Visual Studio. I'm getting sweet looking call graphs but again too much detail for what I'm trying to get.
I need a quick way to generate the inheritance hierarchy, in some kind of collapsible view.
Why not just do it manually, it is a great learning experience when starting to work with a large code base. I usually just look at what class inherits from what, and what class contain what instances, references or pointers to other classes. Have a piece of paper next to you and get drawing...
Instead of going into the full Class Designer tool, just use the "Class View" or the "Object Browser" in Visual Studio - they present fully collapsible class heirarchies.
A good UML tool should do the trick.
Here is a list of generic UMl tools: http://en.wikipedia.org/wiki/List_of_UML_tools
There are lots out there, all with varying feature sets. Try playing with a few to see if you get the output you desire. If they free ones fail you, you might have to shell out for a good commercial grade UML tool
You can try CppDepend, it doesn't create a class hierarchy like Doxygen does but it can show 'the big picture' for your project, it also shows some code metrics.
I've had most success with valgrind and kcachegrind to do this. You run valgrind against your debugging binary, perform whatever actions your interested in, then import the output into kcachegrind to see everything you'd ever want to know about who called what, how often, and when. Plus, because your doing it dynamically, it catches cases that static analysis likely wont.
I've also had some success using Enterprise Architect's reverse engineering features, although this doesn't end up nearly as nicely (but you get a workable UML model which is nice!).
And finally, a tool called "Understand". This is pretty good at static OO analysis, but I think quite pricey and not that widely used.
Try Source Insight it is possible to configure the depth of the generated graph in this tool.
See also C/C++ call-graph utility for Windows platform
Check out SourceNavigator, it's open source, works on a bunch of platforms and has a Hierarchy Browser, a Class Browser, a Cross-Reference Browser and more that will allow you navigate and understand the code.
I'm using it for some time now especially when I have new code to go through and understand.
For a reasonably priced commercial product, you may want to check out SolidSX from Vizlogix (www.vizlogix.com). (If you are outside of North America, go to SolidSource -- www.solidsourceit.com.)
It generates a radial diagram that can be collapsed and expanded. It also integrates with Visual Studio (both BSC and .NET).
What's your definition of 'main vein'? You either want a graph reducer or skeletizer (you could find or write one and apply it to what Doxygen and the rest produce) or, 'main vein' has something to do with the function of the code and, I don't think an automated tool can help you with that. Unless you can point out to it 'These are the important bits that do input and output, show me only elements that are one or two steps away from the paths between these'. Hum, sounds like a cool tool to write :)
... the inheritance hierarchy, in some kind of collapsible view.
again, a sweet idea for a tool!