CN110069258A - A kind of two number generating method of HCI code - Google Patents

A kind of two number generating method of HCI code Download PDF

Info

Publication number
CN110069258A
CN110069258A CN201910339691.0A CN201910339691A CN110069258A CN 110069258 A CN110069258 A CN 110069258A CN 201910339691 A CN201910339691 A CN 201910339691A CN 110069258 A CN110069258 A CN 110069258A
Authority
CN
China
Prior art keywords
hci
code
number generating
generating method
numerical tabular
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.)
Granted
Application number
CN201910339691.0A
Other languages
Chinese (zh)
Other versions
CN110069258B (en
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.)
Barrot Wireless Co Ltd
Original Assignee
Barrot Wireless 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 Barrot Wireless Co Ltd filed Critical Barrot Wireless Co Ltd
Priority to CN201910339691.0A priority Critical patent/CN110069258B/en
Publication of CN110069258A publication Critical patent/CN110069258A/en
Application granted granted Critical
Publication of CN110069258B publication Critical patent/CN110069258B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The embodiment of the invention discloses a kind of two number generating methods of HCI code, first input two parts of source codes, are respectively used to obtain numerical tabular and form converter;Then the code of the numerical tabular is read with converter, use compressed format, it generates according to fixed format for final HCI code and interface used in HCI end user, it is stored by converter come the code of reading numerical values table to generate computer-oriented, the final HCI code of operation close friend has machine processing quick, the small property of code, and has the function of to improve quickly investigation mistake, above-mentioned numerical tabular considering human can be read and maintainability.

Description

