--- /dev/null
+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.
+
-- 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
#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,
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) {
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;
}
}
}
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 {
{
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;
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;
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;
#define NETWORK 0
-// #define SENDER
+#define SENDER
// #define ENABLE_LOGGING
#ifdef SENDER
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(¶ms, (uint8_t *)msg, written);
if (ret != 0) ERROR ("could not send message\n");
#define NETWORK 0
-#define SENDER
+// #define SENDER
// #define ENABLE_LOGGING
#ifdef SENDER
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(¶ms, (uint8_t *)msg, written);
if (ret != 0) ERROR ("could not send message\n");
printf("SENT: %d\n", i);