--- smsdaemon/tester.cpp 2008/12/15 13:27:53 188 +++ smsdaemon/tester.cpp 2008/12/18 06:53:29 196 @@ -29,7 +29,7 @@ string msg = Util::str_formatint(len); msg.append(1, ' '); msg.append(len - msg.length(), 'a'); - + vector pdu = SmsPdu::CreateSmsPdu("22337617", msg, true); for (unsigned int i=0; i 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; - cout << "Pdu: " << pdu[0].pdu << endl; - - modem.SendSmsPdu(pdu[0].pdu, pdu[0].len); -*/ - - - -/* - SMS sms; - sms.sender = "12345678"; - sms.message = "Tog list"; - DebugModemTransceiver modem; - TogPlugin plugin; - - plugin.Execute(modem, sms); - - - string msg = Util::str_gsm2latin(modem.GetMessage()); - - cout << "---- " << msg.length() << " ----" << endl; - cout << msg << endl; -*/ -/* - vector trains = GetTrainInfo("BJ","Bjerringbro"); - - for (unsigned i=0; i res = modem.ReadSms(); - - - for (unsigned i=0; i" << res[i].message << "<" << endl; - cout << endl; - modem.DeleteSms(res[i].sms_index); - } - - for (int j=0; j<5; j++) - { - modem.SendSms("22337617","Test"); - } -*/ + /* + SerialPort port("/dev/ttyS1" ); + port.Open( SerialPort::BAUD_9600, + SerialPort::CHAR_SIZE_8, + SerialPort::PARITY_NONE, + SerialPort::STOP_BITS_1, + SerialPort::FLOW_CONTROL_HARD ); + + ModemTransceiver modem(port); + modem.Init(); + + + 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; + cout << "Pdu: " << pdu[0].pdu << endl; + + modem.SendSmsPdu(pdu[0].pdu, pdu[0].len); + */ + + + + /* + SMS sms; + sms.sender = "12345678"; + sms.message = "Tog list"; + DebugModemTransceiver modem; + TogPlugin plugin; + + plugin.Execute(modem, sms); + + + string msg = Util::str_gsm2latin(modem.GetMessage()); + + cout << "---- " << msg.length() << " ----" << endl; + cout << msg << endl; + */ + /* + vector trains = GetTrainInfo("BJ","Bjerringbro"); + + for (unsigned i=0; i res = modem.ReadSms(); + + + for (unsigned i=0; i" << res[i].message << "<" << endl; + cout << endl; + modem.DeleteSms(res[i].sms_index); + } + + for (int j=0; j<5; j++) + { + modem.SendSms("22337617","Test"); + } + */ return 0; }