A kind of two number generating method of HCI code
Technical field
The present embodiments relate to HCI code technique fields, and in particular to a kind of two number generating method of HCI code.
Background technique
HCI (Host Controller Interface) interface specification defines a large amount of order and event format, ginseng Number.For the user of HCI, the event that these orders or parsing receive is filled in, structure-oriented/macro meaning is needed to determine Justice, and the format that Controller then needs operating specification to define.Bluetooth host (Host) and controller (Controller) end Between order and event have a large amount of property, parameter diversity.
First, naturally format transformation is needed between the two, second, the return event that order is expected is different, Its order supported and characteristic needs that Controller is returned are corresponding with the order and behavior that the end Host can be sent, simply Say there is complicated relationship between order and event in ground.
Therefore, the coding/decoding function and its mapping relations for manually writing order and event one by one, are that a workload is huge Cause to be easy error, and the huge work of size of code, maintainability are poor.To operational efficiency, memory usage, corresponding hardware cost Height and code stability are all unfavorable.
Summary of the invention
For this purpose, the embodiment of the present invention provides a kind of two number generating method of HCI code, the side of HCI code building twice is used Formula, caused by solving coding/decoding function and its mapping relations due to manually writing order and event one by one in the prior art The problems such as size of code is huge, is easy error, and maintainability is poor.
To achieve the goals above, the embodiment of the present invention provides the following technical solutions:
A kind of two number generating method of HCI code, which comprises the steps of:
Step 100, input source code are respectively used to obtain numerical tabular and form converter;
Step 200, the code that the numerical tabular is read with converter are generated using compressed format according to fixed format For final HCI code and interface used in HCI end user.
The embodiment of the present invention is further characterized in that the numerical tabular is standardized according to bluetooth HCI and mankind's reading habit is whole Reason.
The embodiment of the present invention is further characterized in that the numerical tabular includes command value table, event numerical tabular, parameter values Table and attribute value table.
The embodiment of the present invention is further characterized in that the final HCI code includes: the corresponding HCI interface of command event, knot Structure, definition, macro value are enumerated, array and annotation.
The embodiment of the present invention is further characterized in that, the macro value include description command event format, command event relationship and Command event coding.
The embodiment of the present invention is further characterized in that the HCI code computer-oriented storage, operation are friendly.
The embodiment of the present invention is further characterized in that, in the step 200 user oriented final HCI code be OPS it is macro and Structure.
The embodiment of the present invention has the advantages that
The present invention uses the mode of multiple HCI code building, generates face by converter come the code of reading numerical values table It is stored to computer, the final HCI code of operation close friend, has machine processing quick, the small property of code, and have and improve Wrong function is quickly checked, above-mentioned numerical tabular considering human can be read and maintainability.
Detailed description of the invention
It, below will be to embodiment party in order to illustrate more clearly of embodiments of the present invention or technical solution in the prior art Formula or attached drawing needed to be used in the description of the prior art are briefly described.It should be evident that the accompanying drawings in the following description is only It is merely exemplary, it for those of ordinary skill in the art, without creative efforts, can also basis The attached drawing of offer, which is extended, obtains other implementation attached drawings.
Structure depicted in this specification, ratio, size etc., only to cooperate the revealed content of specification, for Those skilled in the art understands and reads, and is not intended to limit the invention enforceable qualifications, therefore does not have technical Essential meaning, the modification of any structure, the change of proportionate relationship or the adjustment of size are not influencing the function of the invention that can be generated Under effect and the purpose that can reach, should all still it fall in the range of disclosed technology contents obtain and can cover.
Fig. 1 is a kind of flow chart of two number generating method of HCI code provided by the invention.
Specific embodiment
Embodiments of the present invention are illustrated by particular specific embodiment below, those skilled in the art can be by this explanation Content disclosed by book is understood other advantages and efficacy of the present invention easily, it is clear that described embodiment is the present invention one Section Example, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall within the protection scope of the present invention.
As shown in Figure 1, the present invention provides a kind of two number generating methods of HCI code, which is characterized in that including walking as follows It is rapid:
Two parts of step 100, input source codes, a copy of it source code is used to be standardized according to bluetooth HCI, according to the mankind Reading habit sorts out command table, and event form, parameter table, attribute table etc., another source code, which is used to form, to be turned Parallel operation;
Step 200, with the code of numerical tabulars multiple in converter read step 100, using compressed format, according to fixed Format is generated for final HCI code used in HCI end user;Comprising: the corresponding HCI interface of command event, structure, fixed Justice, macro value (description command event format and command event relationship, command event coding etc.) are enumerated, array and annotation.
The converter includes text resolver.
User oriented final HCI code is that OPS is macro and structure, computer-oriented storage, operation close friend have at machine Reason is quick, the small property of code, and has the function of to improve quickly investigation mistake.
Wherein OPS it is macro be a processor bit wide number, ordered for every, corresponding such definition It is macro, it is given to user, allowing user easily to fill in, OPS is macro, and at the same time, HCI user is available to about this order Relevant information, including the position where encoding format information, the event code of waiting.
The following are the specific examples of two number generating method of HCI code of the present invention:
1, the material inputted
2, two HCI orders are inputted, as follows:
By two number generating methods of HCI code, wherein first HCI order ultimately generate towards and its read The macro value of OPS are as follows: 0x2200203d;
Article 2 HCI order generates the macro value of OPS are as follows: 0x22b5203e;
The information of the macro carrying of the OPS includes: the operation code of order, the event code that order waits after sending, the coding of order Information, the offset in encoded information table.
Therefore, for HCI user, it is only necessary to carry out following two steps operation, an order can be issued, extremely just Just:
The first step when user fills in structure, is filled into the parameter of order;
Second step, user is macro using above-mentioned OPS, informs the relevant information of HCI code.
User fills in code structure:
There is identical, portion in the structural generation of several above-mentioned first steps coded sequence, part of coded sequence Coded sequence band repeating part obtains the coding schedule of following format by these sequence compactions in one big array.
Each structure has an offset, and coded sequence is located at the deviation post in entire coding schedule and is known as encoding partially Shifting amount, according to offset, user can find each structure in this coding schedule and describe the position of 2bits sequence, and terminate The included ending in position, is 0 ending similar to character string.
HCI interface function can easily, very quickly, and the structure that HCI user is filled in is encoded into needed for hardware A string of the numerical value streams wanted;It is given to hardware.
Vice versa, and the numerical value stream that hardware is given to host host is found back through the search of opcode in coded format Corresponding OPS is macro, takes the coding value sequence of counter structure, the deviation post in entire coded sequence numerical value tables, thus The circulation of hardware numerical value is turned to structure, passes to user by the mode for taking transformational structure.
It is macro with OPS in user oriented, when towards hardware, the coded format as defined in standardizing, the number as defined in specification Value, such as opcode command code, evcode event code.
Coding schedule is as follows:
The obtained final product of two number generating method of HCI code in addition to the example above structure, it is macro, also enumerate, Definition, annotation, array etc..
It can be seen that the text information about this order of input is converted into, OPS is macro, for identification the volume of this order Code formatted data, the information such as event return value of waiting.And it is compressed jointly with other orders into an encoding format data table In lattice, for converting the format between user and machine.The code format of output is clear.
Although above having used general explanation and specific embodiment, the present invention is described in detail, at this On the basis of invention, it can be made some modifications or improvements, this will be apparent to those skilled in the art.Therefore, These modifications or improvements without departing from theon the basis of the spirit of the present invention are fallen within the scope of the claimed invention.

Claims (8)

1. a kind of two number generating method of HCI code, which comprises the steps of:
Two parts of step 100, input source codes are respectively used to obtain numerical tabular and form converter;
Step 200, the code that the numerical tabular is read with converter are generated according to fixed format for HCI using compressed format Final HCI code used in end user.
2. a kind of two number generating method of HCI code according to claim 1, which is characterized in that the numerical tabular is according to blue Tooth HCI specification and mankind's reading habit arrange.
3. a kind of two number generating method of HCI code according to claim 1, which is characterized in that the numerical tabular includes life Enable numerical tabular, event numerical tabular, parameter values table and attribute value table.
4. a kind of two number generating method of HCI code according to claim 1, which is characterized in that the final HCI code packet Include: the corresponding HCI interface of command event, structure, definition, macro value are enumerated, array and annotation.
5. a kind of two number generating method of HCI code according to claim 1, which is characterized in that the macro value includes description Command event format, command event relationship and command event coding.
6. a kind of two number generating method of HCI code according to claim 1, which is characterized in that the HCI code is towards meter The storage of calculation machine, operation are friendly.
7. a kind of two number generating method of HCI code according to claim 1, which is characterized in that the converter includes text This resolver.
8. a kind of two number generating method of HCI code according to claim 1, which is characterized in that in the step 200 towards The final HCI code of user is that OPS is macro and structure.
CN201910339691.0A 2019-04-25 2019-04-25 HCI code secondary generation method Active CN110069258B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910339691.0A CN110069258B (en) 2019-04-25 2019-04-25 HCI code secondary generation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910339691.0A CN110069258B (en) 2019-04-25 2019-04-25 HCI code secondary generation method

