CN101510153A - Data conversion logical unit - Google Patents

Data conversion logical unit Download PDF

Info

Publication number
CN101510153A
CN101510153A CNA200910048039XA CN200910048039A CN101510153A CN 101510153 A CN101510153 A CN 101510153A CN A200910048039X A CNA200910048039X A CN A200910048039XA CN 200910048039 A CN200910048039 A CN 200910048039A CN 101510153 A CN101510153 A CN 101510153A
Authority
CN
China
Prior art keywords
unit
data
header file
data conversion
source
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA200910048039XA
Other languages
Chinese (zh)
Inventor
董琦
刘岚
殷昊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huaya Microelectronics Shanghai Inc
Original Assignee
Huaya Microelectronics Shanghai Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huaya Microelectronics Shanghai Inc filed Critical Huaya Microelectronics Shanghai Inc
Priority to CNA200910048039XA priority Critical patent/CN101510153A/en
Publication of CN101510153A publication Critical patent/CN101510153A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a data transformation logic unit, which is used for transforming and outputting input data and characterized by comprising a header file unit and a source file unit. The header file unit is used for providing parameter-definition which is used for data interchange of the data transformation logic unit and the external part; the source file unit is used for providing concrete realization that source function is used to transform and output the input data; and the data transformation logic unit provides unified external data parameters and the source function. The logic unit has unified external data type and the source function, simplifies the check to the interface functions when invoking each other, saves the workload of programming, and reduces the code amount by improving the reusability of the codes. The invention also provides operations such as inquiry, retrieval, classification and the like, reduces the debugging difficulty and saves huge costs under the premise of guaranteeing the programming flexibility.

Description

