package Software public with Data_Model; ---------- -- Data -- ---------- data Simple_Type properties Type_Source_Name => "custom_int"; Data_Model::Data_Representation => Integer; Source_Text => ("ping"); Source_Data_Size => 8 Bytes; end Simple_Type; ----------------- -- Subprograms -- ----------------- subprogram Do_Ping_Spg features Data_Source : out parameter Simple_Type; properties source_language => lua; source_name => "do_ping"; source_text => ("ping.lua"); end Do_Ping_Spg; subprogram Ping_Spg features Data_Sink : in parameter Simple_Type; properties source_language => LUA; source_name => "receive_ping"; source_text => ("ping.lua"); end Ping_Spg; ------------- -- Threads -- ------------- thread P features Data_Source : out event data port Simple_Type; end P; thread implementation P.Impl calls Mycalls: { P_Spg : subprogram Do_Ping_Spg; }; connections parameter P_Spg.Data_Source -> Data_Source; properties Dispatch_Protocol => Periodic; Period => 10 Ms; Deadline => 10 ms; Priority => 2; end P.Impl; thread Q features Data_Sink : in event data port Simple_Type; end Q; thread implementation Q.Impl calls Mycalls: { Q_Spg : subprogram Ping_Spg; }; connections parameter Data_Sink -> Q_Spg.Data_Sink; properties Dispatch_Protocol => Sporadic; Period => 10 Ms; deadline => 10 Ms; Priority => 1; end Q.Impl; end Software; package lua_ping public with Deployment; with Software; --------------- -- Processor -- --------------- processor the_processor properties Deployment::Execution_Platform => native; end the_processor; processor implementation the_processor.Impl properties Scheduling_Protocol => (Posix_1003_Highest_Priority_First_Protocol); Priority_Range => 0 .. 255; end the_processor.Impl; --------------- -- Processes -- --------------- process A end A; process implementation A.Impl subcomponents Pinger : thread Software::P.Impl; Ping_Me : thread Software::Q.Impl; connections port Pinger.Data_Source -> Ping_Me.Data_Sink; end A.Impl; ------------ -- System -- ------------ system lua_ping_local end lua_ping_local; system implementation lua_ping_local.i subcomponents Node_A : process A.Impl; CPU : processor the_processor.Impl; properties actual_processor_binding => (reference (CPU)) applies to Node_A; end lua_ping_local.i; end lua_ping;