CN111538531A - AT instruction system, processing method and computer storage medium based on object-oriented - Google Patents

AT instruction system, processing method and computer storage medium based on object-oriented Download PDF

Info

Publication number
CN111538531A
CN111538531A CN202010351471.2A CN202010351471A CN111538531A CN 111538531 A CN111538531 A CN 111538531A CN 202010351471 A CN202010351471 A CN 202010351471A CN 111538531 A CN111538531 A CN 111538531A
Authority
CN
China
Prior art keywords
instruction
oriented
mcu
unit
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010351471.2A
Other languages
Chinese (zh)
Inventor
张新杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gaoxing Wulian Technology Co ltd
Original Assignee
Gaoxing Wulian 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 Gaoxing Wulian Technology Co ltd filed Critical Gaoxing Wulian Technology Co ltd
Priority to CN202010351471.2A priority Critical patent/CN111538531A/en
Publication of CN111538531A publication Critical patent/CN111538531A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/226Microinstruction function, e.g. input/output microinstruction; diagnostic microinstruction; microinstruction format

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an AT instruction system based on object-oriented, a processing method and a computer storage medium. The system comprises: the system comprises a Micro Control Unit (MCU) and a functional module, wherein the MCU sends an object-oriented AT instruction to the functional module, and the functional module executes the AT instruction and returns an execution result. By adopting the invention, the function module is taken as an object, the configuration data of the function module is taken as the data of the object, and the function provided by the function module is taken as the action of the object, so that the operation of the AT instruction is realized, the process logic is simple, the use is convenient, the requirement on the MCU is lower, and the use threshold of a client is reduced.

Description

