CN106204794A - Multiple task operating system framework based on OBD detection monitoring device - Google Patents

Multiple task operating system framework based on OBD detection monitoring device Download PDF

Info

Publication number
CN106204794A
CN106204794A CN201610500230.3A CN201610500230A CN106204794A CN 106204794 A CN106204794 A CN 106204794A CN 201610500230 A CN201610500230 A CN 201610500230A CN 106204794 A CN106204794 A CN 106204794A
Authority
CN
China
Prior art keywords
call
function
management
task
layer
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
CN201610500230.3A
Other languages
Chinese (zh)
Other versions
CN106204794B (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 CASTEL WIRELESS TELECOMMUNICATION CO Ltd
Original Assignee
SHENZHEN CASTEL WIRELESS TELECOMMUNICATION 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 CASTEL WIRELESS TELECOMMUNICATION CO Ltd filed Critical SHENZHEN CASTEL WIRELESS TELECOMMUNICATION CO Ltd
Priority to CN201610500230.3A priority Critical patent/CN106204794B/en
Publication of CN106204794A publication Critical patent/CN106204794A/en
Application granted granted Critical
Publication of CN106204794B publication Critical patent/CN106204794B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0645Rental transactions; Leasing transactions
    • 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/08Registering or indicating performance data other than driving, working, idle, or waiting time, with or without registering driving, working, idle or waiting time
    • G07C5/0841Registering performance data

Landscapes

  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • General Physics & Mathematics (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention discloses a kind of multiple task operating system framework based on OBD detection monitoring device, and this framework has been sequentially distributed APP layer, DRIVER layer, BSP layer and CMSIS layer, wherein: APP layer from top to bottom: for application function layer, can set up multiple task module;DRIVER layer: comprise device drives and real-time system, DRIVER layer can be called by APP layer, and DRIVER layer can call APP layer by call back function;Device drives provides for peripheral chip and external module and drives service, and described external module is provided with OBD module;BSP layer: for microcontroller peripheral function-driven layer, call CMSIS layer;CMSIS layer: for ARM Cortex microcontroller software interface standard layer, called by BSP layer and real-time system.The present invention can quickly realize the functional development of customization, the code migrating being prevented effectively from different product difficulty, and this system architecture and product development cycle is significantly shortened, and saves research and development of products expense.

Description

Multiple task operating system framework based on OBD detection monitoring device
Technical field
The present invention relates to vehicle OBD operating system architecture technology field, particularly relate to a kind of based on OBD detection monitoring device Multiple task operating system framework.
Background technology
Public bicycles lease, from environmental protection, caters to current social, green, energy-conservation, the general orientation of reduction of discharging and master Topic, the most cost-effective, protection environment and promotion Sustainable Socioeconomic Development.
But, the Cycle Hire on current bicycle rental system market increases the pattern of swiping the card that is, and part can support hands Machine but all there is many problems, such as: only support wechat client, or only simple queries function.
Summary of the invention
For weak point present in above-mentioned technology, the present invention provides a kind of based on OBD detection monitoring device many Business operating system framework, can realize the reading of vehicle-state quickly through OBD, obtains vehicle problem, and can quickly realize The functional development of customization, reduces the code migrating difficult problem in different product.
In order to achieve the above object, a kind of multiple task operating system framework based on OBD detection monitoring device of the present invention, by Top layer to bottom has been sequentially distributed APP layer, DRIVER layer, BSP layer and CMSIS layer, wherein:
APP layer: for application function layer, multiple task module can be set up;
DRIVER layer: comprise device drives and real-time system, DRIVER layer can be called by APP layer, and DRIVER layer can pass through back Adjust function call APP layer;Device drives provides for peripheral chip and external module and drives service, and described external module is provided with OBD module;
BSP layer: for microcontroller peripheral function-driven layer, call CMSIS layer;
CMSIS layer: for ARM Cortex microcontroller software interface standard layer, called by BSP layer and real-time system;
The management operation of described OBD module includes that the OBD driving in DRIVER layer, OBD agreement, OBD management and OBD receive data Four parts, and in APP layer, set up OBD task and OBD data processing task, specifically comprise the following steps that
Step 11, OBD agreement calls OBD module data and configuration protocol message;
Step 12, after protocol message is carried out encoding packing process by described OBD agreement, described OBD drives the agreement after packing Message sends;
Step 13, described OBD receives data and processes the protocol message received and be sent to OBD management;
Step 14, protocol message is processed, and task message is extracted formation OBD task and OBD by described OBD management Data processing task.
Wherein, described OBD task is used for calling OBD and drives, configuration reception call back function, inquiry outside and internal state, Processing parameter more New function, it is achieved the management of OBD;OBD data processing task passes through query messages queue, to trigger this task, Task processes function by invocation protocol decoding, protocol processes, protocol data after triggering, it is achieved data management function.
Wherein, described external module being additionally provided with gsm module, the driven management operation of described gsm module includes AT order Agreement and GSM management, described GSM management is included in APP layer and sets up GSM driving task and GSM data processing task, concrete steps As follows:
Step 21, GSM drives task to call serial port drive from BSP layer, and GSM drives task configuration to receive call back function;
Step 22, GSM drives task to be pushed to GSM management by packed for serial port drive, and forms message queue;
Step 23, message queue is inquired about, and is called the AT data of AT bidding protocol by GSM data processing task;
Step 24, GSM drives the AT data of task call AT bidding protocol, configuration acknowledgement command sequence number and time-out time, AT number According to transmission, after gsm module receives AT data, carrying out corresponding response, after AT bidding protocol resolves, set is corresponding as required Event position, GSM drives task call AT bidding protocol.
Wherein, described APP layer is also provided with GSM driven management task, and described GSM driven management task is provided with two portions Point, and set up two tasks, two parts are AT bidding protocol and GSM management, and two tasks are that GSM drives task and GSM number According to the task of process, said two part and two tasks are specific as follows:
AT bidding protocol: AT order is the agreement mutual with gsm module, receives after AT command analysis set as required corresponding Corresponding call back function is called in event position, and sending out notice is to APP layer;
GSM manages: periodically inquiry global flag position, does process accordingly, judges that operation is the most successful according to order feedback, management Have power management, Telephone Management Agency, SMS management, GPRS management, FTP management, exception management and updating and management under its command;
GSM drives task: call UART serial port drive, and configuration receives outside call back function, inquiry outside and internal state and process Portion's event;
GSM data processing task: by query messages queue, to trigger this task, this task trigger after by AT protocol-decoding, Protocol processes and protocol data process.
Wherein, described GSM driven management task is additionally provided with the realization of AT order, specific as follows:
When GSM drives task call AT order to send, the acknowledgement command sequence number of configuration requirement and time-out time, call AT life afterwards Order sends function and packs AT order, then calls serial port drive transmission data, the event to be answered such as after completing, response thing Part includes SUCCEED, ERROR, CMS ERROR, CMEERROR and OVERTIME;
After gsm module receives data, carry out corresponding response, after serial ports receives data, put into GSM and drive receive to disappear In breath queue, GSM data processing task regular check message queue, carry out AT command analysis after inquiring data, if wanting The reply data asked, then set SUCCEED time tag;If returning ERROR, the then corresponding error event of set;If Time-out does not receive reply data, then set OVERTIME event.
Wherein, described GSM driven management task is additionally provided with telephony feature management, and the management of described telephony feature includes at incoming call Reason and dialing process, specific as follows:
Incoming call handling: after AT command processing function is resolved to incoming call prompting, the caller ID in configuration telephony feature global variable, And to change telephone state be Call in state;
In Call in state, call management function determines whether there is configuration call-in reporting call back function, without configuring this letter Number pointer, the most directly change state is to Call end state, carries out on-hook process;If being configured with call-in reporting call back function, And by white list, and be that incoming call notification callback function is crossed in never call, then calling the notice application of this call back function has at present Incoming information;
Dialing processes: by interface function after the good telephone number of application configuration, de-electrifying number in configuration telephony feature global variable Code, and to change telephone state be Call ready state;Only just can dial when Call free state, other states Return unsuccessfully;
In Call ready state, call management function Sending dialled number order, changing state after success is Call out state, etc. Treating that the other side picks, the other side picks, and changing state is Calling state, represents and converses, if the other side's on-hook, changes shape State is Call down state, and call management function does respective handling.
Wherein, described GSM driven management task is additionally provided with SMS function management, and described SMS function management includes sending note With receive note, specific as follows:
Send note: application need to configure transmission number, send internal memory, transmission result notification callback function, then calls SMS and sends out Send interface function, write SMS inside story queue;
SMS functional inquiry message queue carries out after obtaining message to be sent encoding and SMS transmission, in AT command processing function solution Analysis is arrived after sending Success Flag, by call back function notice application, sends result;
Receive note: after application obtains new message notice, answer calling interface function in the logical write in SMS position to be read SMS Portion's message queue;
SMS functional inquiry message queue obtains after SMS to be read requires and sends reading order, is resolved at AT command processing function After SMS reads response, call SMS decoding functions, and decoded data are sent to application.
Wherein, described GSM driven management task is additionally provided with GPRS function management, and described GPRS function management includes opening GPRS, closedown GPRS, transmission message and reception message, specific as follows:
Unlatching GPRS: application configuration IP, PORT, linking scheme, socket, linking status notification callback function, message informing return Function call is adjusted to open link interface function, in parameter read-in to the message queue of GPRS function management;
GPRS power function inquire about band link message time, carry out corresponding configuration, and attempt to link given server;
Gsm module has message notifying after link success or failure, after AT command processing function is resolved to this information, passes through chain Connect state notifying call back function notice application link result, when link occurs abnormal also by calling this function notice application chain Connect state change;
Closing the socket number that GPRS: applicative notifications is to be closed, GPRS management function is closed the link of corresponding socket, and is led to The linking status notification callback function notice application link state change of configuration before crossing;
Send message: at link opening, socket that application configuration is to be sent, data length, data pointer, calling interface Function is sent to message queue;GPRS functional inquiry, to after data, is transmitted;
Receive message: AT command processing function passes through to call link state notifying and returns after receiving the GPRS data that server issues Letter of transfer number gives application data-pushing.
The invention has the beneficial effects as follows:
Compared with prior art, the multiple task operating system framework based on OBD detection monitoring device of the present invention, by by top layer APP layer, DRIVER layer, BSP layer and the CMSIS layer being sequentially distributed to bottom, it is achieved vehicle monitoring.Client is by this system tray Structure, can realize the reading of vehicle-state quickly through OBD module management task, obtains vehicle problem.This system architecture is permissible Quickly realizing the functional development of customization, the code migrating being prevented effectively from different product is difficult, and this system architecture makes Product development cycle significantly shortens, and saves research and development of products expense.
Accompanying drawing explanation
Fig. 1 is the block schematic illustration of present invention multiple task operating system framework based on OBD detection monitoring device;
Fig. 2 is OBD function block diagram in DRIVER layer in the present invention;
Fig. 3 is the workflow diagram of gsm module in DRIVER layer in the present invention;
Fig. 4 is the flow chart of phone in GSM driven management task in DRIVER layer in the present invention.
Main element symbol description is as follows:
10, APP layer 11, DRIVER layer
12, BSP layer 13, CMSIS layer.
Detailed description of the invention
In order to more clearly state the present invention, below in conjunction with the accompanying drawings the present invention is further described.
Refering to Fig. 1-2, a kind of multiple task operating system framework based on OBD detection monitoring device of the present invention, by top layer extremely Bottom has been sequentially distributed APP layer 10, DRIVER layer 11, BSP layer 12 and CMSIS layer 13, wherein:
APP layer: for application function layer, multiple task module can be set up;
DRIVER layer: comprise device drives and real-time system, DRIVER layer can be called by APP layer, and DRIVER layer can pass through back Adjust function call APP layer;Device drives provides for peripheral chip and external module and drives service, and external module is provided with OBD Module;
BSP layer: for microcontroller peripheral function-driven layer, call CMSIS layer;
CMSIS layer: for ARM Cortex microcontroller software interface standard layer, called by BSP layer and real-time system;
The management operation of OBD module includes that the OBD driving in DRIVER layer, OBD agreement, OBD management and OBD receive data four Part, and in APP layer, set up OBD task and OBD data processing task, specifically comprise the following steps that
The first step, OBD agreement calls OBD module data and configuration protocol message;
Second step, after protocol message is carried out encoding packing process by OBD agreement, OBD drives the protocol message after packing to send Go out;
3rd step, OBD receives data and processes the protocol message received and be sent to OBD management;
4th step, protocol message is processed, and task message is extracted formation OBD task and OBD data by OBD management Process task.
Compared to prior art, the multiple task operating system framework based on OBD detection monitoring device that the present invention provides is logical After the APP layer being sequentially distributed from top to bottom, DRIVER layer, BSP layer and CMSIS layer, it is achieved vehicle monitoring.Client is by being somebody's turn to do System architecture, can realize the reading of vehicle-state quickly through OBD module management task, obtains vehicle problem.This system tray Structure can quickly realize the functional development of customization, the code migrating being prevented effectively from different product difficulty, and this system tray Structure makes product development cycle significantly shorten, and saves research and development of products expense.
In the present embodiment, OBD task is used for calling OBD and drives, and configuration receives call back function, the outside and internal shape of inquiry State, processing parameter more New function, it is achieved the management of OBD;OBD data processing task passes through query messages queue, to trigger this Business, task processes function by invocation protocol decoding, protocol processes, protocol data after triggering, it is achieved data management function.OBD The realization of control command: agreement sends function first configuration protocol message, and then invocation protocol sends order and (sends life before sending Protocol message can be carried out encoding packing and process by order), call OBD and drive transmission function that the message after packing is sent, send out After having sent, task waits corresponding response event, returns result.OBD receives the process of data: external resource pushes message The reception driven to OBD, OBD drives and again message is pushed to message sink process function, and reception processes function message again Secondary package pushes into reception task message queue, and message sink management role can regularly be checked in message team, and message extraction Out, propose after message by consultative management function, by source codec and call related protocol and process function, at protocol processes letter Number can process the message content obtained, and set corresponding response event.
Further referring to Fig. 3, external module being additionally provided with gsm module, the driven management operation of gsm module includes that AT orders Making agreement and GSM management, GSM management is included in APP layer and sets up GSM driving task and GSM data processing task, and concrete steps are such as Under:
The first step, GSM drives task to call serial port drive from BSP layer, and GSM drives task configuration to receive call back function;
Second step, GSM drives task to be pushed to GSM management by packed for serial port drive, and forms message queue;
3rd step, message queue is inquired about, and is called the AT data of AT bidding protocol by GSM data processing task;
4th step, GSM drives the AT data of task call AT bidding protocol, configuration acknowledgement command sequence number and time-out time, AT number According to transmission, after gsm module receives AT data, carrying out corresponding response, after AT bidding protocol resolves, set is corresponding as required Event position, GSM drives task call AT bidding protocol.
In the present embodiment, APP layer is also provided with GSM driven management task, and GSM driven management task is provided with two portions Point, and set up two tasks, two parts are AT bidding protocol and GSM management, and two tasks are that GSM drives task and GSM number According to the task of process, two parts and two tasks are specific as follows:
AT bidding protocol: AT order is the agreement mutual with gsm module, receives after AT command analysis set as required corresponding Corresponding call back function is called in event position, and sending out notice is to APP layer;
GSM manages: periodically inquiry global flag position, does process accordingly, judges that operation is the most successful according to order feedback, management Have power management, Telephone Management Agency, SMS management, GPRS management, FTP management, exception management and updating and management under its command;
GSM drives task: call UART serial port drive, and configuration receives outside call back function, inquiry outside and internal state and process Portion's event;
GSM data processing task: by query messages queue, to trigger this task, this task trigger after by AT protocol-decoding, Protocol processes and protocol data process.GSM driven management task is additionally provided with the realization of AT order, specific as follows: GSM drives task When calling AT order transmission, the acknowledgement command sequence number of configuration requirement and time-out time, call AT order afterwards and send function to AT Order is packed, and then calls serial port drive and sends data, the event to be answered such as after completing, response event include SUCCEED, ERROR, CMS ERROR, CMEERROR and OVERTIME;After gsm module receives data, carrying out corresponding response, serial ports connects After receiving data, put into GSM and drive in the message queue received, GSM data processing task regular check message queue, inquiry AT command analysis is carried out after data, if the reply data required, then set SUCCEED time tag;If returning ERROR, the then corresponding error event of set;If time-out does not receive reply data, then set OVERTIME event.
Being additionally provided with telephony feature management further referring to Fig. 4, GSM driven management task, telephony feature management includes coming Electric treatment and dialing process, specific as follows:
Incoming call handling: after AT command processing function is resolved to incoming call prompting, the caller ID in configuration telephony feature global variable, And to change telephone state be Call in state;
In Call in state, call management function determines whether there is configuration call-in reporting call back function, without configuring this letter Number pointer, the most directly change state is to Call end state, carries out on-hook process;If being configured with call-in reporting call back function, And by white list, and be that incoming call notification callback function is crossed in never call, then calling the notice application of this call back function has at present Incoming information;
Dialing processes: by interface function after the good telephone number of application configuration, de-electrifying number in configuration telephony feature global variable Code, and to change telephone state be Call ready state;Only just can dial when Call free state, other states Return unsuccessfully;
In Call ready state, call management function Sending dialled number order, changing state after success is Call out state, etc. Treating that the other side picks, the other side picks, and changing state is Calling state, represents and converses, if the other side's on-hook, changes shape State is Call down state, and call management function does respective handling.
State in the present embodiment, GSM driven management task is additionally provided with SMS function management, and SMS function management includes sending short Letter and reception note, specific as follows:
Send note: application need to configure transmission number, send internal memory, transmission result notification callback function, then calls SMS and sends out Send interface function, write SMS inside story queue;
SMS functional inquiry message queue carries out after obtaining message to be sent encoding and SMS transmission, in AT command processing function solution Analysis is arrived after sending Success Flag, by call back function notice application, sends result;
Receive note: after application obtains new message notice, answer calling interface function in the logical write in SMS position to be read SMS Portion's message queue;
SMS functional inquiry message queue obtains after SMS to be read requires and sends reading order, is resolved at AT command processing function After SMS reads response, call SMS decoding functions, and decoded data are sent to application.
In the present embodiment, GSM driven management task is additionally provided with GPRS function management, and GPRS function management includes opening GPRS, closedown GPRS, transmission message and reception message, specific as follows:
Unlatching GPRS: application configuration IP, PORT, linking scheme, socket, linking status notification callback function, message informing return Function call is adjusted to open link interface function, in parameter read-in to the message queue of GPRS function management;
GPRS power function inquire about band link message time, carry out corresponding configuration, and attempt to link given server;
Gsm module has message notifying after link success or failure, after AT command processing function is resolved to this information, passes through chain Connect state notifying call back function notice application link result, when link occurs abnormal also by calling this function notice application chain Connect state change;
Closing the socket number that GPRS: applicative notifications is to be closed, GPRS management function is closed the link of corresponding socket, and is led to The linking status notification callback function notice application link state change of configuration before crossing;
Send message: at link opening, socket that application configuration is to be sent, data length, data pointer, calling interface Function is sent to message queue;GPRS functional inquiry, to after data, is transmitted;
Receive message: AT command processing function passes through to call link state notifying and returns after receiving the GPRS data that server issues Letter of transfer number gives application data-pushing.
It is an object of the invention to provide one: rely on vehicle monitoring system management server, Cloud Server, mobile interchange Net, it is achieved vehicle monitoring.Client, by this system architecture, can realize the reading of vehicle-state quickly through OBD, obtains vehicle Problem, and by GPRS WIFI the means of communication such as bluetooth be sent to monitoring system.This system architecture can quickly realize client Code migrating difficulty in the functional development of customization, minimizing different product.Make product development cycle significantly shorten, save product and grind The expense of sending out.
Along with increasing of private car quantity, large quantities of owners do not possess vehicle problem judgement, cause international and domestic The demand of OBD detection monitoring product is grown with each passing day by market, and in order to cater to consumer, product category gets more and more, but does not has One unified system platform causes the significant wastage of manpower and materials.Old product program portable difficulty, causes new product software to be opened The cycle of sending out is long, causes research and development of products cost to improve.
The several specific embodiments being only the present invention disclosed above, but the present invention is not limited to this, any ability What the technical staff in territory can think change all should fall into protection scope of the present invention.

Claims (8)

1. a multiple task operating system framework based on OBD detection monitoring device, it is characterised in that the most successively APP layer, DRIVER layer, BSP layer and CMSIS layer are distributed, wherein:
APP layer: for application function layer, multiple task module can be set up;
DRIVER layer: comprise device drives and real-time system, DRIVER layer can be called by APP layer, and DRIVER layer can pass through back Adjust function call APP layer;Device drives provides for peripheral chip and external module and drives service, and described external module is provided with OBD module;
BSP layer: for microcontroller peripheral function-driven layer, call CMSIS layer;
CMSIS layer: for ARM Cortex microcontroller software interface standard layer, called by BSP layer and real-time system;
The management operation of described OBD module includes that the OBD driving in DRIVER layer, OBD agreement, OBD management and OBD receive data Four parts, and in APP layer, set up OBD task and OBD data processing task, specifically comprise the following steps that
Step 11, OBD agreement calls OBD module data and configuration protocol message;
Step 12, after protocol message is carried out encoding packing process by described OBD agreement, described OBD drives the agreement after packing Message sends;
Step 13, described OBD receives data and processes the protocol message received and be sent to OBD management;
Step 14, protocol message is processed, and task message is extracted formation OBD task and OBD by described OBD management Data processing task.
Multiple task operating system framework based on OBD detection monitoring device the most according to claim 1, it is characterised in that Described OBD task is used for calling OBD and drives, and configuration receives call back function, inquiry outside and internal state, processing parameter updates merit Can, it is achieved the management of OBD;OBD data processing task passes through query messages queue, and to trigger this task, task is passed through after triggering Invocation protocol decoding, protocol processes, protocol data process function, it is achieved data management function.
Multiple task operating system framework based on OBD detection monitoring device the most according to claim 1, it is characterised in that Being additionally provided with gsm module on described external module, the driven management operation of described gsm module includes AT bidding protocol and GSM management, Described GSM management is included in APP layer and sets up GSM driving task and GSM data processing task, specifically comprises the following steps that
Step 21, GSM drives task to call serial port drive from BSP layer, and GSM drives task configuration to receive call back function;
Step 22, GSM drives task to be pushed to GSM management by packed for serial port drive, and forms message queue;
Step 23, message queue is inquired about, and is called the AT data of AT bidding protocol by GSM data processing task;
Step 24, GSM drives the AT data of task call AT bidding protocol, configuration acknowledgement command sequence number and time-out time, AT number According to transmission, after gsm module receives AT data, carrying out corresponding response, after AT bidding protocol resolves, set is corresponding as required Event position, GSM drives task call AT bidding protocol.
Multiple task operating system framework based on OBD detection monitoring device the most according to claim 1, it is characterised in that Described APP layer is also provided with GSM driven management task, and described GSM driven management task is provided with two parts, and sets up two Business, two parts are AT bidding protocol and GSM management, and two tasks are that GSM drives task and GSM data processing task, described Two parts and two tasks are specific as follows:
AT bidding protocol: AT order is the agreement mutual with gsm module, receives after AT command analysis set as required corresponding Corresponding call back function is called in event position, and sending out notice is to APP layer;
GSM manages: periodically inquiry global flag position, does process accordingly, judges that operation is the most successful according to order feedback, management Have power management, Telephone Management Agency, SMS management, GPRS management, FTP management, exception management and updating and management under its command;
GSM drives task: call UART serial port drive, and configuration receives outside call back function, inquiry outside and internal state and process Portion's event;
GSM data processing task: by query messages queue, to trigger this task, this task trigger after by AT protocol-decoding, Protocol processes and protocol data process.
Multiple task operating system framework based on OBD detection monitoring device the most according to claim 4, it is characterised in that Described GSM driven management task is additionally provided with the realization of AT order, specific as follows:
When GSM drives task call AT order to send, the acknowledgement command sequence number of configuration requirement and time-out time, call AT life afterwards Order sends function and packs AT order, then calls serial port drive transmission data, the event to be answered such as after completing, response thing Part includes SUCCEED, ERROR, CMS ERROR, CMEERROR and OVERTIME;
After gsm module receives data, carry out corresponding response, after serial ports receives data, put into GSM and drive receive to disappear In breath queue, GSM data processing task regular check message queue, carry out AT command analysis after inquiring data, if wanting The reply data asked, then set SUCCEED time tag;If returning ERROR, the then corresponding error event of set;If Time-out does not receive reply data, then set OVERTIME event.
Multiple task operating system framework based on OBD detection monitoring device the most according to claim 5, it is characterised in that Described GSM driven management task is additionally provided with telephony feature management, and the management of described telephony feature includes that incoming call handling and dialing process, Specific as follows:
Incoming call handling: after AT command processing function is resolved to incoming call prompting, the caller ID in configuration telephony feature global variable, And to change telephone state be Call in state;
In Call in state, call management function determines whether there is configuration call-in reporting call back function, without configuring this letter Number pointer, the most directly change state is to Call end state, carries out on-hook process;If being configured with call-in reporting call back function, And by white list, and be that incoming call notification callback function is crossed in never call, then calling the notice application of this call back function has at present Incoming information;
Dialing processes: by interface function after the good telephone number of application configuration, de-electrifying number in configuration telephony feature global variable Code, and to change telephone state be Call ready state;Only just can dial when Call free state, other states Return unsuccessfully;
In Call ready state, call management function Sending dialled number order, changing state after success is Call out state, etc. Treating that the other side picks, the other side picks, and changing state is Calling state, represents and converses, if the other side's on-hook, changes shape State is Call down state, and call management function does respective handling.
Multiple task operating system framework based on OBD detection monitoring device the most according to claim 6, it is characterised in that Described GSM driven management task is additionally provided with SMS function management, and described SMS function management includes sending note and receiving note, tool Body is as follows:
Send note: application need to configure transmission number, send internal memory, transmission result notification callback function, then calls SMS and sends out Send interface function, write SMS inside story queue;
SMS functional inquiry message queue carries out after obtaining message to be sent encoding and SMS transmission, in AT command processing function solution Analysis is arrived after sending Success Flag, by call back function notice application, sends result;
Receive note: after application obtains new message notice, answer calling interface function in the logical write in SMS position to be read SMS Portion's message queue;
SMS functional inquiry message queue obtains after SMS to be read requires and sends reading order, is resolved at AT command processing function After SMS reads response, call SMS decoding functions, and decoded data are sent to application.
Multiple task operating system based on OBD detection monitoring device the most according to claim 7, it is characterised in that described GSM driven management task is additionally provided with GPRS function management, and described GPRS function management includes opening GPRS, closing GPRS, transmission Message and reception message, specific as follows:
Unlatching GPRS: application configuration IP, PORT, linking scheme, socket, linking status notification callback function, message informing return Function call is adjusted to open link interface function, in parameter read-in to the message queue of GPRS function management;
GPRS power function inquire about band link message time, carry out corresponding configuration, and attempt to link given server;
Gsm module has message notifying after link success or failure, after AT command processing function is resolved to this information, passes through chain Connect state notifying call back function notice application link result, when link occurs abnormal also by calling this function notice application chain Connect state change;
Closing the socket number that GPRS: applicative notifications is to be closed, GPRS management function is closed the link of corresponding socket, and is led to The linking status notification callback function notice application link state change of configuration before crossing;
Send message: at link opening, socket that application configuration is to be sent, data length, data pointer, calling interface Function is sent to message queue;GPRS functional inquiry, to after data, is transmitted;
Receive message: AT command processing function passes through to call link state notifying and returns after receiving the GPRS data that server issues Letter of transfer number gives application data-pushing.
CN201610500230.3A 2016-06-30 2016-06-30 Multiple task operating system framework based on OBD detection monitoring devices Active CN106204794B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610500230.3A CN106204794B (en) 2016-06-30 2016-06-30 Multiple task operating system framework based on OBD detection monitoring devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610500230.3A CN106204794B (en) 2016-06-30 2016-06-30 Multiple task operating system framework based on OBD detection monitoring devices

Publications (2)

Publication Number Publication Date
CN106204794A true CN106204794A (en) 2016-12-07
CN106204794B CN106204794B (en) 2018-05-04

Family

ID=57463467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610500230.3A Active CN106204794B (en) 2016-06-30 2016-06-30 Multiple task operating system framework based on OBD detection monitoring devices

Country Status (1)

Country Link
CN (1) CN106204794B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187883A1 (en) * 2002-03-29 2003-10-02 Panasas, Inc. Internally consistent file system image in distributed object-based data storage
CN101118694A (en) * 2007-05-18 2008-02-06 李克明 Vehicle intellectualized management system
US20080262670A1 (en) * 2006-05-22 2008-10-23 Mcclellan Scott System and method for monitoring vehicle parameters and driver behavior
CN201590900U (en) * 2009-11-06 2010-09-22 深圳市元征软件开发有限公司 Vehicle diagnostic system based on mobile platform
CN101929921A (en) * 2009-06-22 2010-12-29 钟桢 Vehicle failure detection method and device based on smart phone
CN103592935A (en) * 2013-11-08 2014-02-19 深圳市道通科技有限公司 Method, device and intelligent terminal for achieving vehicle diagnosis
CN103592933A (en) * 2013-11-07 2014-02-19 深圳市元征科技股份有限公司 Automobile diagnostic system and diagnostic method based on android system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030187883A1 (en) * 2002-03-29 2003-10-02 Panasas, Inc. Internally consistent file system image in distributed object-based data storage
US20080262670A1 (en) * 2006-05-22 2008-10-23 Mcclellan Scott System and method for monitoring vehicle parameters and driver behavior
CN101118694A (en) * 2007-05-18 2008-02-06 李克明 Vehicle intellectualized management system
CN101929921A (en) * 2009-06-22 2010-12-29 钟桢 Vehicle failure detection method and device based on smart phone
CN201590900U (en) * 2009-11-06 2010-09-22 深圳市元征软件开发有限公司 Vehicle diagnostic system based on mobile platform
CN103592933A (en) * 2013-11-07 2014-02-19 深圳市元征科技股份有限公司 Automobile diagnostic system and diagnostic method based on android system
CN103592935A (en) * 2013-11-08 2014-02-19 深圳市道通科技有限公司 Method, device and intelligent terminal for achieving vehicle diagnosis

Also Published As

Publication number Publication date
CN106204794B (en) 2018-05-04

Similar Documents

Publication Publication Date Title
CN103167500B (en) A kind of realize the method and system that call-in of mobile telephone set is uniformly processed
CN103716781B (en) It is a kind of to realize that mobile terminal intelligent card writes the method for card, apparatus and system
CN103118444B (en) Intelligent incoming call processing system
CN107888539A (en) Internet-of-things terminal access device and method
CN105898001A (en) Method and device for processing communication information and server
CN110930095A (en) Supply chain logistics monitoring and early warning method based on block chain prediction machine technology
CN108989179A (en) Message treatment method and device, storage medium
CN105050067B (en) Record communication
CN102130995B (en) Data transmission method for intelligent mobile phone information in Android system
CN100581144C (en) Mail filtering system and mail filtering method
CN111382967B (en) Logistics object management method, server and logistics object management equipment
CN106921752A (en) One kind reminds management method and system, Cloud Server
CN107404580A (en) A kind of method, storage medium and equipment for intercepting harassing call number and short message
CN106204794A (en) Multiple task operating system framework based on OBD detection monitoring device
CN102571549B (en) Method and device for anchoring IP multimedia subsystem (IMS) intelligently
CN107592618A (en) A kind of crosstalk reminding method, device and storage medium
CN101370298B (en) Method for improving call transfer reliability
CN106506863A (en) A kind of fast operating method of smart mobile phone and device
CN101232411A (en) Method of fault alarm short message managing for colony system
CN102546637A (en) Communication terminal and method thereof for realizing communication protocol
CN114416314A (en) Service arrangement method based on API gateway
CN106651066A (en) Data processing method and platform
CN103634488B (en) A kind of communicator of Multi-function mutual UNICOM news
CN100428230C (en) Providing modular telephony service
CN111915168A (en) MNO fusion management platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant