text
stringlengths
0
234
Lower_Sum_m128i_Buffer := ia32_Load(Base(I+1)(J)'Access);
ia32_Store(Base(I+1)(J)'Access, ia32_Add(Lower_Sum_m128i_Buffer, Temp));
Sum_m128i_Buffer := ia32_Load(Base(I)(J-1)'Access);
ia32_Store(Base(I)(J-1)'Access, ia32_Add(Sum_m128i_Buffer, Temp));
Sum_m128i_Buffer := ia32_Load(Base(I)(J+1)'Access);
ia32_Store(Base(I)(J+1)'Access, ia32_Add(Sum_m128i_Buffer, Temp));
Base(I)(J..J+7) := Move(Move(Base(I)(J..J+7)) - (Temp_Values(0) * 4));
Base(I)(J+8..J+15) := Move(Move(Base(I)(J+8..J+15)) - (Temp_Values(1) * 4));
end if;
J := J + 16;
end loop;
Function Definition: procedure Update_Rates is
Function Body: Now : constant Ada.Real_Time.Time := Ada.Real_Time.Clock;
begin
if Deadline < Now then
declare
Dt : constant Ada.Real_Time.Time_Span := Now - Prev_Time;
MS : constant Integer := Dt / ONE_MS;
begin
EtherScope.Analyzer.Ethernet.Update_Rates (Ethernet, Prev_Ethernet, MS);
EtherScope.Analyzer.IPv4.Update_Rates (IPv4, Prev_IPv4, MS);
EtherScope.Analyzer.IGMP.Update_Rates (IGMP_Groups, Prev_Groups, MS);
EtherScope.Analyzer.TCP.Update_Rates (TCP_Ports, Prev_TCP, MS);
Prev_Time := Now;
Deadline := Deadline + Ada.Real_Time.Seconds (1);
Function Definition: procedure Initialize is
Function Body: begin
STM32.Board.Display.Initialize;
STM32.Board.Display.Initialize_Layer (1, HAL.Bitmap.ARGB_1555);
-- Initialize touch panel
STM32.Board.Touch_Panel.Initialize;
for I in Graphs'Range loop
EtherScope.Display.Use_Graph.Initialize (Graphs (I),
X => 100,
Y => 200,
Width => 380,
Height => 72,
Rate => Ada.Real_Time.Milliseconds (1000));
end loop;
end Initialize;
-- ------------------------------
-- Draw the layout presentation frame.
-- ------------------------------
procedure Draw_Frame (Buffer : in out HAL.Bitmap.Bitmap_Buffer'Class) is
begin
Buffer.Set_Source (UI.Texts.Background);
Buffer.Fill;
Draw_Buttons (Buffer);
Buffer.Set_Source (Line_Color);
Buffer.Draw_Vertical_Line (Pt => (98, 0),
Height => Buffer.Height);
end Draw_Frame;
-- ------------------------------
-- Draw the display buttons.
-- ------------------------------
procedure Draw_Buttons (Buffer : in out HAL.Bitmap.Bitmap_Buffer'Class) is
begin
UI.Buttons.Draw_Buttons (Buffer => Buffer,
List => Buttons,
X => 0,
Y => 0,
Width => 95,
Height => 34);
end Draw_Buttons;
-- ------------------------------
-- Refresh the graph and draw it.
-- ------------------------------
procedure Refresh_Graphs (Buffer : in out HAL.Bitmap.Bitmap_Buffer'Class;
Graph_Mode : in EtherScope.Stats.Graph_Kind) is
Now : constant Ada.Real_Time.Time := Ada.Real_Time.Clock;
Samples : EtherScope.Stats.Graph_Samples;
begin
EtherScope.Analyzer.Base.Update_Graph_Samples (Samples, True);
for I in Samples'Range loop
Use_Graph.Add_Sample (Graphs (I), Samples (I), Now);
end loop;
Use_Graph.Draw (Buffer, Graphs (Graph_Mode));
end Refresh_Graphs;
-- ------------------------------
-- Display devices found on the network.
-- ------------------------------
procedure Display_Devices (Buffer : in out HAL.Bitmap.Bitmap_Buffer'Class) is
use EtherScope.Analyzer.Base;
Y : Natural := 15;
begin
EtherScope.Analyzer.Base.Get_Devices (Devices);
Buffer.Set_Source (UI.Texts.Background);