for(ii=0;ii<h;ii++){
//LOOP for scannig all six parameters
for(i=0;i<6;i++){
//Inserting Zero when data is missing
Zero_out=obj.zero_padding(m,In_S[i]);
//cout<<"Value of "<<dat_name[i]<<" After Zero Insersion["<<obj.index<<"]: "<<Zero_out<<endl;
//Sampling after Five mintues
Decimate_out=obj.decimatior(Zero_out);
//Decimate function return 1 so it will print the requird value when it not equal to 1
if(Decimate_out !=1){
cout<<"Value after Decimate["<<obj.index<<"]: "<<Decimate_out<<endl;
//delay for 1ms to send the data properly
delay(1);
//Convert Integer Data to the string
snprintf(stt,sizeof(stt),"Value After Decimation[%d]: %d",obj.index,Decimate_out);
//Send the Result to the PC
obj.stringsend(stt);
}
}
//Increment in Indexx
obj.index++;
//checking the condition
if(h>1){
//Increment in iteration for zero insertion if gap bigger than 1
iter++;
}
}
for (ii = 0; ii < h; ii++) {
for (i = 0; i < 6; i++) {
//Inserting Zero when data is missing
Zero_out = obj.zero_padding(m, In_S[i]);
//cout << "Value of " << dat_name[i] << " After Zero Insersion[" << obj.index << "]: " << Zero_out << endl;
//Sampling after Five mintues
Decimate_out = obj.decimatior(Zero_out);
//Decimate function return 1 so it will print the requird value when it not equal to 1
if (Decimate_out != 1){
cout << "Value after Decimate[" << obj.index << "]: " << Decimate_out << endl;
delay(1);
snprintf(stt, sizeof(stt), "Value After Decimation[%d]: %d", obj.index, Decimate_out);
obj.stringsend(stt);
}
}
obj.index++;
if (h > 1)
iter++;
}