6 |
#include <string> |
#include <string> |
7 |
#include <iostream> |
#include <iostream> |
8 |
#include <vector> |
#include <vector> |
9 |
#include "SerialPort.h" |
#include "serialport/SerialPort.h" |
10 |
|
|
11 |
#include "GsmModem.h" |
#include "GsmModem.h" |
12 |
#include "Sms.h" |
#include "Sms.h" |
13 |
#include "TogPlugin.h" |
#include "plugins/TogPlugin.h" |
14 |
#include "TrainInfo.h" |
#include "plugins/TrainInfo.h" |
15 |
#include "util.h" |
#include "util.h" |
16 |
|
#include "plugins/StatusPlugin.h" |
17 |
#include "SmsPdu.h" |
#include "SmsPdu.h" |
18 |
|
|
19 |
using namespace std; |
using namespace std; |
52 |
return 0; |
return 0; |
53 |
*/ |
*/ |
54 |
|
|
55 |
|
DebugGsmModem modem(true); |
56 |
|
SMS sms; |
57 |
|
sms.sender="1234"; |
58 |
|
sms.message="status"; |
59 |
|
StatusPlugin status; |
60 |
|
status.Execute(modem,sms); |
61 |
|
|
62 |
|
return 0; |
63 |
|
/* |
64 |
SerialPort port("/dev/ttyS1" ); |
SerialPort port("/dev/ttyS1" ); |
65 |
port.Open( SerialPort::BAUD_9600, |
port.Open( SerialPort::BAUD_9600, |
66 |
SerialPort::CHAR_SIZE_8, |
SerialPort::CHAR_SIZE_8, |
96 |
|
|
97 |
} |
} |
98 |
|
|
99 |
|
*/ |
100 |
/* |
/* |
101 |
vector<PduInfo> pdu = SmsPdu::CreateSmsPdu("4522337617", "Hej med dig, igen", true); |
vector<PduInfo> pdu = SmsPdu::CreateSmsPdu("4522337617", "Hej med dig, igen", true); |
102 |
cout << "Len: " << pdu[0].len << endl; |
cout << "Len: " << pdu[0].len << endl; |