当前位置:网站首页>TC software detailed design document (mobile group control)

TC software detailed design document (mobile group control)

2022-06-21 09:21:00 Caijing embedded

TC Software detailed design document ( Mobile group control )

author : The wolf is the whale

date :2021-06-27

One 、 Overall diagram

1、UI Interface

main interface : At the top is LOGO、 Shortcut key 、 Set up , On the left is the device management list , In the middle is the mobile interface display , On the right is the log information ( Hidden )

Set the pop-up box : Set global parameters ( Specific options to be adjusted ), And save to the configuration file

2、 Functional block diagram


Two 、 Business flow chart

1、 The main flow chart

3、 ... and 、 Module implementation

1、adb modular

adb Module function

Query all devices

Turn on the device touch

Turn on the reverse control

install apk

Send and start server

call adb Module

Group list module

Device modules

server modular

File module

adb Dependent modules

All connected mobile phones

adb Responsible for querying all equipment 、 Turn on the device touch 、 Turn on the reverse control 、 install apk、 Send and start server establish tcp Connect , The follow-up work is entrusted to tcp Connect to complete .

Need to use adb There is a main interface 、 Device modules 、server modular 、 File module

2、 Group list module

Group list module

json File read and write

json Handle : Additions and deletions

Dynamic display of equipment list

Equipment management

Display state

Change device name

Modify group name

Add / delete group

Add or delete equipment

Device switching grouping

Equipment connection and disconnection

The device group specifies the reverse master

Device group assignment script

Who is calling me

main interface

Which modules do you want to call

Shortcut bar module

Device management module

adb modular

The device group list module contains json Parsing processing module 、 The list shows 、 Device list management ( Display state 、 increase 、 Delete 、 Connect 、 To break off 、 grouping 、 Specify the master ).

3、 Mouse and keyboard system module

When UI There is a keyboard on the interface 、 When the mouse button is pressed or the mouse button is pressed and moved , According to the position of the pointer , Notify the current location UI The processing function of the corresponding module .

The interface area for receiving keyboard key values is only the main program 、UI The text input box on the and the mobile interface display area .

The only area that receives mouse events is UI Button on 、 Text input box and mobile interface display area .

4、 Device management module

Device management module

Manage a set of devices

Connect and disconnect all devices in the current group

Connect and disconnect individual devices

Update group key value mapping configuration

Update group operation script

Cancel and bind shortcut key operation buttons

Set the reverse group control host

Map all group control slaves

Who is calling me

Group list module

Which modules do you want to call

Device modules

Shortcut key module

Key value events

Device management module : Manage a set of devices ( A master control device , Multiple controlled equipment )、 Connect and disconnect individual devices 、 Connect and disconnect all devices in the current group 、 Update group key value mapping configuration 、 Update group operation script 、 Cancel and bind shortcut key operation buttons 、 Set the reverse group control host 、 Map all group control slaves 、 Respond to the mobile phone operation of the group control host and send it to other slaves

5、 Shortcut key module

Shortcut key module : According to the currently selected device or device group , Send the following command to the device management module : Set the master control device 、 Drop down the notification bar 、 Display touch 、 Breath screen 、 To turn it off 、 The volume is high 、 The volume is low 、 Handover application 、 menu bar 、 return 、 Back to the main interface 、 screenshots .

6、 Device modules

Functions of equipment modules : Operate a device , Response to key value operation , Respond to group control operation , Response send file 、 install apk operation ,adb Connect the phone , start-up TCP Transport video streams and messages .

The device module uses : Key value events 、server modular 、 Video frame cache 、 decode 、 File operations 、 Video streaming 、 Pictures showed UI、 Controller key value mapping 、 To configure .

server Sub module : Transmission and start-up equipment server, Set the reverse control

server The sub module uses :TCP Socket

Decoding sub module : Use ffmpeg library

videobuffer Sub module : Process a frame of pictures after decoding

avframeconvert Sub module : Will decode the original YUV Format of a picture into RGB Format , To display

Controller sub module : Use tcp Connect , Respond to shortcut key actions , Perform the cutting board operation , Perform key value mapping conversion

Device screen UI modular : Use openGL Show 、 Install shortcut key mapping 、 Response key value .

Four 、 Reference material

adb:Android Commissioning Bridge (adb)

ffmpeg:FFmpeg  Multimedia processing tools

genymobile(Android server):Scrcpy Analysis of projection principle - Equipment control

TCP socket: be based on TCP Agreed Socket signal communication

OpenGL:OpenGL  Open graphics specification

QT:QT

原网站

版权声明
本文为[Caijing embedded]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206210917519868.html