Re: [pok-devel] Proposing a patch to sched.c

[ Thread Index | Date Index | More lists.tuxfamily.org/pok-devel Archives ]


Dear pok user and contributors, 
We tried to take into account remarks and suggestion made following our proposal few weeks ago.

We propose three examples to illustrate the flushing policies we'd like to integrate 
to pok for inter partitions communications. 

The example folders are arinc653-sampling§flush-X, X being mif, maf, windows. 
README files describe the expected behaviors. 

We also provide the commented sched.c file implementing the behaviors. 
We executed make commit, everything went well until the execution of the commit command (that cannot complete as expected without being registered). 

Thus, what is the next step ? You would find attached the svn diff of our working copy with respect to the latest commit including examples, Makefiles and so on. 
Wainting for comments and suggestions,
Best regards Thomas 

ps: I have been obliged to modify by hand the release-files file to obtain correct release archives. Otherwise, example files were missing. Did I get it right or is there another way to update this file ? 




----- Mail original -----
De: "Jeremy Rosen" <jeremy.rosen@xxxxxxxxxxx>
À: pok-devel@xxxxxxxxxxxxxxxxxxx
Envoyé: Mardi 29 Janvier 2013 16:08:30
Objet: Re: [pok-devel] Proposing a patch to sched.c

I had a similar need and developed a patch of my own, but it wasn't in a commitable state yet, just for testing so far...

my approch was a bit different (the flush happened per-port at write time) but your patch would fullfill my need too...


I'm looking forward to seeing this commited...

    Cordialement

    Jérémy Rosen

fight key loggers : write some perl using vim

----- Mail original -----
> Dear POK users and contributors,
> We propose to integrate the following functionality in POK concerning
> inter-partition communications.
> The purpose is to propose alternatives to the default flushing
> policy. This proposal is the outcome of a joint
> work in our research group with Etienne Borde and Laurent Pautet.
>
> Up to now the flushing policy cannot be configured and consist in a
> periodic flush at each Major Frame beginning.
> In industry two other configurations are often considered:
> Pol1: Periodic flush with a period dividing the Major Frame.
> Pol2: Systematic flush of partition outgoing ports when leaving its
> scheduling slot.
>
> We propose the following code to handle these two additional
> semantics and handle their selection. The code is still compatible
> with ocarina (the default policy is still the one used before).
>
> Even if we do not propose to update ocarina to handle pre processor
> macro definition to activate them, we
> take advantage of this proposal to inform you that we are developing
> an Eclipse plug-in integrated with the OSATE  framework to handle
> pok code generation. If you are interested we can provide you access
> to the current state of the project.
>
> More detail on the patch :
> Files affected : sched.c
> Optional : new example directory with model integrating properties
> used in our code generation framework to activate the different
> policies.
>
> You can find attached the diff of the affected file with the latest
> revision of POK (#44).
>
> Pol1 is activated when the following macro is defined :
> POK_FLUSH_PERIOD
> You need to bind it to a value dividing Major Frame duration (should
> be checked / enforced at code generation time)
>
> Pol2 will be activated when the following macro is defined :
> POK_NEEDS_FLUSH_ON_WINDOWS
> No particular value is required
>
> If none are defined the default behavior is enforced.
> We 'd like to know your point of view about integrating these
> functionalities, as is or with limited modifications, in POK trunk.
>
> Best regards,
> Thomas ROBERT
> -------------------
> Lecturer,
> Telecom ParisTech - Département INFRES
> 46 rue Barrault, 75634 Paris Cedex 13
> France.
> -------------------
> tel : (+33) (0) 145817749
> -------------------
>
>


Index: kernel/core/sched.c
===================================================================
--- kernel/core/sched.c	(révision 45)
+++ kernel/core/sched.c	(copie de travail)
@@ -57,7 +57,8 @@
 #endif
 
 #if defined (POK_NEEDS_PORTS_SAMPLING) || defined (POK_NEEDS_PORTS_QUEUEING)
-void pok_port_flushall (void);
+extern void pok_port_flushall (void);
+extern void pok_port_flush_partition (uint8_t);
 #endif
 
 uint64_t           pok_sched_slots[POK_CONFIG_SCHEDULING_NBSLOTS]
@@ -67,6 +68,9 @@
 
 pok_sched_t       pok_global_sched;
 uint64_t          pok_sched_next_deadline;
+uint64_t          pok_sched_next_flush; // variable used to handle user defined
+                                 //flushing period, i.e. distinct from MAF 
+                                 //and from partition slot boundaries
 uint64_t          pok_sched_next_major_frame;
 uint8_t           pok_sched_current_slot = 0; /* Which slot are we executing at this time ?*/
 uint32_t	         current_thread = KERNEL_THREAD;
@@ -110,6 +114,7 @@
    pok_sched_current_slot        = 0;
    pok_sched_next_major_frame    = POK_CONFIG_SCHEDULING_MAJOR_FRAME;
    pok_sched_next_deadline       = pok_sched_slots[0];
+   pok_sched_next_flush		 = 0;
    pok_current_partition         = pok_sched_slots_allocation[0];
 }
 
