Commit 9299e7ea authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Add pub-sub test case from UPM

parent 46b2afec
-- type dataview
---------------------------------------
--! File generated by asn2aadl v2.2-r74b182d: DO NOT EDIT !
--------------------------------------------------------
--! MadeInFastMode:True:
--! InputASN1FileChecksum:99fb5efaeceecfcebb8d136f7b0435b8:DataView.acn:
--! InputASN1FileChecksum:1dff15838f05fa134ab259d1e2b7ffdb:DataView.asn:
--! InputASN1FileChecksum:ecf379f559e49f546ebc70f8462986f7:/home/taste/tool-inst/share/SharedTypes/air_device/DataView.acn:
--! InputASN1FileChecksum:cd1a84f23f40a5f78f17fcb7e027dc73:/home/taste/tool-inst/share/SharedTypes/air_device/DataView.asn:
--! InputASN1FileChecksum:ff35cd78b1e82f09b63b209ab7cf7c34:/home/taste/tool-inst/share/taste-types/taste-types.asn:
--------------------------------------------------------
package DataView
public
with Data_Model;
with Taste;
with Base_Types;
with Deployment;
DATA Simulink_Tunable_Parameter
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Simulink-Tunable-Parameter";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Simulink_Tunable_Parameter;
DATA Timer
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Timer";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Timer;
DATA Taste_directive
PROPERTIES
TASTE::Ada_Package_Name => "TASTE_Directives";
Type_Source_Name => "Taste-directive";
Deployment::ASN1_Module_Name => "TASTE-Directives";
TASTE::Forbid_in_PI => true;
END Taste_directive;
data Stream_Element_Buffer
-- Root type for buffer elements
properties
Data_Model::Data_Representation => Character;
end Stream_Element_Buffer;
DATA AttachDetach
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_PUBSUB_N_M_DATAVIEW);
TASTE::Ada_Package_Name => "PUBSUB_N_M_DATAVIEW";
Deployment::ASN1_Module_Name => "PUBSUB-N-M-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "AttachDetach";
TASTE::Position_In_File => [ line => 18 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END AttachDetach;
DATA IMPLEMENTATION AttachDetach.impl
END AttachDetach.impl;
DATA AttachDetach_Buffer_Max
END AttachDetach_Buffer_Max;
DATA IMPLEMENTATION AttachDetach_Buffer_Max.impl
-- Buffer to hold a marshalled data of type AttachDetach
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END AttachDetach_Buffer_Max.impl;
DATA AttachDetach_Buffer
END AttachDetach_Buffer;
DATA IMPLEMENTATION AttachDetach_Buffer.impl
-- Buffer to hold a marshalled data of type AttachDetach
SUBCOMPONENTS
Buffer : data AttachDetach_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END AttachDetach_Buffer.impl;
DATA AttachDetachInfo
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_PUBSUB_N_M_DATAVIEW);
TASTE::Ada_Package_Name => "PUBSUB_N_M_DATAVIEW";
Deployment::ASN1_Module_Name => "PUBSUB-N-M-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "AttachDetachInfo";
TASTE::Position_In_File => [ line => 17 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END AttachDetachInfo;
DATA IMPLEMENTATION AttachDetachInfo.impl
END AttachDetachInfo.impl;
DATA AttachDetachInfo_Buffer_Max
END AttachDetachInfo_Buffer_Max;
DATA IMPLEMENTATION AttachDetachInfo_Buffer_Max.impl
-- Buffer to hold a marshalled data of type AttachDetachInfo
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END AttachDetachInfo_Buffer_Max.impl;
DATA AttachDetachInfo_Buffer
END AttachDetachInfo_Buffer;
DATA IMPLEMENTATION AttachDetachInfo_Buffer.impl
-- Buffer to hold a marshalled data of type AttachDetachInfo
SUBCOMPONENTS
Buffer : data AttachDetachInfo_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END AttachDetachInfo_Buffer.impl;
DATA Message
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_PUBSUB_N_M_DATAVIEW);
TASTE::Ada_Package_Name => "PUBSUB_N_M_DATAVIEW";
Deployment::ASN1_Module_Name => "PUBSUB-N-M-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "Message";
TASTE::Position_In_File => [ line => 10 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END Message;
DATA IMPLEMENTATION Message.impl
END Message.impl;
DATA Message_Buffer_Max
END Message_Buffer_Max;
DATA IMPLEMENTATION Message_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Message
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Message_Buffer_Max.impl;
DATA Message_Buffer
END Message_Buffer;
DATA IMPLEMENTATION Message_Buffer.impl
-- Buffer to hold a marshalled data of type Message
SUBCOMPONENTS
Buffer : data Message_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END Message_Buffer.impl;
DATA MessageContent
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_PUBSUB_N_M_DATAVIEW);
TASTE::Ada_Package_Name => "PUBSUB_N_M_DATAVIEW";
Deployment::ASN1_Module_Name => "PUBSUB-N-M-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "MessageContent";
TASTE::Position_In_File => [ line => 8 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END MessageContent;
DATA IMPLEMENTATION MessageContent.impl
END MessageContent.impl;
DATA MessageContent_Buffer_Max
END MessageContent_Buffer_Max;
DATA IMPLEMENTATION MessageContent_Buffer_Max.impl
-- Buffer to hold a marshalled data of type MessageContent
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END MessageContent_Buffer_Max.impl;
DATA MessageContent_Buffer
END MessageContent_Buffer;
DATA IMPLEMENTATION MessageContent_Buffer.impl
-- Buffer to hold a marshalled data of type MessageContent
SUBCOMPONENTS
Buffer : data MessageContent_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END MessageContent_Buffer.impl;
DATA MessageId
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_PUBSUB_N_M_DATAVIEW);
TASTE::Ada_Package_Name => "PUBSUB_N_M_DATAVIEW";
Deployment::ASN1_Module_Name => "PUBSUB-N-M-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "MessageId";
TASTE::Position_In_File => [ line => 6 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END MessageId;
DATA IMPLEMENTATION MessageId.impl
END MessageId.impl;
DATA MessageId_Buffer_Max
END MessageId_Buffer_Max;
DATA IMPLEMENTATION MessageId_Buffer_Max.impl
-- Buffer to hold a marshalled data of type MessageId
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END MessageId_Buffer_Max.impl;
DATA MessageId_Buffer
END MessageId_Buffer;
DATA IMPLEMENTATION MessageId_Buffer.impl
-- Buffer to hold a marshalled data of type MessageId
SUBCOMPONENTS
Buffer : data MessageId_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END MessageId_Buffer.impl;
DATA SubId
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("DataView.asn");
TASTE::EncodingDefinitionFile => classifier(DataView::ACN_PUBSUB_N_M_DATAVIEW);
TASTE::Ada_Package_Name => "PUBSUB_N_M_DATAVIEW";
Deployment::ASN1_Module_Name => "PUBSUB-N-M-DATAVIEW";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "SubId";
TASTE::Position_In_File => [ line => 8 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END SubId;
DATA IMPLEMENTATION SubId.impl
END SubId.impl;
DATA SubId_Buffer_Max
END SubId_Buffer_Max;
DATA IMPLEMENTATION SubId_Buffer_Max.impl
-- Buffer to hold a marshalled data of type SubId
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END SubId_Buffer_Max.impl;
DATA SubId_Buffer
END SubId_Buffer;
DATA IMPLEMENTATION SubId_Buffer.impl
-- Buffer to hold a marshalled data of type SubId
SUBCOMPONENTS
Buffer : data SubId_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END SubId_Buffer.impl;
DATA T_Boolean
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Boolean";
TASTE::Position_In_File => [ line => 14 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aBOOLEAN;
END T_Boolean;
DATA IMPLEMENTATION T_Boolean.impl
END T_Boolean.impl;
DATA T_Boolean_Buffer_Max
END T_Boolean_Buffer_Max;
DATA IMPLEMENTATION T_Boolean_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Boolean
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Boolean_Buffer_Max.impl;
DATA T_Boolean_Buffer
END T_Boolean_Buffer;
DATA IMPLEMENTATION T_Boolean_Buffer.impl
-- Buffer to hold a marshalled data of type T_Boolean
SUBCOMPONENTS
Buffer : data T_Boolean_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Boolean_Buffer.impl;
DATA T_Int32
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int32";
TASTE::Position_In_File => [ line => 6 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_Int32;
DATA IMPLEMENTATION T_Int32.impl
END T_Int32.impl;
DATA T_Int32_Buffer_Max
END T_Int32_Buffer_Max;
DATA IMPLEMENTATION T_Int32_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Int32
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int32_Buffer_Max.impl;
DATA T_Int32_Buffer
END T_Int32_Buffer;
DATA IMPLEMENTATION T_Int32_Buffer.impl
-- Buffer to hold a marshalled data of type T_Int32
SUBCOMPONENTS
Buffer : data T_Int32_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int32_Buffer.impl;
DATA T_Int8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int8";
TASTE::Position_In_File => [ line => 10 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_Int8;
DATA IMPLEMENTATION T_Int8.impl
END T_Int8.impl;
DATA T_Int8_Buffer_Max
END T_Int8_Buffer_Max;
DATA IMPLEMENTATION T_Int8_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Int8
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int8_Buffer_Max.impl;
DATA T_Int8_Buffer
END T_Int8_Buffer;
DATA IMPLEMENTATION T_Int8_Buffer.impl
-- Buffer to hold a marshalled data of type T_Int8
SUBCOMPONENTS
Buffer : data T_Int8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Int8_Buffer.impl;
DATA T_Null_Record
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Null-Record";
TASTE::Position_In_File => [ line => 16 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aSEQUENCE;
END T_Null_Record;
DATA IMPLEMENTATION T_Null_Record.impl
END T_Null_Record.impl;
DATA T_Null_Record_Buffer_Max
END T_Null_Record_Buffer_Max;
DATA IMPLEMENTATION T_Null_Record_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_Null_Record
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Null_Record_Buffer_Max.impl;
DATA T_Null_Record_Buffer
END T_Null_Record_Buffer;
DATA IMPLEMENTATION T_Null_Record_Buffer.impl
-- Buffer to hold a marshalled data of type T_Null_Record
SUBCOMPONENTS
Buffer : data T_Null_Record_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_Null_Record_Buffer.impl;
DATA T_UInt32
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt32";
TASTE::Position_In_File => [ line => 8 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_UInt32;
DATA IMPLEMENTATION T_UInt32.impl
END T_UInt32.impl;
DATA T_UInt32_Buffer_Max
END T_UInt32_Buffer_Max;
DATA IMPLEMENTATION T_UInt32_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_UInt32
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt32_Buffer_Max.impl;
DATA T_UInt32_Buffer
END T_UInt32_Buffer;
DATA IMPLEMENTATION T_UInt32_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt32
SUBCOMPONENTS
Buffer : data T_UInt32_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt32_Buffer.impl;
DATA T_UInt8
PROPERTIES
-- name of the ASN.1 source file:
Source_Text => ("/home/taste/tool-inst/share/taste-types/taste-types.asn");
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt8";
TASTE::Position_In_File => [ line => 12 ; column => 1 ; ];
-- what kind of type is this?
TASTE::ASN1_Basic_Type =>aINTEGER;
END T_UInt8;
DATA IMPLEMENTATION T_UInt8.impl
END T_UInt8.impl;
DATA T_UInt8_Buffer_Max
END T_UInt8_Buffer_Max;
DATA IMPLEMENTATION T_UInt8_Buffer_Max.impl
-- Buffer to hold a marshalled data of type T_UInt8
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt8_Buffer_Max.impl;
DATA T_UInt8_Buffer
END T_UInt8_Buffer;
DATA IMPLEMENTATION T_UInt8_Buffer.impl
-- Buffer to hold a marshalled data of type T_UInt8
SUBCOMPONENTS
Buffer : data T_UInt8_Buffer_Max.impl;
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
END T_UInt8_Buffer.impl;
SYSTEM Taste_DataView
END Taste_DataView;
SYSTEM IMPLEMENTATION Taste_DataView.others
SUBCOMPONENTS
AttachDetach : DATA AttachDetach.impl;
AttachDetachInfo : DATA AttachDetachInfo.impl;
Message : DATA Message.impl;
MessageContent : DATA MessageContent.impl;
MessageId : DATA MessageId.impl;
SubId : DATA SubId.impl;
T_Boolean : DATA T_Boolean.impl;
T_Int32 : DATA T_Int32.impl;
T_Int8 : DATA T_Int8.impl;
T_Null_Record : DATA T_Null_Record.impl;
T_UInt32 : DATA T_UInt32.impl;
T_UInt8 : DATA T_UInt8.impl;
END Taste_DataView.others;
DATA ACN_PUBSUB_N_M_DATAVIEW
PROPERTIES
Source_Text => ("DataView.acn");
Source_Language => (ACN);
END ACN_PUBSUB_N_M_DATAVIEW;
end DataView;
PUBSUB-N-M-DATAVIEW DEFINITIONS ::= BEGIN
-- In this ACN model, you can specify custom binary encoding rules for
-- your data types. For example if you require a specific memory layout
-- for a record, or need to add padding fields, define endianness, etc.
-- you can do that with ACN. Refer to the TASTE wiki for documentation:
-- https://taste.tuxfamily.org/wiki/index.php?title=Main_Page
-- Example of custom encoding:
-- My-Integer [encoding pos-int, endianness big, size 16]
END
PUBSUB-N-M-DATAVIEW DEFINITIONS ::=
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
MessageId ::= T-Int32
MessageContent ::= T-UInt32
Message ::= SEQUENCE { msg-id MessageId, msg-content MessageContent}
-- Sub Identifier:
SubId ::= T-UInt32
-- Attach = Subscribe
-- Detach = Unsubscribe
AttachDetachInfo ::= SEQUENCE {sub-id SubId, msg-id MessageId}
AttachDetach ::= SEQUENCE { msg-id MessageId, operation ENUMERATED {subscribe, unsubscribe} }
-- ASN.1 Type definitions must start with an uppercase
-- Field names in records (SEQUENCE) must start with a lowercase
-- Underscores are not allowed: use dash (hyphen)
-- For integers do not assume that small ranges will be translated to small
-- types in C or Ada (expect unsigned or signed 64 bits types with subtypes
-- for the range in Ada)
-- Simple types:
-- TASTE-Boolean ::= BOOLEAN
-- MyInteger ::= INTEGER (0..255)
-- MyReal ::= REAL (0.0 .. 1000.0)
-- MyBool ::= BOOLEAN
-- MyEnum ::= ENUMERATED { hello, world, how-are-you }
-- Complex types:
-- MySeq ::= SEQUENCE {
-- input-data MyInteger,
-- output-data MyInteger,