/[projects]/smsdaemon/tester.cpp
ViewVC logotype

Diff of /smsdaemon/tester.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 26 by torben, Mon Jun 9 18:15:53 2008 UTC revision 54 by torben, Wed Jun 11 12:57:26 2008 UTC
# Line 4  Line 4 
4    
5  #include <string>  #include <string>
6  #include <iostream>  #include <iostream>
7  #include "SerialPort.h"  #include <vector>
8    /*#include "SerialPort.h"
9    */
10  #include "GsmModem.h"  #include "GsmModem.h"
11  #include "Sms.h"  #include "Sms.h"
12    #include "TogPlugin.h"
13    #include "TrainInfo.h"
14    #include "util.h"
15    
16    
17  using namespace std;  using namespace std;
18    
# Line 15  int main() Line 21  int main()
21  {  {
22    
23          SMS sms;          SMS sms;
24            sms.sender = "12345678";
25            sms.message = "Tog list";
26            DebugGsmModem modem;
27            TogPlugin plugin;
28    
29            plugin.Execute(modem, sms);
30    
31    
32            string msg = Util::str_gsm2latin(modem.GetMessage());
33    
34            cout << "---- " << msg.length() << " ----" << endl;
35            cout << msg << endl;
36    
37    /*
38            vector<TrainInfo> trains = GetTrainInfo("BJ","Bjerringbro");
39    
40            for (unsigned i=0; i<trains.size(); ++i)
41            {
42                    TrainInfo& train = trains[i];
43                    cout << "-------------------------------------" << endl;
44                    cout << "Time:       {" << train.time        << "}" << endl;
45                    cout << "Update:     {" << train.update      << "}" << endl;
46                    cout << "Type:       {" << train.type        << "}" << endl;
47                    cout << "Destination:{" << train.destination << "}" << endl;
48                    cout << "Origin:     {" << train.origin      << "}" << endl;
49                    cout << "Current:    {" << train.current     << "}" << endl;
50                    cout << "Status:     {" << train.status      << "}" << endl;
51                    cout << "Note:       {" << train.note        << "}" << endl;
52            }
53    */
54    /*
55            SMS sms;
56    
57          sms.message = "Test   test2   teste3 test4";          sms.message = "Test   test2   teste3 test4";
58    
# Line 47  int main() Line 85  int main()
85          {          {
86                  modem.SendSms("22337617","Test");                  modem.SendSms("22337617","Test");
87          }          }
88    */
89          return 0;          return 0;
90  }  }

Legend:
Removed from v.26  
changed lines
  Added in v.54

  ViewVC Help
Powered by ViewVC 1.1.20