CN103475517B - Optical network terminal and hardware configuration parameter storing method thereof - Google Patents
Optical network terminal and hardware configuration parameter storing method thereof Download PDFInfo
- Publication number
- CN103475517B CN103475517B CN201310398673.2A CN201310398673A CN103475517B CN 103475517 B CN103475517 B CN 103475517B CN 201310398673 A CN201310398673 A CN 201310398673A CN 103475517 B CN103475517 B CN 103475517B
- Authority
- CN
- China
- Prior art keywords
- parameter
- api
- configuration
- statement
- intended
- 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
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of optical network terminal and hardware configuration parameter storing method thereof, described method includes: after the functional module in optical network terminal parses parameter name and the parameter value of the parameter being intended to configuration in hardware parameter configuration-direct, the parameter configuration API of hardware register corresponding with this parameter name in call parameters configuration module;After this hardware register is carried out parameter configuration by this parameter configuration API, the storage statement of tables of data belonging to parameter described in call statement package module generates API;This storage statement generates the value of each field of the API record determining in tables of data belonging to described parameter, generates with SQL storage statement for the character string of content, calls the database manipulation API in DBM;Database manipulation API performs SQL after this character string is resolved and stores statement.The present invention be more convenient for parameter preserve hardware and software platform and there is good autgmentability, be more readily maintained.
Description
Technical field
The present invention relates to the communications field, particularly relate to a kind of optical network terminal and hardware configuration parameter storing method thereof.
Background technology
At present, become stronger day by day in the Internet, and people solely browse webpage, check news, but propose diversified application demand.The appearance of the forms such as online game, online video display, telecommuting, Web TV is greatly enriched the life of people, but propose the requirement more increased also to the bandwidth of Internet simultaneously, such as from tens kbps to 1Mbps before, 2Mbps, 10Mbps, 20Mbps, even hundreds of Mbps.Increasing domestic consumer selects network upgrade to fiber entering household now, to obtain the higher network bandwidth.Therefore, increasing optical network terminal is applied by Virtual network operator.
For numerous optical network terminals, Virtual network operator is distinguish different application services, it usually needs the hardware in optical network terminal is carried out parameter configuration, as configured the bias current etc. of the laser instrument of MAC Address, IP address, optical module;Such as, for the optical network unit (ONU near user side, OpticalNetworkUnit), Virtual network operator can pass through local side apparatus, i.e. optical line terminal (OLT, OpticalLineTerminal), issue configuration, hardware in ONU is configured, and hardware configuration parameter is saved in ONU, to guarantee that the planning according to Virtual network operator that ONU can be correct operates;Meanwhile, these hardware configuration parameters also by some hardware configuration reporting parameters to OLT, and can be saved in ONU therein by ONU self.
Way commonplace in the industry at present is, when optical network terminal is carried out parameter configuration, by directly operating FLASH sector, the parameter of configuration to be saved in certain ad-hoc location of FLASH sector.
In actual applications, the inventors found that the method is for numerous parameters, has the parameter of incidence relation especially each other, be difficult to carry out hardware and software platform, and follow-up autgmentability is also not so good, maintenance cost is higher;Such as, the application service of the optical network terminal of different model is different, and technical staff is required for the optical network terminal of different model, develops different application programs to be saved in FLASH sector by hardware configuration parameter, it is difficult to hardware and software platform;And, technical staff needs the application program to these are different to safeguard when exploitation, and follow-up optical network device is upgraded time, if relating to replacing or the increase of some hardware, then need change or increase many about the code that hardware configuration parameter is saved in FLASH sector, making technical staff's inconvenience optical network terminal be safeguarded, upgrade, the autgmentability of optical network terminal is bad.
Therefore, it is necessary to provide a kind of be easy to hardware and software platform, autgmentability better, the more optical network terminal of easy care and hardware configuration parameter storing method thereof.
Summary of the invention
For the defect that above-mentioned prior art exists, the invention provides a kind of optical network terminal and hardware configuration parameter storing method thereof, hardware and software platform that parameter of being more convenient for preserves also has good autgmentability, is more readily maintained.
According to an aspect of the invention, it is provided the hardware configuration parameter storing method of a kind of optical network terminal, including:
It is resolved after receiving hardware parameter configuration-direct by the functional module in described optical network terminal, the parameter name of parameter being intended to configuration wherein carried and parameter value;The parameter configuration API of hardware register corresponding with this parameter name in call parameters configuration module, and by this parameter configuration API incoming to described parameter name and parameter value;
After this hardware register is carried out parameter configuration according to incoming parameter value by this parameter configuration API, the storage statement of tables of data belonging to the described parameter being intended to configuration in call statement package module generates API, and described parameter name and parameter value are passed to this storage statement generation API;
This storage statement generates API according to incoming parameter name and parameter value, it is determined that go out the value of each field being intended to be saved in a record in tables of data belonging to the described parameter being intended to configuration;Afterwards, generate with SQL storage statement for the character string of content, call the database manipulation API in DBM, and this character string is passed in described database manipulation API;
After incoming character string is resolved by described database manipulation API, perform described SQL and store statement: the record determined is increased to belonging to the described parameter being intended to configuration in tables of data, or according to the record modification determined, be intended to the corresponding record in tables of data belonging to the parameter of configuration;Tables of data belonging to the described parameter being intended to configuration is stored in the data base in this device non-volatile memory part.
It is preferred that after the parameter name and parameter value of the described parameter being intended to configuration wherein carried, also include:
Described functional module is called the parameter of hardware register corresponding with this parameter name in described parameter configuration module and is read API, and this parameter incoming for described parameter name is read API;
This parameter reads the reading statement of tables of data belonging to the described parameter being intended to configuration in statement package module described in API Calls and generates API, and described parameter name is passed to this reading statement generation API;
This reading statement generates API according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the described parameter being intended to configuration;Afterwards, generate with SQL reading statement for the character string of content, call the database manipulation API in described DBM, and this character string is passed in described database manipulation API;
After incoming character string is resolved by described database manipulation API, perform described SQL and read statement: the record determined is read out from tables of data belonging to the described parameter being intended to configuration this reading statement backward generation API and returns;
This reading statement generates API and to this parameter, the described database manipulation API record returned is read API return;
This parameter reads API and is returned to described functional module by the record that this reading statement generation API returns;
The parameter value of parameter corresponding with the record of return for the parameter value parsed is compared by described functional module;And
The parameter configuration API of hardware register corresponding with this parameter name in described call parameters configuration module, if particularly as follows: comparative result is different, then calling the parameter configuration API of the hardware register corresponding with this parameter name.
Further, after incoming character string is resolved by described database manipulation API, after performing described SQL storage statement, also include:
If described functional module receives the hardware parameter that user sends and reads instruction, then it is resolved, the parameter name of parameter being intended to read wherein carried and parameter value;
Described functional module is called the parameter of hardware register corresponding with the parameter name of the parameter that this desire reads in described parameter configuration module and is read API, and this parameter name is passed to this parameter reading API;
This parameter reads the reading statement of tables of data belonging to the parameter that this desire in statement package module described in API Calls reads and generates API, and the parameter name of the parameter this desire read is passed to this reading statement and generates API;
This reading statement generates API according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the described parameter being intended to and reading;Afterwards, generate with SQL reading statement for the character string of content, call the database manipulation API in DBM, and this character string is passed in described database manipulation API;
After incoming character string is resolved by described database manipulation API, perform described SQL and read statement: tables of data belonging to the parameter read the described desire recording from described data base determined reads out this reading statement backward generation API and returns;
This reading statement generates API and to this parameter, the described database manipulation API record returned is read API return;
This parameter reads API and is returned to described functional module by the record that this reading statement generation API returns;
The parameter value that described functional module reads out corresponding parameter according to the parameter name of the described parameter being intended to and reading from the record returned returns to described user.
It is preferred that before described functional module receives hardware parameter configuration-direct, also include:
After described optical network terminal starts, described parameter configuration module detects in described nonvolatile semiconductor memory member whether created data base;If it is not, then create described data base in described nonvolatile semiconductor memory member.
Wherein, described in described nonvolatile semiconductor memory member, create described data base, specifically include:
Described parameter configuration module creates described data base and each tables of data in described data base in described nonvolatile semiconductor memory member;Wherein, the parameter each other in this equipment with incidence relation is created in same tables of data;The each parameter not having any incidence relation in this equipment with other parameter is created in same tables of data.
According to another aspect of the present invention, additionally provide a kind of optical network terminal, including: functional module, parameter configuration module, statement package module and DBM;
Wherein, it is resolved after being used for receiving hardware parameter configuration-direct by described functional module, the parameter name of the parameter being intended to configuration wherein carried and parameter value;The parameter configuration API of hardware register corresponding with this parameter name in call parameters configuration module, and by this parameter configuration API incoming to described parameter name and parameter value;
Parameter configuration API in described parameter configuration module is for after carrying out parameter configuration according to incoming parameter value to this hardware register, the storage statement of tables of data belonging to the described parameter being intended to configuration in call statement package module generates API, and described parameter name and parameter value are passed to this storage statement generation API;
Storage statement in described statement package module generates API for according to incoming parameter name and parameter value, it is determined that go out the value of each field of the record being intended to be saved in tables of data belonging to the described parameter being intended to configuration;Afterwards, generate with SQL storage statement for the character string of content, call the database manipulation API in DBM, and this character string is passed in described database manipulation API;
Database manipulation API in described DBM is for after resolving incoming character string, perform described SQL and store statement: belonging to the described parameter being intended to configuration that the record determined is increased in tables of data, or according to the record modification determined, be intended to the corresponding record in tables of data belonging to the parameter of configuration;Tables of data belonging to the described parameter being intended to configuration is stored in the data base in this device non-volatile memory part.
Preferably, described functional module is additionally operable to after the parameter name and parameter value of the described parameter being intended to configuration wherein carried, the parameter calling hardware register corresponding with this parameter name in described parameter configuration module reads API, and this parameter incoming for described parameter name is read API;
Parameter reading API in described parameter configuration module generates API for calling the reading statement of tables of data belonging to the described parameter being intended to configuration in described statement package module, and described parameter name is passed to this reading statement generation API;And this reading statement generates API and is additionally operable to this parameter, the described database manipulation API record returned is read API return;
The statement that reads in described statement package module generates API for according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the described parameter being intended to configuration;Afterwards, generate with SQL reading statement for the character string of content, call the database manipulation API in described DBM, and this character string is passed in described database manipulation API;And this reading statement generates API and is additionally operable to this parameter, the described database manipulation API record returned is read API return;
Database manipulation API in described DBM is additionally operable to described reading statement is generated after the incoming character string of API resolves, and performs described SQL and reads statement: the record determined reads out this reading statement backward from tables of data belonging to the described parameter being intended to configuration and generates API and return;
Described functional module is additionally operable to compare the parameter value of parameter corresponding with the record of return for the parameter value parsed;If comparative result is different, then call the parameter configuration API of the hardware register corresponding with this parameter name.
If it is preferred that described functional module is additionally operable to receive the hardware parameter that user sends reads instruction, then it being resolved, the parameter name of the parameter being intended to read wherein carried and parameter value;And the parameter calling hardware register corresponding with the parameter name of the parameter that this desire reads in described parameter configuration module reads API, and this parameter incoming for this parameter name is read API;
Parameter in described parameter configuration module reads the reading statement of tables of data belonging to the parameter that this desire in statement package module described in API Calls reads and generates API, and the parameter name of the parameter this desire read is passed to this reading statement and generates API;And this parameter reads the API record being additionally operable to this reading statement generation API returns and returns to described functional module;
The statement that reads in described statement package module generates API according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the described parameter being intended to and reading;Afterwards, generate with SQL reading statement for the character string of content, call the database manipulation API in described DBM, and this character string is passed in described database manipulation API;And this reading statement generates API and is additionally operable to this parameter, the described database manipulation API record returned is read API return;
After database manipulation API in described DBM is additionally operable to incoming character string is resolved, performs described SQL and read statement: generate API return tables of data belonging to the record the determined described parameter being intended to read from described data base reads out this reading statement backward;And
Described functional module is additionally operable to the parameter name according to the described parameter being intended to and reading and reads out the parameter value of corresponding parameter from the record returned and return to described user.
It is preferred that described parameter configuration module is additionally operable to, after described optical network terminal starts, to detect in described nonvolatile semiconductor memory member whether created data base;If it is not, then create described data base in described nonvolatile semiconductor memory member.
It is preferred that described parameter configuration module specifically for creating described data base in described nonvolatile semiconductor memory member, and each tables of data in described data base;Wherein, the parameter each other in this equipment with incidence relation is created in same tables of data;The each parameter not having any incidence relation in this equipment with other parameter is created in same tables of data.
In technical scheme, owing to, in the nonvolatile semiconductor memory member in optical network terminal, being arranged to the data base of the tables of data of storage hardware configuration parameter;And the preservation of hardware configuration parameter is carried out modularity, for no optical network terminal, parameter configuration module, statement package module and database operating modules can be transplanted on the optical network terminal of different model, and realize the hardware and software platform that parameter preserves, and being easily maintained property;Simultaneously technical staff is based on the parameter configuration module developed, statement package module and database operating modules, and only need to be absorbed in the writing of code of functional module so that exploitation, maintenance cost are relatively low;And, when optical network terminal increases or amendment services, it is possible to increase or revise the field of data base's corresponding data table so that optical network terminal has autgmentability preferably.
Accompanying drawing explanation
Fig. 1 be the embodiment of the present invention optical network terminal in the internal structure block diagram of MCU system software;
Fig. 2 is the flow chart that the systems soft ware of the embodiment of the present invention carries out a kind of method of hardware configuration parameter preservation;
Fig. 3 is the flow chart that the systems soft ware of the embodiment of the present invention carries out the another kind of method of hardware configuration parameter preservation;
Fig. 4 be the embodiment of the present invention systems soft ware reading database in the method flow diagram of parameter value of parameter.
Detailed description of the invention
Below with reference to accompanying drawing, technical scheme is carried out clear, complete description, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments.Based on the embodiment in the present invention, all other embodiments that those of ordinary skill in the art are obtained under the premise not making creative work, broadly fall into the scope that the present invention protects.
The term such as " module " used in this application, " system " is intended to include the entity relevant to computer, for instance but it is not limited to hardware, firmware, combination thereof, software or executory software.Such as, module it may be that it is not limited to: the process run on processor, processor, object, executable program, the thread of execution, program and/or computer.For example, application program and this computing equipment of computing equipment running can be modules.One or more modules may be located in an executory process and/or thread, and module can also on a computer and/or be distributed in two or more between multiple stage computer.
The present inventor is it is considered that in the nonvolatile semiconductor memory member (such as FLASH) in optical network terminal, can arrange a data base, and create the tables of data of corresponding each parameter in data base;After in optical network terminal, the systems soft ware of MCU receives hardware parameter configuration-direct, the parameter name of the parameter according to desire configuration and parameter value, call corresponding application programs, hardware register is carried out parameter configuration, and carry out corresponding operating to being intended to tables of data belonging to the parameter of configuration, preserve hardware configuration parameter;So, realize separating of application program and data base, optical network terminal for different model, or when optical network terminal is changed or increases hardware, realize the application program of parameter configuration and the preservation of hardware configuration parameter without changing, therefore, it is simple to parameter preserve hardware and software platform and there is good autgmentability;And, energy only need to be placed in the exploitation of the application service of optical network terminal by technical staff, it is not necessary to the exploitation of the application program that more concern bottom hardware parameters preserve so that maintenance cost is relatively low.
Technical scheme is described in detail below in conjunction with accompanying drawing.The optical network terminal that the embodiment of the present invention provides includes micro-control unit (MCU, MicroControlUnit), and the systems soft ware of MCU can carry out hardware parameter configuration according to the hardware parameter configuration-direct received, and hardware configuration parameter is preserved;As it is shown in figure 1, the systems soft ware of MCU includes: functional module 101, parameter configuration module 102, statement package module 103 and DBM 104.
It is true that after optical network terminal starts, the parameter configuration module 102 in systems soft ware needs whether created data base in the nonvolatile semiconductor memory member detecting in this equipment;If not creating in volatile memory device and having data base, then parameter configuration module 102 opens data base, without re-creating data base,;On the contrary, if not having establishment to have data base in volatile memory device, then parameter configuration module 102 creates data base in nonvolatile semiconductor memory member, and to store each hardware configuration parameter, it specifically includes:
Parameter configuration module 102 creates data base and each tables of data in data base in nonvolatile semiconductor memory member;Wherein, the parameter each other in this equipment with incidence relation is created in same tables of data;The each parameter not having any incidence relation in this equipment with other parameter is created in same tables of data;And, each tables of data in data base can create according to the business demand of Virtual network operator.
Such as, VLAN(VirtualLocalAreaNetwork, VLAN) port numbers (port) in configuration, pattern (mode), default vlan value (dflt_tpid, dflt_vid, dflt_cfi), the parameter such as default priority (dflt_pri), there is incidence relation each other, these parameters can be created in same tables of data, as shown in table 1 below:
Table 1
port | mode | dflt_tpid | dflt_vid | dflt_cfi | dflt_pri |
1 | 1 | 0x8100 | 100 | 1 | 7 |
2 | 2 | 0x8100 | 200 | 1 | 6 |
3 | 3 | 0x8100 | 300 | 1 | 5 |
4 | 4 | 0x8100 | 400 | 1 | 4 |
For another example, user name, password, MAC Address (MACADDR) or equipment SN(SerialNumber) number etc. parameter, do not have any incidence relation with other parameter in this equipment, it is possible to be created in same tables of data by these parameters, as shown in table 2 below:
Table 2
Module I D | Parameter name | Parameter value | The length of value |
1 | MAC ADDR | 00:12:34:56:78:01 | 18 |
Afterwards, based on each tables of data in the data base created and data base, hardware register in hardware can be configured by the systems soft ware of the MCU in optical network terminal by SET operation, and hardware configuration parameter is saved in the tables of data of data base, its method flow is as in figure 2 it is shown, specifically include following steps:
S201: it is resolved after receiving hardware parameter configuration-direct by functional module 101, the parameter name of the parameter being intended to configuration wherein carried and parameter value.
Specifically, the hardware in optical network terminal carrying out the mode of parameter configuration, one is to configure in OLT side, and namely OLT sends hardware parameter configuration-direct to optical network terminal, and this mode is the most commonly used;A kind of is by the WEB page in optical network terminal side or CLT(command-lineinterface, Command Line Interface) order, send hardware parameter configuration-direct to optical network terminal;In this step, after functional module 101 receives hardware parameter configuration-direct, hardware parameter configuration-direct is resolved, the parameter name of the parameter being intended to configuration obtaining carrying in hardware parameter configuration-direct and parameter value;
Such as, in OLT side, the MAC Address of ONU is configured, after OLT receives the message that user configures MAC Address, OAM(OperationAdministrationandMaintenance can be passed through, operation management maintainance) or OMCI(OpticalnetworkunitManagementandControlInterface, optical network unit management and control interface) agreement, send hardware parameter configuration-direct to ONU;After functional module 101 in ONU receives hardware parameter configuration-direct, to its parsing carrying out respective protocol, the parameter name of the MAC Address wherein carried and parameter value, as parameter name is: MACADDR, parameter value is: 00:12:34:56:78:01.
S202: the parameter configuration API of hardware register corresponding with this parameter name in functional module 101 call parameters configuration module 102, and it is intended to parameter name and parameter value this parameter configuration API incoming of the parameter of configuration.
Specifically, in parameter configuration module 102, storage has parameter configuration API(ApplicationProgrammingInterface, application programming interface);After functional module 101 obtains parameter name and the parameter value of the parameter of desire configuration according to above-mentioned steps S201, the parameter configuration API of hardware register corresponding with this parameter name in call parameters configuration module 102, is intended to parameter name and parameter value this parameter configuration API incoming of the parameter of configuration;
Such as, in above-mentioned steps S201, after functional module 101 obtains the parameter name MACADDR and parameter value 00:12:34:56:78:01 of MAC Address carried in hardware parameter configuration-direct, MIB_PonMacAddrSet(in call parameters configuration module 102) function (i.e. parameter configuration API), and by parameter name MACADDR and the incoming MIB_PonMacAddrSet(of parameter value 00:12:34:56:78:01) function.
This hardware register is carried out parameter configuration according to incoming parameter value by S203: parameter configuration API.
Such as, the above-mentioned configuration that ONU is carried out MAC Address, MIB_PonMacAddrSet() function is according to incoming parameter value 00:12:34:56:78:01, calls HAL_PonMacAddrSet() function realizes the MAC Address configuration of corresponding hardware register (hardware register such as network interface card).
S204: the storage statement of tables of data belonging to the parameter being intended to configuration in parameter configuration API Calls statement package module 103 generates API, and it is intended to the parameter name of parameter of configuration and parameter value is passed to this storage statement and generates API.
Specifically, in statement package module 103, storage has storage statement to generate API;After hardware register is carried out parameter configuration by parameter configuration API in above-mentioned steps S203, need to be saved in the tables of data in data base hardware configuration parameter, therefore, in this step, the storage statement of tables of data belonging to the parameter being intended to configuration in parameter configuration API Calls statement package module 103 generates API, and is intended to the parameter name of parameter of configuration and parameter value is passed to this storage statement and generates API.
Such as, the above-mentioned configuration that ONU is carried out MAC Address, MIB_PonMacAddrSet() DB_CmnTblWrite(of tables of data belonging to the MAC Address in function call statement package module 103) function (namely storage statement generates API), and parameter name MACADDR and parameter value 00:12:34:56:78:01 is passed to DB_CmnTblWrite() function.
S205: this storage statement generates API according to incoming parameter name and parameter value, it is determined that go out the value of each field that in tables of data belonging to the parameter being intended to be saved in desire configuration records.
Such as, the above-mentioned configuration that ONU is carried out MAC Address, DB_CmnTblWrite() function (namely storage statement generates API) can according to incoming parameter name MACADDR and parameter value 00:12:34:56:78:01, it is determined that go out the value of each field that in tables of data belonging to MAC Address records;Such as table 2, it is determined that the value of each field in the record gone out can be: module I D:1;Parameter name: MACADDR;Parameter value: 00:12:34:56:78:01;The length of value: 18.
S206: this storage statement generates API and generates with SQL storage statement for the character string of content, calls the database manipulation API in DBM 104, and this character string is passed in database manipulation API.
Specifically, this storage statement generate API generate with SQL store statement be content character string, be specifically as follows: use sprintf() function will need perform SQL store statement change into character string;And, database manipulation API can be specifically the interface API that existing embedded database provides.
Such as, sprintf (sql, " INSERTINTO%sVALUES (' %d', ' %d', ' %d', ' %s');", CMN_TBL_NAME, record.mod_id, record.name_id, record.value_len, record.value);// the record that will add converts character string to, exists in SQL array.
S207: after incoming character string is resolved by database manipulation API, performs SQL and stores statement.
Specifically, after incoming character string is resolved by database manipulation API, the process performing SQL storage statement includes: increased to by the record determined in tables of data belonging to the parameter being intended to configuration, or the corresponding record in tables of data belonging to the parameter of the record modification desire configuration determined;Wherein, it is intended to tables of data belonging to the parameter of configuration and is stored in the data base in this device non-volatile memory part.
So, hardware configuration parameter storing method according to the present invention, optical network terminal for different model, if business demand or application service are different, technical staff has only to carry out change or the amendment of the code of functional module, and parameter configuration module, the code of statement package module and database operating modules without, or only need to carry out increasing or revise the little change of certain field in tables of data, thus, greatly facilitate parameter configuration module, statement package module and database operating modules can be transplanted on the optical network terminal of different model, and realize the hardware and software platform that parameter preserves, and being easily maintained property;Simultaneously technical staff is based on the parameter configuration module developed, statement package module and database operating modules, and only need to be absorbed in the writing of code of functional module so that exploitation, maintenance cost are relatively low;And, when optical network terminal increases or amendment services, it is possible to increase or revise the field of data base's corresponding data table, there is autgmentability preferably.
As a kind of more excellent mode, hardware parameter configuration-direct is being resolved by functional module 101, after the parameter name of the parameter being intended to configuration wherein carried and parameter value, it is also possible to the parameter name according to the parameter being intended to configuration, the parameter value of this parameter of record in reading database, it is compared with the parameter value of the parameter parsed, and carry out parameter configuration and the preservation of hardware configuration parameter, the flow process of its method according to comparative result, as it is shown on figure 3, specifically include following steps:
S301: it is resolved after receiving hardware parameter configuration-direct by functional module 101, the parameter name of the parameter being intended to configuration wherein carried and parameter value.
S302: the parameter of hardware register corresponding with this parameter name in functional module 101 call parameters configuration module 102 reads API, and parameter name this parameter incoming being intended to the parameter of configuration reads API.
Specifically, in parameter configuration module 102, also storage has parameter to read API;
Such as, above-mentioned ONU is carried out MAC Address configuration time, MIB_PonMacAddrGet(in functional module 101 call parameters configuration module 102) function (namely parameter reads API), and the parameter name MACADDR of MAC Address is passed to MIB_PonMacAddrGet() function.
S303: this parameter reads the reading statement of tables of data belonging to the parameter being intended to configuration in API Calls statement package module 103 and generates API, and the parameter name being intended to the parameter of configuration is passed to this reading statement and generates API.
Specifically, in statement package module 103, also storage has reading statement to generate API;
Such as, above-mentioned ONU is carried out MAC Address configuration time, MIB_PonMacAddrGet() DB_CmnTblRead(in function call statement package module 103) function (namely read statement and generate API), and the parameter name MACADDR of MAC Address is passed to DB_CmnTblRead() function.
S304: this reading statement generates API according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the parameter being intended to configure.
S305: this reading statement generates API and generates with SQL reading statement for the character string of content, calls the database manipulation API in DBM 104, and this character string is passed in database manipulation API.
S306: after incoming character string is resolved by database manipulation API, performs SQL and reads statement.
Specifically, after incoming character string is resolved by database manipulation API, the process performing SQL reading statement includes: the record determined is read out this reading statement backward from tables of data belonging to the parameter being intended to configuration and generates API return.
S307: this reading statement generates API and to this parameter, the database manipulation API record returned is read API return.
S308: this parameter reads API and returned to functional module 101 by the record that this reading statement generation API returns.
S309: the parameter value of parameter corresponding with the record of return for the parameter value parsed is compared by functional module 101, and judge that whether comparative result is identical;If it is not, then perform step S310;Otherwise, step S320 is performed.
Specifically, the parameter value of parameter corresponding with the record of return for the parameter value parsed is compared by functional module 101;If comparative result is different, then show that the hardware configuration operation that hardware parameter configuration-direct relates to is new configuration operation, it is necessary to carry out the configuration of hardware register, and hardware configuration parameter be saved in the tables of data in data base, specific as follows state shown in step S310;If comparative result is identical, then show that the hardware configuration operation that hardware parameter configuration-direct relates to is the configuration operation repeating to issue, functional module 101 is according to following steps S320, directly hardware configuration operational order is abandoned, thus avoiding repeating the configuration of hardware register, and avoid repeating to be saved in the tables of data in data base hardware configuration parameter.
S310: the hardware register that systems soft ware pair is corresponding with the parameter name of the parameter being intended to configuration carries out parameter configuration, and the parameter value of parameter being intended to configuration is saved in data base to be intended in tables of data belonging to the parameter of configuration, shown in concrete grammar such as step S202~S207.
S320: functional module 101 abandons this hardware parameter configuration-direct, does not carry out any operation.
The systems soft ware of the MCU in the optical network terminal of the present invention can also be operated by GET, reads out the parameter value of parameter in data base, the flow process of its method, as shown in Figure 4, specifically includes following steps:
S401: functional module 101 receives the hardware parameter reading instruction that user sends, and it is resolved, the parameter name of the parameter being intended to read wherein carried and parameter value.
Specifically, after user passes through the WEB page of OLT or optical network terminal side or CLT order sends hardware parameter reading instruction to the systems soft ware of the MCU in optical network terminal, the hardware parameter that receives is read instruction and resolves by the functional module 101 in systems soft ware, and obtains the parameter name of the parameter being intended to read and the parameter value that carry.
S402: the parameter of hardware register corresponding with the parameter name of the parameter that this desire reads in functional module 101 call parameters configuration module 102 reads API, and this parameter incoming for this parameter name is read API.
S403: this parameter reads the reading statement of tables of data belonging to the parameter that this desire in API Calls statement package module 103 reads and generates API, and the parameter name of the parameter this desire read is passed to this reading statement and generates API.
S404: this reading statement generates API according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the parameter being intended to read.
S405: this reading statement generates API and generates with SQL reading statement for the character string of content, calls the database manipulation API in DBM 104, and this character string is passed in database manipulation API.
S406: after incoming character string is resolved by database manipulation API, performs SQL and reads statement.
Specifically, after incoming character string is resolved by database manipulation API, the process performing SQL reading statement includes: reads out this reading statement backward in tables of data belonging to the parameter read the described desire recording from data base determined and generates API return.
S407: this reading statement generates API and to this parameter, the database manipulation API record returned is read API return.
S408: parameter reads API and returned to functional module 101 by the record that this reading statement generation API returns.
S409: the parameter value that functional module 101 reads out corresponding parameter according to the parameter name of the parameter being intended to reading from the record returned returns to user/OLT.
Owing to the configuration data of hardware register is consistent with the data in database file, therefore, systems soft ware reads instruction according to user/OLT hardware parameter sent, it is possible to directly read out the parameter value of corresponding parameter from data base;Thus, decrease the time reading data, and save and read after data from hardware register, carry out data resolving required memory headroom.
In technical scheme, owing to, in the nonvolatile semiconductor memory member in optical network terminal, being arranged to the data base of the tables of data of storage hardware configuration parameter;And the preservation of hardware configuration parameter is carried out modularity, for no optical network terminal, parameter configuration module, statement package module and database operating modules can be transplanted on the optical network terminal of different model, and realize the hardware and software platform that parameter preserves, and being easily maintained property;Simultaneously technical staff is based on the parameter configuration module developed, statement package module and database operating modules, and only need to be absorbed in the writing of code of functional module so that exploitation, maintenance cost are relatively low;And, when optical network terminal increases or amendment services, it is possible to increase or revise the field of data base's corresponding data table so that optical network terminal has autgmentability preferably.
The above is only the preferred embodiment of the present invention; it should be pointed out that, for those skilled in the art, under the premise without departing from the principles of the invention; can also making some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.
Claims (8)
1. the hardware configuration parameter storing method of an optical network terminal, it is characterised in that including:
It is resolved after receiving hardware parameter configuration-direct by the functional module in described optical network terminal, the parameter name of parameter being intended to configuration wherein carried and parameter value;The parameter configuration API of hardware register corresponding with this parameter name in call parameters configuration module, and described parameter name and parameter value are passed to this parameter configuration API;
After this hardware register is carried out parameter configuration according to incoming parameter value by this parameter configuration API, the storage statement of tables of data belonging to the described parameter being intended to configuration in call statement package module generates API, and described parameter name and parameter value are passed to this storage statement generation API;
This storage statement generates API according to incoming parameter name and parameter value, it is determined that go out the value of each field being intended to be saved in a record in tables of data belonging to the described parameter being intended to configuration;Afterwards, generate with SQL storage statement for the character string of content, call the database manipulation API in DBM, and this character string is passed in described database manipulation API;
After incoming character string is resolved by described database manipulation API, perform described SQL and store statement: the record determined is increased to belonging to the described parameter being intended to configuration in tables of data, or according to the record modification determined, be intended to the corresponding record in tables of data belonging to the parameter of configuration;Tables of data belonging to the described parameter being intended to configuration is stored in the data base in this device non-volatile memory part;
After incoming character string is resolved by described database manipulation API, after performing described SQL storage statement, described method also includes:
If described functional module receives the hardware parameter that user sends and reads instruction, then it is resolved, the parameter name of parameter being intended to read wherein carried and parameter value;
Described functional module is called the parameter of hardware register corresponding with the parameter name of the parameter that this desire reads in described parameter configuration module and is read API, and this parameter name is passed to this parameter reading API;
This parameter reads the reading statement of tables of data belonging to the parameter that this desire in statement package module described in API Calls reads and generates API, and the parameter name of the parameter this desire read is passed to this reading statement and generates API;
This reading statement generates API according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the described parameter being intended to and reading;Afterwards, generate with SQL reading statement for the character string of content, call the database manipulation API in DBM, and this character string is passed in described database manipulation API;
After incoming character string is resolved by described database manipulation API, perform described SQL and read statement: tables of data belonging to the parameter read the described desire recording from described data base determined reads out this reading statement backward generation API and returns;
This reading statement generates API and to this parameter, the described database manipulation API record returned is read API return;
This parameter reads API and is returned to described functional module by the record that this reading statement generation API returns;
The parameter value that described functional module reads out corresponding parameter according to the parameter name of the described parameter being intended to and reading from the record returned returns to described user.
2. the method for claim 1, it is characterised in that after the parameter name and parameter value of the described parameter being intended to configuration wherein carried, also include:
Described functional module is called the parameter of hardware register corresponding with this parameter name in described parameter configuration module and is read API, and this parameter incoming for described parameter name is read API;
This parameter reads the reading statement of tables of data belonging to the described parameter being intended to configuration in statement package module described in API Calls and generates API, and described parameter name is passed to this reading statement generation API;
This reading statement generates API according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the described parameter being intended to configuration;Afterwards, generate with SQL reading statement for the character string of content, call the database manipulation API in described DBM, and this character string is passed in described database manipulation API;
After incoming character string is resolved by described database manipulation API, perform described SQL and read statement: the record determined is read out from tables of data belonging to the described parameter being intended to configuration this reading statement backward generation API and returns;
This reading statement generates API and to this parameter, the described database manipulation API record returned is read API return;
This parameter reads API and is returned to described functional module by the record that this reading statement generation API returns;
The parameter value of parameter corresponding with the record of return for the parameter value parsed is compared by described functional module;And
The parameter configuration API of hardware register corresponding with this parameter name in described call parameters configuration module, if particularly as follows: comparative result is different, then calling the parameter configuration API of the hardware register corresponding with this parameter name.
3. method as claimed in claim 1 or 2, it is characterised in that before described functional module receives hardware parameter configuration-direct, also include:
After described optical network terminal starts, described parameter configuration module detects in described nonvolatile semiconductor memory member whether created data base;If it is not, then create described data base in described nonvolatile semiconductor memory member.
4. method as claimed in claim 3, it is characterised in that described create described data base in described nonvolatile semiconductor memory member, specifically includes:
Described parameter configuration module creates described data base and each tables of data in described data base in described nonvolatile semiconductor memory member;Wherein, the parameter each other in this equipment with incidence relation is created in same tables of data;The each parameter not having any incidence relation in this equipment with other parameter is created in same tables of data.
5. an optical network terminal, it is characterised in that including: functional module, parameter configuration module, statement package module and DBM;Wherein
It is resolved after being used for receiving hardware parameter configuration-direct by described functional module, the parameter name of the parameter being intended to configuration wherein carried and parameter value;The parameter configuration API of hardware register corresponding with this parameter name in call parameters configuration module, and by this parameter configuration API incoming to described parameter name and parameter value;
Parameter configuration API in described parameter configuration module is for after carrying out parameter configuration according to incoming parameter value to this hardware register, the storage statement of tables of data belonging to the described parameter being intended to configuration in call statement package module generates API, and described parameter name and parameter value are passed to this storage statement generation API;
Storage statement in described statement package module generates API for according to incoming parameter name and parameter value, it is determined that go out the value of each field of the record being intended to be saved in tables of data belonging to the described parameter being intended to configuration;Afterwards, generate with SQL storage statement for the character string of content, call the database manipulation API in DBM, and this character string is passed in described database manipulation API;
Database manipulation API in described DBM is for after resolving incoming character string, perform described SQL and store statement: belonging to the described parameter being intended to configuration that the record determined is increased in tables of data, or according to the record modification determined, be intended to the corresponding record in tables of data belonging to the parameter of configuration;Tables of data belonging to the described parameter being intended to configuration is stored in the data base in this device non-volatile memory part;
If described functional module is additionally operable to receive the hardware parameter that user sends and reads instruction, then it is resolved, the parameter name of the parameter being intended to read wherein carried and parameter value;And the parameter calling hardware register corresponding with the parameter name of the parameter that this desire reads in described parameter configuration module reads API, and this parameter incoming for this parameter name is read API;
Parameter in described parameter configuration module reads the reading statement of tables of data belonging to the parameter that this desire in statement package module described in API Calls reads and generates API, and the parameter name of the parameter this desire read is passed to this reading statement and generates API;And this parameter reads the API record being additionally operable to this reading statement generation API returns and returns to described functional module;
The statement that reads in described statement package module generates API according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the described parameter being intended to and reading;Afterwards, generate with SQL reading statement for the character string of content, call the database manipulation API in described DBM, and this character string is passed in described database manipulation API;And this reading statement generates API and is additionally operable to this parameter, the described database manipulation API record returned is read API return;
After database manipulation API in described DBM is additionally operable to incoming character string is resolved, performs described SQL and read statement: generate API return tables of data belonging to the record the determined described parameter being intended to read from described data base reads out this reading statement backward;And
Described functional module is additionally operable to the parameter name according to the described parameter being intended to and reading and reads out the parameter value of corresponding parameter from the record returned and return to described user.
6. equipment as claimed in claim 5, it is characterised in that
Described functional module is additionally operable to after the parameter name and parameter value of the described parameter being intended to configuration wherein carried, the parameter calling hardware register corresponding with this parameter name in described parameter configuration module reads API, and this parameter incoming for described parameter name is read API;
Parameter reading API in described parameter configuration module generates API for calling the reading statement of tables of data belonging to the described parameter being intended to configuration in described statement package module, and described parameter name is passed to this reading statement generation API;And this reading statement generates API and is additionally operable to this parameter, the described database manipulation API record returned is read API return;
The statement that reads in described statement package module generates API for according to incoming parameter name, it is determined that go out the record being intended to read in tables of data belonging to the described parameter being intended to configuration;Afterwards, generate with SQL reading statement for the character string of content, call the database manipulation API in described DBM, and this character string is passed in described database manipulation API;And this reading statement generates API and is additionally operable to this parameter, the described database manipulation API record returned is read API return;
Database manipulation API in described DBM is additionally operable to described reading statement is generated after the incoming character string of API resolves, and performs described SQL and reads statement: the record determined reads out this reading statement backward from tables of data belonging to the described parameter being intended to configuration and generates API and return;
Described functional module is additionally operable to compare the parameter value of parameter corresponding with the record of return for the parameter value parsed;If comparative result is different, then call the parameter configuration API of the hardware register corresponding with this parameter name.
7. the equipment as described in claim 5 or 6, it is characterised in that
Described parameter configuration module is additionally operable to, after described optical network terminal starts, to detect in described nonvolatile semiconductor memory member whether created data base;If it is not, then create described data base in described nonvolatile semiconductor memory member.
8. equipment as claimed in claim 7, it is characterised in that
Described parameter configuration module specifically for creating described data base in described nonvolatile semiconductor memory member, and each tables of data in described data base;Wherein, the parameter each other in this equipment with incidence relation is created in same tables of data;The each parameter not having any incidence relation in this equipment with other parameter is created in same tables of data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310398673.2A CN103475517B (en) | 2013-09-04 | 2013-09-04 | Optical network terminal and hardware configuration parameter storing method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310398673.2A CN103475517B (en) | 2013-09-04 | 2013-09-04 | Optical network terminal and hardware configuration parameter storing method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103475517A CN103475517A (en) | 2013-12-25 |
CN103475517B true CN103475517B (en) | 2016-06-29 |
Family
ID=49800227
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310398673.2A Active CN103475517B (en) | 2013-09-04 | 2013-09-04 | Optical network terminal and hardware configuration parameter storing method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103475517B (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103731427B (en) * | 2013-12-31 | 2017-04-12 | 华为技术有限公司 | Conversation processing method, device and system |
CN104168139A (en) * | 2014-08-13 | 2014-11-26 | 烽火通信科技股份有限公司 | OLT equipment customization method based on PON system |
CN105759778B (en) * | 2014-12-16 | 2020-12-22 | 青岛经济技术开发区海尔热水器有限公司 | Control debugging system and debugging method for heat pump water heater |
CN105429789B (en) * | 2015-11-04 | 2018-05-18 | 上海斐讯数据通信技术有限公司 | A kind of OMCI agreements ME collocation methods and system |
CN107995033B (en) * | 2017-11-30 | 2021-11-19 | 深圳市飞鸿光电子有限公司 | ONU configuration file upgrading method and device |
CN110392068B (en) * | 2018-04-17 | 2022-06-21 | 阿里巴巴集团控股有限公司 | Data transmission method, device and equipment |
CN109885293B (en) * | 2019-02-27 | 2022-04-29 | 重庆电子工程职业学院 | Method and device for automatically creating application development of Internet of things and server |
CN113342356B (en) * | 2021-05-18 | 2023-03-28 | 浪潮软件股份有限公司 | Client framework operation and management configuration method |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040120326A1 (en) * | 2002-12-24 | 2004-06-24 | Hyeon-Sik Yoon | System and method for VLAN configuration of E-PON, and recording medium with stored program thereof |
CN101414925A (en) * | 2007-10-17 | 2009-04-22 | 华为技术有限公司 | Method, system and apparatus for configuring optical network terminal |
CN102104420A (en) * | 2009-12-22 | 2011-06-22 | 华为技术有限公司 | Parameter configuring method, device and system for ONT (Optical Network Terminal) |
CN102857838A (en) * | 2012-06-29 | 2013-01-02 | 广东东研网络科技有限公司 | Reconfiguration processing method for OLT (optical line terminal) end to ONU (optical network unit) end parameter configuration failure |
-
2013
- 2013-09-04 CN CN201310398673.2A patent/CN103475517B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040120326A1 (en) * | 2002-12-24 | 2004-06-24 | Hyeon-Sik Yoon | System and method for VLAN configuration of E-PON, and recording medium with stored program thereof |
CN101414925A (en) * | 2007-10-17 | 2009-04-22 | 华为技术有限公司 | Method, system and apparatus for configuring optical network terminal |
CN102104420A (en) * | 2009-12-22 | 2011-06-22 | 华为技术有限公司 | Parameter configuring method, device and system for ONT (Optical Network Terminal) |
CN102857838A (en) * | 2012-06-29 | 2013-01-02 | 广东东研网络科技有限公司 | Reconfiguration processing method for OLT (optical line terminal) end to ONU (optical network unit) end parameter configuration failure |
Also Published As
Publication number | Publication date |
---|---|
CN103475517A (en) | 2013-12-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103475517B (en) | Optical network terminal and hardware configuration parameter storing method thereof | |
US9537737B2 (en) | Consolidated performance metric analysis | |
CN107704360A (en) | Processing method, equipment, server and the storage medium of monitoring data | |
US20140324651A1 (en) | Integrated service identity for different types of information exchange services | |
CN102265297A (en) | Techniques to manage and display related communications | |
CN110493770B (en) | Method for acquiring and managing cloud SIM card data, card pool device and cloud server | |
CN109561300B (en) | Service quality detection method and device | |
CN109379742A (en) | Access method, device and storage medium of wireless local area network | |
CN105101171A (en) | Terminal network parameter configuration method, and terminal | |
CN113612659B (en) | Device networking test method and device, electronic device and storage medium | |
CN102546558B (en) | The changing method of agreement and optical network unit in a kind of optical network unit | |
CN112866053A (en) | Internet of things testing method, system and device and storage medium | |
CN103595736B (en) | Access request treating method and apparatus in video monitoring system | |
CN103902414A (en) | Network type test system and method | |
CN113220481B (en) | Request processing and feedback method, device, computer equipment and readable storage medium | |
CN101867484A (en) | Method and system for upgrading equipment | |
CN110998524A (en) | Method for processing configuration file, processing unit, touch chip, device and medium | |
CN110471966B (en) | Information data verification method, device, computer equipment and storage medium | |
US20200292595A1 (en) | Power outage determination system | |
CN105228139B (en) | A kind of call processing method, device and equipment based on smart machine | |
CN108768807B (en) | Virtual-real interconnection method and device for cloud platform | |
US9813927B2 (en) | Mobile terminal flow identification method and apparatus | |
CN102209149B (en) | Wireless communication equipment and information clearing method | |
CN115544324A (en) | User data analysis method and device and storage medium | |
WO2021128936A1 (en) | Message processing method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |