Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
TrainStat.cpp
- Committer:
- takashikojo
- Date:
- 2015-06-26
- Revision:
- 0:a59f55690685
- Child:
- 1:26a0a9220f01
File content as of revision 0:a59f55690685:
#include <mbed.h>
#include <string>
#include "TrainStat.h"
#include "tokyoMetro.h"
TrainStat::TrainStat() {
source = TOKYO_METRO ;
TMetro_initLine() ;
} ;
TrainStat::~TrainStat(){ } ;
bool TrainStat::setLine(string line)
{
switch(source) {
case YAHOO_TRAIN:
return false ;
case TOKYO_METRO:
TMetro_setLine(line) ;
break ;
default:
return false ;
}
return true ;
}
bool TrainStat::getStat()
{
switch(source) {
case YAHOO_TRAIN:
return false ;
case TOKYO_METRO:
TMetro_query("datapoints", "odpt:TrainInformation", recvBuff, sizeof(recvBuff)) ;
return TMetro_getStat(recvBuff) ;
default:
return false ;
}
}