package System_Demo -- This system combines generic native hardware, TCP/IP protocol stack -- and some software to build a full ping demo. public with Deployment; -- Additional properties (provided by Ocarina) with Generic_Bus; with Generic_Native; -- Generic hardware with TCP_IP_Protocol; -- TCP/IP protocol stack, as an AADL device with Beeper; -- Beeper device with Software; -- Software part for this demo ------------ -- SYSTEM -- ------------ system The_Demo end The_Demo; system implementation The_Demo.impl subcomponents -- Interconnect bus. This component is shared by Node_1 and -- Node_2 to support communication through TCP/IP protocol stack Bus_TCP : bus Generic_Bus::Generic_Bus.impl; ------------------------------------------------------------------ -- Node #1 hardware components Processor_1 : processor Generic_Native::Generic_Processor.impl; Memory_1 : memory Generic_Native::Memory_Segment.impl; TCP_IP_Cnx_1 : device TCP_IP_Protocol::TCP_IP_Device.impl { Deployment::Location => "ip 127.0.0.1 1233"; }; -- Beeper_1 : device Beeper::Beeper_Device.impl; -- Node #1 software components Node_1 : process Software::Pinger_Process.Impl; ------------------------------------------------------------------ -- Node #2 hardware components Processor_2 : processor Generic_Native::Generic_Processor.impl; Memory_2 : memory Generic_Native::Memory_Segment.impl; TCP_IP_Cnx_2 : device TCP_IP_Protocol::TCP_IP_Device.impl { Deployment::Location => "ip 127.0.0.1 2345"; }; -- Node #2 software components Node_2 : process Software::Pingee_Process.Impl; connections -- By connecting the bus to the driver, and binding the -- connection between Node_1.Out_Port and Node_2.In_Port to the -- bus, we model the fact that the communication between port -- 'Out_Port' of Node_1 and 'In_Port' of Node_2 will use the TCP -- protocol stack. bus access Bus_TCP -> TCP_IP_Cnx_1.Ethernet_Wire; bus access Bus_TCP -> TCP_IP_Cnx_2.Ethernet_Wire; port Node_1.Out_Port -> Node_2.In_Port { Actual_Connection_Binding => (reference (Bus_TCP)); }; properties -- By binding the device to the processor, we specify that the -- processor (and then any bound process) have access to this -- driver. Actual_Processor_Binding => (reference (Processor_1)) applies to Node_1; Actual_Processor_Binding => (reference (Processor_1)) applies to TCP_IP_Cnx_1; Actual_Processor_Binding => (reference (Processor_2)) applies to Node_2; Actual_Processor_Binding => (reference (Processor_2)) applies to TCP_IP_Cnx_2; end The_Demo.impl; end System_Demo;