Closed GabeBarfield closed 2 years ago
Solved: The read_interface function was using a FFI call. If the FFI function doesn't have the attribute :blocking => true attached to it then the Ruby global interrupts aren't allowed to fire to let the write_interface function run.
Wow great detective work! Sorry we were of no help but thanks for sharing this issue here. I hope it will help others in the future!
I receive the following error when sending commands using Command Sender in COSMOS 5.0.1: Error sending XXXX due to RuntimeError: Timeout waiting for cmd ack
I am working on a custom SpaceWire interface and was able to successfully navigate through the read side of things and see my telemetry status flowing smoothly; however, when trying to send a command, the write_interface(data) function doesn't appear to be getting called. I pulled all the custom code from write interface function such that it is def write_interface(data) write_interface_base(data) data end and still see the same error. I've looked through the Ruby source and nothing is popping out (although Ruby is not my primary language). Also to add, if I run using a UDP interface instead of the custom SpaceWire, everything works fine. Looking in the udp_interface.rb file though shows the same function call above with the addition of calling write on the stream object which in my case would be replaced with a SpaceWire object, but again, log statements in this function aren't even being reached so it leads to me to believe it is an upstream issue.
Thoughts?
Thanks, Gabe