--- smsdaemon/tester.cpp 2008/06/14 08:39:40 78 +++ smsdaemon/tester.cpp 2008/12/07 15:51:02 142 @@ -6,18 +6,18 @@ #include #include #include -#include "SerialPort.h" +#include "serialport/SerialPort.h" #include "GsmModem.h" #include "Sms.h" -#include "TogPlugin.h" -#include "TrainInfo.h" +#include "plugins/TogPlugin.h" +#include "plugins/TrainInfo.h" #include "util.h" - +#include "plugins/StatusPlugin.h" #include "SmsPdu.h" using namespace std; - +using namespace Util; void test_sms(GsmModem& modem, int len) { @@ -51,7 +51,26 @@ cout << end << endl; return 0; */ + string start = "hej æøåÆØÅ"; + string mid = str_latin2gsm(start); + string final = str_gsm2latin(mid); + + str_dump (start); + str_dump(mid); + str_dump(final); + + return 0; + + DebugGsmModem modem(true); + SMS sms; + sms.SetSender("1234"); + sms.SetMessage("status"); + StatusPlugin status; + status.Execute(modem,sms); + + return 0; +/* SerialPort port("/dev/ttyS1" ); port.Open( SerialPort::BAUD_9600, SerialPort::CHAR_SIZE_8, @@ -63,6 +82,10 @@ modem.Init(); + test_sms(modem, 100); + return 0; + + vector res = modem.ReadSms(true); for (unsigned int i = 0; i pdu = SmsPdu::CreateSmsPdu("4522337617", "Hej med dig, igen", true); cout << "Len: " << pdu[0].len << endl;