- •Content
- •List of symbols and abbreviations
- •Introduction
- •1 Analysis of the subject field
- •1.1 Structure of the enterprise
- •1.2 Enterprise Information System
- •1.3 Statement of the problem
- •2 Оptions for possible methods of accounting and controlling electric energy
- •2.1 Electronic programmable device for remote metering of electric energy of the type «ets-m»
- •2.2 Electronic Multifunctional Multimeter «sem-1»
- •2.3 Characteristics of amr
- •2.4 General requirements for the amr system
- •2.5 Review of existing amr
- •3 Creating a software module
- •3.1 Selecting the language and development environment
- •3.2 Protocol of data exchange with a counter
- •3.3 Structure of the program module for processing the data of electricity meters
- •3.4 Sequence of execution of the request of the electric power meter data processing module
- •3.5 Software Implementation
- •3.6 Cyclic redundant code (crc)
- •Conclusion
- •List of used sources
3 Creating a software module
3.1 Selecting the language and development environment
The tasks were solved using the following means:
1 When building the use case diagram and other diagrams of this application, the Enterprise Architect 7.5 application was used.
2 An object-oriented Java language (the Eclipse MARS.1 shell) was chosen to write the application. The system will be implemented as a distributed application using the JEE7 platform. The model of access to the data of the electric meter will be implemented using a serial communication channel. Data will be accessed using Hibernate ORM technology. Business logic will be implemented using the Spring 4.1 framework. The client application will be implemented using the technology of the GUI application and the jssc-2.8.0 library. The GUI will be developed using the Swing framework.
Spring Framework (or shortly Spring) is a universal open source framework for the Java platform. The Spring Framework is best known as the source of the extensions (features) needed to efficiently develop complex business applications beyond the heavyweight software models that historically have been dominant.
Hibernate is a library for the Java programming language intended for solving object-relational mapping (ORM) problems. This library provides an easy-to-use framework for mapping an object-oriented data model to traditional relational databases. The goal of Hibernate is to free the developer from the significant amount of relatively low-level programming for storing objects in a relational database.
Swing Framework (or shortly Swing) - provides more flexible interface components than the earlier AWT library. Unlike AWT, Swing components are designed for the same cross-platform work, while AWT components repeat the interface of the executable platform unchanged. AWT also uses only standard OS elements for display, that is, for each element a separate OS object is created, therefore AWT does not allow creating arbitrary elements (it is possible to use only rectangular components), AWT-based controls are always displayed over Swing elements (since all Swing components are displayed on the surface of the container). Swing components support specific dynamically connected kinds and behaviors, which allow adaptation to the GUI of the platform (that is, you can dynamically connect another component specific to the operating system, including the type and behavior created by the programmer) to the component. Thus, applications that use Swing can look like native applications for this operating system. The main disadvantage of such «lightweight» components is a relatively slow work. The positive side is the universality of the interface of the created applications on all platforms.
Jssc (the full name of Java Simple Serial Connector) is an open library that allows you to freely work with serial COM ports. The main advantages of this library are:
- the possibility of free use;
- Simplicity of work;
- Multithreading;
- high speed of the main classes and functions;
- Support for the maximum possible number of operating systems of the Windows family.
