ERIS CORE

◆ txOverflowHandler()

void FLASHMEM SvcSerialCommandInterface::txOverflowHandler ( )
protected

Definition at line 195 of file svcSerialCommandInterface.cpp.

195  {
196  char* s;
197  s = strrchr(p_tx_Buffer,'\r');//find last new line
198  s[0] = 0;
199  token = strtok(p_tx_Buffer, &newline);
200  while( token != NULL ) {
201  while(throttle()){
202  delay(50);
203  }
204  if (tx_buffer_overflow_flag==false){
205  //txBufferOverflowFlag=true;
206  Serial.print(F("\""));
207  }else{
208  Serial.print(F(",\""));
209  }
210  //replaceAll(token,'\r',0);
211  Serial.print(token);
212  Serial.print(F("\""));
213  token = strtok(NULL, &newline);
214  }
215  //close the tag
216  Serial.println("]");
217  delay(120);
218  Serial.printf("VM remainder %s",p_tx_Buffer);
219  //start the next part of the multipart message
220  Serial.print(&p_multipart_header[0]);
221  s = strrchr(p_tx_Buffer,'\r');//find last new line
222  //s = strrchr(s,'\r');//find last new line
223  s+=2;
224  //Serial.flush();
225  index_tx_buffer = strlen(s);
227 
228 }
const char PROGMEM s[][16]
Definition: Eris.h:246
bool safer_strncpy(char *dest, const char *source, uint16_t dest_size)
a safer strncpy
Definition: ErisUtils.cpp:20
bool throttle()
returns true if the available serial buffer falls below SERIAL_THROTTLE_BUFFER_REMAINING_THRESHOLD if...
const char newline

References index_tx_buffer, newline, p_multipart_header, p_tx_Buffer, s, safer_strncpy(), throttle(), token, and tx_buffer_overflow_flag.

Referenced by write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: