upm
1.3.0
Sensor/Actuator repository for libmraa (v1.7.0)
Main Page
Related Pages
UPM Libraries
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
src
nmea_gps
nmea_gps.hpp
1
/*
2
* Author: Jon Trulson <jtrulson@ics.com>
3
* Copyright (c) 2016 Intel Corporation.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining
6
* a copy of this software and associated documentation files (the
7
* "Software"), to deal in the Software without restriction, including
8
* without limitation the rights to use, copy, modify, merge, publish,
9
* distribute, sublicense, and/or sell copies of the Software, and to
10
* permit persons to whom the Software is furnished to do so, subject to
11
* the following conditions:
12
*
13
* The above copyright notice and this permission notice shall be
14
* included in all copies or substantial portions of the Software.
15
*
16
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
*/
24
#pragma once
25
26
#include <string>
27
#include <iostream>
28
29
#include <stdlib.h>
30
#include <unistd.h>
31
32
#include "nmea_gps.h"
33
34
namespace
upm {
67
class
NMEAGPS
{
68
public
:
69
79
NMEAGPS
(
unsigned
int
uart,
unsigned
int
baudrate,
80
int
enable_pin);
81
89
NMEAGPS
(
unsigned
int
bus, uint8_t addr);
90
94
~NMEAGPS
();
95
102
std::string
readStr
(
size_t
size);
103
111
int
writeStr
(std::string buffer);
112
120
void
enable
(
bool
enable
);
121
129
void
setBaudrate
(
unsigned
int
baudrate);
130
142
bool
dataAvailable
(
unsigned
int
millis);
143
144
protected
:
145
// nmeaGPS device context
146
nmea_gps_context
m_nmea_gps;
147
148
private
:
149
};
150
}
151
152
upm::NMEAGPS::writeStr
int writeStr(std::string buffer)
Definition:
nmea_gps.cxx:68
_nmea_gps_context
Definition:
nmea_gps.h:51
upm::NMEAGPS
API for the NMEA GPS Module.
Definition:
nmea_gps.hpp:67
upm::NMEAGPS::enable
void enable(bool enable)
Definition:
nmea_gps.cxx:80
upm::NMEAGPS::NMEAGPS
NMEAGPS(unsigned int uart, unsigned int baudrate, int enable_pin)
Definition:
nmea_gps.cxx:33
upm::NMEAGPS::setBaudrate
void setBaudrate(unsigned int baudrate)
Definition:
nmea_gps.cxx:87
upm::NMEAGPS::readStr
std::string readStr(size_t size)
Definition:
nmea_gps.cxx:55
upm::NMEAGPS::dataAvailable
bool dataAvailable(unsigned int millis)
Definition:
nmea_gps.cxx:94
upm::NMEAGPS::~NMEAGPS
~NMEAGPS()
Definition:
nmea_gps.cxx:50
Generated on Wed May 24 2017 14:57:04 for upm by
1.8.6