Snorktracker
 All Data Structures Files Functions Variables Macros Pages
Public Member Functions | Protected Attributes | Friends
MyTime Class Reference

#include <Gps.h>

Public Member Functions

int hour ()
 
int minute ()
 
int second ()
 
 MyTime (int t)
 
void clear ()
 
String timeString ()
 
 operator int ()
 

Protected Attributes

int time
 Time in the form of HoursMinutesSecons i.e. 120135.
 

Friends

class MyGps
 

Detailed Description

Class to store the time with an integer

Definition at line 97 of file Gps.h.

Member Function Documentation

void MyTime::clear ( )

Reset the values.

Definition at line 361 of file Gps.h.

References time.

Referenced by MyGps::clear().

362 {
363  time = 0;
364 }
int time
Time in the form of HoursMinutesSecons i.e. 120135.
Definition: Gps.h:101
int MyTime::hour ( )

Gets the hour from the time value

Definition at line 367 of file Gps.h.

References time.

Referenced by timeString().

368 {
369  return time / 10000;
370 }
int time
Time in the form of HoursMinutesSecons i.e. 120135.
Definition: Gps.h:101
int MyTime::minute ( )

Gets the minute from the time value

Definition at line 373 of file Gps.h.

References time.

Referenced by timeString().

374 {
375  return (time / 100) % 100;
376 }
int time
Time in the form of HoursMinutesSecons i.e. 120135.
Definition: Gps.h:101
int MyTime::second ( )

Gets the seconds from the time value

Definition at line 379 of file Gps.h.

References time.

Referenced by timeString().

380 {
381  return time % 100;
382 }
int time
Time in the form of HoursMinutesSecons i.e. 120135.
Definition: Gps.h:101
String MyTime::timeString ( )

Returns the gps time as a string

Definition at line 385 of file Gps.h.

References hour(), minute(), and second().

Referenced by MyGsmGps::getGps(), MyGsmGps::getGpsFromGsm(), MyWebServer::handleLoadInfoInfo(), and MyWebServer::handleLoadMainInfo().

386 {
387  return String(hour()) + ':' + String(minute()) + ':' + String(second());
388 }
int second()
Definition: Gps.h:379
int minute()
Definition: Gps.h:373
int hour()
Definition: Gps.h:367

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