]> rtime.felk.cvut.cz Git - frescor/fna.git/commitdiff
added the SRC param for the fragmentation layer and a INSTALL file
authorsangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Sat, 3 May 2008 10:10:17 +0000 (10:10 +0000)
committersangorrin <sangorrin@35b4ef3e-fd22-0410-ab77-dab3279adceb>
Sat, 3 May 2008 10:10:17 +0000 (10:10 +0000)
git-svn-id: http://www.frescor.org/private/svn/frescor/fna/trunk@1147 35b4ef3e-fd22-0410-ab77-dab3279adceb

INSTALL [new file with mode: 0644]
TODO [moved from doc/TODO with 100% similarity]
src_frescan/TODO
src_frescan/frescan.c
src_frescan/frescan_data.c
src_frescan/frescan_data.h
tests/tests_frescan/test_frescan_send_basic.c
tests/tests_frescan/test_frescan_servers_send_basic.c

diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..ebd0ecb
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,14 @@
+INSTALL
+=======
+
+
+1.- Enable / Disable the FNA modules (RT-EP, FRESCAN, etc..) in the config.mk and in
+    the fna_configuration.h files
+
+2.- Compile the FNA library with 'make'
+
+3.- Build and example from the 'tests/' directory (i.e.: make test_frescan_send_basic.exe)
+
+4.- Tests using the modules from FRSH distributed interface are located at 'tests/tests_distributed'
+    in the FRSH module, not in FNA.
+
diff --git a/doc/TODO b/TODO
similarity index 100%
rename from doc/TODO
rename to TODO
index cfebaebbc67d5e68c5f3c8e972766968265a663f..3559dcf5caea297a80a018c97af97093908c1cbd 100644 (file)
@@ -1,9 +1,7 @@
-- LOCKS to protect the shared structures
-- Renegotiate, cancel contract
 - reserve commit functions
 - use an internal thread as a bottom half for irq hooks
 - corrections in fna
        * CTU corrections
        * fna_vres_id_t will be frsh_vres_index_T
 - integrate with frsh_sa scheduling analysis module and spare capacity
-- deliverable
+- oh, i forgot CAN priorities are assigned inversely!! map them!
\ No newline at end of file
index 8b0e930d5d3f07b99ffd987e41a83ee998949f16..f34af654ea59a0c48d230ddef55c13320cc3c206 100644 (file)
@@ -34,7 +34,6 @@
 #include "frescan_debug.h"     // DEBUG
 #include "frescan_id.h"        // frescan_id_set_field, frescan_id_get_field
 #include "frescan_hw_buffer.h" // frescan_hw_buffer_update