Data conversion logical unit
Technical field
The present invention relates to numerical data and handle, especially for the data conversion logical unit of software development.
Background technology
Last century six the seventies, along with the appearance of Object-Oriented Programming Language, the various software development methodologies of Object-oriented Programming Design and framework also arise at the historic moment and are developed rapidly.
The core part of Object-oriented Programming Design has been to propose the notion of " object ", by objective entity being abstracted into " object " with certain attribute and function, and by " object " encapsulated, the parameter interface of its attribute and the function of only opening to the outside world, make the programmer in the process of coding, do not need to know the method for object itself be attribute that how to realize and concrete how, and only need the parameter interface of allocating object, just can call object and finish specific function.
MFC (Microsoft Foundation Classes) commonly used at present is exactly a class libraries that comprises more than 100 class, and wherein, these classes are exactly the most frequently used object that arrives in the software development process.In programming process, except calling the parameter interface of these existing objects, to realize needed function, can also utilize the existing object of method from the MFC class libraries of " succession " to derive various self-defined objects, these self-defined objects are except attribute and function with existing object, can also have various self-defining attributes and function as required, thereby realize the expansion of object.
Yet, flourish along with software industry, software systems become and become increasingly complex.Software systems generally include a more than project that comprises a plurality of application examples, and therefore on stream, same class may need to be multiplexed in one or more application examples in the identical or different project.Because the difference of each applied environment, in general, the multiplexing of class can not only be realized by the code of duplicating, pasting class simply, also need manually adjust the interface parameters of class and the relevant parameter in the application example at different application examples, and the exploitation of software systems is finished by several slip-stick artists even a plurality of team collaboration usually, that is to say that a certain section code of being finished may be repeatedly multiplexing by different people.Because the disunity of class interface and program thread and applied environment there are differences, in the process of code reuse, the code of class often appears for example not duplicating fully easily, the perhaps interface parameters of unmodified class has perhaps only been revised the interface parameters of class and problems such as relevant parameter in the unmodified application example.This not only causes the error rate of program to increase greatly, returns follow-up maintenance and inspection work brings very big difficulty, has both delayed the construction cycle, has also increased cost of development.
Summary of the invention
The problem to be solved in the present invention provides a kind of data conversion logical unit, avoids because the problem that the error rate that code reuse brought increases, workload increases, the construction cycle prolongs and cost of development improves.
For addressing the above problem, the invention provides a kind of data conversion logical unit, be used for the input data are changed and exported, it is characterized in that, comprising:
Header file unit is used to provide described data conversion logical unit and outside parameter-definition of carrying out exchanges data;
The specific implementation that provides source function that the input data are changed and exported is provided in the source file unit;
Described data conversion logical unit has standardized outbound data parameter and source function.
Described header file unit comprises:
The header file identify unit is used to identify this logical block and provides classification and the foundation of retrieval;
Header file parameter unit is used for the source function in this logical block is stated and defined.
Optionally, described header file identify unit comprises at least: the header file name identification is used to realize the coupling with described source file unit title; And header file describing word sign, be used to provide the foundation that described header file unit is classified and retrieved.
Optionally, described header file identify unit also comprises: first public information sign is used to identify basic public informations such as developer, company, version information, so that the foundation of retrieval to be provided.
Optionally, described header file parameter unit comprises function declaration at least, the type specification of input data, output data and growth data, and parameter-definition, defined parameter is consistent in described data conversion logical unit.
Optionally, there is and only has a source function described source file unit, and the content of function name and definition that header file identifies is complementary
Compared to prior art, the present invention is by providing standardized outbound data type and source function for same data conversion logical unit, simplified the inspection of docking port function when calling mutually between the different data conversion logical units, saved the workload of programming, and, reduced size of code by having improved the reusability of code.And by identify unit is set, operations such as inquiry, retrieval, classification have been made things convenient for, alleviated the difficulty of debugging, in addition, also pass through the matching structure of a header file unit and at least one source file unit, make same data conversion logical unit can have different behavior realization and initiation parameter, guaranteed flexibility of programming.
Description of drawings
Fig. 1 is the synoptic diagram of data conversion logical unit embodiment of the present invention;
Fig. 2 is the synoptic diagram of the embodiment of header file unit described in Fig. 1;
Fig. 3 is the synoptic diagram of the unit of source file described in Fig. 1 embodiment;
Fig. 4 is the workflow diagram of described display logic unit.
Embodiment
The object of being mentioned in the background technology comprise at least between data element, the data element relation and to the operation of data element, and the interface of object is itself and extraneous passage, definition and expression by these interface parameterss, extraneous program can with required to the data element in the described object, between the data element relation and the processing that the operation of data element is carried out transferred to this object inside, obtain needed result.Interface parameters can be for the relation between data element, the data element and to the combination in any in the operation of data element.Therefore, the definition of interface parameters and expression will influence the function that can realize of object.Give an example, for the object A that carries out multiplying, have two interface parameterss, be respectively real number a and real number b, the product of a and b institute assignment as a result of is worth is returned, and for the object B of carrying out power exponentiation, have three interface parameterss, be respectively real number c, real number d and real number e, after the assignment of c and d is multiplied each other, again product is carried out the power operation of the assignment of e, then return results.As seen, owing to defined different interface parameters, although be to carry out multiplying, the function of described object is also different.Promote the dirigibility in the performance history on the certain meaning of the disunity of this interface, but increased the difficulty of debugging, modification and maintenance also; Especially whether some self-defining objects meet its definition to calling of its and can only rely on artificial inspection to finish substantially, have increased workload and cost of development.
The inventor just is being based on the taking all factors into consideration of the problems referred to above, and after a large amount of research and test have been carried out in the framework of object and necessary operation, has proposed the present invention.
Embodiment of the present invention provides a kind of data conversion logical unit, be used for the input data are changed and exported, have standardized outbound data type and source function, comprise and be provided with header file unit and source file unit, described header file unit is provided with corresponding identify unit, has both guaranteed flexibility of programming such as succession, expansion, has simplified the complicacy of programming again greatly, save a large amount of manpowers and time, saved cost of development.
Promptly in conjunction with the accompanying drawings and embodiments the specific embodiment of the present invention is described in detail below.
Each described data conversion logical unit provides standardized outbound data type and source function, because a kind of conversion way of output of each logical block corresponding data, that is to say, same data conversion logical unit allows multiple input data, all is standardized but all input data and output data also have source function.
Specifically, each described data conversion logical unit can comprise a header file unit and a source file unit.In same data conversion logical unit, source file unit and this header file unit are complementary, so that define, retrieve.
With reference to figure 1, in data conversion logical unit 1, header file unit 1 is corresponding to source file unit 1; In data conversion logical unit 2, header file unit 2 corresponds respectively to source file unit 2; In addition, data conversion logical unit 1 is by header file unit 1, and data conversion logical unit 2 is by header file unit 2, the inputoutput data with unified standard.Standardized inputoutput data, reality is determined by the source function of seeking unity of standard, there is and only has a transfer function data conversion logical unit inside, all observing unified consistent standard when writing transfer function also can be discerned by compilation tool, make like this and be easy to repeat to call after the logical block standardization, and the intercommunication data type, and the needed data type of transfer function will will be defined in the aftermentioned header file.
With reference to figure 2, described header file unit is corresponding to the translation data behavior of data conversion logical unit, be used to provide this data conversion logical unit to carry out the parameter-definition of exchanges data and the function declaration of inside sources function, can comprise: header file identify unit and header file parameter unit with outside.
Wherein, described header file identify unit can comprise header file name identification and header file describing word sign at least, is used to provide the foundation that described header file unit is classified and retrieved, and described name identification also is used to realize the coupling with described source file unit.Described header file identify unit also can comprise first public information sign, is used to identify basic public informations such as developer, company, version information, so that the foundation of retrieval to be provided.
Described header file parameter unit can comprise function declaration, the type specification of input data, output data and growth data, and parameter-definition, defined parameter is consistent in described data conversion logical unit.The parameter unit has defined the data type of the endogenous functional dependence of notebook data conversion logical unit, can carry out parameter identification by enumerating, and comprises the description of input data type, output data type specification and growth data description etc.
Described source file unit is the specific implementation of described data conversion logical unit being carried out data-switching.Give an example,, be output as 3 operation, suppose to determine that a transfer function carries out figure place with the scale-of-two parameter and splits, carry out the last addition of multiplying, i.e. 1x2+1=3 then respectively for realizing input scale-of-two parameter 11.Obtain its decimal system result's output.And the process definition in header file respectively of scale-of-two input parameter and decimal system output parameter.Certainly, in concrete enforcement, the performed task of described data conversion logical unit can be comparatively complicated, and the source function compiling type of described source file also can be more accordingly.
With reference to figure 3, the specific implementation that described source file unit provides source function and data are changed, can comprise source file identify unit and source function unit, wherein the notebook data conversion logical unit is because function only is the input data are changed back output, its source file unit only need provide source function to get final product, so do not need the source file identify unit.But for the unification that keeps the file unit structure, multiplexing, it is empty and can expand in being made as to reserve identify unit.
A specific embodiment is provided below, the workflow of described source file unit is further introduced,
For a data conversion logical unit with Presentation Function, be called for short the display logic unit, its main function is the state of system or other behaviors, carry out visual conversion, particularly, the core data with characterization system state or other behaviors converts the required video data of graphical control to.The data processing method of a kind of display logic unit, also be the source function workflow as shown in Figure 4:
At first carry out step S1, read core data; Because defined the input data parameters in the header file of display logic unit, certain core data (supposing to characterize the binary data 11 of volume) as satisfactory input data type, is shown logic unit reads.
Carry out step S2 then, the core data that reads is carried out conversion process, if the conversion source function of display logic unit is the binary data 11 with this sign volume, convert metric character string to and export demonstration, then through we obtain a decimal data 3 after the conversion of source function.
Carry out step S3 again, the video data that obtains is exported, write store calls for follow-up graphical control, finally is presented on the visualization interface, being illustrated in character string in face of the user will be decimal data 3, and the characterization system current state is that device voice volume is 3.
In said process, after the source function of display logic unit changes into video data with the core data that reads, can also insert growth data and integrate, export again.Such as obtaining after the metric video data 3, it can be expanded and in simple numerical information 3, insert the colouring information redness again, write store again, and the related control data type of change correspondingly finally obtain red character string 3 at display screen.
Only by checking the whether consistent safety inspection of being stated in employed interface parameters and the header file that obtains type, the respective embodiments described above of the present invention have significantly beneficial effect compared to prior art:
At first, in embodiment of the present invention, all data-switching of data conversion logical unit realize all providing the source function and the outbound data type of unified standard, simplified the inspection of docking port function when calling mutually between the different data conversion logical units, saved the workload of programming, and, reduced size of code by having improved the reusability of code.And generate the specific code of header file unit and the masterplate of source file unit by instrument, reduced workload, saved a large amount of manpowers and energy;
Secondly, in the header file unit of composition data conversion logical unit, be provided with header file identify unit and source file identify unit, made things convenient for operations such as inquiry, retrieval, classification, alleviated the difficulty of debugging greatly, alleviated workload, shortened the construction cycle;
In addition, because data conversion logical unit is set to have the structure of a header file unit and a source file unit, make data conversion logical unit can have the most basic data-switching behavior, be easy to the code reuse of source function in the logical block, can also make programming have the dirigibility of height the combination of several data conversion logical unit.
Though the present invention by the preferred embodiment explanation as above, these preferred embodiments are not in order to limit the present invention.Those skilled in the art without departing from the spirit and scope of the present invention, should have the ability various corrections and additional are made in this preferred embodiment, and therefore, protection scope of the present invention is as the criterion with the scope of claims.

