CN113438565B - Gas meter handheld terminal and operation method thereof - Google Patents
Gas meter handheld terminal and operation method thereof Download PDFInfo
- Publication number
- CN113438565B CN113438565B CN202110711702.0A CN202110711702A CN113438565B CN 113438565 B CN113438565 B CN 113438565B CN 202110711702 A CN202110711702 A CN 202110711702A CN 113438565 B CN113438565 B CN 113438565B
- Authority
- CN
- China
- Prior art keywords
- configuration information
- module
- response data
- information
- key
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q9/00—Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q2209/00—Arrangements in telecontrol or telemetry systems
- H04Q2209/60—Arrangements in telecontrol or telemetry systems for transmitting utility meters data, i.e. transmission of data from the reader of the utility meter
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computer Security & Cryptography (AREA)
- Signal Processing (AREA)
- Arrangements For Transmission Of Measured Signals (AREA)
- Measuring Volume Flow (AREA)
Abstract
The invention provides a handheld terminal of a gas meter and an operation method thereof, wherein the handheld terminal of the gas meter comprises a configuration module, a configuration information storage module, an analysis output module and a verification and extraction module, wherein the configuration module is used for receiving key configuration information sent by an upper computer and sending the key configuration information to the configuration information storage module; the configuration information storage module is connected with the configuration module and used for storing and reading configuration information; the analysis output module is used for reading the configuration information of the keys from the configuration information storage module, analyzing the configuration information of the keys and sending corresponding instructions to the gas meter according to the configuration information of the keys; the verification and extraction module is used for receiving a response data packet sent by the gas meter, reading key configuration information in the storage configuration information module, and verifying the response data packet according to the key configuration information. The handheld terminal can control gas meters with different protocols.
Description
Technical Field
The invention relates to the technical field of gas meter control, in particular to a gas meter handheld terminal and an operation method thereof.
Background
Along with the gas technology rapid development, family's family has almost all used the gas, along with the continuous development of gas involucra table, the demand of portable handheld terminal is growing day by day, because of different customers, the agreement that its gas table used is different, optional scheme when developing handheld terminal code has: firstly, the method comprises the following steps: developing corresponding codes according to different clients; secondly, the method comprises the following steps: all client protocols are integrated into one piece of code.
However, both the first and second solutions have their own drawbacks, and the first solution has a problem in that it requires development and maintenance of multiple copies of code; the second scheme has only one code, but it integrates the protocols of all clients, and has the problem of being bloated and complicated in code.
Therefore, in order to solve the problems of different requirements corresponding to different customers and incompatible protocols, it is necessary to provide a gas meter handheld terminal adaptable to multiple protocols and an operation method thereof.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a gas meter handheld terminal which can adapt to various protocols and can control different protocols and an operation method thereof.
In order to solve the problems, the technical scheme of the invention is as follows:
a handheld terminal of a gas meter comprises a configuration module, a configuration information storage module, an analysis output module and a verification and extraction module, wherein the configuration module is used for receiving key configuration information sent by an upper computer and sending the key configuration information to the configuration information storage module; the configuration information storage module is connected with the configuration module and used for storing and reading configuration information; the analysis output module is used for reading the configuration information of the keys from the configuration information storage module, analyzing the configuration information of the keys and sending corresponding instructions to the gas meter according to the configuration information of the keys; the verification and extraction module is used for receiving a response data packet sent by the gas meter, reading key configuration information in the storage configuration information module, and verifying the response data packet according to the key configuration information.
Optionally, the configuration module is configured to receive protocol data about key configuration information issued by the upper computer, analyze the protocol data information, and convert the analyzed data information into key configuration information.
Optionally, the protocol data of the key configuration information includes: the method comprises the steps of obtaining a total length of an instruction data frame, content of the instruction data frame, the total length of a response data frame, a starting byte index of the verification of the response data frame, a byte length which needs to be verified of the response data frame, a starting byte index of a check bit of the response data frame, the number of bytes occupied by the check bit of the response data frame, a starting byte index of effective data in the response data frame and a verification mode of the response data frame.
Optionally, the verification and extraction module is further configured to extract valid information in the response packet and feed back the valid information to a module that needs the information.
Further, the invention also provides an operation method of the handheld terminal of the gas meter, which comprises the following steps:
the handheld terminal receives key configuration information sent by an upper computer;
storing the key configuration information into a configuration information storage module;
reading key configuration information in the storage configuration information module, analyzing the key configuration information, and sending a corresponding instruction to the gas meter according to the key configuration information;
and receiving a response data packet sent by the gas meter, reading key configuration information in the storage configuration information module, and verifying the response data packet according to the key configuration information.
Optionally, the step of receiving, by the handheld terminal, the key configuration information sent by the upper computer specifically includes: the handheld terminal receives protocol data about key configuration information sent by an upper computer, analyzes the protocol data information, and converts the analyzed data information into the key configuration information.
Optionally, the protocol data of the key configuration information includes: the method comprises the steps of obtaining a total length of an instruction data frame, content of the instruction data frame, the total length of a response data frame, a starting byte index of verification of the response data frame, a byte length which needs to be verified of the response data frame, a starting byte index of a check bit of the response data frame, the number of bytes occupied by the check bit of the response data frame, a starting byte index of effective data in the response data frame and a verification mode of the response data frame.
Optionally, the step of receiving a response data packet sent by the gas meter, reading key configuration information in the storage configuration information module, and verifying the response data packet according to the key configuration information specifically includes: the handheld terminal needs to know the total length of the response data packet, where to start verification, the verification length and the verification mode, and verifies the received data packet through the configuration information of the key.
Optionally, the method further comprises the steps of: extracts the valid information in the reply packet and feeds back the valid information to the module that needs this information.
Optionally, the step of extracting valid information in the response packet and feeding back the valid information to the module requiring the information specifically includes: extracting the success or failure flag from the response packet requires knowledge of the following: the information reflecting success and failure starts from which field, the length is what value represents success, which value represents failure, and effective information can be fed back to the display screen module after the effective information is extracted.
Compared with the prior art, the handheld terminal of the gas meter can be communicated with the gas meters with different protocols without protocols, so that the problems of different requirements corresponding to different customers and incompatibility of the protocols are solved, and great convenience is brought to development and maintenance of the handheld terminal of the gas meter.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments with reference to the following drawings:
fig. 1 is a block diagram of a gas meter handheld terminal system according to an embodiment of the present invention;
fig. 2 is a block diagram of a gas meter handheld terminal according to an embodiment of the present invention;
fig. 3 is a flow chart of an operation method of the gas meter handheld terminal according to the embodiment of the present invention;
fig. 4 is another flow chart of the operation method of the gas meter handheld terminal according to the embodiment of the present invention.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications can be made by persons skilled in the art without departing from the concept of the invention. All falling within the scope of the present invention.
Fig. 1 is a block diagram of a gas meter handheld terminal system according to an embodiment of the present invention, and as shown in fig. 1, the gas meter handheld terminal system includes a handheld terminal 1, a gas meter 2 communicating with the handheld terminal 1, and an upper computer 3.
Specifically, in order to solve the problems of different requirements corresponding to different clients and incompatible protocols, and to adapt to various different gas meters 2, the handheld terminal 1 needs to have a function of key function configuration, and corresponding to different keys, the function can send a complete data frame of a corresponding instruction to the handheld terminal 1 through the upper computer 3, and when the corresponding key is used, the handheld terminal 1 sends out the complete data frame configured by the upper computer 3.
The handheld terminal 1 can send an instruction to the gas meter 2 and also can receive a response data packet sent by the gas meter 2, specifically, the handheld terminal 1 can be separated from protocols to communicate with different gas meters 2, and for response data packets sent by the gas meters 2 with different protocols, the process of verifying whether the response data packet is valid and extracting valid information by the handheld terminal 1 is as follows:
firstly, verifying whether the response data packet is valid: the handheld terminal 1 only needs to know the total length of the response data packet, where to start the verification, the verification length and the verification mode, and the above information points are the characteristics of all protocols, so that the received data packet can be verified only by configuring the key information of the handheld terminal through the upper computer.
Secondly, extracting effective information from the response data packet: the handheld terminal 1 is used for setting the gas meter 2, and information about whether response setting is successful or not is inevitably obtained in setting action, so that only a success or failure flag is extracted from a response data packet, and only the following information is known: the information which reflects success and failure begins from which field, the length is what, which value represents success, which value represents failure, and after the effective information is extracted, the effective information can be fed back to the module which needs the information, for example, a module which can see visual information for people, such as a display screen module.
Fig. 2 is a block diagram of a gas meter handheld terminal according to an embodiment of the present invention, and as shown in fig. 2, the gas meter handheld terminal 1 of the present invention includes a configuration module 11, a configuration information storage module 12, an analysis output module 13, and a verification and extraction module 14.
The configuration module 11 is configured to perform interactive communication with the upper computer 3, and is configured to receive protocol data about key configuration information sent by the upper computer 3, analyze the protocol data information, convert the analyzed data information into key configuration information, and send the key configuration information to the configuration information storage module 12.
The protocol data of the key configuration information mainly comprises: the method comprises the following steps of total length of an instruction data frame, content of the instruction data frame, total length of a response data frame, starting byte index of verification of the response data frame, byte length needing to be verified of the response data frame, starting byte index of a verification bit of the response data frame, byte number occupied by the verification bit of the response data frame, effective data starting byte index in the response data frame and verification mode of the response data frame.
The configuration information storage module 12 is connected to the configuration module 11, and is configured to implement functions of storing and reading configuration information.
When a certain key of the handheld terminal 1 is pressed, the analysis output module 13 reads the configuration information of the key from the storage configuration information module 12, analyzes the configuration information of the key, and sends a corresponding instruction to the gas meter 2 according to the configuration information of the key.
After the handheld terminal 1 sends an instruction to the gas meter 2, the gas meter 2 will issue a response data packet to the verification and extraction module 14, the verification and extraction module 14 receives the response data packet, reads the key configuration information in the storage configuration information module 12, verifies the response data packet according to the key configuration information, extracts effective information and feeds the effective information back to a module needing the information, such as a display screen module and other modules capable of seeing visual information to people.
Further, fig. 3 is a flow chart of an operation method of the handheld terminal for a gas meter according to the embodiment of the present invention, and as shown in fig. 3, the operation method of the handheld terminal for a gas meter includes the following steps:
s1: the handheld terminal receives key configuration information issued by an upper computer;
specifically, the handheld terminal receives protocol data about key configuration information sent by an upper computer, analyzes the protocol data information, and converts the analyzed data information into the key configuration information.
The protocol data of the key configuration information mainly comprises: the method comprises the steps of obtaining a total length of an instruction data frame, content of the instruction data frame, the total length of a response data frame, a starting byte index of the verification of the response data frame, a byte length which needs to be verified of the response data frame, a starting byte index of a check bit of the response data frame, the number of bytes occupied by the check bit of the response data frame, a valid data starting byte index in the response data frame and a verification mode of the response data frame.
S2: storing the key configuration information into a configuration information storage module;
s3: reading the key configuration information in the storage configuration information module, analyzing the key configuration information, and sending a corresponding instruction to the gas meter according to the key configuration information;
s4: and receiving a response data packet sent by the gas meter, reading key configuration information in the storage configuration information module, and verifying the response data packet according to the key configuration information.
Specifically, the process of checking the response packet is as follows: the handheld terminal only needs to know the total length of the response data packet, where to start the verification, the verification length and the verification mode, and the information points are the characteristics of all protocols, so that the received data packet can be verified only by configuring the key information of the handheld terminal through the upper computer.
In an alternative embodiment, as shown in fig. 4, the method further comprises the steps of:
s5: extracting the valid information in the response data packet and feeding back the valid information to the module requiring this information.
Specifically, the process of extracting the valid information in the response packet and feeding back the valid information to the module needing the information is as follows: extracting success and failure marks from the response data packet as long as the following information is known: the information reflecting success and failure starts from which field, the length is what, which represents success and which represents failure, and after effective information is extracted, the effective information can be fed back to a module needing the information, such as a display screen module and other modules which can see visual information for people.
Compared with the prior art, the handheld terminal of the gas meter can be communicated with the gas meters with different protocols without protocols, so that the problems of different requirements corresponding to different customers and incompatibility of the protocols are solved, and great convenience is brought to development and maintenance of the handheld terminal of the gas meter.
The foregoing description of specific embodiments of the present invention has been presented. It is to be understood that the present invention is not limited to the specific embodiments described above, and that various changes or modifications may be made by one skilled in the art within the scope of the appended claims without departing from the spirit of the invention. The embodiments and features of the embodiments of the present application may be combined with each other arbitrarily without conflict.
Claims (8)
1. A handheld terminal of a gas meter is characterized by comprising a configuration module, a storage configuration information module, an analysis output module and a verification and extraction module, wherein the configuration module is used for receiving protocol data about key configuration information issued by an upper computer, analyzing the protocol data information, converting the analyzed data information into the key configuration information and sending the key configuration information to the storage configuration information module; the configuration information storage module is connected with the configuration module and used for storing and reading configuration information; when a certain key of the handheld terminal is pressed down, the analysis output module is used for reading the configuration information of the key from the storage configuration information module, analyzing the configuration information of the key and sending a corresponding instruction to the gas meter according to the configuration information of the key; the verification and extraction module is used for receiving a response data packet sent by the gas meter, reading key configuration information in the storage configuration information module, and verifying the response data packet according to the key configuration information.
2. The handheld terminal of gas meter according to claim 1, wherein the protocol data of the key configuration information includes: the method comprises the steps of obtaining a total length of an instruction data frame, content of the instruction data frame, the total length of a response data frame, a starting byte index of the verification of the response data frame, a byte length which needs to be verified of the response data frame, a starting byte index of a check bit of the response data frame, the number of bytes occupied by the check bit of the response data frame, a starting byte index of effective data in the response data frame and a verification mode of the response data frame.
3. The handheld terminal of gas meter of claim 1, characterized in that: the verification and extraction module is also used for extracting effective information in the response data packet and feeding the effective information back to the module needing the information.
4. An operation method of a handheld terminal of a gas meter is characterized by comprising the following steps:
the method for receiving the key configuration information issued by the upper computer through the handheld terminal specifically comprises the following steps: the handheld terminal receives protocol data about key configuration information sent by an upper computer, analyzes the protocol data information, and converts the analyzed data information into the key configuration information;
storing the key configuration information into a configuration information storage module;
when a certain key of the handheld terminal is pressed down, reading key configuration information in the storage configuration information module, analyzing the key configuration information, and sending a corresponding instruction to the gas meter according to the key configuration information;
and receiving a response data packet sent by the gas meter, reading key configuration information in the storage configuration information module, and verifying the response data packet according to the key configuration information.
5. The operation method of the handheld terminal of the gas meter according to claim 4, wherein the protocol data of the key configuration information includes: the method comprises the steps of obtaining a total length of an instruction data frame, content of the instruction data frame, the total length of a response data frame, a starting byte index of the verification of the response data frame, a byte length which needs to be verified of the response data frame, a starting byte index of a check bit of the response data frame, the number of bytes occupied by the check bit of the response data frame, a starting byte index of effective data in the response data frame and a verification mode of the response data frame.
6. The operation method of the handheld terminal of the gas meter according to claim 4, wherein the step of receiving the response data packet sent by the gas meter, reading the key configuration information in the storage configuration information module, and checking the response data packet according to the key configuration information specifically comprises: the handheld terminal needs to know the total length of the response data packet, where to start verification, the verification length and the verification mode, and verifies the received data packet through the configuration information of the key.
7. The method for operating the handheld terminal of the gas meter according to claim 4, wherein the method further comprises the steps of: extracting the valid information in the response data packet and feeding back the valid information to the module requiring this information.
8. The operation method of the handheld terminal for the gas meter according to claim 7, wherein the step of extracting the valid information in the response data packet and feeding back the valid information to the module needing the information specifically comprises: extracting the success or failure flag from the response packet requires knowledge of the following: and the information reflecting success and failure starts from which field, the length is the number, which value represents success and which value represents failure, and effective information is fed back to the display screen module after the effective information is extracted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110711702.0A CN113438565B (en) | 2021-06-25 | 2021-06-25 | Gas meter handheld terminal and operation method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110711702.0A CN113438565B (en) | 2021-06-25 | 2021-06-25 | Gas meter handheld terminal and operation method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113438565A CN113438565A (en) | 2021-09-24 |
CN113438565B true CN113438565B (en) | 2023-04-07 |
Family
ID=77755289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110711702.0A Active CN113438565B (en) | 2021-06-25 | 2021-06-25 | Gas meter handheld terminal and operation method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113438565B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106603581A (en) * | 2017-02-22 | 2017-04-26 | 欣旺达电子股份有限公司 | A test method and device capable of supporting a plurality of communication protocols |
WO2020075894A1 (en) * | 2018-10-12 | 2020-04-16 | 주식회사 시코드 | Ptt communication system with improved protocol compatibility and ptt communication method using same |
CN111459853A (en) * | 2020-04-22 | 2020-07-28 | 深圳市椰壳信息科技有限公司 | Relay equipment control system and method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7375673B2 (en) * | 2005-01-13 | 2008-05-20 | Netgear, Inc. | System and method for universal remote control configuration |
CN109936553A (en) * | 2017-12-18 | 2019-06-25 | 宁波中科集成电路设计中心有限公司 | A kind of serial communication protocol automatic adaptation middleware |
CN110032535B (en) * | 2018-12-28 | 2021-06-29 | 北京润科通用技术有限公司 | Serial port data analysis method and device |
CN211015131U (en) * | 2019-12-23 | 2020-07-14 | 泉州立亿德智能科技有限公司 | Handheld operation device for numerical control system and numerical control equipment |
-
2021
- 2021-06-25 CN CN202110711702.0A patent/CN113438565B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106603581A (en) * | 2017-02-22 | 2017-04-26 | 欣旺达电子股份有限公司 | A test method and device capable of supporting a plurality of communication protocols |
WO2020075894A1 (en) * | 2018-10-12 | 2020-04-16 | 주식회사 시코드 | Ptt communication system with improved protocol compatibility and ptt communication method using same |
CN111459853A (en) * | 2020-04-22 | 2020-07-28 | 深圳市椰壳信息科技有限公司 | Relay equipment control system and method |
Non-Patent Citations (1)
Title |
---|
汪顺舟 ; 赵怀林 ; 郝旭耀 ; 李超 ; .智能管家机器人家电控制系统设计.上海应用技术学院学报(自然科学版).2016,(02),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN113438565A (en) | 2021-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9092705B2 (en) | Method of tele-transmitting information of a medical device and a medical device thereof | |
US9519767B2 (en) | Apparatus and method for authenticating a combination code using a quick response code | |
CN102497265B (en) | Pulse light signal identification method and apparatus thereof | |
CN102340538B (en) | Handheld device implementation method for data management of GYK (Railcar Running Control Device) | |
CN103078892B (en) | The method of content of short message Intelligent Recognition, client, server and system | |
CN108052474B (en) | Data format conversion method, device, equipment and computer readable storage medium | |
CN102404306B (en) | Protocol configuration method and device | |
CN103188128A (en) | Preview method of mail attachment and mail system | |
CN103577320A (en) | Testing method and system of remote terminals | |
CN111752579A (en) | Bluetooth terminal upgrading method and device, storage medium and electronic equipment | |
US7835728B2 (en) | Voice processing unit and system, and voice processing method | |
CN113438565B (en) | Gas meter handheld terminal and operation method thereof | |
CN103997437A (en) | Cloud server registration function testing method | |
CN112181147B (en) | Small program-based wearable device interaction method and device and electronic device | |
CN105653216A (en) | Printing control system and method | |
EP1566068B1 (en) | Loading of an application that is to be deployed in a terminal and a chip card | |
CN102662801B (en) | By the method for JICQ recovery routine, client and system | |
CN109586979B (en) | Message transmission method and device | |
JP2011024179A (en) | Method and apparatus for decoding hangul or japanese words in http packet and method for analyzing hangul or japanese web contents using the same | |
CN105207777A (en) | Network information verification method and apparatus | |
CN101110979B (en) | Method, device and system for message transmission | |
CN114531372A (en) | Data acquisition and monitoring system | |
CN211630177U (en) | Equipment data acquisition system | |
CN110071921B (en) | Internet of things platform access method, device, computer readable storage medium and system | |
CN101272424A (en) | Method for implementing telecommunication incremental value service identification policy control system |
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 |