Skip to content
Snippets Groups Projects

Resolve "Documentation to import new Trackers"

1 file
+ 19
1
Compare changes
  • Side-by-side
  • Inline
+ 19
1
@@ -50,8 +50,26 @@ For each domain to be imported, an entry should be created in the ./config/tikiw
* The certificate to access the SmartData API should be stored in the config directory and described in the configuration.
* The tracker properties defines the name of the trackers (as stored in the TikiWiki) to retrieve the data.
* The api property defines the base url for the API (such as https://iot.lisha.ufsc.br)
* The Trackers element contains a mapping where the mapped value (right) is the name of the Tracker in TikiWiki from which to extract the data.
### Basic information
The import process from the TikiWiki currently assumes that a domain contains three Trackers:
Vehicles, VehicleMaintenancePlan, VehicleMaintenanceReport and VehicleMaintenanceReportErrorCodes.
The first three trackers are specific for each domain. The last one can be shared between different
domains since it a list of standard error codes.
### Extending/modifying the current import process
To modify/extend the current process the class app/command/tikiwiki/ImportCommand.php must be changed.
The process method is responsible for calling the required functions and execute the import process for each domain.
Thus, to add a new Tracker or edit the process of current ones, the necessary methods in this class should be modified.
The class contains several helpers methods to facilitate the conversion process - such as unit conversions and
dynamic TikiWiki Tracker field mappings. The existing methods serve as good guideline on how to implement/extend the
existing code.
# Pipeline development
* Create a new Command (./app/command) following the syntax of existing commands (such as tikiwiki/ImportCommand.php)
* Register the new Command at ./setup.php
\ No newline at end of file
* Register the new Command at ./setup.php
Loading