Calibrating A2L file generated by xcplite using ETAS INCA without HEX file - calibration

How can I calibrate an A2L file generated by the xcplite opensource project using ETAS INCA?
xcplite is a lightweight implementation of the ASAM XCP Protocol Layer V1.4, it generates A2L file, I am trying to load that A2L file in INCA.
But when I try to load it in INCA, it is asking for a .hex file which I don't have. Is it possible to calibrate the A2L file without a .hex file or is it necessary to have one for the ECU in INCA?
I have attempted to generate a .hex file for the project itself, however it is not successful. I am unsure if this is the correct approach to take.
I am new to this process, any help would be appreciated.

Related

Parse WRL file to X3D

Well the problem I have is that I need to transform a WRL file to a X3D xml file, but for this I can't find API's that can get code from the file.
Well first I manually saw what tags were needed for the X3D file, and then I was trying with open source software to modify it by exporting it to that file, but in some cases it doesn't work and I would like to do it by code.
view3dscene https://castle-engine.io/view3dscene.php is a part of the Castle Game engine project. view3dscene by itself is a very capable viewer of both .wrl files -- also known as VRML encoding -- and X3D files. WRL files read by view3dscene can be saved as X3D

Identify old dos system file type and decode it into text file

I have pick up an old dos system from my friend, and I need to import the data into SQL, but before importing the data, i need to decode it into a readable text file, but I failed to do so. I have try several stuff:
file command in ubuntu terminal, it said "data"
Use online trid and it said macbin(MacBinary 1)
Tried bin2hex, but couldn't unhex it
Tried some online macbin to hex, no luck as well
Tried to open in macOS, but it keep extracting files
bin2hex said, nothing here
stuffitexpander.... Doesn't recognize...
This is the file that i need to decode
https://gofile.io/?c=wdbs6A
Please let me know if you need the original program.
I think they are just some database files.
Use this site for explanations. they even have a file analyzer - showing you the data inside.
You will need to rename the files to .db extension instead of .ocm.

How do I add files to my app and find their path to access them

I have some txt files that store some important data for my app. Due to its nature I want them to be in external text files. Currently i plan on reading them using a streamreader that reads the txt line by line. However, i don't know where to put my txt files, so i can access them in my streamreader which requires their path. Ive seen examples of using NSBundle.mainBundlepathforResource. However, I'm not really sure what a Bundle is or how to place my files there in the first place.
You can use NSBundle. Here's another answer that shows how to create and use bundles: https://stackoverflow.com/a/23884501/1228075

iOS AUSampler audiounit - file path issue with EXS audio files?

Following the Apple docs here I have been able to successfully load a GarageBand EXS sampler instrument into AUSampler in my iOS app by recreating, for example the following path within my app directory:
/Sampler Files/Funk Horn Section/nameofaudio.aif
iOS looks for the audio file in the following directory:
file:///Library/Application%20Support/GarageBand/Instrument%20Library/Sampler/Sampler%20Files/Funk%20Horn%20Section/'
However this doesn't work when I create my own EXS file. How does it know to remove the first part of the filepath if GarageBand?? I've even tried creating my EXS instrument and even created in the same GarageBand directory but it makes no difference:
Failed to locate sample '001%20VirusTI%20-%20SeaThr%2314A1B3.aif -- file:///macSSD/Library/Application%20Support/GarageBand/Instrument%20Library/Sampler/Sampler%20Files/VirusTI%20-%20SeaThreeHS%20v2/'
I've also tried manually editing the file path in the exs file with a text editor but nothing works.
The EXS instrument plays fine in logic. But my app can't find it.
Any help greatly appreciated.
The key here is that your source sampler file has to reference samples that come from any of these 'trigger' directory structures to work properly:
"/Sounds/"
"/Sampler Files/"
"/Apple Loops/"
"/EXS Factory Samples/"
"/SoundFont Samples/"
Your sample has to exist in a directory path with one of those triggers in it, and then the path has to match the exact same in your bundle. iOS looks for one of those triggers, then deletes everything before that, and uses that as the new search path in the bundle to find your sample.
It is tricky, but it will work this way if you make sure everything is in order.
I fought with this because my samples were stored in places without any of those keywords, and so it would never find them.

(rails) how to validate whether an uploaded .txt file is not, say, an image file?

I have a upload text file field, and with it I plan to save the file somewhere and then store the location of the file in a database. However, I want to make sure the file they uploaded is a .txt file, and not, say, an image file. I imagine this happens in the validation step. How does one validate such a thing? Also, how do you get the filename of the uploaded file? I could always just check if it said '.txt' but for future reference knowing how to validate without just the filename would be helpful.
Trying to validate the contents of a file based on the filename extension is opening the door for major hackerdom. It's trivial to change the extension and upload the file.
If you are on a Mac/Linux/Unix-based system the OS "file" command is the standard because it looks inside the file for key bytes that flag file types. http://en.wikipedia.org/wiki/File_(Unix) I'm not sure what's available for Windows, but this might help: Determine file type in Ruby
One way of doing it, the simple way really, would be to pass the file through an image loader, preferably one that handles multiple common formats, and see if it throws an error.
The other way is to manually check the file header for common image format headers. For example, .bmp files start with BM. Other formats have their own specific markings you can use.

Resources