Design Fest

Event Logging

Authors: Ivan Neto
                 Nelson Takashi Omori
                 Paulo Cheque Bernardo
                 Renato Pelizzari da Silva
                 Rodrigo Ferreira Baroni

The problem

This is a short description of the problem. The detailed description is here.

A spacecraft has to report required telemetry data to Earth, to report warnings and errors, to verify internal behavior during system testing, and to provide ground operators with detailed data when investigating in-flight anomalies. However, there are limitations like: low downlink rate, low processor speed, low memory and the spacecraft may contact Earth only once a week.

Considering all of the above, we have to design  an event logging facility (ELF) for the spacecraft. 

The desired program:
The system has these requirements:

The design

Class diagram

The program is composed by these classes:

LogSystem

It receives an Event object and apply the entry police. The programmer has to take care of how many events it sends to add to the LogSystem directly, because there is the needed to call LogSystem::arrangeDataBase( ) periodically to check and remove some events that can have its retention policy expired and maybe with full disk, and so to get free space to add new events into the DataBase.

Event

Base class for events. It contains attributes like severity,  event ID, event type ID, timestamp and sourceLocation.

RetentionPolicy

Object that represents a retention policy. It is utilized when the disk is full, and the system has to decide if deleting data is necessary.

RetentionPolicyManager

Every type of Event has its own retention RetentionPolicy. The RetentionPolicyManager manages all of the retention policies that are sent from Earth through Facade.

StoragePolicy

Object that represents all storages policy. When an event occurs, all storage policies are checked, and just if some policy matches the event being requested to be logged, it will be stored.

EntryPolicy

Keeps info about how long (retention policy) that a single kind of event desirable to be logged will be kept into the database.

LogSystemManagerFacade

Facade allows Earth to get the logs and to change the storage and retention policies of the LogSystem. This can be done by calling getDataLogs( ), changeStoragePolicies(desiredEvents: EntryPolicy) and changeRetentionsPolice(retPolicies: RetentionPolicy).

DMSDriver

Driver to communicate with data manager subsystem.

Dynamic

 
Sequence diagram

We assumed that the object Event comes from other components already instantiated. So the LogSystem will receive this object and will call the method add(ev: Event). Then it gets the event type policy from StoragePolicy, inserts the RetentionPolicy into the Event and verifies if it is applicable. If it is, it connects with DMS and stores the Event using DMSDriver.

In some cases, the disk is full, so the SystemLog has to choose some data to be deleted. It calls arrangeDataBase(), that will utilize the information about retention policy, that was stored with the Event, and will free space and log the new entry.

Ground Operator

Class diagram

This diagram describes how a ground operator can interact with the spacecraft to get the desired logged data or update the system with new retention or entry polices.

System Programmer

Class diagram

A system programmer can add new kind of events and specific data. The programmer should also throw this event and catch it, so this event can be logged afterward if necessary.