Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

rjs3c/telemetry-processing

Repository files navigation

Telemetry Processing

Description

Telemetry Data Processing using PHP and EE's M2M SOAP Service.

Team

21-3110-AF

Created by

  • Mo Aziz
  • James Brass
  • Ryan Instrell

Contents

  1. Important Configuration
  2. Access
  3. Usage

Important Configuration

Directory structure

├── includes
│   ├── telemetry_processing (NB. originally telemetry_processing_private)
│   │   ├── app
│   │   ├── tests
│   │   ├── bootstrap.php
├── php_public
│   ├── telemetry_processing (NB. originally telemetry_processing_public)
│   │   ├── css
│   │   ├── media
│   │   ├── .htaccess
│   │   ├── index.php

composer.json

This must be configured as follows:

"autoload": {
        "psr-4": {
            "TelemProc\\" : "telemetry_processing/app/src"
        }
 "require": {
        "slim/slim": "^3.12",
        "slim/psr7": "^1.1",
        "slim/twig-view": "^2.4",
        "monolog/monolog": "^2",
        "doctrine/orm": "^2.6",
        "ext-sodium": "*",
        "ext-json": "*",
        "ext-simplexml": "*",
        "ext-libxml": "*",
        "nochso/html-compress-twig": "*"
$ composer update
  • NB. html-compress-twig is required, otherwise SLIM routes will not work.
  • Further details on how to use html-compress-twig can be found here

settings.php

In includes/telemetry_processing/app/settings.php:

return array(
    'telemetrySettings' => array(
        'displayErrorDetails' => true,
        'addContentLengthHeader' => false,
        'mode' => 'development',
        'debug' => true,
        /* TWIG Settings. */
        'telemetryView' => array(
            'twig_attributes' => array(
                'cache' => CACHE_PATH . 'twig/',
                'auto_reload' => true,
            )
        ),
        /* Doctrine Settings. */
        'doctrineSettings' => array( # Enter your own DB details!
            'driver' => '',
            'host' => '',
            'dbname' => '',
            'port' => '',
            'user' => '',
            'password' => '',
            'charset' => ''
        ),
        /* SOAP Settings. */
        'soapSettings' => array(
            'ee_m2m_username' => '', # Enter your own details!
            'ee_m2m_password' => '', # Enter your own details!
            'ee_m2m_phone_number' => '', # Enter M2M Server MSISDN!
            'wsdl' => 'https://m2mconnect.ee.co.uk/orange-soap/services/MessageServiceByCountry?wsdl',
            'soap_attributes' => array(
                'trace' => true,
                'exceptions' => true
            )
        )
    )
);

To access these settings using SLIM's DIC:

$app->getContainer()->get('telemetrySettings')['telemetryView'];
$app->getContainer()->get('telemetrySettings')['doctrineSettings'];
$app->getContainer()->get('telemetrySettings')['soapSettings'];

Administrator User

To be able to manage users, a user with the 'admin' flag must exist in the telemetry_users table and be logged in.

By default, there is a user of administrator status pre-included. NB The credentials can and should be changed by using the User Management interface.

  • Username : telemetry_user
  • Password : telemetry_user_pass

Misc.

Application Constants:

  • APP_PATH : telemetry_processing/app directory
  • APP_TITLE : Telemetry Processing
  • CACHE_PATH : telemetry_processing/app/cache directory
  • CSS_PATH : CSS directory and file
/* in includes/telemetry_processing/app/settings.php */
$css_file_name = 'styles.css';
  • TEMPLATE_PATH : telemetry_processing/app/templates directory
  • LOG_PATH : includes/logs directory

Access

  • Go to your web browser (i.e. Firefox, Edge, Chrome, etc).
  • Navigate to the web root of your Apache web server.
  • Click on telemetry_processing directory.
  • Enjoy!

Usage

Homepage

This is the main entry point of the application. The options/routes accessible through this page are as follows:

  • Send Test Telemetry Messages (Unauthenticated Route)

    • Uses SOAP to send test telemetry data to EE's M2M server (NB An alternative to using your mobile device, if this method doesn't work).
  • Fetch and Present Telemetry Data (Unauthenticated Route)

    • Shows all currently stored telemetry data in the telemetry_data table.
    • Allows refreshing of the data using 'Fetch' button. This uses SOAP to retrieve telemetry data, and stores this in the telemetry_data table.
  • Update Circuit Board Status (Unauthenticated Route)

    • Allows you to update a simulated circuit board using the most recently stored telemetry values.
  • Manage Users (Authenticated Route)

    • Allows a user (of administrator status) to manage registered users. This includes:

      • Changing passwords.
      • Account removal.
    • NB For a user to classify as an administrator, the 'admin' flag must be set in the telemetry_users table.

  • Login

    • Allows registered users to authenticate.
  • Register

    • Allows unauthenticated users to register their information.

About

Telemetry Data Processing using PHP and EE's M2M SOAP Service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •