CN102830968A - Communication method of cloud operating system - Google Patents

Communication method of cloud operating system Download PDF

Info

Publication number
CN102830968A
CN102830968A CN2012102793136A CN201210279313A CN102830968A CN 102830968 A CN102830968 A CN 102830968A CN 2012102793136 A CN2012102793136 A CN 2012102793136A CN 201210279313 A CN201210279313 A CN 201210279313A CN 102830968 A CN102830968 A CN 102830968A
Authority
CN
China
Prior art keywords
communication
operating system
jni
cloud
serial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012102793136A
Other languages
Chinese (zh)
Inventor
郑亮
于治楼
梁华勇
李伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Group Co Ltd
Original Assignee
Inspur Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Group Co Ltd filed Critical Inspur Group Co Ltd
Priority to CN2012102793136A priority Critical patent/CN102830968A/en
Publication of CN102830968A publication Critical patent/CN102830968A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides a communication method of a cloud operating system. With development of science and technology, cloud computing starts being widely applicable to many fields. With the development of cloud computing, the requirements of cloud computing terminals for operating system performance and diversity and user experience are higher. Complex and varying environments and devices are involved in the field of cloud terminals at present, and the various existing terminal operating systems are imperfect in communication operation and generally only support communication manners most applied daily, such as USB (universal serial bus) interface communication and Bluetooth communication. By the method implementing serial communication on cloud terminal operating systems, application of the terminal operating systems in the traditional industrial environment and the traditional communication means is freed.

Description

