[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106657101A - SDK and method for remote control of different protocol types of wireless communication modules - Google Patents

SDK and method for remote control of different protocol types of wireless communication modules Download PDF

Info

Publication number
CN106657101A
CN106657101A CN201611249941.4A CN201611249941A CN106657101A CN 106657101 A CN106657101 A CN 106657101A CN 201611249941 A CN201611249941 A CN 201611249941A CN 106657101 A CN106657101 A CN 106657101A
Authority
CN
China
Prior art keywords
wireless communication
communication module
interface
class
type
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
CN201611249941.4A
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.)
Opple Lighting Co Ltd
Original Assignee
Opple Lighting 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 Opple Lighting Co Ltd filed Critical Opple Lighting Co Ltd
Priority to CN201611249941.4A priority Critical patent/CN106657101A/en
Publication of CN106657101A publication Critical patent/CN106657101A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention provides an SDK (Software Development Kit) and a method for realizing remote control of different protocol types of wireless communication modules. The SDK comprises an application interface component used for packaging control operation for the different protocol types of the wireless communication modules into a uniform interface for uniform call of an external side; a device component used for abstracting the different protocol types of the wireless communication modules into independent categories, and reserving an interface of a adapter in the corresponding protocol type for each category; and at least two types of adapters, wherein each type of the adapter carries out control operation on the corresponding protocol type of the wireless communication module. The SDK provided by the embodiment packages the control operation of the different protocol types of wireless communication modules into a uniform interface and provides the uniform interface to the external side for uniform call, so that the external part can call the different protocol types of the wireless communication modules indistinguishably without perceiving bottom-layer calling details, the complexity of the exterior is accordingly reduced and the maintainability of an external program is accordingly and accordingly improved.

Description

