--- smsdaemon/tester.cpp 2008/06/12 18:54:24 68 +++ smsdaemon/tester.cpp 2008/06/16 16:41:18 101 @@ -13,7 +13,7 @@ #include "TogPlugin.h" #include "TrainInfo.h" #include "util.h" - +#include "StatusPlugin.h" #include "SmsPdu.h" using namespace std; @@ -27,7 +27,7 @@ msg.append(1, ' '); msg.append(len - msg.length(), 'a'); - vector pdu = SmsPdu::CreateSmsPdu("4522337617", msg, true); + vector pdu = SmsPdu::CreateSmsPdu("22337617", msg, true); for (unsigned int i=0; i temp = SmsPdu::Encode7to8bit("Dette er en test af encode"); - cout << SmsPdu::HexformatVector(temp) << endl; - - string result = SmsPdu::Decode8to7bit(temp); - cout << result << endl; +/* + int shift = 6; + string start = "Hej med dig"; + string end = SmsPdu::Decode8to7bit(SmsPdu::Encode7to8bit(start,shift), shift ); + cout << start << endl; + cout << end << endl; return 0; +*/ + DebugGsmModem modem(true); + SMS sms; + sms.sender="1234"; + sms.message="status"; + StatusPlugin status; + status.Execute(modem,sms); + return 0; +/* SerialPort port("/dev/ttyS1" ); port.Open( SerialPort::BAUD_9600, SerialPort::CHAR_SIZE_8, @@ -61,7 +71,32 @@ GsmModem modem(port); modem.Init(); - test_sms(modem, 161); + + test_sms(modem, 100); + return 0; + + + vector res = modem.ReadSms(true); + + for (unsigned int i = 0; i" << sms.message << "<" << endl; + cout << "Cmd: >" << cmd << "<" << endl; + cout << "Data >" << data << "<" << endl; + + Util::str_dump(sms.message); + //modem.SendSms(sms.sender, sms.message, false); + + } + +*/ /* vector pdu = SmsPdu::CreateSmsPdu("4522337617", "Hej med dig, igen", true); cout << "Len: " << pdu[0].len << endl;