Hi Ryan,
I am just working now on enhancing my 1st design, and this include taking account serial link errors (what I neglected at 1st to concentrate on application level messages). This is the hard part, since such errors are random and really difficult to track, and this randomness is generally what will make our life miserable in the real world.(see KurtE message elsewhere on Dynamixel protocol)
I am therefore planning to synthetize serial data from the same test script, injecting framing or parity errors to further refine and bullet proof the design. Obviously this has a bias, as I will not necessarily inject really random errors.
This has obvioulsy a big minus: I don’t use Logic in the test loop since I use unittest!
Then the question is “'how to put Logic in the unittest loop?”
Ideally, taking a “real” data from Logic2 and flipping one bit randomly would do the job and simulate closely what could happen in a noisy environment for instance. Test suite should be then:
Solution 1: Create test file based on existing capture sla file plus random bit flipping, load it into Logic, run Logic with this file (.sla) and HLA connected, and check the result either through unittest or visually.
Solution 2: Load real sla file, use Logic API (not available in Logic2 so far) to inject test data during unittest setUp() phase, then run the test and assert what is to be asserted.
In both case I’ll need to be able either to access sla file, or acces Logic internal data structure.
For instance, Logic Demo mode use some predefined or synthetized data out of device connection to demo purpose. Could it be possible to inject some data using this (now hidden) API?
Non intrusive way can be using .sla data file synthesis. Is sla file structure documented somewhere?
What do you think should be the best approach?