Rock Monitoring  V 1.0
Connection3G Class Reference

Class that handles the communication over 3G. More...

#include <Connection3G.h>

Collaboration diagram for Connection3G:
Collaboration graph

Public Member Functions

 Connection3G ()
 
void init ()
 This method initializes the operator parameters that are necessary for 3G connection. More...
 
uint8_t sendData (Sensors::structSensors *sensors)
 This method sends all the sensor information from the struct to the webserver. More...
 
uint8_t sendData (Sensors::structSensors *data, uint8_t size)
 This method sends the information of the sensors in the array to the webserver the parameter size tells the function how many sensors from the array should be uploaded. More...
 
uint8_t checkConnection ()
 This method checks if a connection to the 3G network can be established. More...
 

Private Attributes

const char * simPin = "5858"
 
const char * httpStreamAddress = "rockmonitoring.netpresence.ch"
 

Detailed Description

Class that handles the communication over 3G.

Definition at line 15 of file Connection3G.h.

Constructor & Destructor Documentation

Connection3G::Connection3G ( )

Definition at line 5 of file Connection3G.cpp.

Member Function Documentation

uint8_t Connection3G::checkConnection ( )

This method checks if a connection to the 3G network can be established.

Returns
uint8_t state, 0 when 3G Connection could be established, 1 when connection could not be established

Definition at line 188 of file Connection3G.cpp.

void Connection3G::init ( )

This method initializes the operator parameters that are necessary for 3G connection.

Definition at line 9 of file Connection3G.cpp.

uint8_t Connection3G::sendData ( Sensors::structSensors data)

This method sends all the sensor information from the struct to the webserver.

Parameters
Sensors::structSensors* data
Returns
uint8_t state, 0 when sent, 1 when send failed

Definition at line 25 of file Connection3G.cpp.

uint8_t Connection3G::sendData ( Sensors::structSensors data,
uint8_t  size 
)

This method sends the information of the sensors in the array to the webserver the parameter size tells the function how many sensors from the array should be uploaded.

Parameters
Sensors::structSensors* data , data of the sensors
uint8_t size, number of sensors to upload to webserver
Returns
uint8_t state, 0 when sent, 1 when send failed

Definition at line 106 of file Connection3G.cpp.

Member Data Documentation

const char* Connection3G::httpStreamAddress = "rockmonitoring.netpresence.ch"
private

Definition at line 28 of file Connection3G.h.

const char* Connection3G::simPin = "5858"
private

Definition at line 27 of file Connection3G.h.


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