AT instruction system, processing method and computer storage medium based on object-oriented
Technical Field
The invention relates to the technical field of communication, in particular to an AT instruction system based on object orientation.
Background
The AT command is a command for communication transmitted from a Terminal Equipment (TE) or a Data Terminal Equipment (DTE) to a Terminal Adapter (TA) or a Data Circuit Terminal Equipment AT (DCE).
The content of the AT instruction relates to the configuration, inquiry and execution of each function, provides rich interfaces for clients, and can support various flexible designs, but the premise of using the AT instruction is that the clients have certain professional knowledge; secondly, the client may only need a small part of AT commands to meet the needs, but the client has to query the meaning of the parameters in a large number of AT commands to ensure the correctness of the use. For example, a client may only want to send a packet of data to a server, and if the existing AT command system is used, the client must be familiar with status query commands, such as whether an AT channel is available, whether a SIM card is normal, whether a network is normal, how a data channel is established, how parameters are configured, how to send, how to confirm whether sending is successful, and the like, meanings of various parameters in the commands, and applicable scenarios of the parameters.
Therefore, there is a need for an AT command sending method that is easy and convenient to operate, and reduces the use threshold of the AT command.
Disclosure of Invention
In view of the above, the present invention provides an AT command system based on object-oriented, which reduces the use threshold and technical difficulty of the AT command.
The technical scheme adopted by the invention for solving the technical problems is as follows:
according to a first aspect of the present invention, there is provided an object-oriented AT instruction system, the system comprising: a micro control unit MCU and a function module, the micro control unit sends an object-oriented AT instruction to the function module, the function module executes the AT instruction and returns the execution result,
wherein the MCU further comprises:
an AT instruction set unit for generating an object-oriented AT instruction set;
the sending unit is used for calling the AT instruction in the object-oriented AT instruction set and sending the AT instruction to the functional module;
a receiving unit for receiving the execution result returned by the function module,
the functional module further includes:
the instruction acquisition and analysis unit is used for receiving and analyzing an object-oriented AT instruction sent by the MCU;
the configuration unit is used for storing configuration parameters of various networks and devices;
the processing unit is used for acquiring the analysis result of the analysis unit according to the instruction, calling the configuration parameters of the configuration unit as data and executing corresponding functions, namely actions;
and the return unit is used for returning the execution result of the processing unit to the MCU.
According to a second aspect of the present invention, there is provided an AT instruction processing method based on object-oriented, the method comprising:
the MCU sends an AT instruction facing to an object to the functional module;
the function module receives and analyzes an object-oriented AT instruction sent by the MCU;
the functional module acquires the result analyzed by the analysis unit according to the instruction, calls the configuration parameters as data, and executes the corresponding function, namely action;
and the functional module returns the execution result of the processing unit to the MCU.
According to a third aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the object-oriented AT instruction processing steps as described above.
According to the object-oriented AT instruction system and method, the function module is used as the object, the configuration data of the function module is used as the data of the object, the function provided by the function module is used as the action of the object, the AT instruction is operated, the process logic is simple, the use is convenient, the requirement on the MCU is low, and the use threshold of a client is reduced.
Drawings
Fig. 1 is a schematic structural diagram of an AT instruction system based on object-oriented architecture according to an embodiment of the present invention;
fig. 2 is a flowchart of an AT instruction processing method based on object-oriented according to a second embodiment of the present invention;
fig. 3 is a flowchart of a process of sending UDP data according to a third embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, if suffixes such as "module", "part", or "unit" used to indicate elements are used only for the convenience of description of the present invention, they have no specific meaning by themselves. Thus, "module", "component" or "unit" may be used mixedly.
The meaning of an object is a specific object, that is, an object that can be seen and touched in real life. In object-oriented programming, an object refers to a component of a computer system. In object-oriented programming, objects contain two meanings, one of which is data and the other of which is an action. The object is a combination of data and actions.
The invention refers to the thinking of object-oriented program design, and considers the function module as an object, the configuration data of the function module is data, and the function provided by the function module is action. The function module is externally displayed with a function aggregate, such as a function that the module supports network registration, a function of sending User Datagram Protocol (UDP) data, a function of sending Transmission Control Protocol (TCP) data, a function of shutdown and the like.
The following detailed description is given with reference to specific examples.
The embodiment of the invention provides an AT instruction system based on object orientation. Referring to fig. 1, the system includes:
the micro control unit 10 sends an object-oriented AT command to the functional module 11, and the functional module 11 executes the AT command and returns the execution result to the MCU 10.
Wherein the MCU10 further includes:
an AT instruction set unit 101 configured to generate an object-oriented AT instruction set;
the AT instruction set module generates an object-oriented AT instruction set, which comprises: network registration, query configuration, User Datagram Protocol (UDP) data sending, Transmission Control Protocol (TCP) data sending, startup and shutdown and other AT instructions.
A sending unit 102, configured to call an AT instruction in an object-oriented AT instruction set and send the AT instruction to the function module 11;
the receiving unit 103 is configured to receive an execution result returned by the functional module 11.
The object-oriented AT command will be described below by taking UDP data transmission as an example.
+SendUDPDataFunc
The AT command is used for sending a packet of UDP data
+SendUDPDataFunc=<ipaddr>,<port>,<data><CR><LF>
+SendUDPDataFuncERROR=<ErrorCode><CR><LF>
<CR><LF>ok<CR><LF>
Or
+SendUDPDataFuncSuc<CR><LF>
<CR><LF>ok<CR><LF>
Or
<CR><LF>ERROR<CR><LF>
Description of the parameters
< ipaddr > character string
IP address, automatically identified by the bottom layer as being IPv4 or IPv6
< port > integer
Port number
< data > character string
Content of transmission
+SendUDPDataFuncERROR
Failed transmission
< Errorcode > integer
Error code
+SendUDPDataFuncSuc
Success of transmission
For example: AT + SendadPDataFunc 99.99.99.99,7000 just ATestData
+ SendUDPDataFuncSuc// indicates successful transmission
OK
+ SendadPDataFuncERROR: 666// represents transmission failure, 666 represents UDP connection establishment failure
OK
Other AT command principles are similar and are not described in detail here.
The functional module 11 further includes:
the instruction acquisition and analysis unit 111 is used for receiving and analyzing an object-oriented AT instruction sent by the MCU 10;
a configuration unit 112, configured to store configuration parameters of various networks and devices;
the parameters stored by the configuration unit 112 include two parts, one part is a default configuration supported by the module, such as a network access technology APN, a power saving mode PSM, an extended discontinuous reception eDRX configuration parameter, and the like; the other part is parameters which need to be configured for the user to process the data traffic, such as the IP address, port number, etc. of the server.
A processing unit 113, configured to obtain a result analyzed by the analyzing unit 111 according to the instruction, call the configuration parameter of the configuration unit 112 as data, and execute a corresponding function, that is, an action;
a return unit 114 for returning the execution result of the processing unit 113 to the MCU 10.
The return unit 114 returns the execution result to the MCU10 as whether the function was successfully executed.
Preferably, the MCU further comprises: and the display unit is used for displaying the execution result of the AT instruction.
The object-oriented AT command system provided in this embodiment implements an operation on an AT command by using the function module as an object, using configuration data of the function module as data of the object, and using a function provided by the function module as an action of the object, and has the advantages of simple process logic, convenient use, low requirement on an MCU, and reduced use threshold of a client.
Referring to fig. 2, a second embodiment of the present invention provides an AT instruction processing method based on object-oriented. The method comprises the following steps:
step S201, the MCU sends an object-oriented AT instruction to the functional module;
the object-oriented AT-based instructions include: network registration, query configuration, User Datagram Protocol (UDP) data sending, Transmission Control Protocol (TCP) data sending, startup and shutdown and the like.
Step S202, a functional module receives and analyzes an object-oriented AT instruction sent by an MCU;
step S203, the functional module acquires the result analyzed by the analysis unit according to the instruction, calls the configuration parameters as data, and executes the corresponding function, namely action;
the configuration parameters include: a network access technology APN, a power saving mode PSM, an extended discontinuous reception eDRX configuration parameter, an IP address of a server, a port number and the like.
And step S204, the functional module returns the execution result of the processing unit to the MCU.
And the execution result returned to the MCU is whether the function is executed successfully or not.
The following illustrates an object-oriented AT command transmission procedure by transmitting UDP data.
Please refer to fig. 3, which is a flowchart illustrating a process of sending UDP data according to a third embodiment of the present invention. The process of sending the UDP data comprises the following steps:
step S301, the MCU sends an AT instruction for sending UDP data to the functional module;
step S302, judging whether the basic functions of the functional module are normal, and if so, performing step S303;
and the functional module returns the judgment result of whether the function module is normal to the MCU.
Step S303, performing a network registration function;
the function module performs a network registration function.
Step S304, judging whether the registration is successful, and if so, performing step S305;
and the functional module returns the result of whether the registration is successful to the MCU.
Step S305, performing a UDP data transmission function;
the function module performs a UDP data transmission function.
Step S306, judging whether the transmission is successful, and if the transmission is successful, performing step S307;
and step S307, ending the process.
And the functional module returns the result of whether the transmission is successful to the MCU. If it fails, a failure code is returned.
In the process of sending the AT command in this embodiment, it can be seen that only one AT command is needed to send UDP data, and three logic judgments are required, compared with the process-oriented sending method in the prior art, the logic is simple, the number of AT commands is small, and the requirement on the MCU is low, so that the use cost can be saved for the client. Also, the object-oriented AT command scheme of the present invention is more versatile and simple to use as the more complex the traffic involved.
A fourth embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the steps described in the second embodiment or the third embodiment.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. An object-oriented AT command system, the system comprising: a micro control unit MCU and a function module, wherein the MCU sends an object-oriented AT instruction to the function module, the function module executes the AT instruction and returns the execution result,
wherein the MCU further comprises:
an AT instruction set unit for generating an object-oriented AT instruction set;
the sending unit is used for calling the AT instruction in the object-oriented AT instruction set and sending the AT instruction to the functional module;
a receiving unit for receiving the execution result returned by the function module,
the functional module further includes:
the instruction acquisition and analysis unit is used for receiving and analyzing an object-oriented AT instruction sent by the MCU;
the configuration unit is used for storing configuration parameters of various networks and devices;
the processing unit is used for acquiring the analysis result of the analysis unit according to the instruction, calling the configuration parameters of the configuration unit as data and executing corresponding functions, namely actions;
and the return unit is used for returning the execution result of the processing unit to the MCU.
2. The object-oriented AT-based instruction system of claim 1, wherein the configuration unit stores parameters including: a network access technology APN, a power saving mode PSM, an extended discontinuous reception eDRX configuration parameter, an IP address of a server, a port number and the like.
3. The object-oriented AT based instruction set system of claim 1, wherein the object-oriented AT instruction set module generates the object-oriented AT instruction set comprising: network registration, query configuration, User Datagram Protocol (UDP) data sending, Transmission Control Protocol (TCP) data sending and the like.
4. The object-oriented AT instruction system according to claim 1, wherein the return unit returns to the MCU whether the execution result is a successful function execution.
5. The object-oriented AT-based instruction system of claim 1, wherein the MCU further comprises:
and the display unit is used for displaying the execution result of the AT instruction.
6. An AT instruction processing method based on object-oriented, the method comprising:
the MCU sends an AT instruction facing to an object to the functional module;
the function module receives and analyzes an object-oriented AT instruction sent by the MCU;
the functional module acquires the result analyzed by the analysis unit according to the instruction, calls the configuration parameters as data, and executes the corresponding function, namely action;
and the functional module returns the execution result of the processing unit to the MCU.
7. The object-oriented AT instruction processing method of claim 6, wherein the configuration parameters include: a network access technology APN, a power saving mode PSM, an extended discontinuous reception eDRX configuration parameter, an IP address of a server, a port number and the like.
8. The object-oriented AT instruction processing method according to claim 6, wherein the object-oriented AT instruction set comprises: network registration, query configuration, User Datagram Protocol (UDP) data sending, Transmission Control Protocol (TCP) data sending and the like.
9. The AT instruction processing method based on object oriented according to claim 6, wherein the execution result returned to the MCU is whether the function is successfully executed.
10. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, carries out the steps of any of the claims 6 to 9.
CN202010351471.2A 2020-04-28 2020-04-28 AT instruction system, processing method and computer storage medium based on object-oriented Pending CN111538531A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010351471.2A CN111538531A (en) 2020-04-28 2020-04-28 AT instruction system, processing method and computer storage medium based on object-oriented

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010351471.2A CN111538531A (en) 2020-04-28 2020-04-28 AT instruction system, processing method and computer storage medium based on object-oriented