Claims (6)

1. a data conversion logical unit is used for the input data are changed and exported, and it is characterized in that, comprises
Header file unit is used to provide described data conversion logical unit and outside parameter-definition of carrying out exchanges data;
The specific implementation that provides source function that the input data are changed and exported is provided in the source file unit;
Described data conversion logical unit has standardized outbound data parameter and source function.
2. data conversion logical unit as claimed in claim 1 is characterized in that, described header file unit comprises:
The header file identify unit is used to identify this logical block and provides classification and the foundation of retrieval;
Header file parameter unit is used for the source function in this logical block is stated and defined.
3. data conversion logical unit as claimed in claim 2 is characterized in that, described header file identify unit comprises at least: the header file name identification is used to realize the coupling with described source file unit title; And header file describing word sign, be used to provide the foundation that described header file unit is classified and retrieved.
4. data conversion logical unit as claimed in claim 3 is characterized in that, described header file identify unit also comprises: first public information sign is used to identify basic public informations such as developer, company, version information, so that the foundation of retrieval to be provided.
5. data conversion logical unit as claimed in claim 2, it is characterized in that described header file parameter unit comprises function declaration at least, the type specification of input data, output data and growth data, parameter-definition, defined parameter is consistent in described data conversion logical unit.
6. data conversion logical unit as claimed in claim 1 is characterized in that, there is and only has a source function described source file unit, and the content of function name and definition that header file identifies is complementary.
CNA200910048039XA 2009-03-20 2009-03-20 Data conversion logical unit Pending CN101510153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA200910048039XA CN101510153A (en) 2009-03-20 2009-03-20 Data conversion logical unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA200910048039XA CN101510153A (en) 2009-03-20 2009-03-20 Data conversion logical unit

