GATJR
04-11-07, 06:59 PM
We use the ServoPod as an extensible, intelligent front end for connection between a PC platform and our vehicle. It controls all of the servos and I/O to the vehicle.
We communicate to it using command line FORTH words that we create. It is easy for us to add a new FORTH word so extensibility and field testing is awesome. We also can request data that is simply reported back to us over the command line. Just execute the FORTH word in interpretive mode and observe the results on the serial port.
That is a real nice, but the serial line is without any form of message or command validity checking like a checksum.
Would there be a way that would add and require a checksum before the receipt of a CR and the transmission of a CR.
The concept would be that a command line would be typed into ServoPod and that it would expect the last two characters to be the 8 bit hex checksum of the characters in the line. If the checksum was wrong then the line was ignored. The checksum would be the 8 bit modulo addition of all characters received since the last CR.
When the ServoPod is transmitting a line of text that before each CR it transmitted the two ascii hex character of the checksum of everything that was transmitted since the last CR.
I am trying to add command line assurity without significantly disturbing the archicture of the system as it is. We have over 3000 hours of driving on the FORTH code base.
I think that this would be a replacement of the interpreter and PAD sender outer, but I'm a bit fuzzy on this. But I believe this is the beauty of FORTH is the ability to do this level of modular change.
What do you think?
We communicate to it using command line FORTH words that we create. It is easy for us to add a new FORTH word so extensibility and field testing is awesome. We also can request data that is simply reported back to us over the command line. Just execute the FORTH word in interpretive mode and observe the results on the serial port.
That is a real nice, but the serial line is without any form of message or command validity checking like a checksum.
Would there be a way that would add and require a checksum before the receipt of a CR and the transmission of a CR.
The concept would be that a command line would be typed into ServoPod and that it would expect the last two characters to be the 8 bit hex checksum of the characters in the line. If the checksum was wrong then the line was ignored. The checksum would be the 8 bit modulo addition of all characters received since the last CR.
When the ServoPod is transmitting a line of text that before each CR it transmitted the two ascii hex character of the checksum of everything that was transmitted since the last CR.
I am trying to add command line assurity without significantly disturbing the archicture of the system as it is. We have over 3000 hours of driving on the FORTH code base.
I think that this would be a replacement of the interpreter and PAD sender outer, but I'm a bit fuzzy on this. But I believe this is the beauty of FORTH is the ability to do this level of modular change.
What do you think?