Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

Modul The sk.ipesoft.sgcom.dataStorage obsahuje entity DataStorage databázy a DataStorageImpl, ktorý zapuzdruje operácie nad touto databázou. Jeho rozhranie sa delí na dve časti – pre ukladanie a pre výber.
Metóda saveCollectedData sa používa na konci každého zberu dát z meračov – úspešného aj neúspešného, aby sa uložili zozbierané dáta a zaznamenané chyby.
Metódu saveSnMapping volá JdlmsWrapper, ak sa pripojí k novému typu merača a získa nový zoznam COSEM objektov v merači, aby ho mohol pri opakovanom pripojení použiť volaním getSnMapping a ušetril tak čas.
Volanie takeCollectedData vytvorí novú transakciu čítania a odstránenia zozbieraných dát pre konkrétny DataPoint na konkrétnom logickom zariadení Celý postup je popísaný v kapitole 1.3 v bode 7. Rozhranie pre riadenie transakcie je reprezentované objektom typu CollectedData. Ak centrála potvrdí prevzatie dát, volaním removeFromStorage sú dáta z DataStorage databázy odstránené, ak prevzatie zlyhá, signalizuje sa to volaním rollbackRemovalFromStorage a dáta sa v databáze ponechajú module contains the DataStorage database entities and the DataStorageImpl, which encapsulates operations over this database. Its interface is divided into two parts - for writing and for selecting.
The saveCollectedData method is used at the end of each meter data collection - successful or unsuccessful - to save the collected data and the errors recorded.
The saveSnMapping method is called by JdlmsWrapper when it connects to a new type of meter and gets a new list of COSEM objects in the meter so that it can use it by calling getSnMapping when it reconnects to save time.
The takeCollectedData call creates a new transaction of reading and deleting collected data for a specific DataPoint on a specific logical device. The entire procedure is described in Chapter 1.3, point 7. The interface for managing the transaction is represented by an object of type CollectedData. If the metering central confirms the data reading, the call removeFromStorage removes the data from the DataStorage database. If the download fails, it is signaled by the call rollbackRemovalFromStorage and the data remains in the database.