Publications (1)

Publication Number Publication Date
CN101510153A true CN101510153A (en) 2009-08-19

Family

ID=41002558

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA200910048039XA Pending CN101510153A (en) 2009-03-20 2009-03-20 Data conversion logical unit

Country Status (1)

Country Link
CN (1) CN101510153A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558627A (en) * 2018-10-15 2019-04-02 中国核电工程有限公司 A kind of software automatically generates the method across function division repertoire of signals
CN111104100A (en) * 2018-10-29 2020-05-05 大陆汽车电子(连云港)有限公司 Method, system and storage medium for logic control
CN117632312A (en) * 2024-01-25 2024-03-01 深圳市永联科技股份有限公司 Data interaction method and related device
CN117632312B (en) * 2024-01-25 2024-05-14 深圳市永联科技股份有限公司 Data interaction method and related device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109558627A (en) * 2018-10-15 2019-04-02 中国核电工程有限公司 A kind of software automatically generates the method across function division repertoire of signals
CN109558627B (en) * 2018-10-15 2023-07-07 中国核电工程有限公司 Method for automatically generating cross-functional partition signal list by software
CN111104100A (en) * 2018-10-29 2020-05-05 大陆汽车电子(连云港)有限公司 Method, system and storage medium for logic control
CN111104100B (en) * 2018-10-29 2023-10-03 大陆汽车电子(连云港)有限公司 Method, system and storage medium for performing logic control
CN117632312A (en) * 2024-01-25 2024-03-01 深圳市永联科技股份有限公司 Data interaction method and related device
CN117632312B (en) * 2024-01-25 2024-05-14 深圳市永联科技股份有限公司 Data interaction method and related device

Similar Documents

Publication Publication Date Title
Hermanns et al. Stochastic process algebras–between LOTOS and Markov chains
CN110825362A (en) Low-code application software development system and method
Schlenoff et al. A robust process ontology for manufacturing systems integration
CN104360865A (en) Serialization method, deserialization method and related equipment
CN109542450B (en) Method and device for realizing intelligent component of process layer of intelligent substation
CN104298496A (en) Data-analysis-based software development framework system
CN101944026A (en) Implementation method of universal virtual instrument interface
CN102779044B (en) The dissection process system of expression formula and analyzing and processing method
CN112860256B (en) Visual configuration system and method for Linux kernel equipment tree
CN108829884A (en) data mapping method and device
CN111880784A (en) SIMSCRIPT language-oriented discrete event simulation graphical modeling method
CN101211262A (en) Software architecture description language quick construction and support method
CN102354275B (en) Text input box and data processing method thereof
Teilans et al. Design of UML models and their simulation using ARENA
CN101510153A (en) Data conversion logical unit
US6983468B1 (en) Automated interface generation for computer programs in different environments
US11188307B2 (en) Modelizing resources and external data of a program for procedural language coding
CN107391872B (en) Method and device for using PDMS three-dimensional model in software
CN103164228B (en) A kind of generation method of field programmable gate array program and device
CN115495069A (en) Model-driven coal industry software flow implementation method, device and equipment
Shershakov Vtmine for visio: A graphical tool for modeling in process mining
Zhao Interaction design system for artificial intelligence user interfaces based on uml extension mechanisms
CN101515249B (en) Error inspection method
CN102207858A (en) Method for introducing user custom algorithm into algorithm container
Staines A comparison of software analysis and design methods for real time systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20090819