Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tcp duplex #103

Merged
merged 12 commits into from
Aug 25, 2017
Merged

Tcp duplex #103

merged 12 commits into from
Aug 25, 2017

Conversation

reube
Copy link
Contributor

@reube reube commented Aug 24, 2017

Fixes #94
Hi @ProfHoekstra, @jooste.
We're quite keen to get involved in helping with developing bluesky.
(Our company is SPARKL www.sparkl.com).

Specifically, this pull request concerns the 'tcp duplex' issue.
See example on: ethertricity#4
Also, pls see comments on original pull request:
ethertricity#9

I have taken the liberty of adding some tests.
I will also invite you to the slack channel where the output from our CI server goes.
You can run the tests by executing make test or pytest -s bluesky/test with python-pytest installed.
There are 4 simple tests for the tcp interface currently.

The changes are mostly trivial. Modules such as BlueSky_qtgl.py have been chopped around a little to make it more easy to use for tests.

Pls feedback any questions, feedback, etc. Thanks - much appreciated
Andrew Farrell

Test run output:

Branch tcp_duplex set up to track remote branch tcp_duplex from origin.
============================= test session starts ==============================
platform linux2 -- Python 2.7.12, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
rootdir: /home/vagrant/bluesky, inifile:
Reading config from settings.cfg
Creating directory "output"
Creating directory "data/cache/py2"
StateBasedCD: using default Python version, no compiled version for this platform.
StateBasedCD: using Python version.
Using BlueSky performance model
Loading global navigation database...
cachefile constructor
Cachefile not found: data/cache/py2/navdata.p
Reading nav.dat
Reading fix.dat
Reading awy.dat
cachefile constructor
Cachefile not found: data/cache/py2/aptsurface.p
Binary buffer file not found, or file out of date: Constructing vertex buffers from geo data.
Reading apt.dat from apt.zip
Writing cache: data/cache/py2/aptsurface.p
Writing cache: data/cache/py2/navdata.p
collected 4 items

bluesky/test/tcp/test_simple.py Loading palette bluesky-default
Using Qt 4.8.7 for windows and widgets
Initializing multi-process simulation
QGLWidget initialized for OpenGL version 3.3
cachefile constructor
Reading cache: data/cache/py2/aptsurface.p
Maximum supported texture size: 8192
Loading texture data/graphics/world.8192x4096.dds
cachefile constructor
Cachefile not found: data/cache/py2/coastlines.p
Reading coastlines.dat
Writing cache: data/cache/py2/coastlines.p
-- test_create_fail --: Data received: ['Syntax error: Too few arguments', 'CRE', 'CRE acid,type,lat,lon,hdg,alt,spd']
.-- test_create_success --: Data received: ['ok.']
.-- test_pos --: Data received: ['Info on KL204 B744 index = 0', 'Pos: N51\'59\'57.0"  E004\'00\'0.0"', 'Hdg: 180   Trk: 180', 'Alt: 2000 ft  V/S: 0 fpm', 'CAS/TAS/GS: 220/226/226 kts   M: 0.345', '', 'ok.']
.-- test_disconnect --: Data received: ['2']
-- test_disconnect --: Data received: ['2']
-- wait_for --: Data received: ['1']
.Reading config from settings.cfg
StateBasedCD: using default Python version, no compiled version for this platform.
StateBasedCD: using Python version.
Using BlueSky performance model
Loading global navigation database...
cachefile constructor
Reading cache: data/cache/py2/navdata.p
Successfully loaded DATAFEED
('Node', (0, 0), 'stopped.')
Stopping telnet server.
Stopping simulation processes...
Stopping nodes:
Done.
BlueSky normal end.


========================== 4 passed in 123.70 seconds ==========================

@jooste jooste merged commit ce8731b into TUDelft-CNS-ATM:master Aug 25, 2017
@euvl euvl deleted the tcp_duplex branch August 30, 2017 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TCP connection to simulation is one-way only
2 participants