-#include "frescan_bwres_robjs.h"     // frescan_replyobjects_init
 #include "frescan_packets.h"
 
 static int frescan_hook_frame_recv (const struct can_chip_t *chip,
@@ -445,9 +444,9 @@ static int frescan_hook_frame_recv (const struct can_chip_t *chip,
         packet->frame = frame;
 
         if (frag_id == FRESCAN_MX_IDS) {
-                head = the_networks[net].id_fp_queues[prio];
+                head = the_networks[net].id_fp_queues[src][prio];
         } else {
-                head = the_networks[net].id_queues[frag_id];
+                head = the_networks[net].id_queues[src][frag_id];
         }
 
         if (head == NULL) {
@@ -458,9 +457,9 @@ static int frescan_hook_frame_recv (const struct can_chip_t *chip,
                 INIT_LIST_HEAD(&head->msg_list);
 
                 if (frag_id == FRESCAN_MX_IDS) {
-                        the_networks[net].id_fp_queues[prio] = head;
+                        the_networks[net].id_fp_queues[src][prio] = head;
                 } else {
-                        the_networks[net].id_queues[frag_id] = head;
+                        the_networks[net].id_queues[src][frag_id] = head;
                 }
         }
 
@@ -479,9 +478,9 @@ static int frescan_hook_frame_recv (const struct can_chip_t *chip,
                 }
 
                 if (frag_id == FRESCAN_MX_IDS) {
-                        the_networks[net].id_fp_queues[prio] = NULL;
+                        the_networks[net].id_fp_queues[src][prio] = NULL;
                 } else {
-                        the_networks[net].id_queues[frag_id] = NULL;
+                        the_networks[net].id_queues[src][frag_id] = NULL;
                 }
 
         } else {
index cc063d21f14663cc5025a5032196c204d2d0596f..d0e0e0d49001effc2176e2563014ccea9a2e880e 100644 (file)
@@ -38,6 +38,7 @@ int frescan_data_init(int fd, frescan_init_params_t *params)
 {
         frescan_ss_t id;
         frescan_prio_t prio;
+        frescan_node_t src;
 
         the_networks[params->net].fd = fd;
         the_networks[params->net].local_node = params->node;
@@ -47,11 +48,15 @@ int frescan_data_init(int fd, frescan_init_params_t *params)
         FRESCAN_CREATE_LOCK(&the_networks[params->net].lock);
 
         for(id=0; id<FRESCAN_MX_IDS; id++) {
-                the_networks[params->net].id_queues[id] = NULL;
+                for(src=0; src<FRESCAN_MX_NODES; src++) {
+                        the_networks[params->net].id_queues[src][id] = NULL;
+                }
         }
 
         for(prio=0; prio<FRESCAN_MX_PRIOS; prio++) {
-                the_networks[params->net].id_fp_queues[prio] = NULL;
+                for(src=0; src<FRESCAN_MX_NODES; src++) {
+                        the_networks[params->net].id_fp_queues[src][prio] = NULL;
+                }
         }
 
         return 0;
index 71354326cca555412a665f2fa3ecd84bb1b9942d..638eb76d076c603e818d5991d4ba90595ae809cd 100644 (file)
@@ -223,8 +223,8 @@ typedef struct {
         frescan_queues_t queues;
         frescan_packet_t *last_packet;
         frescan_prio_t last_packet_prio;
-        frescan_packet_t *id_queues[FRESCAN_MX_IDS];      // TODO: alloc at init
-        frescan_packet_t *id_fp_queues[FRESCAN_MX_PRIOS]; // TODO: alloc at init
+        frescan_packet_t *id_queues[FRESCAN_MX_NODES][FRESCAN_MX_IDS];      // TODO: alloc at init
+        frescan_packet_t *id_fp_queues[FRESCAN_MX_NODES][FRESCAN_MX_PRIOS]; // TODO: alloc at init
         frescan_sa_scenario_t scenario;
 } frescan_network_data_t;
 
index a858b218ecda948d70d48517eb0520db19f053df..9ea285e9f1bb99bfb39e3ee41b039f33f741951d 100644 (file)
@@ -11,7 +11,7 @@
 
 #define NETWORK 0
 
-// #define SENDER
+#define SENDER
 // #define ENABLE_LOGGING
 
 #ifdef SENDER
@@ -70,7 +70,7 @@ int main ()
 
         while(1) {
                 pause();
-                for (i=0; i<=0; i++) {
+                for (i=0; i<=2; i++) {
                         written = snprintf(msg, sizeof(msg), "his number is... %d", i);
                         ret = frescan_send(&params, (uint8_t *)msg, written);
                         if (ret != 0) ERROR ("could not send message\n");
index e5631b408291d2f890e77fe3d0ba14a887b7c81e..74dcc4e6ade53c79bec2bdea3c8658ae7e421908 100644 (file)
@@ -12,7 +12,7 @@
 
 #define NETWORK 0
 
-#define SENDER
+// #define SENDER
 // #define ENABLE_LOGGING
 
 #ifdef SENDER
@@ -88,7 +88,7 @@ int main ()
         while(1) {
                 pause();
                 for (i=0; i<=2; i++) {
-                        written = snprintf(msg, sizeof(msg), "his %d", i);
+                        written = snprintf(msg, sizeof(msg), "his number is: %d", i);
                         ret = frescan_send(&params, (uint8_t *)msg, written);
                         if (ret != 0) ERROR ("could not send message\n");
                         printf("SENT: %d\n", i);