CN103577166A - ONT management and control interface (OMCI) coding method and device thereof - Google Patents
ONT management and control interface (OMCI) coding method and device thereof Download PDFInfo
- Publication number
- CN103577166A CN103577166A CN201210260917.6A CN201210260917A CN103577166A CN 103577166 A CN103577166 A CN 103577166A CN 201210260917 A CN201210260917 A CN 201210260917A CN 103577166 A CN103577166 A CN 103577166A
- Authority
- CN
- China
- Prior art keywords
- script
- omci
- property parameters
- coding method
- parameters data
- 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
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Communication Control (AREA)
Abstract
The invention discloses an ONT management and control interface (OMCI) coding method and a device thereof. The OMCI coding method comprises a first step of obtaining all attribute parameter data from a management information base (MIB), a second step of dividing the attribute parameter data into groups and storing the attribute parameter data to a document, a third step of running a first script, enabling the first script to detect a value of every attribute parameter datum in the document, selecting function codes corresponding to the values and the attribute parameter data from a function code library, and combining the function codes with the attribute parameter data to generate an output function. According to the OMCI coding method and the device, input of duplicated codes in manual coding is avoided through the script, artificial missing is also avoided, and accordingly communication protocol coding efficiency and maintenance are improved.
Description
Technical field
The present invention relates to a kind of OMCI(ONT Management and Control Interface, ONT management and control interface) coding method and device thereof, particularly relate to a kind of ONT(Optical network terminal, optical network device) and OLT(Optical Line Terminal, OMCI coding method and device thereof optical line terminal).
Background technology
OMCI is GPON(Gigabit-Capable PON, 1000 M passive fiber optic network) a kind of configuration transmission channel defining in standard, by set up proprietary OMCI message between OLT and ONT, for the ONT ability of obtaining of standard is provided, and the method that it is managed and is controlled.Thereby the coding of OMCI part is considerable link for whole communication system, code framework and efficiency have directly affected the Performance and quality of communication system.In traditional OMCI design, conventionally be all according to the standard agreement of communication system manual carry out code Design and realization, be that traditional code Design and generation is by analytic function demand and operand, then one by one complete corresponding power function interface, this process needs manual realizing conventionally.
But the standard of GPON G.988 in the MIB(management information bank of standard) quantity larger, and in MIB, there are a plurality of tables, each table has a plurality of parameters, in table, there are a plurality of attributes simultaneously, each attribute also has its corresponding parameter, and these parameters have determined operation that table and parameter may be carried out and data length size etc.; If by conventional coding implementation, not only have a large amount of codes to need Design and implementation, and can have the code of a large amount of repetitions, the while is also likely missed or neglects some MIB property parameters and causes code efficiency and accuracy rate to be affected.
Summary of the invention
The technical problem to be solved in the present invention is in order to overcome in the OMCI coding of prior art because the code efficiency that adopts hand-coding to cause is low and the low defect of accuracy rate, a kind of OMCI coding method and device thereof are provided, by script, improve communication protocol code efficiency and maintainability.
The present invention solves above-mentioned technical matters by following technical proposals:
The invention provides a kind of OMCI coding method, be characterized in that described OMCI coding method comprises step:
S
1, from a MIB, obtain all property parameters data;
S
2, by described property parameters packet and be stored to a document;
S
3, move one first script, described the first script detects the numerical value of each property parameters data in described document, and choose the function code corresponding to described numerical value and described property parameters data from a function code storehouse, and by described function code and described property parameters data combination producing one output function.
Wherein MIB is management information bank in GPON, and management information bank is a database, and it has represented that a set of of certain equipment or service can management object.Every the ONT being managed by ONLT must have a MIB, it described on this ONT can management object.All MIB must define by accurate institutional framework.So MIB described in the present invention has comprised all manageable property parameters data of ONT.
And by all properties supplemental characteristic grouping and classifying obtaining from MIB, be then stored in same document in the present invention.
Described output function be in OMCI communication to carrying out the function that object carries out concrete operations in ONT, and described function specific definition in existing OMCI communication and ONT end, so be no longer described in detail herein.
The function code of the library storage of function code described in the present invention and described property parameters data have formed final output function jointly.And because content and the kind of the operation of output function determined by described property parameters data and numerical value thereof, so at described property parameters data and numerical value thereof definite in the situation that, content and the kind of the operation of output function are also determined, so now need to find, can realize described output function corresponding to the content of operation and the function code of kind of output function.Therefore between described property parameters data and numerical value function code thereof, there is corresponding relation.
In addition topmost feature of the present invention is automatically moved the coupling of property parameters data and function code and generate output function to traversal by a script.So avoided the operation of a large amount of duplicated codes that classic method causes.
Preferably, step S
1for:
Move one second script, described the second script obtains all property parameters data from described MIB.
In the present invention, can again utilize equally the function of the automatic real getattr supplemental characteristic of script.
Preferably, step S
2for:
Described the second script is also by described property parameters packet and be stored to described document.
The second script described in the present invention is automatic operating procedure S further
2in step, thereby further realized, in OMCI process, automatically generate output function.
Preferably, described step S
2for:
Described property parameters data are divided into groups according to operation species and are stored to described document.
The classification that wherein operation species described in the present invention is output function to the form of concrete operations that can management object in ONT, the corresponding property parameters data of output function that to be about to the form of concrete operations that can management object in ONT be same form are divided into a class.
In the present invention, according to the corresponding operation species of described property parameters data, divide into groups, thereby be convenient to management and the execution of document.
Preferably, described the first script and the second script are TCL script.
Wherein said TCL(Tool Command Language, Tool Command Language) be a kind of embeddable command script language." can embed " and refer to that a lot of application effectively seamless integration together; " order " refers to that each TCL statement can be understood as the form that order adds parameter.TCL language, as the bonding agent of application, is applicable to and collaborative work integrated with other software languages.In addition the script of other kinds is applicable in the present invention too.
Preferably, described MIB is the management database that meets the G.988 standard of GPON.
The present invention also provides a kind of OMCI code device, is characterized in, comprises an ONT; Described ONT comprises an OMCI module, a MIB and a function code storehouse;
Wherein said OMCI module and an OLT set up OMCI communication linkage, and from described MIB, obtain all property parameters data, then by described property parameters packet and be stored to a document;
After this move one first script, described the first script detects the numerical value of each property parameters data in described document, and choose the function code corresponding to described numerical value and described property parameters data from function code storehouse, and by described function code and described property parameters data combination producing one output function.
Preferably, also move one second script in described ONT, described the second script obtains all property parameters data from described MIB, and by described property parameters packet and be stored to described document.
Preferably, in described ONT, described property parameters data are divided into groups according to operation species and are stored to described document.
Preferably, described the first script and the second script are TCL script.
Preferably, described MIB is the management database that meets the G.988 standard of GPON.
Positive progressive effect of the present invention is:
OMCI coding method of the present invention and device thereof have been avoided the input of duplicated code in hand-coding by script, and have also avoided artificial omission, thereby have improved communication protocol code efficiency and maintainability.
In addition personnel are freed from coding work, reduced the maintenance cost of whole GPON network.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the OMCI coding method of the first embodiment of the present invention.
Fig. 2 is the structural representation of the OMCI code device of the second embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, provide preferred embodiment of the present invention, to describe technical scheme of the present invention in detail.
The first embodiment:
Common in the process of design coding and realization in prior art, major part is to generate corresponding processing function and the .C based on C language and .H file by the manual artificial method of passing through, in the situation that systematic comparison is simple or operand is fewer, manual code and automatically generation do not have much differences, but in the situation that the more complicated and operand of system is many, if also manual generating code will have great workload, and be unfavorable for revising or improving the quality of code, search mistake or separate BUG(leak) also can be cumbersome.
So realize automatic coding by script in the present embodiment, wherein in the present embodiment, adopt TCL language as the bonding agent of application, thereby with the integrated use of C language, C programmer calls TCL/Tk(instrument control language/TCL graphical tool case) interpreter move TCL/Tk script; C language function also can be used as the process of TCL/Tk.
By add TCL language in cataloged procedure, mib information is integrated and carried out abstract definition, the TCL script file that generation has comprised all mib informations, and then utilize TCL language to encapsulate the output function of C code, finally move TCL script, generate coding required .C file or .H file.
Use TCL script can simplify the encode process of coding of produced a lot of repetitions of manual mode, generate automatically the function interface that these have identity function.
Wherein as shown in Figure 1, the OMCI coding method of the present embodiment comprises the following steps:
Step 1, moves one the 2nd TCL script, and described the second script obtains all property parameters data from described MIB.And MIB described in the present embodiment is the management database that meets the G.988 standard of GPON.
Step 2, divides into groups described property parameters data and is stored to a document according to operation species.The classification that wherein operation species described in the present embodiment is output function to the form of concrete operations that can management object in ONT, the corresponding property parameters data of output function that to be about to the form of concrete operations that can management object in ONT be same form are divided into a class.
In addition can also be equally in step 2 by described the 2nd TCL script by described property parameters packet and be stored to described document.
Above-mentioned steps 1 and step 2 utilize TCL language to carry out abstract and definition to the MIB in standard G.988, all data are produced to a plurality of table of operation and a plurality of attributes of table subordinate of needing by the method for layering and classification, then be stored in document, so the document has comprised manipulable content and attribute for MIB.
For example for an association attributes that is named as the table of Ontg, be described below shown in code:
table Ontg begin
table_set Name"Onug″
table_set Desc"Onu-g″
table_set MaxEntry 1
table_set ClassId 256
table_set InitType PON_ME_INIT_TYPE_AUTO
table_set StdType PON_ME_STD_TYPE_STD
table_setActionType"PON_ME_ACTION_SET|
PON_ME_ACTION_GET|PON_ME_ACTION_REBOOT"
table_set MsgIdCreate NULL
table_set MsgStructCreate NULL
table_set MsgStructCreateResp NULL
table_set MsgIdDelete NULL
table_set MsgStructDelete NULL
table_set MsgStructDeleteResp NULL
table_set MsgIdGetall NULL
table_set MsgStructGetall NULL
table_set MsgStructGetallResp NULL
table_set IndexNameemptyIndex
table_set MibUsrHandler FALSE
table_set SetCB Ontg_SetCallback
table_set GetCB Ontg_GetCallback
table_set CreateCB NULL
table_set DelCB NULL
table_set MibUpload TRUE
table_set ModuleName APPL_TASK_PON_THREAD
Step 3, move one the one TCL script, a described TCL script detects the numerical value of each property parameters data in described document, and choose the function code corresponding to described numerical value and described property parameters data from a function code storehouse, and by described function code and described property parameters data combination producing one output function.
The function code of the library storage of function code described in the present embodiment and described property parameters data have formed final output function jointly.And because content and the kind of the operation of output function determined by described property parameters data and numerical value thereof, so at described property parameters data and numerical value thereof definite in the situation that, content and the kind of the operation of output function are also determined, so now need to find, can realize described output function corresponding to the content of operation and the function code of kind of output function.Therefore between described property parameters data and numerical value function code thereof, there is corresponding relation.
In step 3, encapsulate the output function that coding generates equally by TCL script, the suction parameter of function is exactly the data in the table defining in above-mentioned example, and the output of function is the C code that coding needs.The code of this part also has TCL script to describe.
For example create shown in the following code of encapsulation function of a table:
In the present embodiment, in OMCI, use in a word TCL script generating code to have following three parts:
The TCL scripting documents of the abstract definition of a, relevant MIB and attribute thereof.
B, for generating the TCL scripting documents of the output function of OMCI code.
C, execution TCL fabrication order, the abstract definition parameter of input MIB, the C code of output OMCI.After TCL scripting documents completes, carry out TCL and generate order, by different parameters is input to encapsulation function, the OMCI code that output needs.
The second embodiment:
The present embodiment is the mode by essential general hardware platform realizes by above-mentioned OMCI coding method OMCI code device.
Wherein said OMCI code device comprises an ONT1, and wherein said ONT1 comprises an OMCI module 11, a MIB12 and a function code storehouse 13.Wherein said MIB12 meets the management database of the G.988 standard of GPON equally.
Wherein said OMCI module 11 and an OLT set up OMCI communication linkage, and in described ONT1, also move one second script, and described the second script obtains all property parameters data from described MIB12, and by described property parameters packet and be stored to a document.In wherein said ONT12, described property parameters data are divided into groups according to operation species and are stored to described document.
After this move one first script, described the first script detects the numerical value of each property parameters data in described document successively, and choose the function code corresponding to described numerical value and described property parameters data from function code storehouse, and by described function code and described property parameters data combination producing one output function.
For convenience of description, in the present embodiment, described ONT1 is divided into various modules according to function and describes respectively, so when implementing the present embodiment, the function of each module can be realized in same or a plurality of software and/or hardware.
The description of the embodiment by above OMCI coding method and OMCI code device is known, and those skilled in the art can be well understood to the mode that the application can add essential general hardware platform by software and realize.Understanding based on such, the part that the application's technical scheme contributes to prior art in essence in other words can embody with the form of software product.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, between each embodiment identical similar part mutually referring to, each embodiment stresses is the difference with other embodiment.Especially, for system embodiment, because it is substantially similar in appearance to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
Although more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is limited by appended claims.Those skilled in the art is not deviating under the prerequisite of principle of the present invention and essence, can make various changes or modifications to these embodiments, but these changes and modification all fall into protection scope of the present invention.
Claims (11)
1. an OMCI coding method, is characterized in that, described OMCI coding method comprises step:
S
1, from a MIB, obtain all property parameters data;
S
2, by described property parameters packet and be stored to a document;
S
3, move one first script, described the first script detects the numerical value of each property parameters data in described document, and choose the function code corresponding to described numerical value and described property parameters data from a function code storehouse, and by described function code and described property parameters data combination producing one output function.
2. OMCI coding method as claimed in claim 1, is characterized in that step S
1for:
Move one second script, described the second script obtains all property parameters data from described MIB.
3. OMCI coding method as claimed in claim 2, is characterized in that step S
2for:
Described the second script is also by described property parameters packet and be stored to described document.
4. OMCI coding method as claimed in claim 2 or claim 3, is characterized in that, described the first script and the second script are TCL script.
5. OMCI coding method as claimed in claim 1, is characterized in that, described step S
2for:
Described property parameters data are divided into groups according to operation species and are stored to described document.
6. OMCI coding method as claimed in claim 1, is characterized in that, described MIB is the management database that meets the G.988 standard of GPON.
7. an OMCI code device, is characterized in that, described OMCI code device comprises an ONT; Described ONT comprises an OMCI module, a MIB and a function code storehouse;
Wherein said OMCI module and an OLT set up OMCI communication linkage, and from described MIB, obtain all property parameters data, then by described property parameters packet and be stored to a document;
After this move one first script, described the first script detects the numerical value of each property parameters data in described document, and choose the function code corresponding to described numerical value and described property parameters data from described function code storehouse, and by described function code and described property parameters data combination producing one output function.
8. OMCI coding method as claimed in claim 7, is characterized in that, also moves one second script in described ONT, and described the second script obtains all property parameters data from described MIB, and by described property parameters packet and be stored to described document.
9. OMCI coding method as claimed in claim 8, is characterized in that, described the first script and the second script are TCL script.
10. OMCI coding method as claimed in claim 7, is characterized in that, in described ONT, described property parameters data is divided into groups according to operation species and is stored to described document.
11. OMCI coding methods as claimed in claim 7, is characterized in that, described MIB is the management database that meets the G.988 standard of GPON.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210260917.6A CN103577166B (en) | 2012-07-25 | 2012-07-25 | OMCI coding methods and its device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210260917.6A CN103577166B (en) | 2012-07-25 | 2012-07-25 | OMCI coding methods and its device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103577166A true CN103577166A (en) | 2014-02-12 |
CN103577166B CN103577166B (en) | 2017-11-14 |
Family
ID=50049023
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210260917.6A Active CN103577166B (en) | 2012-07-25 | 2012-07-25 | OMCI coding methods and its device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103577166B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346173A (en) * | 2014-11-05 | 2015-02-11 | 上海市共进通信技术有限公司 | Method for realizing rapid generation of management entity codes in computer software system |
CN107147630A (en) * | 2017-04-27 | 2017-09-08 | 上海斐讯数据通信技术有限公司 | It is a kind of to realize the method and device that OMCI protocol stack codes are automatically generated |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6233612B1 (en) * | 1998-08-31 | 2001-05-15 | International Business Machines Corporation | Dynamic network protocol management information base options |
CN1658579A (en) * | 2004-02-16 | 2005-08-24 | 华为技术有限公司 | Method for set-up artificial equipment agency |
CN101256482A (en) * | 2007-12-19 | 2008-09-03 | 深圳市同洲电子股份有限公司 | Development system and method for built-in application program |
CN101521592A (en) * | 2008-02-29 | 2009-09-02 | 北大方正集团有限公司 | Method and device for establishing the SNMP agent of printer |
CN101764647A (en) * | 2009-12-17 | 2010-06-30 | 浙江工业大学 | ONU (Optical Network Unit) management and control platform of GPON (Gigabit Passive Optical Network) network management system |
CN101795425A (en) * | 2010-03-23 | 2010-08-04 | 上海大亚科技有限公司 | Gigabit passive optical network (GPON) service management system based on OMCI (Operation Management Communication Interface) entity relationship model |
CN101815008A (en) * | 2010-03-25 | 2010-08-25 | 浙江工业大学 | OLT (Optical Line Terminal) agent subsystem of GPON (Gigabit-Capable Passive Optical Network) management system |
CN102289375A (en) * | 2011-09-02 | 2011-12-21 | 中兴通讯股份有限公司 | Code generation method and system |
CN102497230A (en) * | 2011-12-19 | 2012-06-13 | 太仓市同维电子有限公司 | General-purpose processing method adopted by ONT for multi-vendor non-standard management entity |
CN102520941A (en) * | 2011-12-01 | 2012-06-27 | 大唐移动通信设备有限公司 | Method and device for generating executable documents |
-
2012
- 2012-07-25 CN CN201210260917.6A patent/CN103577166B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6233612B1 (en) * | 1998-08-31 | 2001-05-15 | International Business Machines Corporation | Dynamic network protocol management information base options |
CN1658579A (en) * | 2004-02-16 | 2005-08-24 | 华为技术有限公司 | Method for set-up artificial equipment agency |
CN101256482A (en) * | 2007-12-19 | 2008-09-03 | 深圳市同洲电子股份有限公司 | Development system and method for built-in application program |
CN101521592A (en) * | 2008-02-29 | 2009-09-02 | 北大方正集团有限公司 | Method and device for establishing the SNMP agent of printer |
CN101764647A (en) * | 2009-12-17 | 2010-06-30 | 浙江工业大学 | ONU (Optical Network Unit) management and control platform of GPON (Gigabit Passive Optical Network) network management system |
CN101795425A (en) * | 2010-03-23 | 2010-08-04 | 上海大亚科技有限公司 | Gigabit passive optical network (GPON) service management system based on OMCI (Operation Management Communication Interface) entity relationship model |
CN101815008A (en) * | 2010-03-25 | 2010-08-25 | 浙江工业大学 | OLT (Optical Line Terminal) agent subsystem of GPON (Gigabit-Capable Passive Optical Network) management system |
CN102289375A (en) * | 2011-09-02 | 2011-12-21 | 中兴通讯股份有限公司 | Code generation method and system |
CN102520941A (en) * | 2011-12-01 | 2012-06-27 | 大唐移动通信设备有限公司 | Method and device for generating executable documents |
CN102497230A (en) * | 2011-12-19 | 2012-06-13 | 太仓市同维电子有限公司 | General-purpose processing method adopted by ONT for multi-vendor non-standard management entity |
Non-Patent Citations (1)
Title |
---|
张登银等: "基于SNMP的MIB库转化成C文件的实现", 《计算机技术与发展》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104346173A (en) * | 2014-11-05 | 2015-02-11 | 上海市共进通信技术有限公司 | Method for realizing rapid generation of management entity codes in computer software system |
CN104346173B (en) * | 2014-11-05 | 2018-04-13 | 上海市共进通信技术有限公司 | The method for quickly generating management entity code is realized in computer software |
CN107147630A (en) * | 2017-04-27 | 2017-09-08 | 上海斐讯数据通信技术有限公司 | It is a kind of to realize the method and device that OMCI protocol stack codes are automatically generated |
Also Published As
Publication number | Publication date |
---|---|
CN103577166B (en) | 2017-11-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106777101B (en) | Data processing engine | |
CN106599197B (en) | Data acquisition exchange engine | |
CN110018829B (en) | Method and device for improving execution efficiency of PL/SQL language interpreter | |
CN106293664A (en) | Code generating method and device | |
CN104408159B (en) | A kind of data correlation, loading, querying method and device | |
CN106168965A (en) | Knowledge mapping constructing system | |
CN106610999A (en) | Query processing method and device | |
CN101183370A (en) | Topological modelling approach based on class definition and relationship definition | |
CN102611576B (en) | Method and device for generating network management configuration model file | |
CN101079737A (en) | An automatic structuring and parsing method and system of command line interface command | |
CN115469941A (en) | Automatic configuration processing method and system for wind control index calculation development based on FlinkSQL | |
CN105956481A (en) | Data processing method and device | |
CN105138326A (en) | Method and system for achieving structured query language (sql) dynamic configuration based on ibatis | |
CN104317942A (en) | Massive data comparison method and system based on hadoop cloud platform | |
CN108829884A (en) | data mapping method and device | |
CN102737108A (en) | Method and device for processing flow diagram | |
CN102915344B (en) | SQL (structured query language) statement processing method and device | |
CN102447478B (en) | Encoding method and system for accident rule digital logic design of nuclear power plant | |
CN104007962B (en) | The implementation method of OMCI entities based on Object-oriented Technique | |
CN109116828A (en) | Model code configuration method and device in a kind of controller | |
CN113901135A (en) | Cross-source heterogeneous data intelligent visual analysis display method and equipment | |
CN102707948A (en) | Source code generation method | |
CN101667124A (en) | System and method for configuring monitoring device based on object model | |
CN103577166A (en) | ONT management and control interface (OMCI) coding method and device thereof | |
CN109274742A (en) | IoT data acquisition and monitoring control system |
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 | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20201123 Address after: 221700 4-1-110-shop, Nanyuan new town, Fengxian County, Xuzhou City, Jiangsu Province Patentee after: Song Yixiao Address before: Songjiang District shihudong Town Tower Road 201617 min 579 Lane Shanghai No. -26 Patentee before: Phicomm (Shanghai) Co.,Ltd. |