CN110377272A - A kind of implementation method and device of the SDK based on TBOX - Google Patents

A kind of implementation method and device of the SDK based on TBOX Download PDF

Info

Publication number
CN110377272A
CN110377272A CN201910542463.3A CN201910542463A CN110377272A CN 110377272 A CN110377272 A CN 110377272A CN 201910542463 A CN201910542463 A CN 201910542463A CN 110377272 A CN110377272 A CN 110377272A
Authority
CN
China
Prior art keywords
layer
interface
module
tbox
request instruction
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
CN201910542463.3A
Other languages
Chinese (zh)
Other versions
CN110377272B (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.)
Shenzhen Launch Technology Co Ltd
Original Assignee
Shenzhen Launch Technology 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 Shenzhen Launch Technology Co Ltd filed Critical Shenzhen Launch Technology Co Ltd
Priority to CN201910542463.3A priority Critical patent/CN110377272B/en
Publication of CN110377272A publication Critical patent/CN110377272A/en
Application granted granted Critical
Publication of CN110377272B publication Critical patent/CN110377272B/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/30Creation or generation of source code
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C5/00Registering or indicating the working of vehicles
    • G07C5/008Registering or indicating the working of vehicles communicating information to a remotely located station
    • 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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Stored Programmes (AREA)
  • Telephone Function (AREA)

Abstract

The application belongs to field of computer technology, the implementation method and device of a kind of SDK based on TBOX are provided, the SDK includes interface layer, logical layer and driving layer, this method comprises: interface layer when receiving external command, calls the first api interface corresponding with external command;Interface layer generates the first request instruction according to the first api interface, and the first request instruction is sent to the logical layer;Interface layer receives the implementing result that logical layer returns;Logical layer obtains corresponding data information from driving layer when receiving the first request instruction, according to the first request instruction;Logical layer returns to corresponding implementing result to interface layer according to the data information of acquisition;Layer is driven to drive corresponding TBOX hardware module according to the first request instruction.The interface in SDK in corresponding interface layer can be called to obtain corresponding data by external command, without excessively understanding TBOX hardware internal work mechanism or understanding source code inside TBOX, it can reduce to TBOX product secondary development time and difficulty, to improve development efficiency.

Description

