Unexpected behavior for SBL2e SerialGetLine()
Posted: Wed Oct 06, 2010 2:12 pm
The SBL2E has a handy serial port function called SerialGetLine(). I tried using this to parse data coming into one of the ports and just about went nuts before I finally realized that it forces all lower case chars between "a" and "z" to upper case!!!&*^$%#&!!!!
This is not documented in section 9.4.2.3 of the SBL2e Programmers Guide where the function is described. The good news was that the culprit popped out as soon as I looked at the source. I'm using the interrupt-based serial routines: the actual function is IRQ_SerialGetLine(). Looks like the polled version does this too.
This could be useful, but perhaps controlled by an input parameter. If it stays this way, please update the documents NB guys. I'm still on Rel24_rc2, so maybe this is fixed in 2.50?
While I'm on the topic of the SBL2E serial functions, is there any rationale for not providing an fd when these serial ports are opened so we can easily use select() and the other typical file descriptor calls? Conserving memory space? I guess we could build up an IOexpandStruct, but I was surprised not to see it already done. Just wondering.
Finally, I notice that the usual read() and write() functions for the SBL2e are Read() and Write() and they seem to be methods limited for use w/ Tcp only. We have quite a bit of code written for the other platforms using the more generic read() and write() with the serial port fds so it's not a slam-dunk port to the SBL2e. Thoughts?
This is not documented in section 9.4.2.3 of the SBL2e Programmers Guide where the function is described. The good news was that the culprit popped out as soon as I looked at the source. I'm using the interrupt-based serial routines: the actual function is IRQ_SerialGetLine(). Looks like the polled version does this too.
This could be useful, but perhaps controlled by an input parameter. If it stays this way, please update the documents NB guys. I'm still on Rel24_rc2, so maybe this is fixed in 2.50?
While I'm on the topic of the SBL2E serial functions, is there any rationale for not providing an fd when these serial ports are opened so we can easily use select() and the other typical file descriptor calls? Conserving memory space? I guess we could build up an IOexpandStruct, but I was surprised not to see it already done. Just wondering.
Finally, I notice that the usual read() and write() functions for the SBL2e are Read() and Write() and they seem to be methods limited for use w/ Tcp only. We have quite a bit of code written for the other platforms using the more generic read() and write() with the serial port fds so it's not a slam-dunk port to the SBL2e. Thoughts?