@@ -136,15 +141,30 @@
 
   if (pok_sched_next_deadline <= now)
   {
-      /* Here, we change the partition */
-#  if defined (POK_NEEDS_PORTS_SAMPLING) || defined (POK_NEEDS_PORTS_QUEUEING)
-    if (pok_sched_next_major_frame <= now)
+    //Handling interpartition flushing policy
+#if defined (POK_NEEDS_PORTS_SAMPLING) || defined (POK_NEEDS_PORTS_QUEUEING)
+#if defined (POK_FLUSH_PERIOD)
+    // Flush periodically all partition ports 
+    // nb : Flush periodicity is a multiple of POK time base. 
+    if (pok_sched_next_flush <= now){
+    pok_sched_next_flush += POK_FLUSH_PERIOD;
+    pok_port_flushall();
+    }
+#elif defined (POK_NEEDS_FLUSH_ON_WINDOWS) 
+    //Flush only the ports of the partition that just finished its slot
+    if ((pok_sched_next_deadline<=now)) 
     {
+      pok_port_flush_partition (pok_current_partition);
+    }
+#else // activate default flushing policy at each Major Frame beginning
+  if (pok_sched_next_major_frame <= now)
+    {
       pok_sched_next_major_frame = pok_sched_next_major_frame +	POK_CONFIG_SCHEDULING_MAJOR_FRAME;
       pok_port_flushall();
-    }
-#  endif /* defined (POK_NEEDS_PORTS....) */
-
+      }
+#endif
+#endif
+      /* Here, we change the partition */
     pok_sched_current_slot = (pok_sched_current_slot + 1) % POK_CONFIG_SCHEDULING_NBSLOTS;
     pok_sched_next_deadline = pok_sched_next_deadline + pok_sched_slots[pok_sched_current_slot];
 /*
Index: misc/release-files
===================================================================
--- misc/release-files	(révision 45)
+++ misc/release-files	(copie de travail)
@@ -847,3 +847,111 @@
 examples/case-study-sigada09/Makefile
 examples/case-study-sigada09/common.c
 examples/case-study-sigada09/queued-buffer.c
+examples/arinc653-sampling-flush-maf/model.aadl
+examples/arinc653-sampling-flush-maf/user_receive.c
+examples/arinc653-sampling-flush-maf/user_receive.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/deployment.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/deployment.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/routing.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/Makefile
+examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/routing.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/gtypes.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/deployment.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/activity.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/main.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/subprograms.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/deployment.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/main.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/subprograms.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/gtypes.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/Makefile
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/activity.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/gtypes.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/deployment.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/activity.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/main.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/subprograms.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/deployment.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/main.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/subprograms.h
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/gtypes.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/Makefile
+examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/activity.c
+examples/arinc653-sampling-flush-maf/generated-code/cpu/Makefile
+examples/arinc653-sampling-flush-maf/generated-code/Makefile
+examples/arinc653-sampling-flush-maf/user_send.c
+examples/arinc653-sampling-flush-maf/Makefile
+examples/arinc653-sampling-flush-maf/user_send.h
+examples/arinc653-sampling-flush-maf/README
+examples/arinc653-sampling-flush-mif/model.aadl
+examples/arinc653-sampling-flush-mif/user_receive.c
+examples/arinc653-sampling-flush-mif/user_receive.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/deployment.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/deployment.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/routing.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/Makefile
+examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/routing.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/gtypes.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/deployment.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/activity.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/main.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/subprograms.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/deployment.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/main.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/subprograms.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/gtypes.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/Makefile
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/activity.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/gtypes.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/deployment.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/activity.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/main.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/subprograms.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/deployment.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/main.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/subprograms.h
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/gtypes.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/Makefile
+examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/activity.c
+examples/arinc653-sampling-flush-mif/generated-code/cpu/Makefile
+examples/arinc653-sampling-flush-mif/generated-code/Makefile
+examples/arinc653-sampling-flush-mif/user_send.c
+examples/arinc653-sampling-flush-mif/Makefile
+examples/arinc653-sampling-flush-mif/user_send.h
+examples/arinc653-sampling-flush-mif/README
+examples/arinc653-sampling-flush-window/model.aadl
+examples/arinc653-sampling-flush-window/user_receive.c
+examples/arinc653-sampling-flush-window/user_receive.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/deployment.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/deployment.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/routing.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/Makefile
+examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/routing.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/gtypes.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/deployment.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/activity.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/main.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/subprograms.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/deployment.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/main.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/subprograms.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/gtypes.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/Makefile
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/activity.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/gtypes.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/deployment.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/activity.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/main.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/subprograms.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/deployment.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/main.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/subprograms.h
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/gtypes.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/Makefile
+examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/activity.c
+examples/arinc653-sampling-flush-window/generated-code/cpu/Makefile
+examples/arinc653-sampling-flush-window/generated-code/Makefile
+examples/arinc653-sampling-flush-window/user_send.c
+examples/arinc653-sampling-flush-window/Makefile
+examples/arinc653-sampling-flush-window/user_send.h
+examples/arinc653-sampling-flush-window/README
Index: examples/arinc653-sampling-flush-maf/model.aadl
===================================================================
--- examples/arinc653-sampling-flush-maf/model.aadl	(révision 0)
+++ examples/arinc653-sampling-flush-maf/model.aadl	(révision 0)
@@ -0,0 +1,192 @@
+--
+--                              POK header
+-- 
+--  The following file is a part of the POK project. Any modification should
+--  be made according to the POK licence. You CANNOT use this file or a part 
+--  of a file for your own project.
+-- 
+--  For more information on the POK licence, please see our LICENCE FILE
+--
+--  Please follow the coding guidelines described in doc/CODING_GUIDELINES
+--
+--                                      Copyright (c) 2007-2013 POK team 
+--
+--  Created by devel on Sat Feb 16 08:46:09 2013 
+--
+package pingpong
+
+public
+
+with Data_Model;
+with POK;
+with ARINC653;
+
+data integer
+properties
+  Data_Model::Data_Representation => integer;
+end integer;
+
+virtual bus ip_com
+properties
+   Required_Connection_Quality_Of_Service => (SecureDelivery);
+end ip_com;
+
+
+virtual processor partition
+properties
+   POK::Scheduler => RR;
+   POK::Additional_Features => (libc_stdio, console);
+end partition;
+
+virtual processor implementation partition.withcom
+properties
+   Provided_Virtual_Bus_Class => 
+               (classifier (pingpong::ip_com));
+end partition.withcom;
+
+subprogram send_spg
+features
+   output : out parameter integer;
+properties
+   source_name => "send";
+   source_language => (C);
+   source_text => ("../../../../input/user_send.h");
+   POK::source_location => "../../../../input/user_send.o";
+end send_spg;
+
+subprogram receive_spg
+features
+   input : in parameter integer;
+properties
+   source_text => ("../../../../input/user_receive.h");
+   POK::source_location => "../../../../input/user_receive.o";
+   source_language => (C);
+   source_name => "receive";
+end receive_spg;
+
+processor qemu_cpu
+properties
+   POK::Scheduler => Static;
+   POK::Architecture => x86;
+   POK::BSP => x86_qemu;
+end qemu_cpu;
+
+processor implementation qemu_cpu.impl
+subcomponents
+   partition_sender : virtual processor partition.withcom;
+   partition_receiver : virtual processor partition.withcom;
+properties
+   ARINC653::Module_Major_Frame => 4000ms;
+   ARINC653::Partition_Slots => (1000ms, 1000ms,1000ms, 1000ms);
+   ARINC653::Slots_Allocation => ( reference (partition_sender), reference (partition_receiver), reference (partition_sender), reference (partition_receiver));
+   POK::Ports_Flush_Time => Major_Frame_Switch;
+end qemu_cpu.impl;
+
+thread receive_ping
+features
+   tdatain : in data port integer;
+properties
+   Priority => 1;
+   Dispatch_Protocol => Periodic;
+   Compute_Execution_Time => 0 ms .. 1 ms;
+   Period => 2000 Ms;
+   Source_Data_Size => 400000 bytes;
+   Source_Stack_Size => 400000 bytes;
+   Source_Code_Size => 40 bytes;
+end receive_ping;
+
+thread send_ping
+features
+   tdataout : out data port integer;
+properties
+   Priority => 1;
+   Dispatch_Protocol => Periodic;
+   Period => 2000 Ms;
+   Source_Data_Size => 40000 bytes;
+   Source_Stack_Size => 40000 bytes;
+   Source_Code_Size => 40 bytes;
+   Compute_Execution_Time => 0 ms .. 1 ms;
+end send_ping;
+
+thread implementation send_ping.impl
+calls 
+   call1 : { pspg : subprogram send_spg;};
+connections
+   parameter pspg.output -> tdataout;
+end send_ping.impl;
+
+thread implementation receive_ping.impl
+calls 
+   call1 : { pspg : subprogram receive_spg;};
+connections
+   parameter tdatain -> pspg.input;
+end receive_ping.impl;
+
+process receive_ping_process
+features
+   pdatain : in data port integer
+   					{ARINC653::Sampling_Refresh_Period => 10 ms;}; 
+properties
+   Source_Code_Size => 10 KByte;
+   Source_Data_Size => 15 KByte;
+end receive_ping_process;
+
+process send_ping_process
+features
+   pdataout : out data port integer
+   					{ARINC653::Sampling_Refresh_Period => 10 ms;};
+end send_ping_process;
+
+process implementation receive_ping_process.impl
+subcomponents
+   thr : thread receive_ping.impl;
+connections
+   port pdatain -> thr.tdatain; 
+end receive_ping_process.impl;
+
+process implementation send_ping_process.impl
+subcomponents
+   thr : thread send_ping.impl;
+connections
+   port thr.tdataout -> pdataout;
+end send_ping_process.impl;
+
+system root
+end root;
+
+memory partitionmemory
+properties
+   Byte_Count => 80000;
+end partitionmemory;
+
+memory mainmemory
+end mainmemory;
+
+memory implementation mainmemory.impl
+subcomponents
+   part1: memory partitionmemory;
+   part2: memory partitionmemory;
+end mainmemory.impl;
+
+
+
+system implementation root.impl
+subcomponents
+   cpu : processor qemu_cpu.impl;
+   pr1 : process send_ping_process.impl;
+   pr2 : process receive_ping_process.impl;
+   mem : memory mainmemory.impl;
+connections
+   port pr1.pdataout -> pr2.pdatain;
+properties
+   actual_processor_binding => 
+      (reference (cpu.partition_sender)) applies to pr1;
+   actual_processor_binding => 
+      (reference (cpu.partition_receiver)) applies to pr2;
+   actual_memory_binding =>
+      (reference (mem.part1)) applies to pr1;
+   actual_memory_binding =>
+      (reference (mem.part2)) applies to pr2;
+end root.impl;
+
+end pingpong;
Index: examples/arinc653-sampling-flush-maf/user_receive.c
===================================================================
--- examples/arinc653-sampling-flush-maf/user_receive.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/user_receive.c	(révision 0)
@@ -0,0 +1,46 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#include "user_receive.h"
+#include <types.h>
+#include <libc/stdio.h>
+
+void receive(uint8_t d)
+{
+  if(d<10 && d>1)
+    printf("received value: %d\n", d);
+}
Index: examples/arinc653-sampling-flush-maf/user_receive.h
===================================================================
--- examples/arinc653-sampling-flush-maf/user_receive.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/user_receive.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#ifndef __USER_RECEIVE_H__
+#define __USER_RECEIVE_H__
+
+void receive(uint8_t d);
+
+#endif
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/deployment.c	(révision 0)
@@ -0,0 +1,18 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include <types.h>
+#include "deployment.h"
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/deployment.h	(révision 0)
@@ -0,0 +1,46 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+
+#include "routing.h"
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_CONFIG_LOCAL_NODE 0
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_GETTICK 1
+#define POK_NEEDS_THREADS 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_DEBUG 1
+#define POK_NEEDS_SCHED 1
+#define POK_CONFIG_NB_PARTITIONS 2
+#define POK_CONFIG_NB_THREADS 6
+#define POK_CONFIG_PARTITIONS_NTHREADS {2,2}
+#define POK_NEEDS_SCHED_RR 1
+#define POK_NEEDS_SCHED_RR 1
+#define POK_CONFIG_PARTITIONS_SCHEDULER {POK_SCHED_RR,POK_SCHED_RR}
+#define POK_NEEDS_PORTS_SAMPLING 1
+#define POK_NEEDS_THREAD_ID 1
+#define POK_CONFIG_PARTITIONS_NLOCKOBJECTS {0,0}
+#define POK_CONFIG_PARTITIONS_SIZE {80000,80000}
+#define POK_CONFIG_SCHEDULING_SLOTS {1000,1000,1000,1000}
+#define POK_CONFIG_SCHEDULING_NBSLOTS 4
+#define POK_CONFIG_SCHEDULING_SLOTS_ALLOCATION {0,1,0,1,}
+#define POK_CONFIG_SCHEDULING_MAJOR_FRAME 4000
+#define POK_CONFIG_STACKS_SIZE 440000
+#define POK_CONFIG_NB_BUSES 0
+#endif
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/routing.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/routing.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/routing.c	(révision 0)
@@ -0,0 +1,32 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "routing.h"
+#include "middleware/port.h"
+#include <types.h>
+uint8_t pr1_partport[1] = {pr1_thr_tdataout_tdataout,};
+uint8_t pr1_thr_tdataout_tdataout_deployment_destinations[1] = {pr2_thr_tdatain_tdatain_global,};
+uint8_t pr2_partport[1] = {pr2_thr_tdatain_tdatain,};
+uint8_t pok_global_ports_to_local_ports[POK_CONFIG_NB_GLOBAL_PORTS] = {pr1_thr_tdataout_tdataout,pr2_thr_tdatain_tdatain,};
+uint8_t pok_local_ports_to_global_ports[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout_global,pr2_thr_tdatain_tdatain_global,};
+uint8_t pok_ports_nodes[POK_CONFIG_NB_GLOBAL_PORTS] = {cpu,cpu,};
+uint8_t pok_ports_nb_ports_by_partition[POK_CONFIG_NB_PARTITIONS] = {1,1,};
+uint8_t* pok_ports_by_partition[POK_CONFIG_NB_PARTITIONS] = {pr1_partport,pr2_partport,};
+char* pok_ports_names[POK_CONFIG_NB_PORTS] = {"pr1_thr_tdataout_tdataout","pr2_thr_tdatain_tdatain",};
+uint8_t pok_ports_identifiers[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout,pr2_thr_tdatain_tdatain,};
+uint8_t pok_ports_nb_destinations[POK_CONFIG_NB_PORTS] = {1,0,};
+uint8_t* pok_ports_destinations[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout_deployment_destinations,NULL,};
+uint8_t pok_ports_kind[POK_CONFIG_NB_PORTS] = {POK_PORT_KIND_SAMPLING,POK_PORT_KIND_SAMPLING,};
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/Makefile
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/Makefile	(révision 0)
@@ -0,0 +1,10 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+LO_TARGET = kernel.lo
+LO_OBJS = deployment.o routing.o
+LO_DEPS = pok.lo
+all: kernel copy-kernel $(LO_TARGET)
+clean: common-clean
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-common.mk
+include $(POK_PATH)/misc/mk/rules-kernel.mk
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/routing.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/routing.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/kernel/routing.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ROUTING_H__
+#define __GENERATED_ROUTING_H__
+#define POK_CONFIG_NB_GLOBAL_PORTS 2
+#define POK_CONFIG_NB_PORTS 2
+#define POK_CONFIG_NB_NODES 1
+#define POK_CONFIG_PARTITIONS_PORTS {0,1,}
+typedef enum
+{
+  cpu = 0,
+} pok_node_identifier_t;
+typedef enum
+{
+  pr1_thr_tdataout_tdataout = 0,
+  pr2_thr_tdatain_tdatain = 1,
+  invalid_local_port = 2
+} pok_port_local_identifier_t;
+typedef enum
+{
+  pr1_thr_tdataout_tdataout_global = 0,
+  pr2_thr_tdatain_tdatain_global = 1,
+} pok_port_identifier_t;
+#define POK_CONFIG_NB_BUSES 0
+typedef enum
+{
+  invalid_bus = 0
+} pok_bus_identifier_t;
+#endif
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/gtypes.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/gtypes.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/gtypes.h	(révision 0)
@@ -0,0 +1,27 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_GTYPES_H__
+#define __GENERATED_GTYPES_H__
+#include "arinc653/sampling.h"
+#include "arinc653/types.h"
+typedef unsigned int Base_Types__Unsigned_8;
+typedef  int pingpong__integer;
+typedef RETURN_CODE_TYPE pok_runtime__Return_Code_Type;
+typedef SAMPLING_PORT_ID_TYPE pok_runtime__Sampling_Port_Id_Type;
+
+#endif
+
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/deployment.c	(révision 0)
@@ -0,0 +1,18 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "deployment.h"
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/activity.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/activity.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/activity.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ACTIVITY_H__
+#define __GENERATED_ACTIVITY_H__
+#include "arinc653/sampling.h"
+#include "../../../user_send.h"
+#include "arinc653/blackboard.h"
+#include "arinc653/types.h"
+#include "subprograms.h"
+void*  pingpong_refined__pr1_thr_impl_Job();
+
+
+#endif
+
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/main.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/main.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/main.c	(révision 0)
@@ -0,0 +1,52 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+
+/******************************************************************************/
+/*                                 INCLUSION                                  */
+
+#include "main.h"
+#include "activity.h"
+
+/******************************************************************************/
+/*                              GLOBAL VARIABLES                              */
+
+PROCESS_ID_TYPE arinc_threads[POK_CONFIG_NB_THREADS];
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
+
+/******************************************************************************/
+/*                                    MAIN                                    */
+
+int main ()
+{
+  PROCESS_ATTRIBUTE_TYPE tattr;
+  RETURN_CODE_TYPE ret;
+  CREATE_SAMPLING_PORT ("pr1_thr_tdataout_tdataout",
+    sizeof( pingpong__integer ), SOURCE, 10,
+      &(src_tdataout_Instance), &(ret));
+  tattr.ENTRY_POINT = pingpong_refined__pr1_thr_impl_Job;
+  tattr.PERIOD = 2000;
+  tattr.DEADLINE = 2000;
+  tattr.TIME_CAPACITY = 1;
+  tattr.BASE_PRIORITY = 1;
+  strcpy(tattr.NAME, "thr");
+  CREATE_PROCESS (&(tattr), &(arinc_threads[1]), &(ret));
+  START (arinc_threads[1], &(ret));
+  SET_PARTITION_MODE (NORMAL, &(ret));
+  return (0);
+}
+
+/******************************************************************************/
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/subprograms.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/subprograms.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/subprograms.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "subprograms.h"
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/deployment.h	(révision 0)
@@ -0,0 +1,24 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+#include "main.h"
+#include "arinc653/sampling.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/main.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/main.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/main.h	(révision 0)
@@ -0,0 +1,40 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_MAIN_H__
+#define __GENERATED_MAIN_H__
+
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_LIBC_STDIO 1
+#define POK_CONFIG_NB_THREADS 2
+#define POK_NEEDS_ARINC653_SAMPLING 1
+#define POK_NEEDS_LIBC_STRING 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_PROTOCOLS 1
+#define POK_CONFIG_STACKS_SIZE 40000
+#define POK_NEEDS_ARINC653_TIME 1
+#define POK_NEEDS_ARINC653_PROCESS 1
+#define POK_NEEDS_ARINC653_PARTITION 1
+#define POK_NEEDS_MIDDLEWARE 1
+
+#include <arinc653/types.h>
+#include <arinc653/process.h>
+#include <arinc653/partition.h>
+#include <arinc653/time.h>
+#include "gtypes.h"
+
+#endif
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/subprograms.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/subprograms.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/subprograms.h	(révision 0)
@@ -0,0 +1,25 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_SUBPROGRAMS_H__
+#define __GENERATED_SUBPROGRAMS_H__
+#include "arinc653/sampling.h"
+#include "../../../user_send.h"
+#include "arinc653/blackboard.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/gtypes.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/gtypes.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/gtypes.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "gtypes.h"
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/Makefile
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+TARGET = pr1.elf
+OBJS = main.o activity.o subprograms.o gtypes.o deployment.o ../../../user_send.o 
+all: libpok $(TARGET)
+
+clean: common-clean
+
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-partition.mk
+include $(POK_PATH)/misc/mk/rules-common.mk
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/activity.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/activity.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr1/activity.c	(révision 0)
@@ -0,0 +1,32 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "activity.h"
+#include "main.h"
+
+extern SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
+void* pingpong_refined__pr1_thr_impl_Job()
+{
+  Base_Types__Unsigned_8 pingpong_refined__pr1_thr_impl_tdataout_Length = sizeof(pingpong__integer);
+  pingpong__integer pingpong_refined__pr1_thr_impl_tdataout_MsgAddr;
+  RETURN_CODE_TYPE pingpong_refined__pr1_thr_impl_runtime_call_ret;
+  while (1) {
+    send (&pingpong_refined__pr1_thr_impl_tdataout_MsgAddr);
+    WRITE_SAMPLING_MESSAGE (src_tdataout_Instance, &pingpong_refined__pr1_thr_impl_tdataout_MsgAddr, pingpong_refined__pr1_thr_impl_tdataout_Length, &pingpong_refined__pr1_thr_impl_runtime_call_ret);
+    PERIODIC_WAIT (&pingpong_refined__pr1_thr_impl_runtime_call_ret);
+  }
+  return 0;
+}
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/gtypes.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/gtypes.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/gtypes.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_GTYPES_H__
+#define __GENERATED_GTYPES_H__
+#include "arinc653/sampling.h"
+#include "arinc653/types.h"
+typedef unsigned int Base_Types__Unsigned_8;
+typedef  int pingpong__integer;
+typedef VALIDITY_TYPE pok_runtime__Validity_Type;
+typedef RETURN_CODE_TYPE pok_runtime__Return_Code_Type;
+typedef SAMPLING_PORT_ID_TYPE pok_runtime__Sampling_Port_Id_Type;
+
+#endif
+
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/deployment.c	(révision 0)
@@ -0,0 +1,19 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "deployment.h"
+SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/activity.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/activity.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/activity.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ACTIVITY_H__
+#define __GENERATED_ACTIVITY_H__
+#include "arinc653/sampling.h"
+#include "arinc653/blackboard.h"
+#include "arinc653/types.h"
+#include "../../../user_receive.h"
+#include "subprograms.h"
+void*  pingpong_refined__pr2_thr_impl_Job();
+
+
+#endif
+
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/main.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/main.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/main.c	(révision 0)
@@ -0,0 +1,52 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+
+/******************************************************************************/
+/*                                 INCLUSION                                  */
+
+#include "main.h"
+#include "activity.h"
+
+/******************************************************************************/
+/*                              GLOBAL VARIABLES                              */
+
+PROCESS_ID_TYPE arinc_threads[POK_CONFIG_NB_THREADS];
+SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
+
+/******************************************************************************/
+/*                                    MAIN                                    */
+
+int main ()
+{
+  PROCESS_ATTRIBUTE_TYPE tattr;
+  RETURN_CODE_TYPE ret;
+  CREATE_SAMPLING_PORT ("pr2_thr_tdatain_tdatain",
+    sizeof( pingpong__integer ), DESTINATION, 10,
+      &(dst_tdataout_Instance), &(ret));
+  tattr.ENTRY_POINT = pingpong_refined__pr2_thr_impl_Job;
+  tattr.PERIOD = 2000;
+  tattr.DEADLINE = 2000;
+  tattr.TIME_CAPACITY = 1;
+  tattr.BASE_PRIORITY = 1;
+  strcpy(tattr.NAME, "thr");
+  CREATE_PROCESS (&(tattr), &(arinc_threads[1]), &(ret));
+  START (arinc_threads[1], &(ret));
+  SET_PARTITION_MODE (NORMAL, &(ret));
+  return (0);
+}
+
+/******************************************************************************/
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/subprograms.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/subprograms.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/subprograms.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "subprograms.h"
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/deployment.h	(révision 0)
@@ -0,0 +1,24 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+#include "main.h"
+#include "arinc653/sampling.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/main.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/main.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/main.h	(révision 0)
@@ -0,0 +1,40 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_MAIN_H__
+#define __GENERATED_MAIN_H__
+
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_LIBC_STDIO 1
+#define POK_CONFIG_NB_THREADS 2
+#define POK_NEEDS_ARINC653_SAMPLING 1
+#define POK_NEEDS_LIBC_STRING 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_PROTOCOLS 1
+#define POK_CONFIG_STACKS_SIZE 400000
+#define POK_NEEDS_ARINC653_TIME 1
+#define POK_NEEDS_ARINC653_PROCESS 1
+#define POK_NEEDS_ARINC653_PARTITION 1
+#define POK_NEEDS_MIDDLEWARE 1
+
+#include <arinc653/types.h>
+#include <arinc653/process.h>
+#include <arinc653/partition.h>
+#include <arinc653/time.h>
+#include "gtypes.h"
+
+#endif
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/subprograms.h
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/subprograms.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/subprograms.h	(révision 0)
@@ -0,0 +1,25 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_SUBPROGRAMS_H__
+#define __GENERATED_SUBPROGRAMS_H__
+#include "arinc653/sampling.h"
+#include "arinc653/blackboard.h"
+#include "../../../user_receive.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/gtypes.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/gtypes.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/gtypes.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "gtypes.h"
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/Makefile
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+TARGET = pr2.elf
+OBJS = main.o activity.o subprograms.o gtypes.o deployment.o ../../../user_receive.o 
+all: libpok $(TARGET)
+
+clean: common-clean
+
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-partition.mk
+include $(POK_PATH)/misc/mk/rules-common.mk
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/activity.c
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/activity.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/pr2/activity.c	(révision 0)
@@ -0,0 +1,33 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "activity.h"
+#include "main.h"
+
+extern SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
+void* pingpong_refined__pr2_thr_impl_Job()
+{
+  Base_Types__Unsigned_8 pingpong_refined__pr2_thr_impl_tdatain_Length = sizeof(pingpong__integer);
+  pingpong__integer pingpong_refined__pr2_thr_impl_tdatain_MsgAddr;
+  VALIDITY_TYPE pingpong_refined__pr2_thr_impl_tdatain_Validity;
+  RETURN_CODE_TYPE pingpong_refined__pr2_thr_impl_runtime_call_ret;
+  while (1) {
+    READ_SAMPLING_MESSAGE (dst_tdataout_Instance, &pingpong_refined__pr2_thr_impl_tdatain_MsgAddr, pingpong_refined__pr2_thr_impl_tdatain_Length, &pingpong_refined__pr2_thr_impl_tdatain_Validity, &pingpong_refined__pr2_thr_impl_runtime_call_ret);
+    receive (pingpong_refined__pr2_thr_impl_tdatain_MsgAddr);
+    PERIODIC_WAIT (&pingpong_refined__pr2_thr_impl_runtime_call_ret);
+  }
+  return 0;
+}
Index: examples/arinc653-sampling-flush-maf/generated-code/cpu/Makefile
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/cpu/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/cpu/Makefile	(révision 0)
@@ -0,0 +1,25 @@
+export ARCH=x86
+export BSP=x86-qemu
+export POK_CONFIG_OPTIMIZE_FOR_GENERATED_CODE=1
+include $(POK_PATH)/misc/mk/config.mk
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+TARGET=$(shell pwd)/pok.elf
+PARTITIONS=pr1/pr1.elf pr2/pr2.elf 
+KERNEL=kernel/kernel.lo
+all: build-kernel partitions $(TARGET)
+build-kernel:
+	$(CD) kernel && $(MAKE)
+partitions:
+	$(CD) pr1 && $(MAKE)
+	$(CD) pr2 && $(MAKE)
+clean: common-clean
+	$(CD) kernel && $(MAKE) clean
+	$(CD) pr1 && $(MAKE) clean
+	$(CD) pr2 && $(MAKE) clean
+distclean: clean
+	$(CD) kernel && $(MAKE) distclean
+	$(CD) pr1 && $(MAKE) distclean
+	$(CD) pr2 && $(MAKE) distclean
+include $(POK_PATH)/misc/mk/rules-common.mk
+include $(POK_PATH)/misc/mk/rules-main.mk
+include $(POK_PATH)/misc/mk/install-rules.mk
Index: examples/arinc653-sampling-flush-maf/generated-code/Makefile
===================================================================
--- examples/arinc653-sampling-flush-maf/generated-code/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-maf/generated-code/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+all:
+	$(MAKE) -C cpu all
+
+clean:
+	$(MAKE) -C cpu clean
+
+run:
+	$(MAKE) -C cpu run
+
+test:
+	$(MAKE) -C cpu run QEMU_MISC="-nographic -serial /dev/stdout > cpu.trace"
\ No newline at end of file
Index: examples/arinc653-sampling-flush-maf/user_send.c
===================================================================
--- examples/arinc653-sampling-flush-maf/user_send.c	(révision 0)
+++ examples/arinc653-sampling-flush-maf/user_send.c	(révision 0)
@@ -0,0 +1,49 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#include <types.h>
+#include <libc/stdio.h>
+
+uint8_t value=0;
+
+void send(uint8_t* d)
+{
+  *d = value;
+  value++;
+  if(*d<10 && *d>1)
+    printf("send value: %d\n", *d);
+}
Index: examples/arinc653-sampling-flush-maf/Makefile
===================================================================
--- examples/arinc653-sampling-flush-maf/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-maf/Makefile	(révision 0)
@@ -0,0 +1,33 @@
+include $(POK_PATH)/misc/mk/config.mk
+
+test: 
+	$(MAKE) distclean >/dev/null 2>&1;	
+	$(ECHO) -n "`basename $(CURDIR)` on x86: ";		
+	if $(MAKE) -C generated-code all > /dev/null 2>&1;	\
+	then								\
+		$(ECHO) "SUCCESS";					\
+		$(ECHO) -n 0 > .fail;					\
+	else								\
+		$(ECHO) "FAILURE";					\
+		$(ECHO) -n 1 > .fail;					\
+	fi;		
+	$(MAKE) -C generated-code clean  >/dev/null 2>&1;	
+
+distclean: clean
+	$(MAKE) -C $(POK_PATH)/kernel clean 
+
+clean:
+	$(MAKE) -C generated-code clean
+
+
+test-exec:
+	$(MAKE) -C generated-code test
+
+run:
+	$(MAKE) -C generated-code run
+
+all: 
+	$(MAKE) -C generated-code all
+
+
+
Index: examples/arinc653-sampling-flush-maf/user_send.h
===================================================================
--- examples/arinc653-sampling-flush-maf/user_send.h	(révision 0)
+++ examples/arinc653-sampling-flush-maf/user_send.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#ifndef __USER_SEND_H__
+#define __USER_SEND_H__
+
+void send(uint8_t* d);
+
+#endif
Index: examples/arinc653-sampling-flush-maf/README
===================================================================
--- examples/arinc653-sampling-flush-maf/README	(révision 0)
+++ examples/arinc653-sampling-flush-maf/README	(révision 0)
@@ -0,0 +1,4 @@
+This example allows testing flushig policies implemented between partionions :
+*  flush all ports each time a MAjor Frame starts (maf).
+Code cannot be generated, Ramses has been used to generate the "generated code directory" 
+ 
Index: examples/arinc653-sampling-flush-mif/model.aadl
===================================================================
--- examples/arinc653-sampling-flush-mif/model.aadl	(révision 0)
+++ examples/arinc653-sampling-flush-mif/model.aadl	(révision 0)
@@ -0,0 +1,194 @@
+--
+--                              POK header
+-- 
+--  The following file is a part of the POK project. Any modification should
+--  be made according to the POK licence. You CANNOT use this file or a part 
+--  of a file for your own project.
+-- 
+--  For more information on the POK licence, please see our LICENCE FILE
+--
+--  Please follow the coding guidelines described in doc/CODING_GUIDELINES
+--
+--                                      Copyright (c) 2007-2013 POK team 
+--
+--  Created by devel on Sat Feb 16 08:46:09 2013 
+--
+package pingpong
+
+public
+
+with Data_Model;
+with POK;
+with ARINC653;
+
+data integer
+properties
+  Data_Model::Data_Representation => integer;
+end integer;
+
+virtual bus ip_com
+properties
+   Required_Connection_Quality_Of_Service => (SecureDelivery);
+end ip_com;
+
+
+virtual processor partition
+properties
+   POK::Scheduler => RR;
+   POK::Additional_Features => (libc_stdio, console);
+end partition;
+
+virtual processor implementation partition.withcom
+properties
+   Provided_Virtual_Bus_Class => 
+               (classifier (pingpong::ip_com));
+end partition.withcom;
+
+subprogram send_spg
+features
+   output : out parameter integer;
+properties
+   source_name => "send";
+   source_language => (C);
+   source_text => ("../../../../input/user_send.h");
+   POK::source_location => "../../../../input/user_send.o";
+end send_spg;
+
+subprogram receive_spg
+features
+   input : in parameter integer;
+properties
+   source_text => ("../../../../input/user_receive.h");
+   POK::source_location => "../../../../input/user_receive.o";
+   source_language => (C);
+   source_name => "receive";
+end receive_spg;
+
+processor qemu_cpu
+properties
+   POK::Scheduler => static;
+   POK::Architecture => x86;
+   POK::BSP => x86_qemu;
+end qemu_cpu;
+
+processor implementation qemu_cpu.impl
+subcomponents
+   partition_sender : virtual processor partition.withcom;
+   partition_receiver : virtual processor partition.withcom;
+properties
+   POK::Scheduler => static;
+   ARINC653::Module_Major_Frame => 6000ms;
+   ARINC653::Partition_Slots => (1000ms,1000ms,1000ms, 1000ms,1000ms, 1000ms);
+   ARINC653::Slots_Allocation => ( reference (partition_sender), reference (partition_receiver), reference (partition_sender), reference (partition_receiver), reference (partition_sender), reference (partition_receiver));
+   POK::Ports_Flush_Time => Minor_Frame_Switch;
+   POK::Module_Minor_Frame => 3000ms;
+end qemu_cpu.impl;
+
+thread receive_ping
+features
+   tdatain : in data port integer;
+properties
+   Priority => 1;
+   Dispatch_Protocol => Periodic;
+   Compute_Execution_Time => 0 ms .. 1 ms;
+   Period => 2000 Ms;
+   Source_Data_Size => 400000 bytes;
+   Source_Stack_Size => 400000 bytes;
+   Source_Code_Size => 40 bytes;
+end receive_ping;
+
+thread send_ping
+features
+   tdataout : out data port integer;
+properties
+   Priority => 1;
+   Dispatch_Protocol => Periodic;
+   Period => 2000 Ms;
+   Source_Data_Size => 40 bytes;
+   Source_Stack_Size => 40 bytes;
+   Source_Code_Size => 40 bytes;
+   Compute_Execution_Time => 0 ms .. 1 ms;
+end send_ping;
+
+thread implementation send_ping.impl
+calls 
+   call1 : { pspg : subprogram send_spg;};
+connections
+   parameter pspg.output -> tdataout;
+end send_ping.impl;
+
+thread implementation receive_ping.impl
+calls 
+   call1 : { pspg : subprogram receive_spg;};
+connections
+   parameter tdatain -> pspg.input;
+end receive_ping.impl;
+
+process receive_ping_process
+features
+   pdatain : in data port integer
+   				{ARINC653::Sampling_Refresh_Period => 10 ms;}; 
+properties
+   Source_Code_Size => 10 KByte;
+   Source_Data_Size => 15 KByte;
+end receive_ping_process;
+
+process send_ping_process
+features
+   pdataout : out data port integer
+   				{ARINC653::Sampling_Refresh_Period => 10 ms;};
+end send_ping_process;
+
+process implementation receive_ping_process.impl
+subcomponents
+   thr : thread receive_ping.impl;
+connections
+   port pdatain -> thr.tdatain; 
+end receive_ping_process.impl;
+
+process implementation send_ping_process.impl
+subcomponents
+   thr : thread send_ping.impl;
+connections
+   port thr.tdataout -> pdataout;
+end send_ping_process.impl;
+
+system root
+end root;
+
+memory partitionmemory
+properties
+   Byte_Count => 80000;
+end partitionmemory;
+
+memory mainmemory
+end mainmemory;
+
+memory implementation mainmemory.impl
+subcomponents
+   part1: memory partitionmemory ;
+   part2: memory partitionmemory ;
+end mainmemory.impl;
+
+
+
+system implementation root.impl
+subcomponents
+   cpu : processor qemu_cpu.impl;
+   pr1 : process send_ping_process.impl;
+   pr2 : process receive_ping_process.impl;
+   mem : memory mainmemory.impl;
+connections
+   port pr1.pdataout -> pr2.pdatain;
+properties
+   actual_processor_binding => 
+      (reference (cpu.partition_sender)) applies to pr1;
+   actual_processor_binding => 
+      (reference (cpu.partition_receiver)) applies to pr2;
+   actual_memory_binding =>
+      (reference (mem.part1)) applies to pr1;
+   actual_memory_binding =>
+      (reference (mem.part2)) applies to pr2;
+end root.impl;
+
+end pingpong;
Index: examples/arinc653-sampling-flush-mif/user_receive.c
===================================================================
--- examples/arinc653-sampling-flush-mif/user_receive.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/user_receive.c	(révision 0)
@@ -0,0 +1,46 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#include "user_receive.h"
+#include <types.h>
+#include <libc/stdio.h>
+
+void receive(uint8_t d)
+{
+  if(d<10 && d>1)
+    printf("received value: %d\n", d);
+}
Index: examples/arinc653-sampling-flush-mif/user_receive.h
===================================================================
--- examples/arinc653-sampling-flush-mif/user_receive.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/user_receive.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#ifndef __USER_RECEIVE_H__
+#define __USER_RECEIVE_H__
+
+void receive(uint8_t d);
+
+#endif
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/deployment.c	(révision 0)
@@ -0,0 +1,18 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include <types.h>
+#include "deployment.h"
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/deployment.h	(révision 0)
@@ -0,0 +1,47 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+
+#include "routing.h"
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_CONFIG_LOCAL_NODE 0
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_GETTICK 1
+#define POK_NEEDS_THREADS 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_DEBUG 1
+#define POK_NEEDS_SCHED 1
+#define POK_CONFIG_NB_PARTITIONS 2
+#define POK_CONFIG_NB_THREADS 6
+#define POK_CONFIG_PARTITIONS_NTHREADS {2,2}
+#define POK_NEEDS_SCHED_RR 1
+#define POK_NEEDS_SCHED_RR 1
+#define POK_CONFIG_PARTITIONS_SCHEDULER {POK_SCHED_RR,POK_SCHED_RR}
+#define POK_NEEDS_PORTS_SAMPLING 1
+#define POK_NEEDS_THREAD_ID 1
+#define POK_CONFIG_PARTITIONS_NLOCKOBJECTS {0,0}
+#define POK_CONFIG_PARTITIONS_SIZE {80000,80000}
+#define POK_CONFIG_SCHEDULING_SLOTS {1000,1000,1000,1000,1000,1000}
+#define POK_CONFIG_SCHEDULING_NBSLOTS 6
+#define POK_CONFIG_SCHEDULING_SLOTS_ALLOCATION {0,1,0,1,0,1,}
+#define POK_CONFIG_SCHEDULING_MAJOR_FRAME 6000
+#define POK_FLUSH_PERIOD 3000
+#define POK_CONFIG_STACKS_SIZE 400040
+#define POK_CONFIG_NB_BUSES 0
+#endif
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/routing.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/routing.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/routing.c	(révision 0)
@@ -0,0 +1,32 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "routing.h"
+#include "middleware/port.h"
+#include <types.h>
+uint8_t pr1_partport[1] = {pr1_thr_tdataout_tdataout,};
+uint8_t pr1_thr_tdataout_tdataout_deployment_destinations[1] = {pr2_thr_tdatain_tdatain_global,};
+uint8_t pr2_partport[1] = {pr2_thr_tdatain_tdatain,};
+uint8_t pok_global_ports_to_local_ports[POK_CONFIG_NB_GLOBAL_PORTS] = {pr1_thr_tdataout_tdataout,pr2_thr_tdatain_tdatain,};
+uint8_t pok_local_ports_to_global_ports[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout_global,pr2_thr_tdatain_tdatain_global,};
+uint8_t pok_ports_nodes[POK_CONFIG_NB_GLOBAL_PORTS] = {cpu,cpu,};
+uint8_t pok_ports_nb_ports_by_partition[POK_CONFIG_NB_PARTITIONS] = {1,1,};
+uint8_t* pok_ports_by_partition[POK_CONFIG_NB_PARTITIONS] = {pr1_partport,pr2_partport,};
+char* pok_ports_names[POK_CONFIG_NB_PORTS] = {"pr1_thr_tdataout_tdataout","pr2_thr_tdatain_tdatain",};
+uint8_t pok_ports_identifiers[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout,pr2_thr_tdatain_tdatain,};
+uint8_t pok_ports_nb_destinations[POK_CONFIG_NB_PORTS] = {1,0,};
+uint8_t* pok_ports_destinations[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout_deployment_destinations,NULL,};
+uint8_t pok_ports_kind[POK_CONFIG_NB_PORTS] = {POK_PORT_KIND_SAMPLING,POK_PORT_KIND_SAMPLING,};
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/Makefile
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/Makefile	(révision 0)
@@ -0,0 +1,10 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+LO_TARGET = kernel.lo
+LO_OBJS = deployment.o routing.o
+LO_DEPS = pok.lo
+all: kernel copy-kernel $(LO_TARGET)
+clean: common-clean
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-common.mk
+include $(POK_PATH)/misc/mk/rules-kernel.mk
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/routing.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/routing.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/kernel/routing.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ROUTING_H__
+#define __GENERATED_ROUTING_H__
+#define POK_CONFIG_NB_GLOBAL_PORTS 2
+#define POK_CONFIG_NB_PORTS 2
+#define POK_CONFIG_NB_NODES 1
+#define POK_CONFIG_PARTITIONS_PORTS {0,1,}
+typedef enum
+{
+  cpu = 0,
+} pok_node_identifier_t;
+typedef enum
+{
+  pr1_thr_tdataout_tdataout = 0,
+  pr2_thr_tdatain_tdatain = 1,
+  invalid_local_port = 2
+} pok_port_local_identifier_t;
+typedef enum
+{
+  pr1_thr_tdataout_tdataout_global = 0,
+  pr2_thr_tdatain_tdatain_global = 1,
+} pok_port_identifier_t;
+#define POK_CONFIG_NB_BUSES 0
+typedef enum
+{
+  invalid_bus = 0
+} pok_bus_identifier_t;
+#endif
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/gtypes.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/gtypes.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/gtypes.h	(révision 0)
@@ -0,0 +1,27 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_GTYPES_H__
+#define __GENERATED_GTYPES_H__
+#include "arinc653/sampling.h"
+#include "arinc653/types.h"
+typedef unsigned int Base_Types__Unsigned_8;
+typedef  int pingpong__integer;
+typedef RETURN_CODE_TYPE pok_runtime__Return_Code_Type;
+typedef SAMPLING_PORT_ID_TYPE pok_runtime__Sampling_Port_Id_Type;
+
+#endif
+
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/deployment.c	(révision 0)
@@ -0,0 +1,18 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "deployment.h"
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/activity.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/activity.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/activity.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ACTIVITY_H__
+#define __GENERATED_ACTIVITY_H__
+#include "arinc653/sampling.h"
+#include "../../../user_send.h"
+#include "arinc653/blackboard.h"
+#include "arinc653/types.h"
+#include "subprograms.h"
+void*  pingpong_refined__pr1_thr_impl_Job();
+
+
+#endif
+
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/main.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/main.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/main.c	(révision 0)
@@ -0,0 +1,52 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+
+/******************************************************************************/
+/*                                 INCLUSION                                  */
+
+#include "main.h"
+#include "activity.h"
+
+/******************************************************************************/
+/*                              GLOBAL VARIABLES                              */
+
+PROCESS_ID_TYPE arinc_threads[POK_CONFIG_NB_THREADS];
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
+
+/******************************************************************************/
+/*                                    MAIN                                    */
+
+int main ()
+{
+  PROCESS_ATTRIBUTE_TYPE tattr;
+  RETURN_CODE_TYPE ret;
+  CREATE_SAMPLING_PORT ("pr1_thr_tdataout_tdataout",
+    sizeof( pingpong__integer ), SOURCE, 10,
+      &(src_tdataout_Instance), &(ret));
+  tattr.ENTRY_POINT = pingpong_refined__pr1_thr_impl_Job;
+  tattr.PERIOD = 2000;
+  tattr.DEADLINE = 2000;
+  tattr.TIME_CAPACITY = 1;
+  tattr.BASE_PRIORITY = 1;
+  strcpy(tattr.NAME, "thr");
+  CREATE_PROCESS (&(tattr), &(arinc_threads[1]), &(ret));
+  START (arinc_threads[1], &(ret));
+  SET_PARTITION_MODE (NORMAL, &(ret));
+  return (0);
+}
+
+/******************************************************************************/
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/subprograms.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/subprograms.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/subprograms.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "subprograms.h"
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/deployment.h	(révision 0)
@@ -0,0 +1,24 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+#include "main.h"
+#include "arinc653/sampling.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/main.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/main.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/main.h	(révision 0)
@@ -0,0 +1,40 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_MAIN_H__
+#define __GENERATED_MAIN_H__
+
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_LIBC_STDIO 1
+#define POK_CONFIG_NB_THREADS 2
+#define POK_NEEDS_ARINC653_SAMPLING 1
+#define POK_NEEDS_LIBC_STRING 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_PROTOCOLS 1
+#define POK_CONFIG_STACKS_SIZE 40
+#define POK_NEEDS_ARINC653_TIME 1
+#define POK_NEEDS_ARINC653_PROCESS 1
+#define POK_NEEDS_ARINC653_PARTITION 1
+#define POK_NEEDS_MIDDLEWARE 1
+
+#include <arinc653/types.h>
+#include <arinc653/process.h>
+#include <arinc653/partition.h>
+#include <arinc653/time.h>
+#include "gtypes.h"
+
+#endif
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/subprograms.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/subprograms.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/subprograms.h	(révision 0)
@@ -0,0 +1,25 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_SUBPROGRAMS_H__
+#define __GENERATED_SUBPROGRAMS_H__
+#include "arinc653/sampling.h"
+#include "../../../user_send.h"
+#include "arinc653/blackboard.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/gtypes.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/gtypes.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/gtypes.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "gtypes.h"
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/Makefile
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+TARGET = pr1.elf
+OBJS = main.o activity.o subprograms.o gtypes.o deployment.o ../../../user_send.o 
+all: libpok $(TARGET)
+
+clean: common-clean
+
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-partition.mk
+include $(POK_PATH)/misc/mk/rules-common.mk
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/activity.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/activity.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr1/activity.c	(révision 0)
@@ -0,0 +1,32 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "activity.h"
+#include "main.h"
+
+extern SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
+void* pingpong_refined__pr1_thr_impl_Job()
+{
+  Base_Types__Unsigned_8 pingpong_refined__pr1_thr_impl_tdataout_Length = sizeof(pingpong__integer);
+  pingpong__integer pingpong_refined__pr1_thr_impl_tdataout_MsgAddr;
+  RETURN_CODE_TYPE pingpong_refined__pr1_thr_impl_runtime_call_ret;
+  while (1) {
+    send (&pingpong_refined__pr1_thr_impl_tdataout_MsgAddr);
+    WRITE_SAMPLING_MESSAGE (src_tdataout_Instance, &pingpong_refined__pr1_thr_impl_tdataout_MsgAddr, pingpong_refined__pr1_thr_impl_tdataout_Length, &pingpong_refined__pr1_thr_impl_runtime_call_ret);
+    PERIODIC_WAIT (&pingpong_refined__pr1_thr_impl_runtime_call_ret);
+  }
+  return 0;
+}
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/gtypes.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/gtypes.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/gtypes.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_GTYPES_H__
+#define __GENERATED_GTYPES_H__
+#include "arinc653/sampling.h"
+#include "arinc653/types.h"
+typedef unsigned int Base_Types__Unsigned_8;
+typedef  int pingpong__integer;
+typedef VALIDITY_TYPE pok_runtime__Validity_Type;
+typedef RETURN_CODE_TYPE pok_runtime__Return_Code_Type;
+typedef SAMPLING_PORT_ID_TYPE pok_runtime__Sampling_Port_Id_Type;
+
+#endif
+
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/deployment.c	(révision 0)
@@ -0,0 +1,19 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "deployment.h"
+SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/activity.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/activity.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/activity.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ACTIVITY_H__
+#define __GENERATED_ACTIVITY_H__
+#include "arinc653/sampling.h"
+#include "arinc653/blackboard.h"
+#include "arinc653/types.h"
+#include "../../../user_receive.h"
+#include "subprograms.h"
+void*  pingpong_refined__pr2_thr_impl_Job();
+
+
+#endif
+
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/main.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/main.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/main.c	(révision 0)
@@ -0,0 +1,52 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+
+/******************************************************************************/
+/*                                 INCLUSION                                  */
+
+#include "main.h"
+#include "activity.h"
+
+/******************************************************************************/
+/*                              GLOBAL VARIABLES                              */
+
+PROCESS_ID_TYPE arinc_threads[POK_CONFIG_NB_THREADS];
+SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
+
+/******************************************************************************/
+/*                                    MAIN                                    */
+
+int main ()
+{
+  PROCESS_ATTRIBUTE_TYPE tattr;
+  RETURN_CODE_TYPE ret;
+  CREATE_SAMPLING_PORT ("pr2_thr_tdatain_tdatain",
+    sizeof( pingpong__integer ), DESTINATION, 10,
+      &(dst_tdataout_Instance), &(ret));
+  tattr.ENTRY_POINT = pingpong_refined__pr2_thr_impl_Job;
+  tattr.PERIOD = 2000;
+  tattr.DEADLINE = 2000;
+  tattr.TIME_CAPACITY = 1;
+  tattr.BASE_PRIORITY = 1;
+  strcpy(tattr.NAME, "thr");
+  CREATE_PROCESS (&(tattr), &(arinc_threads[1]), &(ret));
+  START (arinc_threads[1], &(ret));
+  SET_PARTITION_MODE (NORMAL, &(ret));
+  return (0);
+}
+
+/******************************************************************************/
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/subprograms.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/subprograms.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/subprograms.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "subprograms.h"
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/deployment.h	(révision 0)
@@ -0,0 +1,24 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+#include "main.h"
+#include "arinc653/sampling.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/main.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/main.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/main.h	(révision 0)
@@ -0,0 +1,40 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_MAIN_H__
+#define __GENERATED_MAIN_H__
+
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_LIBC_STDIO 1
+#define POK_CONFIG_NB_THREADS 2
+#define POK_NEEDS_ARINC653_SAMPLING 1
+#define POK_NEEDS_LIBC_STRING 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_PROTOCOLS 1
+#define POK_CONFIG_STACKS_SIZE 400000
+#define POK_NEEDS_ARINC653_TIME 1
+#define POK_NEEDS_ARINC653_PROCESS 1
+#define POK_NEEDS_ARINC653_PARTITION 1
+#define POK_NEEDS_MIDDLEWARE 1
+
+#include <arinc653/types.h>
+#include <arinc653/process.h>
+#include <arinc653/partition.h>
+#include <arinc653/time.h>
+#include "gtypes.h"
+
+#endif
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/subprograms.h
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/subprograms.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/subprograms.h	(révision 0)
@@ -0,0 +1,25 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_SUBPROGRAMS_H__
+#define __GENERATED_SUBPROGRAMS_H__
+#include "arinc653/sampling.h"
+#include "arinc653/blackboard.h"
+#include "../../../user_receive.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/gtypes.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/gtypes.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/gtypes.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "gtypes.h"
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/Makefile
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+TARGET = pr2.elf
+OBJS = main.o activity.o subprograms.o gtypes.o deployment.o ../../../user_receive.o 
+all: libpok $(TARGET)
+
+clean: common-clean
+
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-partition.mk
+include $(POK_PATH)/misc/mk/rules-common.mk
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/activity.c
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/activity.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/pr2/activity.c	(révision 0)
@@ -0,0 +1,33 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "activity.h"
+#include "main.h"
+
+extern SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
+void* pingpong_refined__pr2_thr_impl_Job()
+{
+  Base_Types__Unsigned_8 pingpong_refined__pr2_thr_impl_tdatain_Length = sizeof(pingpong__integer);
+  pingpong__integer pingpong_refined__pr2_thr_impl_tdatain_MsgAddr;
+  VALIDITY_TYPE pingpong_refined__pr2_thr_impl_tdatain_Validity;
+  RETURN_CODE_TYPE pingpong_refined__pr2_thr_impl_runtime_call_ret;
+  while (1) {
+    READ_SAMPLING_MESSAGE (dst_tdataout_Instance, &pingpong_refined__pr2_thr_impl_tdatain_MsgAddr, pingpong_refined__pr2_thr_impl_tdatain_Length, &pingpong_refined__pr2_thr_impl_tdatain_Validity, &pingpong_refined__pr2_thr_impl_runtime_call_ret);
+    receive (pingpong_refined__pr2_thr_impl_tdatain_MsgAddr);
+    PERIODIC_WAIT (&pingpong_refined__pr2_thr_impl_runtime_call_ret);
+  }
+  return 0;
+}
Index: examples/arinc653-sampling-flush-mif/generated-code/cpu/Makefile
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/cpu/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/cpu/Makefile	(révision 0)
@@ -0,0 +1,25 @@
+export ARCH=x86
+export BSP=x86-qemu
+export POK_CONFIG_OPTIMIZE_FOR_GENERATED_CODE=1
+include $(POK_PATH)/misc/mk/config.mk
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+TARGET=$(shell pwd)/pok.elf
+PARTITIONS=pr1/pr1.elf pr2/pr2.elf 
+KERNEL=kernel/kernel.lo
+all: build-kernel partitions $(TARGET)
+build-kernel:
+	$(CD) kernel && $(MAKE)
+partitions:
+	$(CD) pr1 && $(MAKE)
+	$(CD) pr2 && $(MAKE)
+clean: common-clean
+	$(CD) kernel && $(MAKE) clean
+	$(CD) pr1 && $(MAKE) clean
+	$(CD) pr2 && $(MAKE) clean
+distclean: clean
+	$(CD) kernel && $(MAKE) distclean
+	$(CD) pr1 && $(MAKE) distclean
+	$(CD) pr2 && $(MAKE) distclean
+include $(POK_PATH)/misc/mk/rules-common.mk
+include $(POK_PATH)/misc/mk/rules-main.mk
+include $(POK_PATH)/misc/mk/install-rules.mk
Index: examples/arinc653-sampling-flush-mif/generated-code/Makefile
===================================================================
--- examples/arinc653-sampling-flush-mif/generated-code/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-mif/generated-code/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+all:
+	$(MAKE) -C cpu all
+
+clean:
+	$(MAKE) -C cpu clean
+
+run:
+	$(MAKE) -C cpu run
+
+test:
+	$(MAKE) -C cpu run QEMU_MISC="-nographic -serial /dev/stdout > cpu.trace"
\ No newline at end of file
Index: examples/arinc653-sampling-flush-mif/user_send.c
===================================================================
--- examples/arinc653-sampling-flush-mif/user_send.c	(révision 0)
+++ examples/arinc653-sampling-flush-mif/user_send.c	(révision 0)
@@ -0,0 +1,49 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#include <types.h>
+#include <libc/stdio.h>
+
+uint8_t value=0;
+
+void send(uint8_t* d)
+{
+  *d = value;
+  value++;
+  if(*d<10 && *d>1)
+    printf("send value: %d\n", *d);
+}
Index: examples/arinc653-sampling-flush-mif/Makefile
===================================================================
--- examples/arinc653-sampling-flush-mif/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-mif/Makefile	(révision 0)
@@ -0,0 +1,33 @@
+include $(POK_PATH)/misc/mk/config.mk
+
+test: 
+	$(MAKE) distclean >/dev/null 2>&1;	
+	$(ECHO) -n "`basename $(CURDIR)` on x86: ";		
+	if $(MAKE) -C generated-code all > /dev/null 2>&1;	\
+	then								\
+		$(ECHO) "SUCCESS";					\
+		$(ECHO) -n 0 > .fail;					\
+	else								\
+		$(ECHO) "FAILURE";					\
+		$(ECHO) -n 1 > .fail;					\
+	fi;		
+	$(MAKE) -C generated-code clean  >/dev/null 2>&1;	
+
+distclean: clean
+	$(MAKE) -C $(POK_PATH)/kernel clean 
+
+clean:
+	$(MAKE) -C generated-code clean
+
+
+test-exec:
+	$(MAKE) -C generated-code test
+
+run:
+	$(MAKE) -C generated-code run
+
+all: 
+	$(MAKE) -C generated-code all
+
+
+
Index: examples/arinc653-sampling-flush-mif/user_send.h
===================================================================
--- examples/arinc653-sampling-flush-mif/user_send.h	(révision 0)
+++ examples/arinc653-sampling-flush-mif/user_send.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#ifndef __USER_SEND_H__
+#define __USER_SEND_H__
+
+void send(uint8_t* d);
+
+#endif
Index: examples/arinc653-sampling-flush-mif/README
===================================================================
--- examples/arinc653-sampling-flush-mif/README	(révision 0)
+++ examples/arinc653-sampling-flush-mif/README	(révision 0)
@@ -0,0 +1,4 @@
+This example allows testing flushig policies implemented between partionions :
+*  flush all ports periodically, the selected period is called Minor Frame and its value is stored in a macro. 
+Code cannot be generated, Ramses has been used to generate the "generated code directory" 
+ 
Index: examples/Makefile
===================================================================
--- examples/Makefile	(révision 45)
+++ examples/Makefile	(copie de travail)
@@ -1,6 +1,9 @@
 -include $(POK_PATH)/misc/mk/config.mk
 
 SUBDIRS= \
