Library
Наша цель - создание ПО для сетей сбора данных. Мы должны обеспечить поддержку регистрации данных, передачи данных в ЦОД, хранение (резервное копирование, архивация - вертикальная масштабируемость (?)), организация доступа (распространение данных, публикация как данных, так и результатов их обработки). Имея в виду тенденцию к увеличения плотности сетей наблюдения необходимо обеспечить горизонтальную масштабируемость системы.
Мы будем считать, что пункты наблюдений оснащены приемным оборудованием JAVAD или совмести
This software is a programming component that is used to create tools for GNSS data management service. The purpose of such service is to collect, store and make publicly available GNSS measurement data. Key features of such data management service include providing online access to captured data for user-chosen period of time and being capable of capturing every piece of measurements that the receiver can provide.
To enable stable and fast access to stored data the service should implements some features that are generally attributed to database management systems. These features are: horizontal scaling, data redundancy, and predictable search time. One of the ways to acquire these traits is to utilize a popular relational database management system such as PostgreSQL or MySQL with its forks. RDBMS like those already include the desired features. Through database clustering we can achieve horizontal scaling, replication provides data redundancy and with indexes we can achieve predictable search time. In our software we have chosen MySQL as database management system, however, this could be easily changed. The API's to access the RDBMS are public and are available for almost any platform and programming language. To use RDBMS as storage for GNSS data our manipulation API provides all the necessary connectors.
To implement the capture capability feature we have decided to use vendor-specific format with an evergreen API. This reduces the effort to manually keep the format up-to-date with receiver capabilities. The subject software implements GREIS. Unlike most other vendor-specific formats GREIS has a very well-formed specification. So we designed an automated code generator that processes the official specification into C++ code of program library we called "Greis", database schema for MySQL and brief documentation in Doxygen. At the core of automatic code generation lies the meta-information gathered from official vendor documentation, a document called "GNSS Receiver External Interface Specification". This document describes the format used by the receiver's firmware. To obtain formal format definition from this human-readable document we utilize some basic methods of natural language processing. The result of such processing is format specification metainformation. This metainformation is a sufficient instrument to describe any message. To generate metainformation we locate the specific fragments of text, analyse them and then build a syntax tree. Those specific fragments of interest are C-like message definitions, as seen on fig. 1. After analysis we have a syntax tree except for dynamic length messages. Because the messages could be either fixed length or dynamic length
The document has an easily distinguishable structure so we considered simple methods of lexical analysis sufficient. The analysis is performed in two steps: inter-message and intra-message and is sort of finite-state machine. First step locates specific fragments i. e. message definitions with preprogrammed character sequences called anchors. When this anchor is encountered during the processing the state of the parser switches to intra-message parsing. Intra-message parsing is a strict syntactic analysis with regular expressions that extracts the needed attributes of message until "stop" anchor triggers changes the state again to inter-message. The result is an abstract syntax tree that describes the whole message composition. This abstract syntax tree is ultimately formalized into XML-formatted specification. This XML is then used to create library headers, code files, doxygen documentation and SQL deployment schema.