#include #include GSM3ShieldV1ModemCore theGSM3ShieldV1ModemCore; char* __ok__="OK"; GSM3ShieldV1ModemCore::GSM3ShieldV1ModemCore() : gss() { gss.registerMgr(this); _dataInBufferFrom=0; _dataInBufferTo=0; commandError=1; commandCounter=0; ongoingCommand=NONE; takeMilliseconds(); for(int i=0;irecognizeUnsolicitedEvent(from); } if((!recognized)&&(activeProvider)) activeProvider->manageResponse(from, to); } void GSM3ShieldV1ModemCore::openCommand(GSM3ShieldV1BaseProvider* provider, GSM3_commandType_e c) { activeProvider=provider; commandError=0; commandCounter=1; ongoingCommand=c; _dataInBufferFrom=0; _dataInBufferTo=0; }; size_t GSM3ShieldV1ModemCore::writePGM(PGM_P str, bool CR) { int i=0; char c; do { c=pgm_read_byte_near(str + i); if(c!=0) write(c); i++; } while (c!=0); if(CR) print("\r"); return 1; } size_t GSM3ShieldV1ModemCore::write(uint8_t c) { if(_debug) GSM3CircularBuffer::printCharDebug(c); return gss.write(c); } unsigned long GSM3ShieldV1ModemCore::takeMilliseconds() { unsigned long now=millis(); unsigned long delta; delta=now-milliseconds; milliseconds=now; return delta; } void GSM3ShieldV1ModemCore::delayInsideInterrupt(unsigned long milliseconds) { for (unsigned long k=0;k