CANTOOLAPP_ results show

Source: Internet
Author: User

GitHub links are as follows: Https://github.com/cyj-fightman/CanTool

The software with the Virtual serial port tool is a friendly serial debugging assistant, the analog port connection using the VSPD

Show the development of the interface: which Main.java as the main entrance, click Main.java Run can, if not for debugging, our team has also packaged the software: CanTool.exe as runnable files, Cantool.jar executable jar package, can run

The points to be reminded are the need

1. The program needs to copy the Rxtxparallel.dll,rxtxserial.dll two files into the C:\Windows\System32 directory (regardless of debugging or for use)

2. The program also imports Rxtxcomm.jar,serialportio.jar two jar package (debug required)

3. Program using Eclipse Development, using Swt/jface plug-in, development language for Java

4. The program uses Java JDK 1.8

The 5.database.txt needs to be placed on the same level of the executable file, which is easy to parse by default and can also be imported in the import function. Placed at the top-level directory when debugging.

6. The program development and operation need to configure the environment, you can refer to GitHub above "" installation and configuration Instructions "" Https://github.com/cyj-fightman/CanTool/tree/master/CanTool_data

Next is the main interface of the program:

The menu bar of the main interface is: file, parameter setting, and about,

The file is divided into two content, respectively, the export received and parse the completed files, but also in the right column of the window to get the data

The import data file is an import-defined data file that resolves the content owned by the obtained field according to the data file

In addition, parameters are set to set the parameters such as baud rate, port, stop bit and so on with serial port connection.

About: Some introductions to software and members of this group

Take a look at the software reception function, the first need is analog to the end of the can device, this side with friendly serial debugging assistant open COM2 port, baud rate is set to 115200, data bit 8 bits, stop bit 1,

The t35880011121314151617 is the data that will be sent, which is encoded and needs to be decoded in the program.

The decoding of the program is divided into two parts, the first is to parse the obtained ID DLC data: The code is as follows

The ID is then mapped to the ID in the database to obtain further parsing in the database:

Where 856 of the database in decimal and hexadecimal conversion can be obtained from the t35880011121314151617 parse the ID, that is: 358:

Then the data generated by parsing the contents of the database:

, (take the first line for example) each row corresponds to the important content has,

Device Name: Cdu_hvacoffbuttonst

Extract the starting bit and length from data: 0|1

Extraction direction: 0+

A, B value: (1,0) A is a 1LSB (Least significant Bit) represents the physical value of the size, also known as FACTOR,B is the amount of physical offset

Range of values: [0|1]

Unit name: "" (this side is empty, the back has temperature symbol °c)

Node Name: HVAC

Next receive the content: The software will get the data and parse, the left box represents the data received, the right box represents the parsed data and the database table content corresponding

Here's what to send: The software can be typed directly in the window to send:

On the other port you will receive the content:

At the same time, the software also provides the function of intelligent transmission, because it is necessary to send the encoded data to the next layer of the can device, and the coding results are difficult to grasp, such as coding t35880011121314151617 is difficult to read,

As a result, the smart send function is completed:

Click Smart Send to see another window pop-up:

Click on any of the corresponding database table names: The table name is also extracted from the corresponding ID of the data:

If you click Cdu_1, the following content appears:

The value of this table can be edited, after editing is completed, click on the X, you can exit the window, and in the main window in the Send box, there is a need to send the encoding content:

Click Send to find that the peer has received the content

Add: Also added a bit of error hint:

1: Error in Parameter setting interface:

2: If the database specifies the value range edit error

The above is the basic content of our software

Team member: Banyan Tree Chen Yu

Chen Yukian

Li

Yuan Lin Lynn

CANTOOLAPP_ results show

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.