Commit b75dc39e authored by jhugues's avatar jhugues
Browse files

* Fix build failure on these examples



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-ada@3386 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 6c2450de
pragma Style_Checks (Off); -- turn off style checks
WITH Interfaces;
USE Interfaces;
WITH Unchecked_Conversion;
PACKAGE AdaAsn1RTL IS
TYPE BIT IS mod 2**1;
TYPE BitArray IS ARRAY (Natural RANGE <>) OF BIT;
for BitArray'Component_Size use 1;
pragma Pack(BitArray);
TYPE OctetBuffer IS ARRAY (Natural RANGE <>) OF Unsigned_8;
TYPE OctetBuffer_Ptr IS ACCESS ALL OctetBuffer;
SUBTYPE Asn1Int IS Long_Long_Integer;
SUBTYPE Asn1UInt IS Unsigned_64;
MSBIT_ONE : CONSTANT Asn1UInt := 2**(Asn1UInt'SIZE - 1);
MSBYTE_FF : CONSTANT Asn1UInt := Shift_Left(Asn1UInt(16#FF#), Asn1UInt'Size-8);
TYPE Asn1SccSint IS NEW Asn1Int;
SUBTYPE Octet IS BitArray(1..8);
SUBTYPE Asn1Real IS LONG_Float;
MantissaFactor : Asn1Real:=Asn1Real(Unsigned_64(2)**Asn1Real'Machine_Mantissa);
TYPE OctetArray4 IS NEW OctetBuffer(1..4);
TYPE OctetArray8 IS NEW OctetBuffer(1..8);
TYPE Asn1Boolean IS NEW Boolean;
FOR Asn1Boolean'SIZE USE 32;
SUBTYPE Flag IS Asn1Boolean;
TYPE Asn1NullType IS NEW Character range Character'Val(0)..Character'Val(0);
ERR_INSUFFICIENT_DATA : CONSTANT INTEGER := 101;
ERR_INCORRECT_PER_STREAM : CONSTANT INTEGER := 102;
ERR_INVALID_CHOICE_ALTERNATIVE : CONSTANT INTEGER := 103;
ERR_INCORRECT_STREAM : CONSTANT INTEGER := 104;
ERR_INVALID_BER_FILE : CONSTANT INTEGER := 201;
ERR_BER_LENGTH_MISMATCH : CONSTANT INTEGER := 202;
ERR_BER_TAG_MISMATCH : CONSTANT INTEGER := 203;
GENERIC
MAX : POSITIVE;
PACKAGE BIT_STRING_PACKAGE IS
TYPE BIT_STRING IS
RECORD
Length : Integer;
Data : BitArray (1 .. MAX);
END RECORD;
TYPE FIXED_BIT_STRING IS
RECORD
Data : BitArray (1 .. MAX);
END RECORD;
END BIT_STRING_PACKAGE;
TYPE ASN1_RESULT IS
RECORD
Success : Boolean;
ErrorCode : INTEGER := 0;
END RECORD;
TYPE BitStream
(N : Integer) IS
RECORD
CurrentBit : Natural :=1;
Data : BitArray (1 .. N) := (1..N=>0);
END RECORD;
-- nBits 1 .. 7
GENERIC
MAX : POSITIVE;
TYPE ELEMENT IS PRIVATE;
PACKAGE SEQUENCE_OF_PACKAGE IS
TYPE LIST IS ARRAY (Positive RANGE 1 .. MAX) OF ELEMENT;
TYPE SEQUENCE_OF IS
RECORD
Length : Integer;
Data : LIST;
END RECORD;
TYPE FIXED_SEQUENCE_OF IS
RECORD
Data : LIST;
END RECORD;
END SEQUENCE_OF_PACKAGE;
END AdaAsn1RTL;
pragma Style_Checks (Off); -- turn off style checks
-- Code automatically generated by asn1scc tool
-- Date was: 10/25/2011
-- Time was: 12:46:14
WITH Ada.Strings.Fixed;
USE ADA.Strings.Fixed;
WITH Interfaces;
USE Interfaces;
WITH Ada.Characters.latin_1;
WITH AdaAsn1RTL;
USE AdaAsn1RTL;
package POHICDRIVER_IP is
SUBTYPE Port_T IS Asn1Int;
Port_T_REQUIRED_BYTES_FOR_ENCODING:CONSTANT INTEGER := 2;
Port_T_REQUIRED_BITS_FOR_ENCODING:CONSTANT INTEGER := 15;
Port_T_REQUIRED_BYTES_FOR_ACN_ENCODING:CONSTANT INTEGER := 2;
Port_T_REQUIRED_BITS_FOR_ACN_ENCODING:CONSTANT INTEGER := 15;
Port_T_REQUIRED_BYTES_FOR_XER_ENCODING:CONSTANT INTEGER := 37;
ERR_Port_T:CONSTANT INTEGER := 1000; -- (0..16535)
TYPE Version_T IS (ipv4, ipv6);
for Version_T use
(ipv4 => 0, ipv6 => 1);
for Version_T'Size use 32;
Version_T_REQUIRED_BYTES_FOR_ENCODING:CONSTANT INTEGER := 1;
Version_T_REQUIRED_BITS_FOR_ENCODING:CONSTANT INTEGER := 1;
Version_T_REQUIRED_BYTES_FOR_ACN_ENCODING:CONSTANT INTEGER := 1;
Version_T_REQUIRED_BITS_FOR_ACN_ENCODING:CONSTANT INTEGER := 1;
Version_T_REQUIRED_BYTES_FOR_XER_ENCODING:CONSTANT INTEGER := 34;
ERR_Version_T_unknown_enumeration_value:CONSTANT INTEGER := 1001; -- invalid enumeration value
TYPE IP_Conf_T_EXIST IS RECORD
broadcast:BIT;
netmask:BIT;
gateway:BIT;
dns:BIT;
version:BIT;
END RECORD;
TYPE IP_Conf_T IS RECORD
devname : String(1..21);
address : String(1..41);
broadcast : String(1..41);
netmask : String(1..41);
gateway : String(1..41);
dns : String(1..41);
version : Version_T:=ipv4;
port : Port_T:=0;
Exist : IP_Conf_T_EXIST;
END RECORD;
IP_Conf_T_REQUIRED_BYTES_FOR_ENCODING:CONSTANT INTEGER := 200;
IP_Conf_T_REQUIRED_BITS_FOR_ENCODING:CONSTANT INTEGER := 1596;
IP_Conf_T_REQUIRED_BYTES_FOR_ACN_ENCODING:CONSTANT INTEGER := 227;
IP_Conf_T_REQUIRED_BITS_FOR_ACN_ENCODING:CONSTANT INTEGER := 1816;
IP_Conf_T_REQUIRED_BYTES_FOR_XER_ENCODING:CONSTANT INTEGER := 416;
ERR_IP_Conf_T_devname:CONSTANT INTEGER := 1002; -- (SIZE (1..20))
ERR_IP_Conf_T_address:CONSTANT INTEGER := 1003; -- (SIZE (1..40))
ERR_IP_Conf_T_broadcast:CONSTANT INTEGER := 1004; -- (SIZE (1..40))
ERR_IP_Conf_T_netmask:CONSTANT INTEGER := 1005; -- (SIZE (1..40))
ERR_IP_Conf_T_gateway:CONSTANT INTEGER := 1006; -- (SIZE (1..40))
ERR_IP_Conf_T_dns:CONSTANT INTEGER := 1007; -- (SIZE (1..40))
localhost1:aliased IP_Conf_T:=(devname => "eth0" & 16*Character'Val(0) & Character'Val(0),
address => "127.0.0.1" & 31*Character'Val(0) & Character'Val(0),
broadcast => 41*Character'Val(0),
netmask => 41*Character'Val(0),
gateway => 41*Character'Val(0),
dns => 41*Character'Val(0),
version => ipv4,
port => 5489,
exist => (broadcast => 0, netmask => 0, gateway => 0, dns => 0, version => 0));
localhost2:aliased IP_Conf_T:=(devname => "eth0" & 16*Character'Val(0) & Character'Val(0),
address => "127.0.0.1" & 31*Character'Val(0) & Character'Val(0),
broadcast => 41*Character'Val(0),
netmask => 41*Character'Val(0),
gateway => 41*Character'Val(0),
dns => 41*Character'Val(0),
version => ipv4,
port => 5489,
exist => (broadcast => 0, netmask => 0, gateway => 0, dns => 0, version => 0));
--END;
end POHICDRIVER_IP;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment