Commit Graph

15 Commits

Author SHA1 Message Date
Deans
a4d49850f3 Add per-session variable server logs 2023-06-26 12:23:58 -05:00
Deans
99ee88a686 Add more Variable Server unit and integration tests, clean up and clarify naming 2023-06-26 12:23:58 -05:00
Jacqueline Deans
0788dcfa9b Replace TrickComm with new connection_handler library 2023-06-26 12:23:58 -05:00
Jacqueline Deans
c2e42f4ef4 Refactor and test Variable Server.
- Split VariableServerThread into VariableServerSession and VariableReference classes
- Use C++ streams for data handling
- Unit tests
2023-06-26 12:23:58 -05:00
Alex Lin
ad42376d5e
Variable Server byteswapping crashes the sim ()
* Variable Server byteswapping crashes the sim 

The code to byteswap a variable server buffer has a comment saying there is a bug. The comment is
correct.  The original code would swap the parameter and anything else that followed that parameter
in the structure.  Crashes everywhere.  Created a new routine that byteswaps a single parameter.
Strangely we didn't have such a routine until now.  Did some testing of doubles, floats, ints,
shorts, and chars and all were swapped correctly.

* Variable Server byteswapping crashes the sim 

enabling binary byteswap test.
2023-06-01 13:20:14 -05:00
Jacqueline Deans
fc8eb338f1
Add test for a multicast variable server session () 2023-04-04 11:02:32 -05:00
Jacqueline Deans
5f6a5de070
Expand SIM_test_varserver ()
* Add tests for alternate ways to open VS port

* Don't connect to varserv when quiet=true in trickops

* Add print to try to help debug hanging trickops test

* Handle multicast connect failures gracefully

* Multicast is disabled by default on mac

* Forgot an important return value

* Take away retries

* Fix issue with restart test

* Revert trickops debugging changes

* Remove debugging accidentally left in [no ci]

* whoops

* Allow retries

* Update trickops.py

* sim test adjustments

* Add docs [no ci]

* wording [no ci]

* Cleanup

* Remove large messages, test that one in unit tests
2023-02-24 14:44:55 -06:00
Jacqueline Deans
fb25ea70d2
Fix undefined behavior in vs_format_ascii () 2023-02-07 13:11:51 -06:00
Jacqueline Deans
97cf685b6a
Parser and test for var_binary () 2023-01-11 09:27:30 -06:00
Jacqueline Deans
a8daf4514c
Improvements to SIM_test_varserv ()
* Add freeze test to SIM_test_varserv; make mode test more comprehensive
2022-12-15 12:53:39 -06:00
Jacqueline Deans
90b5cdcb3c
Variable Server Integration Test ()
* Added restart to trickops script; updated varserver integration test
2022-12-05 15:24:20 -06:00
jmpenn
2a03ff5cf4
Replace sprintf with snprintf in all of Trick source. ()
* Replace sprintf with snprintf in all of Trick source. 

* Don't add -Werror for MacOS because of deprecated sprintf warnings which we cant get rid of because SWIG. 

* Fixed an unbalanced parenthesis in S_overrides.mk. 
2022-11-15 15:00:05 -06:00
Jacqueline Deans
9c8799610f
Variable Server - var_send_once and integration test ()
* Adds the send_once command and message type, which allows a user to request a variable to be sent immediately and only once (intended to replace the var_add, var_send, var_clear idiom that is commonly used for this purpose)
* Minor refactoring of variable server internals to reduce repeated code
* Adds SIM_test_varserv to integration test to test basic variable server functionality
* Changes graphics client for SIM_billiards to use var_send_once as an example of intended use
* Add documentation for var_send_once in docs and tutorial
* Set exit_code_enabled in trick unit tests to be true by default
* Patch for failing bookworm build
2022-08-18 10:47:07 -05:00
Michael Vetter
18f0d7e871 Remove trailing whitespaces
Makes it easier to edit the files. So if we press 'end of line' we are
really at the end of line.
2016-11-08 10:25:07 +01:00
Alex Lin
9ddc786ace Split test sims and fun sims into separate directories.
Moved most of the rest of the sims to test.

refs 
2016-02-23 16:19:30 -06:00