void GSM3ShieldV1SMSProvider::manageResponse(byte from, byte to) { switch(theGSM3ShieldV1ModemCore.getOngoingCommand()) { /* case XON: if (flagReadingSocket) { // flagReadingSocket = 0; fullBufferSocket = (theGSM3ShieldV1ModemCore.theBuffer().availableBytes()<3); } else theGSM3ShieldV1ModemCore.openCommand(this,NONE); break; */ case NONE: theGSM3ShieldV1ModemCore.gss.cb.deleteToTheEnd(from); break; case BEGINSMS: beginSMSContinue(); break; case ENDSMS: endSMSContinue(); break; case AVAILABLESMS: availableSMSContinue(); break; case FLUSHSMS: flushSMSContinue(); break; } }
//Flush SMS main function. void GSM3ShieldV1SMSProvider::flushSMS() { //With this, sms data can fill up to 2x128+5x128 bytes. for (int aux = 0;aux<5;aux++) { theGSM3ShieldV1ModemCore.theBuffer().flush(); theGSM3ShieldV1ModemCore.gss.spaceAvailable(); delay(10); } theGSM3ShieldV1ModemCore.openCommand(this,FLUSHSMS); flushSMSContinue(); }
//Flush SMS main function. void SIM808SMSProvider::flushSMS() { //With this, sms data can fill up to 2x128+5x128 bytes. for (int aux = 0; aux<5; aux++) { SIM808ModemCore_t.theBuffer().Flush(); SIM808ModemCore_t.gss.spaceAvailable(); delay(10); } SIM808ModemCore_t.openCommand(this, FLUSHSMS); flushSMSContinue(); }
void SIM808SMSProvider::manageResponse(int from, int to) { switch (SIM808ModemCore_t.getOngoingCommand()){ case NONE: SIM808ModemCore_t.gss.cb.deleteToTheEnd(from); break; case BEGINSMS: beginSMSContinue(); break; case ENDSMS: endSMSContinue(); break; case AVAILABLESMS: availableSMSContinue(); break; case FLUSHSMS: flushSMSContinue(); break; } #if ANDYDEBUGx Serial.println("SMS getOngoingCommand..."); Serial.println(SIM808ModemCore_t.getOngoingCommand()); #endif }