The SDK and method of the wireless communication module of remotely control different agreement type
Technical field
The present invention relates to technical field of internet application, particularly a kind of to realize the wireless of remotely control different agreement type The SDK and method of communication module.
Background technology
With the quick popularization of smart machine (such as Intelligent illumination device, intelligent camera), the behaviour of various smart machines Prosecutor formula is also not quite similar, and has bluetooth, there is WIFI (WIreless-Fidelity, Wireless Fidelity), there is ZigBee (purple honeybee) , etc..Substantially the intelligence on all be unableing to do without control of intelligent terminal or system is operated to being set and controlled for these smart machines Control module, such as APP (Application, application program) etc., inventor has found that current intelligent control module is logical for different The wireless communication module (that is, bluetooth, WIFI or ZigBee etc.) of letter protocol type without unified method of calling, substantially respectively The a set of implementation of communication protocol type correspondence is planted, without unified specification, such construction cycle is longer, relatively costly, it would be highly desirable to Solve this problem.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome the problems referred to above or at least in part solve on State the wireless communication module for realizing remotely control different agreement type of problem SDK (Software Development Kit, Software development kit) and corresponding method.
According to an aspect of of the present present invention, there is provided a kind of wireless communication module for realizing remotely control different agreement type Software development kit SDK, including:
Application interface component is unified for will be packaged into the control operation of the wireless communication module of different agreement type Interface, for outside unified call;
Apparatus assembly, for the wireless communication module of the different agreement type to be abstracted into into independent class, each class is pre- Stay the interface of the adapter of corresponding protocol type;
At least two class adapters, wherein, all kinds of adapters are controlled to the wireless communication module of corresponding protocol type Operation.
Alternatively, the wireless communication module is located in smart machine, and the application interface component is for different types of Smart machine provides the interface of different types of control operation.
Alternatively, if the unified interface of encapsulation include it is multiple, each interface correspondence different agreement type it is wireless One or more control operations of communication module.
Alternatively, the application interface component is additionally operable to search for the wireless communication module of different agreement type and creates not With the mark of the wireless communication module of protocol type.
Alternatively, the application interface component includes realizing the interface of the function that equipment finds that the interface definition has first Method and second method, the first method is used to search for the wireless communication module of different agreement type, and the second method is used The mark of the wireless communication module of respective protocol type is created in the message replied by wireless communication module.
Alternatively, each class in the apparatus assembly realizes the unified interface encapsulated in the application interface component, When the interface is called, the apparatus assembly is additionally operable to the corresponding protocol class of mark according to the application interface building component Type, calls the interface of the adapter of respective protocol type, with using the adapter of respective protocol type to respective protocol type Wireless communication module is controlled operation.
Alternatively, there is the first base class defined in the apparatus assembly and be inherited from least two of first base class Two base class, the different protocol type of each the second base class correspondence, by inheriting at least two second base class by the difference The wireless communication module of protocol type is abstracted into independent class.
Alternatively, there is abstract method defined in first base class, described at least two second base class are inheriting described the The abstract method of definition is realized during one base class.
Alternatively, at least two class adapters have to channel radio to there is a unified interface defined in the unified interface The method that letter module is controlled operation, all kinds of adapters realize the method defined in the unified interface to realize to corresponding association The wireless communication module of view type is controlled operation.
Alternatively, the control operation includes for the message read from wireless communication module submitting to the apparatus assembly Operation, the apparatus assembly is additionally operable to parse the message, obtains the parameter number of wireless communication module included in the message According to by supplemental characteristic renewal in each class.
Alternatively, the software development kit calling for the intelligent control module on control of intelligent terminal or system, from And realize control of intelligent terminal or system by intelligent control module call the unified interface that the software development kit is provided come The wireless communication module of remotely control different agreement type.
According to another aspect of the present invention, a kind of radio communication mold for realizing remotely control different agreement type is additionally provided The method of block, including:
Unified interface will be packaged into the control operation of the wireless communication module of different agreement type, for outside unified Call;
The wireless communication module of the different agreement type is abstracted into into independent class, each class reserves corresponding protocol class The interface of the adapter of type;
The interface of the adapter of respective protocol type is called, using the adapter of respective protocol type to respective protocol type Wireless communication module be controlled operation.
Alternatively, the wireless communication module is located in smart machine, and methods described also includes:
The interface of different types of control operation is provided for different types of smart machine.
Alternatively, methods described also includes:
The wireless communication module of search different agreement type, and create corresponding by the message of wireless communication module reply The mark of the wireless communication module of protocol type.
Alternatively, the interface of the adapter for calling respective protocol type, including:
Each class realizes the unified interface of encapsulation, when the interface is called, according to the corresponding agreement of mark for creating Type, calls the interface of the adapter of respective protocol type.
Alternatively, methods described also includes:
Message is read from wireless communication module, and parses the message, obtain the radio communication mold included in the message The supplemental characteristic of block, and then the supplemental characteristic is updated in each class.
Embodiments provide a kind of software development kit (SDK), it include application interface component, apparatus assembly and At least two class adapters, wherein, the wireless communication module of different agreement type is abstracted into into independent class by apparatus assembly, each Class reserves the interface of the adapter of corresponding protocol type, by all kinds of adapters of interface interchange of reserved adapter to corresponding The wireless communication module of protocol type be controlled operation, and by application interface component by the channel radio to different agreement type The control operation of letter module is packaged into unified interface, there is provided to outside (i.e. intelligent control module, such as APP) unified call, Allow outside indistinguishably to call the wireless communication module of different agreement type, details is called without the need for perceiving bottom, so as to drop The complexity of low outside and the maintainability of raising external program.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of specification, and in order to allow the above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the specific embodiment of the present invention.
According to the detailed description below in conjunction with accompanying drawing to the specific embodiment of the invention, those skilled in the art will be brighter Above-mentioned and other purposes, the advantages and features of the present invention.
Description of the drawings
By the detailed description for reading hereafter preferred embodiment, various other advantages and benefit is common for this area Technical staff will be clear from understanding.Accompanying drawing is only used for illustrating the purpose of preferred embodiment, and is not considered as to the present invention Restriction.And in whole accompanying drawing, it is denoted by the same reference numerals identical part.In the accompanying drawings:
Fig. 1 shows the wireless communication module for realizing remotely control different agreement type according to an embodiment of the invention The structural representation of software development kit;
Fig. 2 shows the wireless communication module for realizing remotely control different agreement type according to an embodiment of the invention The hierarchy schematic diagram of software development kit;
Fig. 3 shows the UML structure charts of adaptation layer according to an embodiment of the invention;
Fig. 4 shows the UML structure charts of mechanical floor according to an embodiment of the invention;
Fig. 5 shows the UML structure charts of interface layer according to an embodiment of the invention;And
Fig. 6 shows the wireless communication module for realizing remotely control different agreement type according to an embodiment of the invention The flow chart of method.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should not be by embodiments set forth here Limited.On the contrary, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
To solve above-mentioned technical problem, a kind of nothing for realizing remotely control different agreement type is embodiments provided The software development kit (SDK) of line communication module.Fig. 1 shows and according to an embodiment of the invention realizes remotely control different agreement The structural representation of the software development kit of the wireless communication module of type.As shown in figure 1, the software development kit 100 can include: Application interface component 110, at least apparatus assembly 120, two class adapters 130.
In each part of the software development kit 100 of the present embodiment, application interface component 110 is used for will be to different agreement class The control operation of the wireless communication module of type is packaged into unified interface, for outside unified call;Apparatus assembly 120 is used for will The wireless communication module of different agreement type is abstracted into independent class, and each class reserves connecing for the adapter of corresponding protocol type Mouthful;All kinds of adapters at least two class adapters 130 are controlled operation to the wireless communication module of corresponding protocol type.
Using the software development kit 100 of the present embodiment, namely SDK, it is by the nothing to different agreement type The control operation of line communication module is packaged into unified interface, there is provided adjust to outside (i.e. intelligent control module, such as APP) is unified With, allow outside indistinguishably to call the wireless communication module of different agreement type, details is called without the need for perceiving bottom, so as to The maintainability of complexity and raising external program outside reducing.
In the alternative embodiment of the present invention, wireless communication module may be located at smart machine (such as Intelligent illumination device, intelligence Energy video camera, Intelligent air purifier etc.) in, software development kit 100 can be controlled by remotely control wireless communication module Smart machine.In actual applications, developer can be based on software development kit 100 come in developing intellectual resource control terminal or system Intelligent control module (for example, software development kit 100 is arranged in intelligent control module), can so utilize Based Intelligent Control mould Block carrys out remotely control wireless communication module, and then to control smart machine.Here control of intelligent terminal can be computer, intelligence The terminals such as mobile phone, intelligent watch, for example, control of intelligent terminal is smart mobile phone, then intelligent control module can be smart mobile phone On APP, so, user can manipulate APP and carry out remotely control wireless communication module, and then to control smart machine.Specifically, When user manipulates APP, APP calls the unified interface that software development kit 100 is provided to carry out remotely control different agreement type Wireless communication module, so as to realize the control to smart machine.
Application interface component in order to meet the demand for control to different types of smart machine, in software development kit 100 110 can also be for the interface that different types of smart machine provides different types of control operation.For example, when intelligence sets During for being Intelligent illumination device, the interface of the control operation that application interface component 110 is provided can be returned such as connection, de-interfaced Adjust interface, status poll interface, arrange, control (such as timer setting, parameter setting, switch, light modulation, mix colours, degree of lightening) Interface, OTA (Over-the-Air, aerial to download) upgrade interface, etc., the invention is not restricted to this.When smart machine is intelligence During video camera, the interface of the control operation that application interface component 110 is provided can be such as connection, de-interfaced, callback interface, state Query interface, setting, control (such as video camera title, relative parameters setting, switch, regulation sound, regulation camera picture) connect Mouth, OTA upgrade interfaces, etc., the invention is not restricted to this.It should be noted that herein citing is only illustrative, not to this Invention is limited.
The present invention alternative embodiment in, if encapsulation unified interface include it is multiple, each interface can correspond to not With one or more control operations of the wireless communication module of protocol type.For example, in citing above, connection, disconnection connect Mouth is to having attended operation and opening operation, status poll interface corresponding states inquiry operation, etc..
In the alternative embodiment of the present invention, it is different that the application interface component 110 in software development kit 100 is additionally operable to search The mark of the wireless communication module of protocol type and the wireless communication module of establishment different agreement type.Specifically, application connects Mouth component 110 can include realizing the interface of the function that equipment finds that might as well be defined as IFindDevice interfaces, the interface is determined Justice has first method and second method, and first method is used to search for the wireless communication module of different agreement type, and second method is used The mark of the wireless communication module of respective protocol type is created in the message replied by wireless communication module.Here, wirelessly In the message that communication module is replied the relevant information of wireless communication module is carried (such as model or numbering, communication protocol type, IP Address etc.), such that it is able to create the nothing of respective protocol type according to the relevant information of the wireless communication module carried in message The mark of line communication module.
In the alternative embodiment of the present invention, each class in apparatus assembly 120 is realized being encapsulated in application interface component 110 Unified interface, when unified interface is called, apparatus assembly 120 is additionally operable to what is created according to application interface component 110 Corresponding protocol type is identified, the interface of the adapter of respective protocol type is called, with using the adapter of respective protocol type Operation is controlled to the wireless communication module of respective protocol type.As can be seen here, apparatus assembly 120 can be according to radio communication The protocol type of module matches corresponding adapter, realizes free switching adapter, and flexibility ratio is high.
Each part and the wireless communication module of different agreement type in order to clearly illustrate software development kit 100 Structural relation, three-decker, i.e. application-interface layer, mechanical floor and adaptation layer are divided in Fig. 2 by software development kit 100, point Dui Ying not application interface component 110, apparatus assembly 120 and at least two class adapters 130.The work(of each layer is also illustrated in Fig. 2 Can, will describe in detail respectively below.
First, the application interface component 110 in application-interface layer is by the control to the wireless communication module of different agreement type System operation be packaged into unified interface (as equipment finds interface, connection, de-interfaced, callback interface, status poll interface, if Put, control interface, OTA upgrade interfaces, etc.), for outside unified call, so as to shield bottom details is realized.Here outside Portion can be such as APP, the usually UI of APP (User Interface, user interface) layer.
Secondly, the wireless communication module of different agreement type is abstracted into independent class by the apparatus assembly 120 in mechanical floor, Each class reserves the interface of the adapter of corresponding protocol type, the wireless communication module of the different agreement type illustrated in Fig. 2 WIFI and Bluetooth wireless communication module are included, this is certainly not limited to, there can also be the wireless communication modules such as ZigBee.
Furthermore, at least two class adapters 130 in adaptation layer, including WIFI connection adapters and bluetooth connection adapter, All kinds of adapters are controlled operation to the wireless communication module of corresponding protocol type.In addition, further illustrate in Fig. 2 WIFI without Line communication module and Bluetooth wireless communication module, they are located in intelligent terminal, so as to pass through remotely control wireless communication module To control smart machine.
For outside, the function of realizing equipment discovery of the offer of application interface component 110 can be called IFindDevice interfaces, the wireless communication module of different agreement type is searched for by the first method of the interface, and is connect by this Mouthful the message replied by wireless communication module of second method creating the mark of the wireless communication module of respective protocol type. Further, outside may call upon application interface component 110 encapsulation unified interface, so as to apparatus assembly 120 according to should The corresponding protocol type of mark created with interface module 110, calls the interface of the adapter 130 of respective protocol type, and then Operation is controlled to the wireless communication module of respective protocol type using the adapter 130 of respective protocol type.
In the alternative embodiment of the present invention, the wireless communication module of respective protocol type is controlled in adapter 130 During system operation, can future self-application interface module 110 control instruction be converted into the target instruction target word of respective protocol type, and then Target instruction target word is sent to into the wireless communication module of respective protocol type, so as to the wireless communication module of respective protocol type is connecing Receive and be capable of identify that after target instruction target word the target instruction target word, and then intelligent terminal is controlled according to recognition result.
Come to above-mentioned three below in conjunction with UML (Unified Modeling Language, UML) structure chart Each part in Rotating fields is introduced, in UML structure charts, with wireless communication module as WIFI wireless communication modules and bluetooth As a example by wireless communication module.
(1) adaptation layer
At least two class adapter 130 pairs in adaptation layer should have unified interface, have to channel radio defined in the unified interface The method that letter module is controlled operation, all kinds of adapters 130 realize the method defined in the unified interface to realize to corresponding The wireless communication module of protocol type is controlled operation.
Fig. 3 illustrates the UML structure charts of adaptation layer, and adaptation layer mainly has three classes in Fig. 3, respectively BaseConnectionAdapter, BleConnectionAdapter, WiFiConnectionAdapter, wherein, BaseConnectionAdapter is unified interface, and being had defined in the unified interface wireless communication module is controlled operation Method, it is disconnection of wireless communication module, release that such as connect () is connection wireless communication module, disconnect () It is to write data toward wireless communication module (that is, to operate wireless communication module, enter that () is release resource, write (byte [] data) And operate smart machine), callback (byte [] data) message read from wireless communication module is thrown to upper strata, Isconnect () judges that whether wireless communication module connects, and the invention is not restricted to this.
BleConnectionAdapter and WiFiConnectionAdapter realize respectively above-mentioned unified interface, i.e., Realize the method that operation is controlled to wireless communication module of the unified interface definition.
(2) mechanical floor
The definition of apparatus assembly 120 in mechanical floor has the first base class and is inherited from least two second bases of the first base class Class, the different protocol type of each the second base class correspondence, by inheriting at least two second base class by the nothing of different agreement type Line communication module is abstracted into independent class.If additionally, there is abstract method defined in the first base class, at least two second base class exist The abstract method of definition is realized when inheriting the first base class.
Fig. 4 illustrates the UML structure charts of mechanical floor, and in the diagram, class BaseSmartDevice is the first base class, and it is to take out The base class of the top of wireless communication module as class, such essential information for including wireless communication module and BaseConnectionAdapter interfaces, i.e. the unified interface of adapter in adaptation layer.
In the diagram, class BaseBleSmartDevice is the Bluetooth wireless communication module for being inherited from BaseSmartDevice Base class, it realizes the abstract method defined in parent (i.e. class BaseSmartDevice).Class BaseWifiSmartDevice is the base class of the WIFI wireless communication modules for being inherited from BaseSmartDevice, and it realizes father Abstract method defined in class (i.e. class BaseSmartDevice).
Further, the direct derived class BaseBleSmartDevice of the wireless communication module of all different agreement types and Class BaseWiFiSmartDevice, so as to the wireless communication module of different agreement type is abstracted into into independent class.Such as Fig. 4 institutes Show, class BleMusicWakeUpBedLamp and class BlePM25Light are inherited from class BaseBleSmartDevice;Class WifiMusicWakeUpBedLamp and class WifiPM25Light are inherited from class BaseWiFiSmartDevice.In addition, equipment Each class in component 120 realizes the unified interface encapsulated in application interface component 110.
Apparatus assembly 120 in mechanical floor provides important method analyze (), and it is for parsing Data in BaseConnectionAdapter in callback (byte [] data), i.e. read from wireless communication module Message, apparatus assembly 120 parses the message, the supplemental characteristic of wireless communication module included in the message is obtained, by parameter number According to renewal in each class.
(3) interface layer
The UML structure charts of interface layer are respectively as shown in figure 5, illustrate two unified interfaces for encapsulating in Fig. 5 IPM25Light and IMusicWakeUpBedLamp, and realize the IFindDevice interfaces of the function that equipment finds.
Be previously mentioned, application interface component 110 encapsulation unified interface can include it is multiple, each interface can correspond to One or more control operations of the wireless communication module of different agreement type.Fig. 5 illustrate interface IPM25Light and In IMusicWakeUpBedLamp, if each of which defines drying method, these methods can be used to realize corresponding control behaviour Make.For example, in interface IPM25Light, which define open (), close () method to realize opening respectively, close behaviour Make.It should be noted that the method defined in the interface and each interface of Fig. 5 signals is only illustrative, the present invention is not entered Row is limited.
Further, in order to meet the demand for control to different types of smart machine, application interface component 110 can be with The interface of different types of control operation is provided for different types of smart machine, each interface can define different types of control The method of system operation.For example, for Intelligent illumination device, the method that general interface is included has connection, disconnection, switch, light modulation, tune Color, degree of lightening, status poll, timer setting, parameter setting, OTA upgradings, resource release etc., the invention is not restricted to this.
One very important function of interface layer is that equipment of realizing finds, application interface component 110 sets there is provided realization The IFindDevice interfaces of the existing function of preparation, as shown in figure 5, the interface definition has first method scandevice () method With second method createdevice (byte [] data) method, first method is used to search for the channel radio of different agreement type Letter module, second method is used to create the wireless communication module of respective protocol type by the message of wireless communication module reply Mark.Here, in the message that wireless communication module is replied the relevant information of wireless communication module is carried (such as model or volume Number, communication protocol type, IP address etc.), such that it is able to be created according to the relevant information of the wireless communication module carried in message Build the mark of the wireless communication module of respective protocol type.In Figure 5, realize especially by FindDeviceManager classes Method defined in IFindDevice interfaces.
Further, each class in apparatus assembly 120 realizes the unified interface encapsulated in application interface component 110, In Figure 5, class WifiPM25Light and class BlePM25Light realize interface IPM25Light;Class WifiMusicWakeUpBedLamp and class BleMusicWakeUpBedLamp realize interface IMusicWakeUpBedLamp.
Software development kit (SDK) provided in an embodiment of the present invention can be write based on different operating system, for example Based on the operating system such as Linux/Unix, Android (Android), IOS or Saipan, the invention is not restricted to this.So, based on difference The SDK that writes of operating system, it is possible to use SDK developing intellectual resource control modules in corresponding operating system, so as to utilize intelligence Energy control module carrys out remotely control wireless communication module, and then to control smart machine.
So that intelligent control module is as APP as an example, based on the SDK that different operating system is write, it is possible to use SDK is corresponding Operating system on develop APP, so as to user can be by manipulating APP come remotely control wireless communication module, and then to control Smart machine.Specifically, when user manipulates APP, APP calls the unified interface that software development kit 100 is provided remotely to control The wireless communication module of different agreement type processed, so as to realize the control to smart machine.
The software of the wireless communication module for realizing remotely control different agreement type provided based on each embodiment above Kit, based on same inventive concept, the embodiment of the present invention additionally provides a kind of nothing for realizing remotely control different agreement type The method of line communication module.
Fig. 6 shows the wireless communication module for realizing remotely control different agreement type according to an embodiment of the invention The flow chart of method.As shown in fig. 6, the method at least may comprise steps of S602 to step S606.
Step S602, will be packaged into unified interface to the control operation of the wireless communication module of different agreement type, with For outside unified call.
Step S604, by the wireless communication module of different agreement type independent class is abstracted into, and each class is reserved corresponding The interface of the adapter of protocol type.
Step S606, calls the interface of the adapter of respective protocol type, using the adapter of respective protocol type to phase The wireless communication module for answering protocol type is controlled operation.
In embodiments of the present invention, the wireless communication module of different agreement type is abstracted into into independent class, each class is pre- The interface of the adapter of corresponding protocol type is stayed, is assisted to corresponding by all kinds of adapters of interface interchange of the adapter reserved The wireless communication module of view type is controlled operation, and the control operation of the wireless communication module of different agreement type will be sealed Dress up unified interface, there is provided to outside (such as APP) unified call, allow outside indistinguishably to call different agreement type Wireless communication module, without the need for perceiving bottom details is called, so as to reducing the complexity of outside and improving safeguarding for external program Property.
The method of the wireless communication module for realizing remotely control different agreement type provided in an embodiment of the present invention can be answered In the intelligent control module on control of intelligent terminal or system, so that control of intelligent terminal is as smart mobile phone as an example, then the party Method can apply the APP on smart mobile phone.
Wireless communication module may be located in different types of smart machine, such as Intelligent illumination device, intelligent camera, intelligence Energy air purifier etc., in order to meet the demand for control to different types of smart machine, in the alternative embodiment of the present invention, The interface that different types of smart machine provides different types of control operation can be directed to.For example, when smart machine is During Intelligent illumination device, there is provided control operation interface can as connection, de-interfaced, callback interface, status poll interface, Arrange, control (such as timer setting, parameter setting, switch, light modulation, mix colours, degree of lightening) interface, OTA (Over-the- Air, aerial to download) upgrade interface, etc., the invention is not restricted to this.When smart machine be intelligent camera when, there is provided control The interface of operation can be arranged, control (such as video camera title, phase such as connection, de-interfaced, callback interface, status poll interface Related parameter is arranged, switch, adjust sound, adjust camera picture etc.) interface, OTA upgrade interfaces, etc., the invention is not restricted to this. It should be noted that herein citing is only illustrative, do not limit the invention.
Before remotely control is carried out to wireless communication module, it is necessary first to set up with wireless communication module and be connected, that is, need Discovering device is wanted, in embodiments of the present invention, the wireless communication module of different agreement type is may search for, and by radio communication The message that module is replied is creating the mark of the wireless communication module of respective protocol type.Specifically, in search different agreement class During the wireless communication module of type, the searching request of the wireless communication module of search different agreement type can be generated, and will search Request overseas broadcast, after the broadcast, if receiving the message of wireless communication module reply, creates according to the message replied The mark of the wireless communication module of respective protocol type.Next, can send out to the corresponding wireless communication module of mark for creating The request for setting up connection is acted, connection between the two is completed when a response message is received.
The interface of the adapter of respective protocol type is called in above step S606, embodiments providing one kind can The scheme of choosing, in this scenario, can be realized the unified interface of encapsulation, when the interface is called, according to wound by each class The corresponding protocol type of mark built, calls the interface of the adapter of respective protocol type.
In the alternative embodiment of the present invention, to read message from wireless communication module, and the message can be parsed, be obtained The supplemental characteristic of the wireless communication module included in the message, and then supplemental characteristic is updated in each class.Here, channel radio The supplemental characteristic of letter module includes the related data of wireless communication module place smart machine, so, control of intelligent terminal or Intelligent control module in system can get parms data from each class, be shown to the use of control of intelligent terminal or system Family, so that user easily gets the status information of smart machine.
In the alternative embodiment of the present invention, behaviour is controlled to the wireless communication module of respective protocol type in adapter When making, the unified corresponding control instruction of interface of encapsulation can be converted into the target instruction target word of respective protocol type, and then will Target instruction target word is sent to the wireless communication module of respective protocol type, so as to the wireless communication module of respective protocol type is being received The target instruction target word is capable of identify that to after target instruction target word, and then intelligent terminal is controlled according to recognition result.
According to the combination of above-mentioned any one alternative embodiment or multiple alternative embodiments, the embodiment of the present invention can reach Following beneficial effect:
Embodiments provide a kind of software development kit (SDK), it include application interface component, apparatus assembly and At least two class adapters, wherein, the wireless communication module of different agreement type is abstracted into into independent class by apparatus assembly, each Class reserves the interface of the adapter of corresponding protocol type, by all kinds of adapters of interface interchange of reserved adapter to corresponding The wireless communication module of protocol type be controlled operation, and by application interface component by the channel radio to different agreement type The control operation of letter module is packaged into unified interface, there is provided to outside (i.e. intelligent control module, such as APP) unified call, Allow outside indistinguishably to call the wireless communication module of different agreement type, details is called without the need for perceiving bottom, so as to drop The complexity of low outside and the maintainability of raising external program.
In specification mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case of without these details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand one or more in each inventive aspect, exist Above in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.However, the method for the disclosure should be construed to reflect following intention:I.e. required guarantor The more features of feature that the application claims ratio of shield is expressly recited in each claim.More precisely, such as following Claims reflect as, inventive aspect is all features less than single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as the separate embodiments of the present invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more equipment different from the embodiment.Can be the module or list in embodiment Unit or component are combined into a module or unit or component, and can be divided in addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit is excluded each other, can adopt any Combine to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification is (including adjoint power Profit is required, summary and accompanying drawing) disclosed in each feature can it is identical by offers, be equal to or the alternative features of similar purpose carry out generation Replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In included some features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in detail in the claims, embodiment required for protection one of arbitrarily Can in any combination mode using.
The present invention all parts embodiment can be realized with hardware, or with one or more processor operation Software module realize, or with combinations thereof realization.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) are realizing according to embodiments of the present invention realizing remotely control different agreement class The some or all functions of some or all parts in the software development kit (SDK) of the wireless communication module of type.This The bright some or all equipment or program of device (example being also implemented as performing method as described herein Such as, computer program and computer program).Such program for realizing the present invention can be stored in computer-readable medium On, or can have the form of one or more signal.Such signal can be downloaded from internet website and obtained, or Person provides on carrier signal, or provides in any other form.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability Field technique personnel can design without departing from the scope of the appended claims alternative embodiment.In the claims, Any reference symbol between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and be run after fame Claim.
So far, although those skilled in the art will appreciate that detailed herein illustrate and describe multiple showing for the present invention Example property embodiment, but, without departing from the spirit and scope of the present invention, still can be direct according to present disclosure It is determined that or deriving many other variations or modifications for meeting the principle of the invention.Therefore, the scope of the present invention is understood that and recognizes It is set to and covers all these other variations or modifications.

