summaryrefslogtreecommitdiffstats
path: root/serial_link/tests/transport_tests.c
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-02-21 12:53:51 +0200
committerFred Sundvik <fsundvik@gmail.com>2016-02-21 12:53:51 +0200
commit4ee6eadf9e88b89f017c3c06e2d376cf953f6a42 (patch)
tree0d7d4e841c9cb7713caee616dbd0d5171ad5e429 /serial_link/tests/transport_tests.c
parentb7059d35f90a7cc8b07944d78984afa832190bdc (diff)
Local and remote objects WIP
Diffstat (limited to 'serial_link/tests/transport_tests.c')
-rw-r--r--serial_link/tests/transport_tests.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/serial_link/tests/transport_tests.c b/serial_link/tests/transport_tests.c
index a64e7446d8..f9f5b47737 100644
--- a/serial_link/tests/transport_tests.c
+++ b/serial_link/tests/transport_tests.c
@@ -25,6 +25,32 @@ SOFTWARE.
#include <cgreen/cgreen.h>
#include "protocol/transport.c"
+typedef struct {
+ uint32_t test;
+} test_object1_t;
+
+typedef struct {
+ uint32_t test1;
+ uint32_t test2;
+} test_object2_t;
+
+MASTER_REMOTE_OBJECT(0, test_object1_t);
+SLAVE_REMOTE_OBJECT(1, test_object1_t);
+MASTER_REMOTE_OBJECT(2, test_object2_t);
+SLAVE_REMOTE_OBJECT(3, test_object2_t);
+
+// We want
+// master -> slave = 1 local(target all), 1 remote object
+// slave -> master = 1 local(target 0), multiple remote objects
+// master -> single slave (multiple local, target id), 1 remote object
+
+remote_object_t* remote_objects[] = {
+ REMOTE_OBJECT(0),
+ REMOTE_OBJECT(1),
+ REMOTE_OBJECT(2),
+ REMOTE_OBJECT(3),
+};
+
Describe(Transport);
BeforeEach(Transport) {
init_transport();