Data communication between the Qtopia application and the Linux Kernel

Source: Internet
Author: User
Data Communication Between Qtopia applications and Linux kernel-general Linux technology-Linux programming and kernel information. For details, see the following section. Recently, I am working on a project for data communication between the Qtopia application and the Linux kernel. Since Linux has been exposed for a relatively short period of time, I plan to adopt the following solutions:

1. Export "Shared data" from the driver module in the Linux kernel ";

Method: a: EXPORT_SYMBOL B: netlink (learning)

2. "Shared data" is a member of the signal-slot Mechanism object in Qtopia. When "Shared data" changes, the Qt slot function is triggered.

The method is:
A declares the QSocketNotifier object, QSocketNotifier * notifier;

B. Use QSocketNotifier to establish the association between "Shared data" and notifier. notifier = new QSocketNotifier (fd, QSocketNotifier: Read, this); // fd is a parameter related to shared data.

C associates the qt signal with the SLOT function connect (notifier, SIGNAL (activated (int), this, SLOT (readKeyboardData ()));

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.