1 |
#include "StatusPlugin.h" |
#include "StatusPlugin.h" |
2 |
#include "IGsmModem.h" |
#include "ISmsTransceiver.h" |
3 |
#include "Sms.h" |
#include "Sms.h" |
4 |
|
|
5 |
#include <sstream> |
#include <sstream> |
6 |
#include "version.h" |
#include "version.h" |
7 |
|
|
8 |
#include "common.h" |
#include "Common.h" |
9 |
|
|
10 |
StatusPlugin::StatusPlugin() |
StatusPlugin::StatusPlugin() |
11 |
: Plugin("status", "Returns a status of the smsdaemon") |
: Plugin("status", "Returns a status of the smsdaemon") |
12 |
{ |
{ |
13 |
|
|
14 |
} |
} |
15 |
|
|
16 |
void StatusPlugin::Execute(IGsmModem& modem, SMS& sms) |
void StatusPlugin::Execute(ISmsTransceiver& modem, SMS& sms) |
17 |
{ |
{ |
18 |
Common* cmn = Common::instance(); |
Common* cmn = Common::instance(); |
19 |
|
|
34 |
os << "Uptime: " << days << "d, " << hour << ":" << min << ":" << sec; |
os << "Uptime: " << days << "d, " << hour << ":" << min << ":" << sec; |
35 |
|
|
36 |
|
|
37 |
modem.SendSms(sms.sender, os.str(), true ); |
modem.SendSms(sms.GetSender(), os.str(), true ); |
38 |
|
|
39 |
} |
} |