Automate log conversion as Action in Vector CANoe - canoe

CANoe offers an option Actions in the Export and Logging Settings window. The help window says:
An action defines an application that is called after saving the
target file.
What I'd like to achieve is something similar to this question: have all the logs from the application happen in BLF format using a single logging block (for performance reasons, I don't want to put a lot of logging blocks in the simulation), then set up an action to automatically convert the BLF file to ASC. Yes, I could write an helper program opening CANoe via COM, but I'd like not to. Somebody from Vector told me once that the only portion of CANoe certified for ISO26262 is the CLI, but it doesn't sound right to me.
I can't even get started on this, as I cannot find any documentation about using CANoe via CLI. Does anybody knows how to do this (if it can be done)?
EDIT: in the CANoe RT Server: Command Line Control portion of the help manual, it says (emphasys mine):
Configuration and control of the CANoe RT server is mainly done via
the CANoe dialog on the user PC in Options dialog (Extensions|CANoe
RT). In addition you can also control Runtime Server and Runtime
Kernel via command line input on the server host.
so they have CLI for something. I'm afraid the answer might be that is not feasible because Vector wants to enforce COM interface as the only interface for automation pipelines (see also Jenkins integration)

The question which you are referring to uses COM interface for performing the conversion.
A suggestion for you is to create an application which open a new CANoe window and then make the conversion and close immediately(similar to the one in the question you referred).
Then, you can start the application via the Actions feature.
NOTE: There are no CLIs to control the CANoe application.

Related

How to launch vscode debug configuration from the browser?

I have a test case reporting scheme delivered in HTML that is complex in its own right and not easily ported to a VSCode extension. I would like to launch a Debug Configuration for each failing test case from the browser displaying the report. I have already been able to modify the report and have added a copy/paste widget for each test case's associated command. However I would like to do something to the effect of:
Launch a service as a VSCode extension that can handle requests
Formulate those requests in a way that can dynamically create launch configurations
It may be that I am stuck writing a Debug Adapter without the bells and whistles of interacting with the report.
That being said, if this is a solved problem or has a framework for solving with VSCode (and I realize remote execution could be a Very Bad Thing for VSCode to allow), I have not been able to find it through an existing extension.
I welcome your ideas.
This is perhaps not as open ended as it sounds...my question ultimately is: can VSCode operate as a service to be requested by web interfaces? Even if it could be done via Localhost this would be a boon. If it can be done over ssh with authentication, that would also be a bonus.
One way of getting VSCode to handle requests would be by invoking a vscode:// URI. This requires your extension to implement a URI handler. After the mandatory parts of the URI, you could have arbitrary data with whatever information you need.
Something that might or might not be an issue for your use case is that invoking such a URI triggers a popup in VSCode / doesn't work silently:
For dynamically creating launch configurations, you can use the vscode.debug.startDebugging() API.

Command line switches for CWBTF.EXE aka Data Transfer From IBM i..?

I would like to add an Edit action to the right-click context menu for IBM *.DTF files in my Windows Registry.
What are the command lines switches for CWBTF.EXE..? Is there a switch for "open DTF file for editing" (but do not run it)..?
I've searched Google, StackOverflow, and the the IBM i 7.3 documentation for any mention of the command line switches for CWBTF.EXE aka "Data Transfer From IBM i", but I've found none.
The shortcut on my Windows Start Menu for "Data Transfer From IBM i" has the /t switch, but I cannot find any information on this.
I did find the command-line transfer utility RTOPCB.EXE, which does have some /? help text, but the options did not seem to relate much to the full-GUI version CWBTF.EXE.
I'm not sure where the documentation on the old Client Access program (CWBTF.EXE) exists. However, if you are able to use the newer Java based Access Client Solutions, the documentation for scripting can be found here. In particular, look for /plugin=download for transfer from IBM i.
I don't know if there are command-line switches which will override the "run automatically" setting. It seems unlikely. But depending on how determined you are, and how comfortable you are with scripting, a workaround could be to write your own CWBTF.EXE wrapper in a scripting language of your choice.
In broad strokes, your wrapper would go ahead and modify the .dtf file (or a copy of it) to ensure AutoRun=0 appears in the [Properties] section. Then it would call CWBTF.EXE on the modified .dtf. Then after that, if it's well-behaved, it would restore the .dtf to its original state (or remove the altered copy).
Armed with such a script, you could associate Edit with the wrapper.

Mac OS : is there any way to sniff system open call without kernel

I've to open a file from any location in Mac OS and I want to do some operation before it opens in any relative application. Is there any way to sniff the system open call and hold it for while and do some operation.
For an example, I'm opening test.doc file, which will open in msword application or can choose any other application by right click and open with. I want to hold for a while and want to perform some operation before launching this ms word application or any relative application(system open call) on my text.doc file.
Is there any way in programming language for Mac OS (C/C++/ObjectiveC/Swift) without going to kernel.
Any help will be highly appreciated.
As far as I'm aware totally intercepting/hooking the syscall can only be done in a kext.
If it's for a specific application, and this application supports dynamically loaded plugins, you could write a plugin that hooks the syscall.
You can in principle inject code into the process and hook the open() syscall for that process even if the application does not support plugins. (e.g. using mach_inject) The downside of this is that if e.g. the user double-clicks a file in the Finder, and this launches the application and immediately opens the file, there is only a very small window of time in which you could inject the code. I don't think there's a way you can do this reliably with only user space code.
Even with a kernel extension, hooking syscalls is no longer viable due to various protections in the kernel, such as KASLR. With Mojave, code injection will no longer be viable due to SIP. The only supported method to do what's being asked is to use the Kernel Authorisation (KAuth) framework.

