Ok - i got NEMA 0183 data coming from a NEMA talker into my RPi5. But I am not sure I totally understand it.
i am using non-canonical mode, and there are these lines;i am using the inter-character timer as a return method, only while I have the inter-character timer set to 2, I don't know what timer interval that represents? Anyone out there know?
Also in the "res = read(fd,readBuf,255);" Does this read until the readBuf is full and then make the readBuf available, or is it character by character?
What I want to have happen is each NEMA sentence ends with a LF. There will only be 3 or 4 sentences being sent, so set up a LF counter, so when 4 LF are received the 4 sentences will be in readBuf to be parsed.
I look forward to an explanation and help.
Kind regards,
David
i am using non-canonical mode, and there are these lines;
Code:
newtio.c_cc[VTIME] = 2; // inter−character timer unused // newtio.c_cc[VMIN] = 0; // // tcflush(fd, TCIFLUSH); tcsetattr(fd,TCSANOW,&newtio); LF_Ctr = 0; while (STOP==FALSE) { // loop for input // res = read(fd,readBuf,255); // returns after 5 chars have been input // readBuf[res]=0; // so we can printf...//Also in the "res = read(fd,readBuf,255);" Does this read until the readBuf is full and then make the readBuf available, or is it character by character?
What I want to have happen is each NEMA sentence ends with a LF. There will only be 3 or 4 sentences being sent, so set up a LF counter, so when 4 LF are received the 4 sentences will be in readBuf to be parsed.
I look forward to an explanation and help.
Kind regards,
David
Statistics: Posted by DFansler — Thu Jun 12, 2025 4:48 am