]> git.tdb.fi Git - r2c2.git/commit
Refer to things in the driver with abstract ids instead of addresses
authorMikko Rasa <tdb@tdb.fi>
Thu, 7 Nov 2013 22:01:03 +0000 (00:01 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 7 Nov 2013 22:01:03 +0000 (00:01 +0200)
commit73e4a36bbf828e07b83a779b696875e1f80045cc
tree48f053c00c18c089bad5937e0574d31e9a147949
parentb28062f2dc88e082ee5a28b2e1f7c4c8bd989023
Refer to things in the driver with abstract ids instead of addresses

Since different protocols can and do have overlapping address spaces, the
address alone isn't sufficient to identify a thing.  Passing both address
and protocol in every function and signal would make the interface too
complicated.

At the moment only locomotives can have a protocol specified, but there's
no technical reason why other types of things couldn't have different
protocols as well.
15 files changed:
source/libr2c2/arducontrol.cpp
source/libr2c2/arducontrol.h
source/libr2c2/centralstation.cpp
source/libr2c2/centralstation.h
source/libr2c2/driver.h
source/libr2c2/dummy.cpp
source/libr2c2/dummy.h
source/libr2c2/intellibox.cpp
source/libr2c2/intellibox.h
source/libr2c2/sensor.cpp
source/libr2c2/sensor.h
source/libr2c2/track.cpp
source/libr2c2/track.h
source/libr2c2/train.cpp
source/libr2c2/train.h