Claims (16)

1. a kind of software development kit SDK of the wireless communication module for realizing remotely control different agreement type, it is characterised in that bag Include:
Application interface component, for unified connecing being packaged into the control operation of the wireless communication module of different agreement type Mouthful, for outside unified call;
Apparatus assembly, for the wireless communication module of the different agreement type to be abstracted into into independent class, it is right that each class is reserved The interface of the adapter of the protocol type answered;
At least two class adapters, wherein, all kinds of adapters are controlled operation to the wireless communication module of corresponding protocol type.
2. software development kit SDK according to claim 1, it is characterised in that the wireless communication module is located at intelligence and sets In standby, the application interface component provides the interface of different types of control operation for different types of smart machine.
3. software development kit SDK according to claim 1, it is characterised in that if the unified interface of encapsulation include it is multiple, Then each interface corresponds to one or more control operations of the wireless communication module of the different agreement type.
4. software development kit SDK according to claim 1, it is characterised in that the application interface component is additionally operable to search The mark of the wireless communication module of different agreement type and the wireless communication module of establishment different agreement type.
5. software development kit SDK according to claim 4, it is characterised in that the application interface component sets including realization The interface of the existing function of preparation, the interface definition has first method and second method, and the first method is used to search for different associations The wireless communication module of view type, the second method is used to create respective protocol by the message of wireless communication module reply The mark of the wireless communication module of type.
6. software development kit SDK according to claim 5, it is characterised in that each class in the apparatus assembly is realized The unified interface encapsulated in the application interface component, when the interface is called, the apparatus assembly is additionally operable to according to institute The corresponding protocol type of mark of application interface building component is stated, the interface of the adapter of respective protocol type is called, to utilize The adapter of respective protocol type is controlled operation to the wireless communication module of respective protocol type.
7. software development kit SDK according to claim 1, it is characterised in that have the first base defined in the apparatus assembly Class and at least two second base class of first base class are inherited from, the different protocol types of each second base class correspondence lead to Cross and inherit described at least two second base class the wireless communication module of the different agreement type is abstracted into into independent class.
8. software development kit SDK according to claim 7, it is characterised in that have abstract side defined in first base class Method, described at least two second base class realize the abstract method of definition when first base class is inherited.
9. software development kit SDK according to claim 1, it is characterised in that at least two class adapters are to there is system One interface, has the method that operation is controlled to wireless communication module defined in the unified interface, and all kinds of adapters realize institute State the method defined in unified interface to realize being controlled the wireless communication module of respective protocol type operation.
10. software development kit SDK according to claim 9, it is characterised in that the control operation is included from channel radio The message that letter module reads submits to the operation of the apparatus assembly, and the apparatus assembly is additionally operable to parse the message, obtains The supplemental characteristic of the wireless communication module included in the message, the supplemental characteristic is updated in each class.
The 11. software development kit SDK according to any one of claim 1-10, it is characterised in that the software development kit For calling for the intelligent control module on control of intelligent terminal or system, so as to realize that control of intelligent terminal or system pass through intelligence Energy control module calls the unified interface that the software development kit is provided to carry out the radio communication of remotely control different agreement type Module.
A kind of 12. methods of the wireless communication module for realizing remotely control different agreement type, it is characterised in that include:
Unified interface will be packaged into the control operation of the wireless communication module of different agreement type, for outside unified tune With;
The wireless communication module of the different agreement type is abstracted into into independent class, each class reserves corresponding protocol type The interface of adapter;
The interface of the adapter of respective protocol type is called, using nothing of the adapter of respective protocol type to respective protocol type Line communication module is controlled operation.
13. methods according to claim 12, it is characterised in that the wireless communication module is located in smart machine, institute Stating method also includes:
The interface of different types of control operation is provided for different types of smart machine.
14. methods according to claim 12, it is characterised in that also include:
The wireless communication module of search different agreement type, and respective protocol is created by the message of wireless communication module reply The mark of the wireless communication module of type.
15. methods according to claim 14, it is characterised in that the adapter for calling respective protocol type connects Mouthful, including:
Each class realizes the unified interface of encapsulation, when the interface is called, according to the corresponding protocol type of mark for creating, Call the interface of the adapter of respective protocol type.
16. methods according to claim 12, it is characterised in that also include:
Message is read from wireless communication module, and the message is parsed, the wireless communication module for obtaining being included in the message Supplemental characteristic, and then the supplemental characteristic is updated in each class.
CN201611249941.4A 2016-12-29 2016-12-29 SDK and method for remote control of different protocol types of wireless communication modules Pending CN106657101A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611249941.4A CN106657101A (en) 2016-12-29 2016-12-29 SDK and method for remote control of different protocol types of wireless communication modules

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611249941.4A CN106657101A (en) 2016-12-29 2016-12-29 SDK and method for remote control of different protocol types of wireless communication modules