Publications (1)

Publication Number Publication Date
CN111538531A true CN111538531A (en) 2020-08-14

Family

ID=71967625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010351471.2A Pending CN111538531A (en) 2020-04-28 2020-04-28 AT instruction system, processing method and computer storage medium based on object-oriented

Country Status (1)

Country Link
CN (1) CN111538531A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091525A1 (en) * 2003-10-24 2005-04-28 Snover Jeffrey P. Mechanism for providing extended functionality to command line instructions
CN101505543A (en) * 2009-03-11 2009-08-12 中兴通讯股份有限公司 Method and system for parallel processing AT command
CN102023862A (en) * 2010-12-13 2011-04-20 中兴通讯股份有限公司 Mobile terminal control method and system
CN102279744A (en) * 2011-08-24 2011-12-14 北京星网锐捷网络技术有限公司 System and method for processing command line
CN103136036A (en) * 2011-12-03 2013-06-05 鸿富锦精密工业(深圳)有限公司 System and method for function module order management
CN109240772A (en) * 2018-08-07 2019-01-18 武汉普利商用机器有限公司 The operation system and service implementation method that identity-based certificate is read
CN110351715A (en) * 2019-07-15 2019-10-18 西安中兴物联软件有限公司 AT command processing method, terminal adapter and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050091525A1 (en) * 2003-10-24 2005-04-28 Snover Jeffrey P. Mechanism for providing extended functionality to command line instructions
CN101505543A (en) * 2009-03-11 2009-08-12 中兴通讯股份有限公司 Method and system for parallel processing AT command
CN102023862A (en) * 2010-12-13 2011-04-20 中兴通讯股份有限公司 Mobile terminal control method and system
CN102279744A (en) * 2011-08-24 2011-12-14 北京星网锐捷网络技术有限公司 System and method for processing command line
CN103136036A (en) * 2011-12-03 2013-06-05 鸿富锦精密工业(深圳)有限公司 System and method for function module order management
CN109240772A (en) * 2018-08-07 2019-01-18 武汉普利商用机器有限公司 The operation system and service implementation method that identity-based certificate is read
CN110351715A (en) * 2019-07-15 2019-10-18 西安中兴物联软件有限公司 AT command processing method, terminal adapter and computer readable storage medium

