RAPP Platform API
 All Classes Namespaces Files Functions Variables Typedefs
rapp::cloud::service_controller Class Reference

Main class that controllers RAPP Services. More...

#include <service_controller.hpp>

Public Member Functions

 service_controller ()
 no empty constructor More...
 
void run_job (const std::shared_ptr< asio_socket > job)
 Run one service job. More...
 
void run_jobs (const std::vector< std::shared_ptr< asio_socket >> &jobs)
 Run a group of jobs in a batch. More...
 
void stop ()
 stop the service controller More...
 

Private Attributes

boost::asio::io_service io_
 
boost::asio::ip::tcp::resolver::query query_
 resolution, query and io service More...
 
boost::asio::ip::tcp::resolver resol_
 

Detailed Description

Main class that controllers RAPP Services.

Version
Date
January-2016
Author
Alex Gkiokas a.gki.nosp@m.okas.nosp@m.@orte.nosp@m.lio..nosp@m.co.uk

This class controls services (be it on cloud or robot). A service is a callable function which offers some type of functionality to the callee. Whilst most services reside on the cloud (rapp::services::cloud) some may reside on the robot (rapp::services::robot) The service controller is used for either clour or robot, as it essentially controlls the socket connections. This is low-level stuff, and is of little concern to external developers, and is to be used only by developers who wish to create or extend services.

Definition at line 20 of file service_controller.hpp.

Constructor & Destructor Documentation

rapp::cloud::service_controller::service_controller ( )

no empty constructor

Definition at line 5 of file service_controller.cpp.

Member Function Documentation

void rapp::cloud::service_controller::run_job ( const std::shared_ptr< asio_socket job)

Run one service job.

Parameters
clientis the actual object pointer that will be executed in a single operation
Note
upon completion, the object's handler will be invoked
upon completion - scheduler is reset

Definition at line 9 of file service_controller.cpp.

void rapp::cloud::service_controller::run_jobs ( const std::vector< std::shared_ptr< asio_socket >> &  jobs)

Run a group of jobs in a batch.

Parameters
jobsis vector of constant pointers to client services
Note
upon completion, the each object's handler will be invoked
Warning
upon completion, the queue schedule will be reset.

Definition at line 19 of file service_controller.cpp.

void rapp::cloud::service_controller::stop ( )

stop the service controller

Definition at line 33 of file service_controller.cpp.

Member Data Documentation

boost::asio::io_service rapp::cloud::service_controller::io_
private

Definition at line 49 of file service_controller.hpp.

boost::asio::ip::tcp::resolver::query rapp::cloud::service_controller::query_
private

resolution, query and io service

Definition at line 48 of file service_controller.hpp.

boost::asio::ip::tcp::resolver rapp::cloud::service_controller::resol_
private

Definition at line 50 of file service_controller.hpp.


The documentation for this class was generated from the following files: