--- smsdaemon/tester.cpp 2008/06/11 10:21:47 49 +++ smsdaemon/tester.cpp 2008/06/12 11:05:18 61 @@ -1,26 +1,71 @@ /* using http://sourceforge.net/projects/libserial/ + * */ #include #include #include -/*#include "SerialPort.h" -*/ +#include "SerialPort.h" + #include "GsmModem.h" #include "Sms.h" #include "TogPlugin.h" +#include "TrainInfo.h" #include "util.h" +#include "SmsPdu.h" using namespace std; +void test_sms(GsmModem& modem, int len) +{ + cout << "----- test_sms( " << len << " ) ------- " << endl; + + string msg = Util::str_formatint(len); + msg.append(len - msg.length(), 'a'); + + vector pdu = SmsPdu::CreateSmsPdu("4522337617", msg, true); + + for (unsigned int i=0; i pdu = SmsPdu::CreateSmsPdu("4522337617", "Hej med dig, igen", true); + cout << "Len: " << pdu[0].len << endl; + cout << "Pdu: " << pdu[0].pdu << endl; + + modem.SendSmsPdu(pdu[0].pdu, pdu[0].len); +*/ + + + +/* SMS sms; sms.sender = "12345678"; - sms.message = "Tog bj"; + sms.message = "Tog list"; DebugGsmModem modem; TogPlugin plugin; @@ -31,7 +76,7 @@ cout << "---- " << msg.length() << " ----" << endl; cout << msg << endl; - +*/ /* vector trains = GetTrainInfo("BJ","Bjerringbro");