Publications (2)

Publication Number Publication Date
CN110069258A true CN110069258A (en) 2019-07-30
CN110069258B CN110069258B (en) 2023-04-25

Family

ID=67368918

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910339691.0A Active CN110069258B (en) 2019-04-25 2019-04-25 HCI code secondary generation method

Country Status (1)

Country Link
CN (1) CN110069258B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464187A (en) * 2020-04-17 2020-07-28 北京百瑞互联技术有限公司 Host control interface command event coding method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW504617B (en) * 2001-02-06 2002-10-01 Shinewave Int Inc Method using computer software to implement simulated bluetooth communication
CN101305585A (en) * 2005-11-07 2008-11-12 Lg电子株式会社 Near field communication host controller interface
CN101827462A (en) * 2010-05-28 2010-09-08 哈尔滨工业大学 Bluetooth wireless communication system architecting method
JP2012088066A (en) * 2010-10-15 2012-05-10 Denso Corp Mobile system and map storage device with communication function
CN202339623U (en) * 2011-11-23 2012-07-18 康佳集团股份有限公司 Remote control signal converter for controlling electric appliance by virtue of mobile phone
CN107924292A (en) * 2015-09-03 2018-04-17 高通股份有限公司 Hardware-accelerated type storage compression

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW504617B (en) * 2001-02-06 2002-10-01 Shinewave Int Inc Method using computer software to implement simulated bluetooth communication
CN101305585A (en) * 2005-11-07 2008-11-12 Lg电子株式会社 Near field communication host controller interface
CN101827462A (en) * 2010-05-28 2010-09-08 哈尔滨工业大学 Bluetooth wireless communication system architecting method
JP2012088066A (en) * 2010-10-15 2012-05-10 Denso Corp Mobile system and map storage device with communication function
CN202339623U (en) * 2011-11-23 2012-07-18 康佳集团股份有限公司 Remote control signal converter for controlling electric appliance by virtue of mobile phone
CN107924292A (en) * 2015-09-03 2018-04-17 高通股份有限公司 Hardware-accelerated type storage compression

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464187A (en) * 2020-04-17 2020-07-28 北京百瑞互联技术有限公司 Host control interface command event coding method
CN111464187B (en) * 2020-04-17 2023-04-28 北京百瑞互联技术有限公司 Host control interface command event coding method, storage medium and computer equipment

Also Published As

Publication number Publication date
CN110069258B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
McKinney pandas: a foundational Python library for data analysis and statistics
US9336184B2 (en) Representation of an interactive document as a graph of entities
CN103500196B (en) EXCEL data export method and let-off gear(stand) thereof under many concurrent big data quantity environment
US9304672B2 (en) Representation of an interactive document as a graph of entities
CN104360865A (en) Serialization method, deserialization method and related equipment
CN101963944B (en) Object storage method and system
CN105450232A (en) Encoding method, decoding method, encoding device and decoding device
CN102929646B (en) Application program generation method and device
CN102982010A (en) Method and device for abstracting document structure
US8612489B2 (en) LossLess transformation of XBRL instance to XML data model instance
US20120254724A1 (en) Encoder compiler, computer readable medium, and communication device
Zunke et al. Json vs xml: A comparative performance analysis of data exchange formats
US20100211867A1 (en) Processing module, a device, and a method for processing of xml data
CN104615431A (en) Method and device for achieving Web application
Brochier Cyclotomic associators and finite type invariants for tangles in the solid torus
CN101634942A (en) Method and system for dynamically creating data tables
CN109981676A (en) One kind being based on the customized Internet of Things information interacting method of binary system analysis protocol
CN103309849B (en) A kind of docx document creation based on OpenXML and amending method
CN110069258A (en) A kind of two number generating method of HCI code
JP2013089183A (en) Exi decoder and program
CN101770367A (en) Compressing method and compressing device of .NET file
CN105718429B (en) The method and device of inspection report generation
CN110191156A (en) A kind of data processing method and device based on block chain
CN111311461B (en) Editor of structured dynamic medical record form based on B-S and generation method
Riedel et al. A model driven internet of things

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: A1009, floor 9, block a, No. 9, Shangdi Third Street, Haidian District, Beijing 100085

Patentee after: Beijing Bairui Internet Technology Co.,Ltd.

Address before: 7-1, building C, 7 / F, building 2-1, No.2, Shangdi Information Road, Haidian District, Beijing, 100085

Patentee before: BARROT WIRELESS Co.,Ltd.

CP03 Change of name, title or address