A kind of means of communication of cloud operating system
Technical field
The present invention relates to the cloud computing technical field, specifically a kind of means of communication of cloud operating system.
Background technology
The cloud computing terminal operating system is at the early-stage and disperse state.Various technology and product are used and are immature; Particularly in the environment of cloud computing terminal device high complexityization, for the realization of the various communication modes of terminal device requirement has just been arranged, because cloud operating system is used on the intelligent artifact of daily life more now; So in the realization of the communication modes of traditional device with regard to defectiveness; Through realizing traditional serial communication mode, make the communication of the support various device that cloud computing operating system becomes reconciled, so that adapt to the various device environment.
Summary of the invention
The objective of the invention is under existing terminal operating system, provides a kind of means of communication of practicality of reality for developing commercial cloud terminal device particularly to the cloud terminal operating system in the complicated business working environment.
The objective of the invention is to realize that by following mode step is following:
1) at first with c language design JNI interface, through the opening and closing of JNI interface completion serial ports, the standard of JNI is Java_packagename_classname_methodname;
2) then create file jni/Android.mk; This file is the Makefile of local C code,
3) we need generate library file under the linux environment then, generate filename.so by name, open to this bottom, and the program of closing serial ports just designs and is over;
4) in order to realize system-level serial communication, we also must realize interface on cloud operating system, just only in this way on cloud operating system design of program can call serial communication;
Realize the interface of upper strata serial communication at last, concrete implementation method: at first the filename.so library file that generates is copied under the src catalogue, then write the serialport.java file, key code is following:
public?class?SerialPort?{?  ……?  /*open?the?serial?port*/?  mFd?=?open(device.getAbsolutePath(),?baudrate);?  //?JNI?  private?native?static?FileDescriptor?open(String?path,?int?baudrate);?  public?native?void?close();?  static?{?  System.loadLibrary("serial_port");
We just can realize serial communication through calling this type of SerialPort in the upper procedure design like this.
The invention has the beneficial effects as follows: along with development of science and technology; Cloud computing begins to be used widely in a lot of fields; Development along with cloud computing; Terminal device to cloud computing is had higher requirement on performance, variation and the user experience of operating system, because present field, cloud terminal can relate to environment and complex equipments is changeable, what still current various terminal operating systems were done in communication work is not very perfect; Many communication modes have often just been supported to use in the daily life, for example: the communication of USB mouth, bluetooth communication etc.This patent is through providing a kind of method that on the cloud terminal operating system, realizes serial communication, makes terminal operating system on Traditional industrial environment and traditional communication modes, obtain liberation.
Description of drawings
Fig. 1 is the communication flow synoptic diagram.
Embodiment
Explanation at length below with reference to Figure of description method of the present invention being done.
Step is following:
1) at first with c language design JNI interface, through the opening and closing of JNI interface completion serial ports, the standard of JNI is Java_packagename_classname_methodname;
2) then create file jni/Android.mk; This file is the Makefile of local C code,
3) we need generate library file under the linux environment then, generate filename.so by name, open to this bottom, and the program of closing serial ports just designs and is over;
4) in order to realize system-level serial communication, we also must realize interface on cloud operating system, just only in this way on cloud operating system design of program can call serial communication;
Realize the interface of upper strata serial communication at last, concrete implementation method: at first the filename.so library file that generates is copied under the src catalogue, then write the serialport.java file, key code is following:
public?class?SerialPort?{?  ……?  /*open?the?serial?port*/?  mFd?=?open(device.getAbsolutePath(),?baudrate);?  //?JNI?  private?native?static?FileDescriptor?open(String?path,?int?baudrate);?  public?native?void?close();?  static?{?  System.loadLibrary("serial_port");
We just can realize serial communication through calling this type of SerialPort in the upper procedure design like this.
Communication flow is as shown in Figure 1:
A, that SerialPort.java class that at first will generate import in your project;
B, then oneself the class in call the method among the SerialPort.java;
C, at last through calling the business that SerialPort.java realizes oneself.
Except that the described technical characterictic of instructions, be the known technology of those skilled in the art.

Claims (1)

1. the means of communication of a cloud operating system is characterized in that step is following:
1) at first with c language design JNI interface, through the opening and closing of JNI interface completion serial ports, the standard of JNI is Java_packagename_classname_methodname;
2) then create file jni/Android.mk; This file is the Makefile of local C code,
3) we need generate library file under the linux environment then, generate filename.so by name, open to this bottom, and the program of closing serial ports just designs and is over;
4) in order to realize system-level serial communication, we also must realize interface on cloud operating system, just only in this way on cloud operating system design of program can call serial communication;
Realize the interface of upper strata serial communication at last, concrete implementation method: at first the filename.so library file that generates is copied under the src catalogue, then write the serialport.java file, key code is following:
public?class?SerialPort?{?  ……?  /*open?the?serial?port*/?  mFd?=?open(device.getAbsolutePath(),?baudrate);?  //?JNI?  private?native?static?FileDescriptor?open(String?path,?int?baudrate);?  public?native?void?close();?  static?{?  System.loadLibrary("serial_port");
We just can realize serial communication through calling this type of SerialPort in the upper procedure design like this.
CN2012102793136A 2012-08-08 2012-08-08 Communication method of cloud operating system Pending CN102830968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012102793136A CN102830968A (en) 2012-08-08 2012-08-08 Communication method of cloud operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012102793136A CN102830968A (en) 2012-08-08 2012-08-08 Communication method of cloud operating system

Publications (1)

Publication Number Publication Date
CN102830968A true CN102830968A (en) 2012-12-19

Family

ID=47334118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012102793136A Pending CN102830968A (en) 2012-08-08 2012-08-08 Communication method of cloud operating system

Country Status (1)

Country Link
CN (1) CN102830968A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080005368A1 (en) * 2006-04-21 2008-01-03 Barrett Kreiner Peripheral hardware devices providing multiple interfaces and related systems and methods
CN102446144A (en) * 2010-09-30 2012-05-09 北大方正集团有限公司 Method, device and system for scheduling serial port resources

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080005368A1 (en) * 2006-04-21 2008-01-03 Barrett Kreiner Peripheral hardware devices providing multiple interfaces and related systems and methods
CN102446144A (en) * 2010-09-30 2012-05-09 北大方正集团有限公司 Method, device and system for scheduling serial port resources

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
金智义等: "基于Android平台的串口通信实现", 《电脑知识与技术》 *

Similar Documents

Publication Publication Date Title
Anwaarullah et al. RTOS based home automation system using Android
CN102622211B (en) A kind of method and apparatus of application development
US11403196B2 (en) Widget provisioning of user experience analytics and user interface / application management
TW202044019A (en) Access method based on H5 access mode, access component thereof and mobile terminal
CN103176802B (en) Realize the method that the user interface UI of system separates with widget library by control pond
CN106020921B (en) The transplantation method and its system of peripheral hardware application program
CN102541558B (en) Method for integrating Android application system in television system based on Android inner core
Riliskis et al. Ravel: Programming iot applications as distributed models, views, and controllers
CN103473072B (en) Mobile cloud computing application program development method
CN106201466B (en) A kind of Template Manager method based on heat
CN104035778A (en) Android application program development method
CN103019748B (en) The method and system of local application inserted in table top forms under Linux
CN104809534A (en) Business process management system
CN102779059B (en) The method and apparatus starting application in the client of Saipan
CN102830968A (en) Communication method of cloud operating system
Chowhan Hands-on Serverless Computing: Build, Run and Orchestrate Serverless Applications Using AWS Lambda, Microsoft Azure Functions, and Google Cloud Functions
CN114741054A (en) Desktop application software development and construction method based on homemade operating system
TWI447647B (en) Terminal device for executing android applications
CN113741862A (en) Communication system and method for mobile terminal expansion development
CN103309681B (en) A kind of open platform client software operational approach and device thereof
KR101196838B1 (en) Common Communication Manager Corded in Source Code of Android Layer Architecture
Guan et al. Rapid development of IoT applications with TinyLink
CN106663007B (en) Method for operating tool in working environment and machine using the method
CN104166562B (en) Generation method and device for application program magnet in Windows
Sravani et al. Developing Touch Screen based Data Transmission Using S3C2440 Processor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121219