A kind of implementation method and device of the SDK based on TBOX
Technical field
The application belongs to field of computer technology more particularly to a kind of implementation method and device of the SDK based on TBOX.
Background technique
Remote information processor (Telematics BOX, T-BOX) is on automobile for controlling the embedded of tracking motor Equipment can obtain car status information, location information etc. in real time.On Vehicles Collected from Market, there are the various TBOX of more companies Product provides similar function.
Currently, realizing correspondence when developer or third-party platform client need to do present TBOX product secondary development When function, it is to be understood that when TBOX hardware internal work mechanism or understanding TBOX inside source code, it just can be carried out secondary development, thus Increase secondary development time and difficulty, leads to the inefficiency of secondary development.
Summary of the invention
In view of this, the embodiment of the present application provides the implementation method and device of a kind of SDK based on TBOX, it is intended to solve existing Have it is big to TBOX product secondary development time and difficulty, so as to cause secondary development inefficiency the problem of.
The embodiment of the present application first aspect provides the implementation method of SDK based on TBOX a kind of, which is characterized in that described SDK includes interface layer, logical layer and driving layer, and the interface layer includes N number of api interface, and the logical layer connects with described respectively Mouth layer and driving layer communication connection;Wherein, N≤1 and be integer;
The implementation method includes:
The interface layer calls the first api interface corresponding with the external command when receiving external command;
The interface layer generates the first request instruction according to first api interface, and first request instruction is sent To the logical layer;
The interface layer when receiving the implementing result that the logical layer returns, by the implementing result be sent to it is described The corresponding client of external command;
The logical layer is when receiving first request instruction, according to first request instruction from the driving layer Obtain corresponding data information;
Data information of the logical layer according to acquisition, the corresponding implementing result of Xiang Suoshu interface layer return;
The driving layer drives corresponding TBOX hardware module according to first request instruction, and obtains the TBOX hardware The data information that module obtains after executing.
In one embodiment, the logical layer includes M logic module, and the M logic module is pre-stored For realizing M executable program of Different Logic processing function, N number of api interface in the interface layer is distinguished at least in advance It is associated with a logic module;Wherein, M≤1 and be integer;
Data information of the logical layer according to acquisition, the corresponding implementing result of Xiang Suoshu interface layer return, comprising:
The logical layer calls corresponding first logic module according to first api interface;
Using the data information of the acquisition as the input information of first logic module, and obtain first logic The implementing result that module exports after executing;
The implementing result is back to the interface layer by the logical layer.
In one embodiment, the implementing result is back to the interface layer by the logical layer, comprising:
The implementing result is back to the first api interface of the interface layer by the logical layer.
In one embodiment, the driving layer includes K drive module, and the K drive module is pre-stored For driving K executable program of hardware module in TBOX;Wherein, K≤1 and be integer;
The logical layer is when receiving first request instruction, according to first request instruction from the driving layer Obtain corresponding data information, comprising:
The logical layer when receiving first request instruction, from the driving layer with first request instruction Corresponding data information is obtained in corresponding drive module.
In one embodiment, the driving layer drives corresponding TBOX hardware module according to first request instruction, and Obtain the data information obtained after the TBOX hardware module executes, comprising:
The hardware mould for driving layer to call corresponding drive module to drive corresponding TBOX according to first request instruction Block, and obtain the data information obtained after the TBOX hardware module executes.
In one embodiment, the interface layer is when receiving the implementing result that the logical layer returns, by the execution As a result it is sent to client corresponding with the external command, comprising:
The first api interface in the interface layer is when receiving the implementing result that the logical layer returns, by the execution As a result it is sent to client corresponding with the external command.
In one embodiment, the interface layer includes at least one of following api interface: positional interface, data connect Mouth, remote alarm interface, vehicle control interface, configuration interface, WIFI interface and blue tooth interface.
In one embodiment, the logical layer includes at least one of following logic module: position information process mould Block, warning information processing module, vehicle data processing module, vehicle control module, WIFI management module, power management module and Bluetooth management module.
In one embodiment, the driving layer includes at least one of following drive module: GPS drive module, speed It spends sensor drive module, onboard diagnostic system drive module, inertial navigation drive module, gyroscope drive module, WIFI and drives mould Block, electric power driving module, data acquisition drive module and bluetooth drive module.
The embodiment of the present application second aspect provides the realization device of SDK based on TBOX a kind of, and described device includes SDK Component, the SDK component include interface layer, logical layer and driving layer, and the interface layer includes N number of api interface, the logical layer It is communicated to connect respectively with the interface layer and the driving layer;Wherein, N≤1 and be integer;
The interface layer, for calling first API corresponding with the external command to connect when receiving external command Mouthful;
The interface layer is also used to generate the first request instruction according to first api interface, and first request is referred to Order is sent to the logical layer;
The interface layer is also used to send the implementing result when receiving the implementing result that the logical layer returns To client corresponding with the external command;
The logical layer, for when receiving first request instruction, according to first request instruction from described Layer is driven to obtain corresponding data information;
The logical layer, is also used to the data information according to acquisition, and Xiang Suoshu interface layer returns to corresponding implementing result;
The driving layer, for driving corresponding TBOX hardware module according to first request instruction, and described in acquisition The data information that TBOX hardware module obtains after executing.
In one embodiment, the logical layer includes M logic module, and the M logic module is pre-stored For realizing M executable program of Different Logic processing function, N number of api interface in the interface layer is distinguished at least in advance It is associated with a logic module;Wherein, M≤1 and be integer;
The logical layer is specifically used for:
Corresponding first logic module is called according to first api interface;
The logical layer obtains institute using the data information of the acquisition as the input information of first logic module State the implementing result exported after the first logic module executes;
The implementing result is back to the interface layer.
In one embodiment, the logical layer is specifically also used to:
The implementing result is back to the first api interface of the interface layer.
In one embodiment, the driving layer includes K drive module, and the K drive module is pre-stored For driving K executable program of hardware module in TBOX;Wherein, K≤1 and be integer;
The logical layer is specifically also used to:
When receiving first request instruction, the drive corresponding with first request instruction from the driving layer Corresponding data information is obtained in dynamic model block.
In one embodiment, the driving layer is specifically also used to:
It calls corresponding drive module to drive the hardware module of corresponding TBOX according to first request instruction, and obtains institute State the data information obtained after TBOX hardware module executes.
In one embodiment, the interface layer is specifically also used to:
It, will be described through the first api interface in the interface layer when receiving the implementing result that the logical layer returns Implementing result is sent to client corresponding with the external command.
In one embodiment, the interface layer includes at least one of following api interface: positional interface, data connect Mouth, remote alarm interface, vehicle control interface, configuration interface, WIFI interface and blue tooth interface.
In one embodiment, the logical layer includes at least one of following logic module: position information process mould Block, warning information processing module, vehicle data processing module, vehicle control module, WIFI management module, power management module and Bluetooth management module.
In one embodiment, the driving layer includes at least one of following drive module: GPS drive module, speed It spends sensor drive module, onboard diagnostic system drive module, inertial navigation drive module, gyroscope drive module, WIFI and drives mould Block, electric power driving module, data acquisition drive module and bluetooth drive module.
The third aspect of the embodiment of the present application provides a kind of electronic equipment, including memory, processor and is stored in institute The computer program that can be run in memory and on the processor is stated, the processor executes real when the computer program The step of existing above method.
The fourth aspect of the embodiment of the present application provides a kind of computer readable storage medium, and computer readable storage medium is deposited The step of containing computer program, the above method realized when above-mentioned computer program is executed by processor.
In the embodiment of the present application, SDK includes interface layer, logical layer and driving layer, and the interface layer includes that N number of API connects Mouthful, the logical layer is communicated to connect with the interface layer and the driving layer respectively, and the interface layer is receiving external command When, call the first api interface corresponding with the external command;The interface layer generates first according to first api interface First request instruction is sent to the logical layer by request instruction;The interface layer is receiving what the logical layer returned When implementing result, the implementing result is sent to client corresponding with the external command;The logical layer is receiving When first request instruction, corresponding data information is obtained from the driving layer according to first request instruction;It is described to patrol Layer is collected according to the data information of acquisition, Xiang Suoshu interface layer returns to corresponding implementing result;The driving layer is according to described first Request instruction drives corresponding TBOX hardware module, and obtains the data information obtained after the TBOX hardware module executes.Work as phase Close user directly can call the interface in SDK in corresponding interface layer to obtain corresponding total in secondary development by external command According to understanding TBOX hardware internal work mechanism without excessive or understand source code inside TBOX, open secondary to TBOX product can be reduced Time and difficulty are sent out, to improve the efficiency of secondary development.
Detailed description of the invention
It in order to more clearly explain the technical solutions in the embodiments of the present application, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described.
Fig. 1 is a kind of configuration diagram for SDK that the embodiment of the present application one provides;
Fig. 2 is a kind of flow diagram of the implementation method for SDK based on TBOX that the embodiment of the present application one provides;
Fig. 3 is a kind of flow diagram of the implementation method for SDK based on TBOX that the embodiment of the present application two provides;
Fig. 4 is a kind of concrete configuration diagram for SDK that the embodiment of the present application two provides;
Fig. 5 is a kind of structural schematic diagram of the realization device for SDK based on TBOX that the embodiment of the present application three provides;
Fig. 6 is the structural schematic diagram for a kind of electronic equipment that the embodiment of the present application four provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, so as to provide a thorough understanding of the present application embodiment.In other situations, omit to well-known system, device, circuit with And the detailed description of method, so as not to obscure the description of the present application with unnecessary details.
In order to illustrate technical solution described herein, the following is a description of specific embodiments.
Embodiment one
The embodiment of the present application provides the implementation method of SDK based on TBOX a kind of, can be applied to smart phone, plate electricity The electronic equipments such as brain, desktop computer or server, Fig. 1 show the Software Development Kit (Software Development Kit, SDK) configuration diagram, the SDK includes interface layer 11, logical layer 12 and drives layer 13, described to connect Mouth layer includes N number of application programming interfaces (Application Program Interface, API) interface, the logical layer difference It is communicated to connect with the interface layer and the driving layer.Wherein, N≤1 and be integer.Api interface can provide general utility functions Collection, and can be directly by calling api interface to carry out secondary development.SDK be for specific software package, software frame, hardware platform, Operating system etc. establishes the set of the developing instrument of application software.SDK in the application is to be based on existing TBOX hardware platform simultaneously It is realized using layered structure.Each layer can independently execute respective function, so as to reduce the dependence and coupling between at all levels.
In one embodiment, the logical layer includes M logic module, and the M logic module is pre-stored For realizing M executable program of Different Logic processing function, N number of api interface in the interface layer is distinguished at least in advance It is associated with a logic module;Above-mentioned driving layer includes K drive module, and the K drive module is pre-stored for driving K executable program of hardware module in dynamic TBOX;Wherein, M≤1 and be integer, K≤1 and be integer;The application Split multiple functional modules for each layer in SDK, modules function all for realizing preparatory specifically logical process function, To which the functional module in reaching at all levels is clear in job responsibility, the dependence and coupling of modules can be reduced.It is needing to match again (if increased module, module is reduced or changes the function in module) progress flexible configuration when setting.
As shown in Fig. 2, the implementation method of the SDK based on TBOX includes:
Step S201, the interface layer call first API corresponding with the external command when receiving external command Interface.
In the embodiment of the present application, said external instruction can be regarded as calling the external command of corresponding A PI interface, and outside refers to It enables and can be the instruction for calling different api interfaces in SDK.External command is received by the interface layer of SDK, when interface layer is receiving When to external command, api interface corresponding with the external command can be called, and connect current api interface as the first API Mouthful.
In a particular application, for example, including GPS interface in api interface, when the interface layer by SDK receive it is outer Portion's instruction is that can then call GPS interface when calling the instruction of GPS interface, and the GPS interface is that have to obtain GPS data ability Interface.
Step S202, the interface layer generate the first request instruction according to first api interface, described first are requested Instruction is sent to the logical layer.
In the embodiment of the present application, interface layer, can be raw according to the type of the first api interface after calling the first api interface It is sent to logical layer at corresponding request instruction, and using the request instruction being currently generated as the first request instruction, makes logical layer Corresponding processing is made according to above-mentioned first request instruction.
Step S203, the interface layer send out the implementing result when receiving the implementing result that the logical layer returns It send to client corresponding with the external command.
In the embodiment of the present application, logical layer is according to the first request instruction, after performing corresponding processing, obtains corresponding hold Row as a result, and implementing result is back to interface layer, when interface layer receives the implementing result of logical layer return, by implementing result It is sent to client corresponding with said external instruction, said external instructs corresponding client to can be in the application for holding The electric terminal of row SDK implementation method, is also possible to other terminal devices.
In one embodiment, the interface layer is when receiving the implementing result that the logical layer returns, by the execution As a result it is sent to client corresponding with the external command, comprising: the first api interface in the interface layer is described in the reception When the implementing result that logical layer returns, the implementing result is sent to client corresponding with the external command.It is directly logical The first api interface crossed in interface layer receives the implementing result that logical layer returns, described in the first interface reception in interface layer When the implementing result that logical layer returns, visitor corresponding with said external instruction can be sent to by the first api interface by implementing result Family end.
Step S204, the logical layer when receiving first request instruction, according to first request instruction from The driving layer obtains corresponding data information.
In the embodiment of the present application, above-mentioned first request instruction is generated by the first api interface, and logical layer is receiving When the first request instruction, data information corresponding with the first api interface can be obtained from driving layer according to the first request instruction.
In one embodiment, the driving layer includes K drive module, and the K drive module is pre-stored For driving K executable program of hardware module in TBOX;The logical layer is when receiving first request instruction, root Obtain corresponding data information from the driving layer according to first request instruction, comprising: the logical layer receive it is described When the first request instruction, corresponding number is obtained from drive module corresponding with first request instruction in the driving layer It is believed that breath.Drive journey in include multiple drive modules, when logical layer needs to obtain information, can first according to request instruction obtain with First api interface corresponds to drive module, then corresponding data information is obtained from corresponding drive module.
Step S205, data information of the logical layer according to acquisition, the corresponding implementing result of Xiang Suoshu interface layer return.
In the embodiment of the present application, the corresponding logical process program of each api interface has been stored in advance in logical layer, has patrolled Layer is collected after the data information that driving layer obtains, after being handled by pre-stored logical process program, is corresponded to Implementing result, and return to the corresponding implementing result to interface layer.
Step S206, the driving layer drives corresponding TBOX hardware module according to first request instruction, and obtains institute State the data information obtained after TBOX hardware module executes.
In the embodiment of the present application, above-mentioned first request instruction is generated by the first api interface, when above-mentioned logical layer root When obtaining corresponding data information from driving layer according to the first request instruction, driving layer drives in TBOX according to the first request instruction Corresponding hardware module, and obtain the data information obtained after hardware module executes.
In one embodiment, the driving layer drives corresponding TBOX hardware module according to first request instruction, and Obtain the data information obtained after the TBOX hardware module executes, comprising: the driving layer is according to first request instruction It calls corresponding drive module to drive the hardware module of corresponding TBOX, and obtains the number obtained after the TBOX hardware module executes It is believed that breath.Above-mentioned driving layer includes multiple drive modules, and the multiple drive module is pre-stored for driving in TBOX Multiple executable programs of hardware module;Pre-stored program can drive hardware module in TBOX to transport in each drive module Row, and obtain the data in corresponding hardware module.In a kind of concrete application, for example, include GPS drive module in driving layer, Above-mentioned first api interface is GPS interface, driving layer can according to GPS interface generate the first request instruction, and call with it is above-mentioned The associated GPS drive module of GPS interface, GPS drive module drive TBOX in the associated hardware module of GPS drive module, and Obtain TBOX in the postrun related data of the associated hardware module of GPS drive module.
It can be seen that in the embodiment of the present application, can directly pass through external command tune when associated user is in secondary development Obtain corresponding data with the interface in interface layer corresponding in SDK, without it is excessive understand TBOX hardware internal work mechanism or Understand source code inside TBOX, can reduce to TBOX product secondary development time and difficulty, to improve the efficiency of secondary development.
Embodiment two
The present embodiment is the further explanation to embodiment one, and the present embodiment is the same as example 1 or similar place tool Body can be found in the associated description of embodiment one, and details are not described herein again, and the logical layer includes M logic module, the M logic Module is the pre-stored M executable program for realizing Different Logic processing function, N number of API in the interface layer N number of api interface that interface is at least associated in a logic module and interface layer respectively in advance is at least associated with one respectively in advance Drive module.As shown in figure 3, above-mentioned S204 includes:
Step S301, the logical layer call corresponding first logic module according to first api interface.
In the embodiment of the present application, N number of api interface in interface layer is associated with corresponding logic module, logical layer in advance When getting corresponding data information from driving layer according to the first request instruction, logical layer calls associated with first interface Logic module.
Step S302 using the data information of the acquisition as the input information of first logic module, and obtains institute State the implementing result exported after the first logic module executes.
In the embodiment of the present application, when logical layer calls logic module associated with first interface, by what is currently called Logic module is patrolled from the data information that driving layer is got as first as the first logic module using according to the first request instruction The input information of module is collected, and obtains the output information of the first logic module, the first logic module is processing journey predetermined Order function.
The implementing result is back to the interface layer by step S303, the logical layer.
In the embodiment of the present application, it after the logical layer is handled by data of the counterlogic module to acquisition, obtains To implementing result be back to interface layer.
In one embodiment, the implementing result is back to the interface layer by the logical layer, comprising: the logic The implementing result is back to the first api interface of the interface layer by layer.That due to said external command calls is the first API Interface, after logical layer is handled by data of the counterlogic module to acquisition, obtained implementing result is back to interface The first api interface in layer, what is called when external command is other api interfaces, logical layer by for logic module to obtaining After the data taken are handled, obtained implementing result is back to corresponding other interfaces.
In one embodiment, the interface layer includes but is not limited at least one of following api interface: position connects Mouth, data-interface, remote alarm interface, vehicle control interface, configuration interface, WIFI interface and blue tooth interface.
In one embodiment, the logical layer includes at least one of following logic module: position information process mould Block, warning information processing module, vehicle data processing module, vehicle control module, WIFI management module, power management module and Bluetooth management module.
In one embodiment, the driving layer includes at least one of following drive module: GPS drive module, speed It spends sensor drive module, onboard diagnostic system drive module, inertial navigation drive module, gyroscope drive module, WIFI and drives mould Block, electric power driving module, data acquisition drive module and bluetooth drive module.
In a particular application, each api interface module in above-mentioned interface layer and logic moulds one or more in logical layer Block is associated, and each api interface module in above-mentioned interface layer is closed with one or more drive modules in driving layer Join, the modules in above-mentioned logical layer are associated with one or more drive modules in driving layer.Such as above-mentioned position Interface can be associated with the position information process module in logical layer in advance, naturally it is also possible to modules other in logical layer into Row association.And above-mentioned positional interface is associated with the GPS drive module in driving layer in advance, naturally it is also possible to its in driving layer Its module is associated.Position information process module in above-mentioned logical layer can in advance with the GPS drive module phase in driving layer Association, after obtaining data information from the GPS drive module in driving layer, directly by the position information process module in logical layer It is handled.Modules in certain logical layer can be associated with multiple GPS drive modules, can be obtained according to multiple drive modules The multiple carry out fusion treatments taken.
In one embodiment, as shown in figure 4, the illustrated concrete configuration diagram of SDK, SDK include interface layer 41, logical layer 42 and driving layer 43.The interface layer includes positional interface 411, data-interface 412, remote alarm interface 413, vehicle The api interfaces such as control interface 414, configuration interface 415, WIFI interface 416 and blue tooth interface 417;The logical layer 42 includes position Set message processing module 421, warning information processing module 422, vehicle data processing module 423, vehicle control module 424, The logic modules such as WIFI management module 425, power management module 426 and bluetooth management module 427;The driving layer 43 includes GPS drive module 431, velocity sensor drive module 432, onboard diagnostic system drive module 433, inertial navigation drive module 434, Gyroscope drive module 435, WIFI drive module 436, electric power driving module 437, data acquisition drive module 438 and bluetooth are driven Dynamic model block 439.So as to externally provide the api interface of multiple functions, framework of the inside using layering, each layer by interface layer Including multiple functional modules or interface, modules function is clear in job responsibility, reduces the dependence of modules, coupling.Each layer is all Be it is closed, request can be by transmitting in layer, and each layer all be isolation, and any one layer of change does not interfere with it His layer.It is independent of each other between interface in each layer or module.
It can be seen that in the embodiment of the present application, functions of modules is all independently carried out handling and specifically be patrolled in advance in logical layer Processing function is collected, so that the functional module in reaching at all levels is clear in job responsibility, the dependence and coupling that can reduce modules are worked as Associated user directly can call the interface in SDK in corresponding interface layer to obtain to deserved in secondary development by external command Data understand source code inside TBOX hardware internal work mechanism or understanding TBOX without excessive, can reduce secondary to TBOX product Development time and difficulty, to improve the efficiency of secondary development.
Embodiment three
The embodiment of the present invention provides the realization device of SDK based on TBOX a kind of, can be integrated in smart phone, plate electricity The electronic equipments such as brain, desktop computer or server, for executing the method and step in embodiment one and/or embodiment two, in order to Convenient for explanation, it is only illustrated in the relevant part of the present invention, as shown in figure 5, the realization device 5 of the SDK based on TBOX includes SDK component 50, the SDK component include interface layer 501, logical layer 502 and driving layer 503, and the interface layer 501 includes N number of Api interface, the logical layer 502 are communicated to connect with the interface layer 501 and the driving layer 503 respectively;
The interface layer 501, for calling first API corresponding with the external command when receiving external command Interface;
The interface layer 501 is also used to generate the first request instruction according to first api interface, described first is asked Instruction is asked to be sent to the logical layer;
The interface layer 501 is also used to send out the implementing result when receiving the implementing result that the logical layer returns It send to client corresponding with the external command;
In one embodiment, the interface layer 501 is specifically also used to:
It, will be described through the first api interface in the interface layer when receiving the implementing result that the logical layer returns Implementing result is sent to client corresponding with the external command.
The logical layer 502, for when receiving first request instruction, according to first request instruction from institute It states driving layer and obtains corresponding data information;
In one embodiment, the driving layer includes K drive module, and the K drive module is pre-stored For driving K executable program of hardware module in TBOX;
The logical layer is specifically also used to:
When receiving first request instruction, the drive corresponding with first request instruction from the driving layer Corresponding data information is obtained in dynamic model block.
The logical layer 502 is also used to the data information according to acquisition, and the return of Xiang Suoshu interface layer is corresponding to execute knot Fruit;
In one embodiment, the logical layer includes M logic module, and the M logic module is pre-stored For realizing M executable program of Different Logic processing function, N number of api interface in the interface layer is distinguished at least in advance It is associated with a logic module;
The logical layer is specifically used for:
Corresponding first logic module is called according to first api interface;
Using the data information of the acquisition as the input information of first logic module, and obtain first logic The implementing result that module exports after executing;
The implementing result is back to the interface layer.
In one embodiment, the logical layer is specifically also used to:
The implementing result is back to the first api interface of the interface layer.
The driving layer 503, for driving corresponding TBOX hardware module according to first request instruction, and described in acquisition The data information that TBOX hardware module obtains after executing.
In one embodiment, the driving layer is specifically also used to:
It calls corresponding drive module to drive the hardware module of corresponding TBOX according to first request instruction, and obtains institute State the data information obtained after TBOX hardware module executes.
In one embodiment, the interface layer includes at least one of following api interface: positional interface, data connect Mouth, remote alarm interface, vehicle control interface, configuration interface, WIFI interface and blue tooth interface.
In one embodiment, the logical layer includes at least one of following logic module: position information process mould Block, warning information processing module, vehicle data processing module, vehicle control module, WIFI management module, power management module and Bluetooth management module.
In one embodiment, the driving layer includes at least one of following drive module: GPS drive module, speed It spends sensor drive module, onboard diagnostic system drive module, inertial navigation drive module, gyroscope drive module, WIFI and drives mould Block, electric power driving module, data acquisition drive module and bluetooth drive module.
It can be seen that in the embodiment of the present application, can directly pass through external command tune when associated user is in secondary development Obtain corresponding data with the interface in interface layer corresponding in SDK, without it is excessive understand TBOX hardware internal work mechanism or Understand source code inside TBOX, can reduce to TBOX product secondary development time and difficulty, to improve the efficiency of secondary development.
Example IV
The present embodiment provides the schematic diagrames of a kind of electronic equipment, as shown in fig. 6, the electronic equipment 6 in the present embodiment includes: Processor 61, memory 62 and it is stored in the computer program that can be run in above-mentioned memory 62 and on above-mentioned processor 61 63.Above-mentioned processor 61 is realized when executing above-mentioned computer program 63 in the implementation method embodiment of the above-mentioned SDK based on TBOX The step of, such as the method and step in embodiment one and/or the method and step in embodiment two.
Illustratively, above-mentioned computer program 63 can be divided into one or more units/modules, said one or Multiple units/modules are stored in above-mentioned memory 62, and are executed by above-mentioned processor 61, to complete the present invention.Above-mentioned one A or multiple units/modules can be the series of computation machine program instruction section that can complete specific function, which is used for Implementation procedure of the above-mentioned computer program 63 in above-mentioned electronic equipment 6 is described.For example, above-mentioned computer program 63 can be divided It is cut into components, each component concrete functions such as interface layer, logical layer and driving layer to have been described in above-described embodiment three, herein not It repeats again.
Above-mentioned electronic equipment 6 can be integrated in the electronics such as smart phone, tablet computer, desktop computer or server and set It is standby.Above-mentioned electronic equipment 6 may include, but be not limited only to, processor 61, memory 62.It will be understood by those skilled in the art that figure 6 be only the example of electronic equipment 6, does not constitute the restriction to electronic equipment 6, may include than illustrating more or fewer portions Part perhaps combines certain components or different components, such as above-mentioned electronic equipment 6 can also include input-output equipment, net Network access device, bus etc..
Alleged processor 61 can be central processing unit (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field- Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
Above-mentioned memory 62 can be the internal storage unit of electronic equipment 6, such as the hard disk or memory of electronic equipment 6. Above-mentioned memory 62 is also possible to the External memory equipment of above-mentioned electronic equipment 6, such as the grafting being equipped on above-mentioned electronic equipment 6 Formula hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, above-mentioned memory 62 can also both including above-mentioned electronic equipment 6 internal storage unit or Including External memory equipment.Above-mentioned memory 62 is for storing needed for above-mentioned computer program and above-mentioned electronic equipment 6 it Its program and data.Above-mentioned memory 62 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience and simplicity of description, foregoing description it is specific The course of work can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed method, apparatus, electronic equipment, it can To realize by another way.The unit as illustrated by the separation member may or may not be physically separate , component shown as a unit may or may not be physical unit.It can select according to the actual needs wherein Some or all of unit achieve the purpose of the solution of this embodiment.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The above is merely preferred embodiments of the present invention, be not intended to limit the invention, it is all in spirit of the invention and Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within principle.

Claims (10)

1. a kind of implementation method of the SDK based on TBOX, which is characterized in that the SDK includes interface layer, logical layer and driving Layer, the interface layer include N number of api interface, and the logical layer is communicated to connect with the interface layer and the driving layer respectively;Its In, N≤1 and be integer;
The implementation method includes:
The interface layer calls the first api interface corresponding with the external command when receiving external command;
The interface layer generates the first request instruction according to first api interface, and first request instruction is sent to institute State logical layer;
The implementing result is sent to and the outside by the interface layer when receiving the implementing result that the logical layer returns Instruct corresponding client;
The logical layer is obtained when receiving first request instruction, according to first request instruction from the driving layer Corresponding data information;
Data information of the logical layer according to acquisition, the corresponding implementing result of Xiang Suoshu interface layer return;
The driving layer drives corresponding TBOX hardware module according to first request instruction, and obtains the TBOX hardware module The data information obtained after execution.
2. the implementation method of the SDK according to claim 1 based on TBOX, which is characterized in that the logical layer includes M Logic module, the M logic module are the pre-stored M executable program for realizing Different Logic processing function, N number of api interface in the interface layer is at least associated with a logic module respectively in advance;Wherein, M≤1 and be integer;
Data information of the logical layer according to acquisition, the corresponding implementing result of Xiang Suoshu interface layer return, comprising:
The logical layer calls corresponding first logic module according to first api interface;
The logical layer obtains described using the data information of the acquisition as the input information of first logic module The implementing result that one logic module exports after executing;
The implementing result is back to the interface layer by the logical layer.
3. the implementation method of the SDK according to claim 1 based on TBOX, which is characterized in that the driving layer includes K Drive module, the K drive module are pre-stored for driving K executable program of hardware module in TBOX;Its In, K≤1 and be integer;
The logical layer is obtained when receiving first request instruction, according to first request instruction from the driving layer Corresponding data information, comprising:
The logical layer is opposite with first request instruction from the driving layer when receiving first request instruction Corresponding data information is obtained in the drive module answered.
4. the implementation method of the SDK according to claim 3 based on TBOX, which is characterized in that the driving layer is according to institute It states the first request instruction and drives corresponding TBOX hardware module, and obtain the data letter obtained after the TBOX hardware module executes Breath, comprising:
The hardware module for driving layer to call corresponding drive module to drive corresponding TBOX according to first request instruction, and Obtain the data information obtained after the TBOX hardware module executes.
5. the implementation method of the SDK according to claim 1 based on TBOX, which is characterized in that the interface layer is receiving When the implementing result that the logical layer returns, the implementing result is sent to client corresponding with the external command, is wrapped It includes:
The first api interface in the interface layer is when receiving the implementing result that the logical layer returns, by the implementing result It is sent to client corresponding with the external command.
6. the implementation method of the SDK according to claim 1 based on TBOX, which is characterized in that the interface layer include with At least one of lower api interface: positional interface, data-interface, remote alarm interface, vehicle control interface, configuration interface, WIFI connect Mouth and blue tooth interface.
7. the implementation method of the SDK according to claim 1 based on TBOX, which is characterized in that the logical layer include with At least one of lower logic module: position information process module, warning information processing module, vehicle data processing module, vehicle Control module, WIFI management module, power management module and bluetooth management module.
8. the implementation method of the SDK according to claim 1 based on TBOX, which is characterized in that the driving layer include with At least one of lower drive module: GPS drive module, onboard diagnostic system drive module, is used at velocity sensor drive module Drive module, gyroscope drive module, WIFI drive module, electric power driving module, data acquisition drive module and bluetooth is led to drive Dynamic model block.
9. a kind of realization device of the SDK based on TBOX, which is characterized in that the realization device includes SDK component, the SDK Component includes interface layer, logical layer and driving layer, and the interface layer includes N number of api interface, and the logical layer connects with described respectively Mouth layer and driving layer communication connection;Wherein, N≤1 and be integer;
The interface layer, for calling the first api interface corresponding with the external command when receiving external command;
The interface layer is also used to generate the first request instruction according to first api interface, first request instruction is sent out It send to the logical layer;
The interface layer is also used to when receiving the implementing result that the logical layer returns, by the implementing result be sent to The corresponding client of the external command;
The logical layer, for when receiving first request instruction, according to first request instruction from the driving Layer obtains corresponding data information;
The logical layer, is also used to the data information according to acquisition, and Xiang Suoshu interface layer returns to corresponding implementing result;
The driving layer, for driving corresponding TBOX hardware module according to first request instruction, and it is hard to obtain the TBOX The data information that part module obtains after executing.
10. a kind of electronic equipment, including memory, processor and storage are in the memory and can be on the processor The computer program of operation, which is characterized in that the processor realizes such as claim 1 to 8 when executing the computer program The step of any one the method.
CN201910542463.3A 2019-06-21 2019-06-21 Method and device for realizing SDK based on TBOX Active CN110377272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910542463.3A CN110377272B (en) 2019-06-21 2019-06-21 Method and device for realizing SDK based on TBOX

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910542463.3A CN110377272B (en) 2019-06-21 2019-06-21 Method and device for realizing SDK based on TBOX

Publications (2)

Publication Number Publication Date
CN110377272A true CN110377272A (en) 2019-10-25
CN110377272B CN110377272B (en) 2023-06-02

Family

ID=68250593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910542463.3A Active CN110377272B (en) 2019-06-21 2019-06-21 Method and device for realizing SDK based on TBOX

Country Status (1)

Country Link
CN (1) CN110377272B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464408A (en) * 2020-03-17 2020-07-28 创驱(上海)新能源科技有限公司 Fully-configured vehicle machine and T-BOX testing device and testing method thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105763542A (en) * 2016-02-02 2016-07-13 国家电网公司 Device and method of encryption and authentication for distribution terminal serial port communication
US20170039058A1 (en) * 2015-08-03 2017-02-09 Alibaba Group Holding Limited Method and apparatus for facilitating a software update process over a network
CN107957863A (en) * 2016-10-15 2018-04-24 郑州天迈科技股份有限公司 Vehicular video dispatch terminal technology is layered convenient system
CN109495498A (en) * 2018-12-12 2019-03-19 北京车联天下信息技术有限公司 The ca authentication method, apparatus and car networking information management system of vehicle arrangement
CN109756545A (en) * 2018-01-23 2019-05-14 启迪云控(北京)科技有限公司 Join onboard system for the intelligent network in intelligent network connection cloud control system
CN109871244A (en) * 2019-02-26 2019-06-11 深圳和而泰数据资源与云技术有限公司 Hard drive device, method, chip and non-transient computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170039058A1 (en) * 2015-08-03 2017-02-09 Alibaba Group Holding Limited Method and apparatus for facilitating a software update process over a network
CN105763542A (en) * 2016-02-02 2016-07-13 国家电网公司 Device and method of encryption and authentication for distribution terminal serial port communication
CN107957863A (en) * 2016-10-15 2018-04-24 郑州天迈科技股份有限公司 Vehicular video dispatch terminal technology is layered convenient system
CN109756545A (en) * 2018-01-23 2019-05-14 启迪云控(北京)科技有限公司 Join onboard system for the intelligent network in intelligent network connection cloud control system
CN109495498A (en) * 2018-12-12 2019-03-19 北京车联天下信息技术有限公司 The ca authentication method, apparatus and car networking information management system of vehicle arrangement
CN109871244A (en) * 2019-02-26 2019-06-11 深圳和而泰数据资源与云技术有限公司 Hard drive device, method, chip and non-transient computer readable storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
TARCISIO MENDES DE FARIAS等: "A rule-based methodology to extract building model views", 《AUTOMATION IN CONSTRUCTION》 *
夏战锋: "语义Web中基于描述逻辑的多知识库整合研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 *
姜婷婷等: "一种NMR谱仪控制台软件系统的多层架构设计", 《波谱学杂志》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464408A (en) * 2020-03-17 2020-07-28 创驱(上海)新能源科技有限公司 Fully-configured vehicle machine and T-BOX testing device and testing method thereof

Also Published As

Publication number Publication date
CN110377272B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
US9132715B2 (en) Vehicle connectivity systems, methods and applications
US11474859B2 (en) Method, device, and real-time network for highly integrated automotive systems
CN106453465A (en) System and method for interworking between vehicle controller and external resource
CN111786862B (en) Control system and control method thereof and all-terrain vehicle
CN112477781B (en) System and method for realizing electronic control function in automobile and automobile
CN109765895A (en) Automatic driving vehicle control method, device, automatic driving vehicle and storage medium
CN213715751U (en) Domain controller
CN106162528A (en) LoRa signal and Bluetooth signal modular converter, conversion method and sender unit
CN103377070A (en) Field bus interface abstract method
CN111025990B (en) RISC-V based vehicle-mounted terminal system
CN113992713A (en) Vehicle cloud communication method and device, electronic equipment and storage medium
CN110377272A (en) A kind of implementation method and device of the SDK based on TBOX
CN108196864A (en) A kind of vehicle electronic device upgrade-system and method
CN112463710A (en) Inter-core communication method and system based on embedded platform
CN109361653B (en) POWERLINK main station
CN107972024A (en) Robot and apply data processing method and system in robot
CN106603113A (en) Radar signal processor external communication control system
CN108197043B (en) Control system and method for peripheral hardware of intelligent vehicle machine
CN103162973B (en) The automobile diagnositc system of the multi-thread journey of single-chip and method
CN110532033A (en) A kind of data processing system and data processing method
CN104729517A (en) Vehicle-mounted information system
CN111124611A (en) Robot management method, robot management device and electronic equipment
CN110246057A (en) Generation based on car-mounted terminal drives processing method and system, car-mounted terminal
CN111405495A (en) Asynchronous communication method, medium, terminal and device based on cross-type communication link
CN109613858A (en) Based on vehicle-mounted control terminal transport vehicle operating status control method, system and terminal

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