The persistence service on the SDDL core is used to populate the database with json messages exchanged with Mobile Hub. It supported receiving and sending message to mobile hubs.
For usage you of the project PersistenceServiceSDDL you need:
The project has the following structure and the following source java code:
The blue marked section of the project is the persistence source code.
The PersistanceService.Java initializes de processing SDDL core node, and uses the CtreeDatabase.java to persist the information on the CTreeACE database.'
It also uses utils.java to parse the json messages received from the mobile hub. It contains in model all classes that the SDDL can receive from sensors from the mobile hub. All of these classes extend the InformationData.java abstract classes.
By running the PersistanceService.java it will initialize the Core, by giving the Server IP to the mobile Hubs, it will be ready to receive and process the json messages exchanged with mobile hub node and persists relevant data on the c-treACE database.
The red marked section of the project is a client that simulates a MobileHub where the developer can create json messages and send to the PersistanceService. By running HelloCoreClient.java after running the PersistanceService.Java it will generate all supported messages to test the persistence and easy the development of new features without needing for a actual mobile hub with sensors that send all types of messages functioning.
The black arrow marked section consists of MsgFormats.md that contains the supported json messages it can receive from mobile hub or send it back to mobile. If the developer will change the json format of the message or add additional messages is important to keep this document up to date.