Similar Documents

Publication Publication Date Title
US20200213403A1 (en) Information transmission method and device
US6477576B2 (en) Methods, systems and computer program products for the automated discovery of a services menu
CN110032512B (en) Debugging method of small program, related equipment and terminal
CN113132185B (en) Equipment distribution network binding method, system, mobile terminal and storage medium
CN112423238B (en) Electronic device, control terminal, storage medium, and device connection method
CN107124483A (en) Domain name analytic method and server
US20140038518A1 (en) Communication Device
CN111147314A (en) Switch upgrading method, device and storage medium
CN105245418A (en) Method, device and system for controlling smart home devices
US9164816B2 (en) System and method for exchanging information in a multimedia terminal
CN112954717A (en) Household appliance network distribution method and device based on H5 page
CN107733974A (en) A kind of upgrade method of mobile terminal
US8456671B2 (en) Communication system, information storage device, management device, and terminal device
EP2854027A1 (en) Method for downloading application program, user equipment and application server
US7593349B2 (en) Method and arrangement for configuration of a device in a data network
WO2014183439A1 (en) Method, apparatus and system for switching function mode
CN112333062A (en) Control method and control device for household equipment and computer readable storage medium
CN111538531A (en) AT instruction system, processing method and computer storage medium based on object-oriented
US8453154B2 (en) System and method for managing memory resource(s) of a wireless handheld computing device
CN108833135B (en) Mesh networking management method, management equipment and extender
CN111756817A (en) Device discovery method, device and computer-readable storage medium
US10116739B2 (en) Method for enabling point-to-point transmission and network connecting device
CN108055660B (en) Method for transmitting data in network channel and Internet of things terminal
WO2023070834A1 (en) Method and system for communication between applet and webpage, and related device
US11804986B2 (en) Method for the remote management of a device connected to a residential gateway

Legal Events

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

Application publication date: 20200814