Publications (1)

Publication Number Publication Date
CN106657101A true CN106657101A (en) 2017-05-10

Family

ID=58836097

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611249941.4A Pending CN106657101A (en) 2016-12-29 2016-12-29 SDK and method for remote control of different protocol types of wireless communication modules

Country Status (1)

Country Link
CN (1) CN106657101A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109298852A (en) * 2018-08-23 2019-02-01 北京凌宇智控科技有限公司 Simplify the method and readable storage medium storing program for executing of virtual reality applications program development
CN111435338A (en) * 2019-01-14 2020-07-21 中国移动通信集团终端有限公司 Multi-intelligent hardware unified management and control method, platform, system, equipment and storage medium
CN111711940A (en) * 2020-04-29 2020-09-25 杭州涂鸦信息技术有限公司 Intelligent device data interaction method, intelligent device and storage device
CN112565459A (en) * 2020-12-28 2021-03-26 深圳杰睿联科技有限公司 Internet of things equipment and method for managing profile in eUICC card
CN113867988A (en) * 2021-09-29 2021-12-31 展讯通信(深圳)有限公司 Universal remote communication calling architecture and method
CN115576612A (en) * 2022-09-02 2023-01-06 广州市金其利信息科技有限公司 External device adaptation method and device, intelligent terminal and readable storage medium
CN117891442A (en) * 2024-02-03 2024-04-16 贵州送变电有限责任公司 Client program software architecture design method based on object-oriented

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101573876A (en) * 2006-05-23 2009-11-04 斯通斯迪壹有限公司 System and method for multi-radio control
CN104579938A (en) * 2014-12-19 2015-04-29 上海物联网有限公司 Multi-mode multi-protocol gateway device used for network transmission performance test of wireless sensor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101573876A (en) * 2006-05-23 2009-11-04 斯通斯迪壹有限公司 System and method for multi-radio control
CN104579938A (en) * 2014-12-19 2015-04-29 上海物联网有限公司 Multi-mode multi-protocol gateway device used for network transmission performance test of wireless sensor

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109298852A (en) * 2018-08-23 2019-02-01 北京凌宇智控科技有限公司 Simplify the method and readable storage medium storing program for executing of virtual reality applications program development
CN111435338A (en) * 2019-01-14 2020-07-21 中国移动通信集团终端有限公司 Multi-intelligent hardware unified management and control method, platform, system, equipment and storage medium
CN111711940A (en) * 2020-04-29 2020-09-25 杭州涂鸦信息技术有限公司 Intelligent device data interaction method, intelligent device and storage device
CN111711940B (en) * 2020-04-29 2023-10-31 杭州涂鸦信息技术有限公司 Intelligent device data interaction method, intelligent device and storage device
CN112565459A (en) * 2020-12-28 2021-03-26 深圳杰睿联科技有限公司 Internet of things equipment and method for managing profile in eUICC card
CN112565459B (en) * 2020-12-28 2021-08-24 深圳杰睿联科技有限公司 Internet of things equipment and method for managing profile in eUICC card
CN113867988A (en) * 2021-09-29 2021-12-31 展讯通信(深圳)有限公司 Universal remote communication calling architecture and method
CN115576612A (en) * 2022-09-02 2023-01-06 广州市金其利信息科技有限公司 External device adaptation method and device, intelligent terminal and readable storage medium
CN115576612B (en) * 2022-09-02 2023-05-12 广州市金其利信息科技有限公司 External device adaptation method and device, intelligent terminal and readable storage medium
CN117891442A (en) * 2024-02-03 2024-04-16 贵州送变电有限责任公司 Client program software architecture design method based on object-oriented

