Extracting record from big endian data
问题 I have the following code for network protocol implementation. As the protocol is big endian, I wanted to use the Bit_Order attribute and High_Order_First value but it seems I made a mistake. With Ada.Unchecked_Conversion; with Ada.Text_IO; use Ada.Text_IO; with System; use System; procedure Bit_Extraction is type Byte is range 0 .. (2**8)-1 with Size => 8; type Command is (Read_Coils, Read_Discrete_Inputs ) with Size => 7; for Command use (Read_Coils => 1, Read_Discrete_Inputs => 4); type