Peekerpoke  0.1 beta
Location Class Reference

#include <Location.h>

Public Member Functions

 Location ()
 Default constructor of class Location. More...
 
 ~Location ()
 
bool isWork ()
 
void doLoop ()
 check if reach a new place, do all the time More...
 

Private Member Functions

int setInterfaceAttribs (int fd, int speed, int parity)
 setter function for port to NFC More...
 
void setBlocking (int fd, int should_block)
 setter function for port to NFC More...
 
void initial ()
 call by constructor More...
 
string buf2str (char *c)
 convert char[] to string in dex More...
 
void searchMap (const string &s)
 
void insertMap ()
 clear and construct the m_map More...
 

Private Attributes

char * portname
 
int fd
 
bool work
 
map< string, pointm_map
 

Constructor & Destructor Documentation

Location::Location ( )

Default constructor of class Location.

Open the port to NFC, call function initial()

Location::~Location ( )

Member Function Documentation

string Location::buf2str ( char *  c)
private

convert char[] to string in dex

Parameters
pointerof char array
Returns
convert result
void Location::doLoop ( )

check if reach a new place, do all the time

void Location::initial ( )
private

call by constructor

void Location::insertMap ( )
private

clear and construct the m_map

bool Location::isWork ( )
void Location::searchMap ( const string &  s)
private
void Location::setBlocking ( int  fd,
int  should_block 
)
private

setter function for port to NFC

Parameters
fdport open return value
should_blockwhether the post should be block
Returns
error code
int Location::setInterfaceAttribs ( int  fd,
int  speed,
int  parity 
)
private

setter function for port to NFC

Parameters
fdport open return value
speedcommunicate speed
parityif parity set 0
Returns
error code

Member Data Documentation

int Location::fd
private
map<string, point> Location::m_map
private
char* Location::portname
private
bool Location::work
private

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