Similar Documents

Publication Publication Date Title
CN106657101A (en) SDK and method for remote control of different protocol types of wireless communication modules
CN108769165B (en) Data processing method in Internet of things and Internet of things access system
CN110912813B (en) Gateway supporting multiple protocols, control method and event reporting method
CN104123151B (en) The plug-in management method of application program, device and mobile terminal in mobile terminal
CN110058863A (en) Construction method, device, equipment and the storage medium of Docker container
CN106301910B (en) A kind of programming system and its method of WiFi equipment
EP2608585B1 (en) Method, device and system for triggering terminal operation
CN105471686A (en) Terminal control method, terminal control apparatus and system
CN107682238A (en) Smart home platform device and terminal electronic device
CN103513998A (en) Method and device for generating upgrade package and method and terminal for upgrading dynamic documents in difference mode
CN105306677A (en) Method, apparatus and system for controlling intelligent device
CN106686074A (en) System and method for quickly constructing IOT (Internet of Things) application
CN104053045A (en) Display device and share control method thereof
CN111192143B (en) Data processing method, device, storage medium and blockchain node
WO2015117522A1 (en) Parameter configuration data processing method and device, and parameter configuration method and device
CN206350033U (en) A kind of system of rapid build Internet of Things application
CN107526584A (en) Data cut-in method and device
CN106549840B (en) Data interaction system, method and device
CN101917702B (en) Mobile terminal locking processing method, mobile terminal and network side
CN104581695A (en) Mobile terminal configuration method and system
CN104077414A (en) Decoding device and decoding method applied to LTE network signals
CN107864488B (en) Method, device and system for automatically testing base station service
CN104578418A (en) Configuration method and system of automatic power distribution equipment based on 101 protocols, and equipment
CN209216131U (en) A kind of electronic tag base station and electronic labelling system
CN116795435A (en) Compatibility management and control method and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170510