+	arinc653-sampling-flush-window \
+	arinc653-sampling-flush-mif 		\
+	arinc653-sampling-flush-maf 		\
 	ada-runtime				\
 	arinc653-blackboard		      	\
 	arinc653-buffer				\
@@ -32,6 +35,7 @@
 	partitions-scheduling			\
 	partitions-threads			\
 
+
 #	mutexes				\ ### deprecated Makefile
 #	mutexes-timed			\ ### deprecated Makefile
 #	semaphores			\ ### deprecated Makefile
Index: examples/arinc653-sampling-flush-window/model.aadl
===================================================================
--- examples/arinc653-sampling-flush-window/model.aadl	(révision 0)
+++ examples/arinc653-sampling-flush-window/model.aadl	(révision 0)
@@ -0,0 +1,192 @@
+--
+--                              POK header
+-- 
+--  The following file is a part of the POK project. Any modification should
+--  be made according to the POK licence. You CANNOT use this file or a part 
+--  of a file for your own project.
+-- 
+--  For more information on the POK licence, please see our LICENCE FILE
+--
+--  Please follow the coding guidelines described in doc/CODING_GUIDELINES
+--
+--                                      Copyright (c) 2007-2013 POK team 
+--
+--  Created by devel on Sat Feb 16 08:46:09 2013 
+--
+package test_sampling_flush_window
+
+public
+
+with Data_Model;
+with POK;
+with ARINC653;
+
+data integer
+properties
+  Data_Model::Data_Representation => integer;
+end integer;
+
+virtual bus ip_com
+properties
+   Required_Connection_Quality_Of_Service => (SecureDelivery);
+end ip_com;
+
+
+virtual processor partition
+properties
+   POK::Scheduler => RR;
+   POK::Additional_Features => (libc_stdio, console);
+end partition;
+
+virtual processor implementation partition.withcom
+properties
+   Provided_Virtual_Bus_Class => 
+               (classifier (test_sampling_flush_window::ip_com));
+end partition.withcom;
+
+subprogram send_spg
+features
+   output : out parameter integer;
+properties
+   source_name => "send";
+   source_language => (C);
+   source_text => ("../../../../input/user_send.h");
+   POK::source_location => "../../../../input/user_send.o";
+end send_spg;
+
+subprogram receive_spg
+features
+   input : in parameter integer;
+properties
+   source_text => ("../../../../input/user_receive.h");
+   POK::source_location => "../../../../input/user_receive.o";
+   source_language => (C);
+   source_name => "receive";
+end receive_spg;
+
+processor qemu_cpu
+properties
+   POK::Scheduler => Static;
+   POK::Architecture => x86;
+   POK::BSP => x86_qemu;
+end qemu_cpu;
+
+processor implementation qemu_cpu.impl
+subcomponents
+   partition_sender : virtual processor partition.withcom;
+   partition_receiver : virtual processor partition.withcom;
+properties
+   ARINC653::Module_Major_Frame => 4000ms;
+   ARINC653::Partition_Slots => (1000ms, 1000ms,1000ms, 1000ms);
+   ARINC653::Slots_Allocation => ( reference (partition_sender), reference (partition_receiver), reference (partition_sender), reference (partition_receiver));
+   POK::Ports_Flush_Time => Partition_Slot_Switch; 
+end qemu_cpu.impl;
+
+thread receive_ping
+features
+   tdatain : in data port integer;
+properties
+   Priority => 1;
+   Dispatch_Protocol => Periodic;
+   Compute_Execution_Time => 0 ms .. 1 ms;
+   Period => 2000 Ms;
+   Source_Data_Size => 400000 bytes;
+   Source_Stack_Size => 400000 bytes;
+   Source_Code_Size => 40 bytes;
+end receive_ping;
+
+thread send_ping
+features
+   tdataout : out data port integer;
+properties
+   Priority => 1;
+   Dispatch_Protocol => Periodic;
+   Period => 2000 Ms;
+   Source_Data_Size => 40000 bytes;
+   Source_Stack_Size => 40000 bytes;
+   Source_Code_Size => 40 bytes;
+   Compute_Execution_Time => 0 ms .. 1 ms;
+end send_ping;
+
+thread implementation send_ping.impl
+calls 
+   call1 : { pspg : subprogram send_spg;};
+connections
+   parameter pspg.output -> tdataout;
+end send_ping.impl;
+
+thread implementation receive_ping.impl
+calls 
+   call1 : { pspg : subprogram receive_spg;};
+connections
+   parameter tdatain -> pspg.input;
+end receive_ping.impl;
+
+process receive_ping_process
+features
+   pdatain : in data port integer
+   					{ARINC653::Sampling_Refresh_Period => 10 ms;}; 
+properties
+   Source_Code_Size => 10 KByte;
+   Source_Data_Size => 15 KByte;
+end receive_ping_process;
+
+process send_ping_process
+features
+   pdataout : out data port integer
+   					{ARINC653::Sampling_Refresh_Period => 10 ms;};
+end send_ping_process;
+
+process implementation receive_ping_process.impl
+subcomponents
+   thr : thread receive_ping.impl;
+connections
+   port pdatain -> thr.tdatain; 
+end receive_ping_process.impl;
+
+process implementation send_ping_process.impl
+subcomponents
+   thr : thread send_ping.impl;
+connections
+   port thr.tdataout -> pdataout;
+end send_ping_process.impl;
+
+system root
+end root;
+
+memory partitionmemory
+properties
+   Byte_Count => 80000;
+end partitionmemory;
+
+memory mainmemory
+end mainmemory;
+
+memory implementation mainmemory.impl
+subcomponents
+   part1: memory partitionmemory ;
+   part2: memory partitionmemory ;
+end mainmemory.impl;
+
+
+
+system implementation root.impl
+subcomponents
+   cpu : processor qemu_cpu.impl;
+   pr1 : process send_ping_process.impl;
+   pr2 : process receive_ping_process.impl;
+   mem : memory mainmemory.impl;
+connections
+   port pr1.pdataout -> pr2.pdatain;
+properties
+   actual_processor_binding => 
+      (reference (cpu.partition_sender)) applies to pr1;
+   actual_processor_binding => 
+      (reference (cpu.partition_receiver)) applies to pr2;
+   actual_memory_binding =>
+      (reference (mem.part1)) applies to pr1;
+   actual_memory_binding =>
+      (reference (mem.part2)) applies to pr2;
+end root.impl;
+
+end test_sampling_flush_window;
Index: examples/arinc653-sampling-flush-window/user_receive.c
===================================================================
--- examples/arinc653-sampling-flush-window/user_receive.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/user_receive.c	(révision 0)
@@ -0,0 +1,46 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#include "user_receive.h"
+#include <types.h>
+#include <libc/stdio.h>
+
+void receive(uint8_t d)
+{
+  if(d<10 && d>1)
+    printf("received value: %d\n", d);
+}
Index: examples/arinc653-sampling-flush-window/user_receive.h
===================================================================
--- examples/arinc653-sampling-flush-window/user_receive.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/user_receive.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#ifndef __USER_RECEIVE_H__
+#define __USER_RECEIVE_H__
+
+void receive(uint8_t d);
+
+#endif
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/deployment.c	(révision 0)
@@ -0,0 +1,18 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include <types.h>
+#include "deployment.h"
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/deployment.h	(révision 0)
@@ -0,0 +1,47 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+
+#include "routing.h"
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_CONFIG_LOCAL_NODE 0
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_GETTICK 1
+#define POK_NEEDS_THREADS 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_DEBUG 1
+#define POK_NEEDS_SCHED 1
+#define POK_CONFIG_NB_PARTITIONS 2
+#define POK_CONFIG_NB_THREADS 6
+#define POK_CONFIG_PARTITIONS_NTHREADS {2,2}
+#define POK_NEEDS_SCHED_RR 1
+#define POK_NEEDS_SCHED_RR 1
+#define POK_CONFIG_PARTITIONS_SCHEDULER {POK_SCHED_RR,POK_SCHED_RR}
+#define POK_NEEDS_PORTS_SAMPLING 1
+#define POK_NEEDS_THREAD_ID 1
+#define POK_CONFIG_PARTITIONS_NLOCKOBJECTS {0,0}
+#define POK_CONFIG_PARTITIONS_SIZE {80000,80000}
+#define POK_CONFIG_SCHEDULING_SLOTS {1000,1000,1000,1000}
+#define POK_CONFIG_SCHEDULING_NBSLOTS 4
+#define POK_CONFIG_SCHEDULING_SLOTS_ALLOCATION {0,1,0,1,}
+#define POK_CONFIG_SCHEDULING_MAJOR_FRAME 4000
+#define POK_NEEDS_FLUSH_ON_WINDOWS
+#define POK_CONFIG_STACKS_SIZE 440000
+#define POK_CONFIG_NB_BUSES 0
+#endif
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/routing.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/routing.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/routing.c	(révision 0)
@@ -0,0 +1,32 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "routing.h"
+#include "middleware/port.h"
+#include <types.h>
+uint8_t pr1_partport[1] = {pr1_thr_tdataout_tdataout,};
+uint8_t pr1_thr_tdataout_tdataout_deployment_destinations[1] = {pr2_thr_tdatain_tdatain_global,};
+uint8_t pr2_partport[1] = {pr2_thr_tdatain_tdatain,};
+uint8_t pok_global_ports_to_local_ports[POK_CONFIG_NB_GLOBAL_PORTS] = {pr1_thr_tdataout_tdataout,pr2_thr_tdatain_tdatain,};
+uint8_t pok_local_ports_to_global_ports[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout_global,pr2_thr_tdatain_tdatain_global,};
+uint8_t pok_ports_nodes[POK_CONFIG_NB_GLOBAL_PORTS] = {cpu,cpu,};
+uint8_t pok_ports_nb_ports_by_partition[POK_CONFIG_NB_PARTITIONS] = {1,1,};
+uint8_t* pok_ports_by_partition[POK_CONFIG_NB_PARTITIONS] = {pr1_partport,pr2_partport,};
+char* pok_ports_names[POK_CONFIG_NB_PORTS] = {"pr1_thr_tdataout_tdataout","pr2_thr_tdatain_tdatain",};
+uint8_t pok_ports_identifiers[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout,pr2_thr_tdatain_tdatain,};
+uint8_t pok_ports_nb_destinations[POK_CONFIG_NB_PORTS] = {1,0,};
+uint8_t* pok_ports_destinations[POK_CONFIG_NB_PORTS] = {pr1_thr_tdataout_tdataout_deployment_destinations,NULL,};
+uint8_t pok_ports_kind[POK_CONFIG_NB_PORTS] = {POK_PORT_KIND_SAMPLING,POK_PORT_KIND_SAMPLING,};
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/Makefile
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/Makefile	(révision 0)
@@ -0,0 +1,10 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+LO_TARGET = kernel.lo
+LO_OBJS = deployment.o routing.o
+LO_DEPS = pok.lo
+all: kernel copy-kernel $(LO_TARGET)
+clean: common-clean
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-common.mk
+include $(POK_PATH)/misc/mk/rules-kernel.mk
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/routing.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/routing.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/kernel/routing.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ROUTING_H__
+#define __GENERATED_ROUTING_H__
+#define POK_CONFIG_NB_GLOBAL_PORTS 2
+#define POK_CONFIG_NB_PORTS 2
+#define POK_CONFIG_NB_NODES 1
+#define POK_CONFIG_PARTITIONS_PORTS {0,1,}
+typedef enum
+{
+  cpu = 0,
+} pok_node_identifier_t;
+typedef enum
+{
+  pr1_thr_tdataout_tdataout = 0,
+  pr2_thr_tdatain_tdatain = 1,
+  invalid_local_port = 2
+} pok_port_local_identifier_t;
+typedef enum
+{
+  pr1_thr_tdataout_tdataout_global = 0,
+  pr2_thr_tdatain_tdatain_global = 1,
+} pok_port_identifier_t;
+#define POK_CONFIG_NB_BUSES 0
+typedef enum
+{
+  invalid_bus = 0
+} pok_bus_identifier_t;
+#endif
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/gtypes.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/gtypes.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/gtypes.h	(révision 0)
@@ -0,0 +1,27 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_GTYPES_H__
+#define __GENERATED_GTYPES_H__
+#include "arinc653/sampling.h"
+#include "arinc653/types.h"
+typedef unsigned int Base_Types__Unsigned_8;
+typedef  int test_sampling_flush_window__integer;
+typedef RETURN_CODE_TYPE pok_runtime__Return_Code_Type;
+typedef SAMPLING_PORT_ID_TYPE pok_runtime__Sampling_Port_Id_Type;
+
+#endif
+
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/deployment.c	(révision 0)
@@ -0,0 +1,18 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "deployment.h"
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/activity.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/activity.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/activity.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ACTIVITY_H__
+#define __GENERATED_ACTIVITY_H__
+#include "arinc653/sampling.h"
+#include "../../../user_send.h"
+#include "arinc653/blackboard.h"
+#include "arinc653/types.h"
+#include "subprograms.h"
+void*  test_sampling_flush_window_refined__pr1_thr_impl_Job();
+
+
+#endif
+
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/main.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/main.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/main.c	(révision 0)
@@ -0,0 +1,52 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+
+/******************************************************************************/
+/*                                 INCLUSION                                  */
+
+#include "main.h"
+#include "activity.h"
+
+/******************************************************************************/
+/*                              GLOBAL VARIABLES                              */
+
+PROCESS_ID_TYPE arinc_threads[POK_CONFIG_NB_THREADS];
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
+
+/******************************************************************************/
+/*                                    MAIN                                    */
+
+int main ()
+{
+  PROCESS_ATTRIBUTE_TYPE tattr;
+  RETURN_CODE_TYPE ret;
+  CREATE_SAMPLING_PORT ("pr1_thr_tdataout_tdataout",
+    sizeof( test_sampling_flush_window__integer ), SOURCE, 10,
+      &(src_tdataout_Instance), &(ret));
+  tattr.ENTRY_POINT = test_sampling_flush_window_refined__pr1_thr_impl_Job;
+  tattr.PERIOD = 2000;
+  tattr.DEADLINE = 2000;
+  tattr.TIME_CAPACITY = 1;
+  tattr.BASE_PRIORITY = 1;
+  strcpy(tattr.NAME, "thr");
+  CREATE_PROCESS (&(tattr), &(arinc_threads[1]), &(ret));
+  START (arinc_threads[1], &(ret));
+  SET_PARTITION_MODE (NORMAL, &(ret));
+  return (0);
+}
+
+/******************************************************************************/
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/subprograms.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/subprograms.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/subprograms.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "subprograms.h"
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/deployment.h	(révision 0)
@@ -0,0 +1,24 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+#include "main.h"
+#include "arinc653/sampling.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/main.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/main.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/main.h	(révision 0)
@@ -0,0 +1,40 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_MAIN_H__
+#define __GENERATED_MAIN_H__
+
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_LIBC_STDIO 1
+#define POK_CONFIG_NB_THREADS 2
+#define POK_NEEDS_ARINC653_SAMPLING 1
+#define POK_NEEDS_LIBC_STRING 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_PROTOCOLS 1
+#define POK_CONFIG_STACKS_SIZE 40000
+#define POK_NEEDS_ARINC653_TIME 1
+#define POK_NEEDS_ARINC653_PROCESS 1
+#define POK_NEEDS_ARINC653_PARTITION 1
+#define POK_NEEDS_MIDDLEWARE 1
+
+#include <arinc653/types.h>
+#include <arinc653/process.h>
+#include <arinc653/partition.h>
+#include <arinc653/time.h>
+#include "gtypes.h"
+
+#endif
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/subprograms.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/subprograms.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/subprograms.h	(révision 0)
@@ -0,0 +1,25 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_SUBPROGRAMS_H__
+#define __GENERATED_SUBPROGRAMS_H__
+#include "arinc653/sampling.h"
+#include "../../../user_send.h"
+#include "arinc653/blackboard.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/gtypes.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/gtypes.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/gtypes.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "gtypes.h"
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/Makefile
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+TARGET = pr1.elf
+OBJS = main.o activity.o subprograms.o gtypes.o deployment.o ../../../user_send.o 
+all: libpok $(TARGET)
+
+clean: common-clean
+
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-partition.mk
+include $(POK_PATH)/misc/mk/rules-common.mk
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/activity.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/activity.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr1/activity.c	(révision 0)
@@ -0,0 +1,32 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "activity.h"
+#include "main.h"
+
+extern SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
+void* test_sampling_flush_window_refined__pr1_thr_impl_Job()
+{
+  Base_Types__Unsigned_8 test_sampling_flush_window_refined__pr1_thr_impl_tdataout_Length = sizeof(test_sampling_flush_window__integer);
+  test_sampling_flush_window__integer test_sampling_flush_window_refined__pr1_thr_impl_tdataout_MsgAddr;
+  RETURN_CODE_TYPE test_sampling_flush_window_refined__pr1_thr_impl_runtime_call_ret;
+  while (1) {
+    send (&test_sampling_flush_window_refined__pr1_thr_impl_tdataout_MsgAddr);
+    WRITE_SAMPLING_MESSAGE (src_tdataout_Instance, &test_sampling_flush_window_refined__pr1_thr_impl_tdataout_MsgAddr, test_sampling_flush_window_refined__pr1_thr_impl_tdataout_Length, &test_sampling_flush_window_refined__pr1_thr_impl_runtime_call_ret);
+    PERIODIC_WAIT (&test_sampling_flush_window_refined__pr1_thr_impl_runtime_call_ret);
+  }
+  return 0;
+}
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/gtypes.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/gtypes.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/gtypes.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_GTYPES_H__
+#define __GENERATED_GTYPES_H__
+#include "arinc653/sampling.h"
+#include "arinc653/types.h"
+typedef unsigned int Base_Types__Unsigned_8;
+typedef  int test_sampling_flush_window__integer;
+typedef VALIDITY_TYPE pok_runtime__Validity_Type;
+typedef RETURN_CODE_TYPE pok_runtime__Return_Code_Type;
+typedef SAMPLING_PORT_ID_TYPE pok_runtime__Sampling_Port_Id_Type;
+
+#endif
+
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/deployment.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/deployment.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/deployment.c	(révision 0)
@@ -0,0 +1,19 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "deployment.h"
+SAMPLING_PORT_ID_TYPE src_tdataout_Instance;
+SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/activity.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/activity.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/activity.h	(révision 0)
@@ -0,0 +1,28 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_ACTIVITY_H__
+#define __GENERATED_ACTIVITY_H__
+#include "arinc653/sampling.h"
+#include "arinc653/blackboard.h"
+#include "arinc653/types.h"
+#include "../../../user_receive.h"
+#include "subprograms.h"
+void*  test_sampling_flush_window_refined__pr2_thr_impl_Job();
+
+
+#endif
+
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/main.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/main.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/main.c	(révision 0)
@@ -0,0 +1,52 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+
+/******************************************************************************/
+/*                                 INCLUSION                                  */
+
+#include "main.h"
+#include "activity.h"
+
+/******************************************************************************/
+/*                              GLOBAL VARIABLES                              */
+
+PROCESS_ID_TYPE arinc_threads[POK_CONFIG_NB_THREADS];
+SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
+
+/******************************************************************************/
+/*                                    MAIN                                    */
+
+int main ()
+{
+  PROCESS_ATTRIBUTE_TYPE tattr;
+  RETURN_CODE_TYPE ret;
+  CREATE_SAMPLING_PORT ("pr2_thr_tdatain_tdatain",
+    sizeof( test_sampling_flush_window__integer ), DESTINATION, 10,
+      &(dst_tdataout_Instance), &(ret));
+  tattr.ENTRY_POINT = test_sampling_flush_window_refined__pr2_thr_impl_Job;
+  tattr.PERIOD = 2000;
+  tattr.DEADLINE = 2000;
+  tattr.TIME_CAPACITY = 1;
+  tattr.BASE_PRIORITY = 1;
+  strcpy(tattr.NAME, "thr");
+  CREATE_PROCESS (&(tattr), &(arinc_threads[1]), &(ret));
+  START (arinc_threads[1], &(ret));
+  SET_PARTITION_MODE (NORMAL, &(ret));
+  return (0);
+}
+
+/******************************************************************************/
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/subprograms.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/subprograms.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/subprograms.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "subprograms.h"
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/deployment.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/deployment.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/deployment.h	(révision 0)
@@ -0,0 +1,24 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_DEPLOYMENT_H__
+#define __GENERATED_DEPLOYMENT_H__
+#include "main.h"
+#include "arinc653/sampling.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/main.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/main.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/main.h	(révision 0)
@@ -0,0 +1,40 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_MAIN_H__
+#define __GENERATED_MAIN_H__
+
+#define POK_GENERATED_CODE 1
+#define POK_NEEDS_CONSOLE 1
+#define POK_NEEDS_LIBC_STDIO 1
+#define POK_CONFIG_NB_THREADS 2
+#define POK_NEEDS_ARINC653_SAMPLING 1
+#define POK_NEEDS_LIBC_STRING 1
+#define POK_NEEDS_PARTITIONS 1
+#define POK_NEEDS_PROTOCOLS 1
+#define POK_CONFIG_STACKS_SIZE 400000
+#define POK_NEEDS_ARINC653_TIME 1
+#define POK_NEEDS_ARINC653_PROCESS 1
+#define POK_NEEDS_ARINC653_PARTITION 1
+#define POK_NEEDS_MIDDLEWARE 1
+
+#include <arinc653/types.h>
+#include <arinc653/process.h>
+#include <arinc653/partition.h>
+#include <arinc653/time.h>
+#include "gtypes.h"
+
+#endif
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/subprograms.h
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/subprograms.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/subprograms.h	(révision 0)
@@ -0,0 +1,25 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#ifndef __GENERATED_SUBPROGRAMS_H__
+#define __GENERATED_SUBPROGRAMS_H__
+#include "arinc653/sampling.h"
+#include "arinc653/blackboard.h"
+#include "../../../user_receive.h"
+#include "gtypes.h"
+
+#endif
+
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/gtypes.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/gtypes.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/gtypes.c	(révision 0)
@@ -0,0 +1,17 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "gtypes.h"
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/Makefile
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+export DEPLOYMENT_HEADER=$(shell pwd)/deployment.h
+include $(POK_PATH)/misc/mk/config.mk
+TARGET = pr2.elf
+OBJS = main.o activity.o subprograms.o gtypes.o deployment.o ../../../user_receive.o 
+all: libpok $(TARGET)
+
+clean: common-clean
+
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+include $(POK_PATH)/misc/mk/rules-partition.mk
+include $(POK_PATH)/misc/mk/rules-common.mk
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/activity.c
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/activity.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/pr2/activity.c	(révision 0)
@@ -0,0 +1,33 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+#include "activity.h"
+#include "main.h"
+
+extern SAMPLING_PORT_ID_TYPE dst_tdataout_Instance;
+void* test_sampling_flush_window_refined__pr2_thr_impl_Job()
+{
+  Base_Types__Unsigned_8 test_sampling_flush_window_refined__pr2_thr_impl_tdatain_Length = sizeof(test_sampling_flush_window__integer);
+  test_sampling_flush_window__integer test_sampling_flush_window_refined__pr2_thr_impl_tdatain_MsgAddr;
+  VALIDITY_TYPE test_sampling_flush_window_refined__pr2_thr_impl_tdatain_Validity;
+  RETURN_CODE_TYPE test_sampling_flush_window_refined__pr2_thr_impl_runtime_call_ret;
+  while (1) {
+    READ_SAMPLING_MESSAGE (dst_tdataout_Instance, &test_sampling_flush_window_refined__pr2_thr_impl_tdatain_MsgAddr, test_sampling_flush_window_refined__pr2_thr_impl_tdatain_Length, &test_sampling_flush_window_refined__pr2_thr_impl_tdatain_Validity, &test_sampling_flush_window_refined__pr2_thr_impl_runtime_call_ret);
+    receive (test_sampling_flush_window_refined__pr2_thr_impl_tdatain_MsgAddr);
+    PERIODIC_WAIT (&test_sampling_flush_window_refined__pr2_thr_impl_runtime_call_ret);
+  }
+  return 0;
+}
Index: examples/arinc653-sampling-flush-window/generated-code/cpu/Makefile
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/cpu/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/cpu/Makefile	(révision 0)
@@ -0,0 +1,25 @@
+export ARCH=x86
+export BSP=x86-qemu
+export POK_CONFIG_OPTIMIZE_FOR_GENERATED_CODE=1
+include $(POK_PATH)/misc/mk/config.mk
+include $(POK_PATH)/misc/mk/common-$(ARCH).mk
+TARGET=$(shell pwd)/pok.elf
+PARTITIONS=pr1/pr1.elf pr2/pr2.elf 
+KERNEL=kernel/kernel.lo
+all: build-kernel partitions $(TARGET)
+build-kernel:
+	$(CD) kernel && $(MAKE)
+partitions:
+	$(CD) pr1 && $(MAKE)
+	$(CD) pr2 && $(MAKE)
+clean: common-clean
+	$(CD) kernel && $(MAKE) clean
+	$(CD) pr1 && $(MAKE) clean
+	$(CD) pr2 && $(MAKE) clean
+distclean: clean
+	$(CD) kernel && $(MAKE) distclean
+	$(CD) pr1 && $(MAKE) distclean
+	$(CD) pr2 && $(MAKE) distclean
+include $(POK_PATH)/misc/mk/rules-common.mk
+include $(POK_PATH)/misc/mk/rules-main.mk
+include $(POK_PATH)/misc/mk/install-rules.mk
Index: examples/arinc653-sampling-flush-window/generated-code/Makefile
===================================================================
--- examples/arinc653-sampling-flush-window/generated-code/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-window/generated-code/Makefile	(révision 0)
@@ -0,0 +1,11 @@
+all:
+	$(MAKE) -C cpu all
+
+clean:
+	$(MAKE) -C cpu clean
+
+run:
+	$(MAKE) -C cpu run
+
+test:
+	$(MAKE) -C cpu run QEMU_MISC="-nographic -serial /dev/stdout > cpu.trace"
\ No newline at end of file
Index: examples/arinc653-sampling-flush-window/user_send.c
===================================================================
--- examples/arinc653-sampling-flush-window/user_send.c	(révision 0)
+++ examples/arinc653-sampling-flush-window/user_send.c	(révision 0)
@@ -0,0 +1,49 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#include <types.h>
+#include <libc/stdio.h>
+
+uint8_t value=0;
+
+void send(uint8_t* d)
+{
+  *d = value;
+  value++;
+  if(*d<10 && *d>1)
+    printf("send value: %d\n", *d);
+}
Index: examples/arinc653-sampling-flush-window/Makefile
===================================================================
--- examples/arinc653-sampling-flush-window/Makefile	(révision 0)
+++ examples/arinc653-sampling-flush-window/Makefile	(révision 0)
@@ -0,0 +1,33 @@
+include $(POK_PATH)/misc/mk/config.mk
+
+test: 
+	$(MAKE) distclean >/dev/null 2>&1;	
+	$(ECHO) -n "`basename $(CURDIR)` on x86: ";		
+	if $(MAKE) -C generated-code all > /dev/null 2>&1;	\
+	then								\
+		$(ECHO) "SUCCESS";					\
+		$(ECHO) -n 0 > .fail;					\
+	else								\
+		$(ECHO) "FAILURE";					\
+		$(ECHO) -n 1 > .fail;					\
+	fi;		
+	$(MAKE) -C generated-code clean  >/dev/null 2>&1;	
+
+distclean: clean
+	$(MAKE) -C $(POK_PATH)/kernel clean 
+
+clean:
+	$(MAKE) -C generated-code clean
+
+
+test-exec:
+	$(MAKE) -C generated-code test
+
+run:
+	$(MAKE) -C generated-code run
+
+all: 
+	$(MAKE) -C generated-code all
+
+
+
Index: examples/arinc653-sampling-flush-window/user_send.h
===================================================================
--- examples/arinc653-sampling-flush-window/user_send.h	(révision 0)
+++ examples/arinc653-sampling-flush-window/user_send.h	(révision 0)
@@ -0,0 +1,43 @@
+/*
+ *                               POK header
+ * 
+ * The following file is a part of the POK project. Any modification should
+ * made according to the POK licence. You CANNOT use this file or a part of
+ * this file is this part of a file for your own project
+ *
+ * For more information on the POK licence, please see our LICENCE FILE
+ *
+ * Please follow the coding guidelines described in doc/CODING_GUIDELINES
+ *
+ *                                      Copyright (c) 2007-2013 POK team 
+ *
+ * Created by devel on Sat Feb 16 08:46:09 2013 
+ */
+
+/**
+ * AADL-RAMSES
+ * 
+ * Copyright © 2012 TELECOM ParisTech and CNRS
+ * 
+ * TELECOM ParisTech/LTCI
+ * 
+ * Authors: see AUTHORS
+ * 
+ * This program is free software: you can redistribute it and/or modify 
+ * it under the terms of the Eclipse Public License as published by Eclipse,
+ * either version 1.0 of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * Eclipse Public License for more details.
+ * You should have received a copy of the Eclipse Public License
+ * along with this program.  If not, see 
+ * http://www.eclipse.org/org/documents/epl-v10.php
+ */
+
+#ifndef __USER_SEND_H__
+#define __USER_SEND_H__
+
+void send(uint8_t* d);
+
+#endif
Index: examples/arinc653-sampling-flush-window/README
===================================================================
--- examples/arinc653-sampling-flush-window/README	(révision 0)
+++ examples/arinc653-sampling-flush-window/README	(révision 0)
@@ -0,0 +1,4 @@
+This example allows testing flushig policies implemented between partionions:
+* At the end of each partition slot, partition ports are flushed (window).
+Code cannot be generated, Ramses has been used to generate the "generated code directory" 
+ 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/