Start an application at system start without login

We have a new server running and we got some new programs doing import routines. So far so good... But there is one program that is put into autostart folder. So it doesn't run until admin logs in and it stops if we logout.
I'd like to put this one into a seperate session so it may work without any interaction by simply starting it with the task scheduler at startup. Is this the right way to do this? Is it safe if I log in later and log out?
Many thanks!
Edit: The applications shows as a symbol in the task bar if running, it can be configured by this. Anything I must know about this if I change?
Edit: It is not my application, I cannot rewrite it as a service.
I successfully added the application by using task schelduler on startup. Login and logout will not quit the application but no symbol is shown. Please add details to my side questions and I'll mark your answer as the accepted one.
Edit: Ended up using this one. If I have to configure, I stop the application in task manager and start it again by link. After that I quit the application and restart it by task scheduler manual start.
You need to run your program as a Windows Service. One way of doing it is using the sc.exe program:
> sc create <new_service_name> binPath= "c:\myapp\myapp.exe"
You can read about it here.
You need to separate your application in two.
To allow it to run without a user session, you need a windows service. That should handle all the background stuff. You can then register the service and set it to start when the system starts.
To allow it to have a UI, and show up in the notification area, you need a windows application. This will be in autostart as usual, and will communicate with the service - for example, over named pipes.
While it is still (barely) possible to run an UI application without a user session, it's only maintained for backwards compatibility, and already shows a lot of problems. It will likely be removed altogether in the future, because it breaks quite a few contracts. Do not rely on hacks like this.
I also used the task scheduler to create the application at system startup. It should be noted that if you want to use for mining, you have to disable an option in "settings" where it says that if the application lasts more than three days in a row it will end.
It really works wonderfully!
it is a old question but I recently solved in another way...
(before I was using a scheduled-task for startup but this gave me diverse problems with lots software...)
Some programs also for diverse reasons must be run at a user level... or even inside a specific user session...
So the best way I found was to use a tool like Sysinternal/Autoruns to program the auto-logon to a specific user (it is a registry setting)... and in the startup-folder of that user (or any other "autorun/autolaunch" task)... run a script that first locks the screen... and next runs the other intended programs... that will run under that user profile...
so you can choose a standard user or a administrator... or even launch programs from a standard user in adminsitrator mode...
I hope will help...
This "hack" solved me many problems with startup apps...
I could not get the "sc create" command to work. Instead I manually edited the registry using regedit. I added a new key in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services.
I used the following page to figure out required parameters and their values. Note that the names do not map.
https://learn.microsoft.com/en-us/windows-hardware/drivers/install/inf-addservice-directive
Old question, but for anyone that stumbles here. Use srvany to set the program as a custom service.
Note that when you do this with for example dropbox, googledrive, etc., you will need stop the service, then open the program normally to make changes like password, updates, etc.
below is a well enough intro.
https://www.iceflatline.com/2015/12/run-a-windows-application-as-a-service-with-srvany/
Download the tool kit here
https://www.microsoft.com/en-us/download/details.aspx?id=17657
Convert user application to Service and Register it using Regsvr32 or installutil.exe. It will start the service using SYSTEM user account. Which is a high privilege account.
Note : You can`t run any Window based application. Even a Message only window.

Eclipse debugger for GEF editor

I have a GEF editor which represent a finite state machine. Editor's input (and output) is XML. What I am looking for is a way to debug my editor visually.
The way editor works is you create a state Start->Email->End, XML that is created is send to the server and there magic happens, of course Email object has properties that you set: from email, to email, subject, etc. What I am looking for is a way I can launch a debugger and step through each step of execution. So for example if I break at Email step I would be able to see what message was, whom it was for and what server returned at the end.
Is this something that is possible to accomplish and if so are there any articles I need to read to familiarize myself with how to create this debugger?
I found some discussion about Eclipse debuggers (1,2) but nothing about what I am interested in doing.
There are two different issues here.
One is writing a debugger engine, that manages the execution of your model, for example steps the execution, allows querying the variables/states, etc., and another one that outputs the result in your editor.
The articles you have linked work with the first issue: creating an engine that executes the model in the background, and integrates the engine into the Eclipse environment using 1) the launch framework to execute it similarly as Java programs, and 2) allows displaying the state in the textual editors.
You want to display the state in graphical editors. Because graphical editors have much less in common, the back-annotation of the debug state has to be done manually (instead of the generic support for text editors). Basically, I would create actions that set up breakpoints, and update the model to be able to store/query the execution state, and then update the GEF views to display it on the GUI. For this you have to change your Figures and your EditParts at least, and possibly other places as well.