Commit 11dfe773 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Merge branch 'feature_fixDemoAbb' into 'master'

Feature fix demo abb

See merge request !34
parents 5c5785a7 dfcce29d
Pipeline #1814 passed with stage
in 8 minutes and 50 seconds
--------------------------------------------------------
--! File generated by asn2aadl v2.1.41: DO NOT EDIT !
--! File generated by asn2aadl v2.2-r750cd0a: DO NOT EDIT !
--------------------------------------------------------
--! InputASN1FileChecksum:607a8809f6171272bd95da808c544429:/home/taste/tool-src/kazoo/test/Demo_ABB_Opengeode/DataView.asn:
--! MadeInFastMode:True:
--! InputASN1FileChecksum:ee8a7e01f29874c0d50f437d5abb9599:/home/taste/tool-inst/share/taste-types/taste-types.asn:
--! InputASN1FileChecksum:61d1e3db9c71662d17329cb2483e9ac8:/home/taste/tool-src/kazoo/test/Demo_ABB_Opengeode/DataView.asn:
--------------------------------------------------------
package DataView
......@@ -47,9 +48,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Cabin-button";
TASTE::Position_In_File => [ line => 42 ; column => 1 ; ];
......@@ -67,8 +65,6 @@ DATA IMPLEMENTATION Cabin_button_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Cabin_button
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Cabin_button_Buffer_Max.impl;
......@@ -82,7 +78,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END Cabin_button_Buffer.impl;
DATA Floor_button
......@@ -92,9 +87,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Floor-button";
TASTE::Position_In_File => [ line => 37 ; column => 1 ; ];
......@@ -112,8 +104,6 @@ DATA IMPLEMENTATION Floor_button_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Floor_button
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Floor_button_Buffer_Max.impl;
......@@ -127,7 +117,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END Floor_button_Buffer.impl;
DATA Floors
......@@ -137,9 +126,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 4; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Floors";
TASTE::Position_In_File => [ line => 10 ; column => 1 ; ];
......@@ -157,8 +143,6 @@ DATA IMPLEMENTATION Floors_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Floors
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Floors_Buffer_Max.impl;
......@@ -172,7 +156,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END Floors_Buffer.impl;
DATA Lift_control
......@@ -182,9 +165,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 20; suggested aligned message buffer is...
Source_Data_Size => 24 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Lift-control";
TASTE::Position_In_File => [ line => 21 ; column => 1 ; ];
......@@ -202,8 +182,6 @@ DATA IMPLEMENTATION Lift_control_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Lift_control
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (24); -- Size of the buffer
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Lift_control_Buffer_Max.impl;
......@@ -217,7 +195,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 40 Bytes; -- Size of the buffer in bytes
END Lift_control_Buffer.impl;
DATA Lift_sensor
......@@ -227,9 +204,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 16; suggested aligned message buffer is...
Source_Data_Size => 16 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Lift-sensor";
TASTE::Position_In_File => [ line => 28 ; column => 1 ; ];
......@@ -247,8 +221,6 @@ DATA IMPLEMENTATION Lift_sensor_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Lift_sensor
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (16); -- Size of the buffer
Source_Data_Size => 16 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Lift_sensor_Buffer_Max.impl;
......@@ -262,7 +234,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 32 Bytes; -- Size of the buffer in bytes
END Lift_sensor_Buffer.impl;
DATA OnOff
......@@ -272,9 +243,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 4; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "OnOff";
TASTE::Position_In_File => [ line => 5 ; column => 1 ; ];
......@@ -292,8 +260,6 @@ DATA IMPLEMENTATION OnOff_Buffer_Max.impl
-- Buffer to hold a marshalled data of type OnOff
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END OnOff_Buffer_Max.impl;
......@@ -307,7 +273,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END OnOff_Buffer.impl;
DATA OpenClose
......@@ -317,9 +282,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 4; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "OpenClose";
TASTE::Position_In_File => [ line => 6 ; column => 1 ; ];
......@@ -337,8 +299,6 @@ DATA IMPLEMENTATION OpenClose_Buffer_Max.impl
-- Buffer to hold a marshalled data of type OpenClose
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END OpenClose_Buffer_Max.impl;
......@@ -352,7 +312,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END OpenClose_Buffer.impl;
DATA Position
......@@ -362,9 +321,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 13; suggested aligned message buffer is...
Source_Data_Size => 16 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Position";
TASTE::Position_In_File => [ line => 7 ; column => 1 ; ];
......@@ -382,8 +338,6 @@ DATA IMPLEMENTATION Position_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Position
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (16); -- Size of the buffer
Source_Data_Size => 16 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Position_Buffer_Max.impl;
......@@ -397,7 +351,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 32 Bytes; -- Size of the buffer in bytes
END Position_Buffer.impl;
DATA Start_condition
......@@ -407,9 +360,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 16; suggested aligned message buffer is...
Source_Data_Size => 16 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Start-condition";
TASTE::Position_In_File => [ line => 47 ; column => 1 ; ];
......@@ -427,8 +377,6 @@ DATA IMPLEMENTATION Start_condition_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Start_condition
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (16); -- Size of the buffer
Source_Data_Size => 16 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Start_condition_Buffer_Max.impl;
......@@ -442,7 +390,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 32 Bytes; -- Size of the buffer in bytes
END Start_condition_Buffer.impl;
DATA Status
......@@ -452,9 +399,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 24; suggested aligned message buffer is...
Source_Data_Size => 24 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "Status";
TASTE::Position_In_File => [ line => 52 ; column => 1 ; ];
......@@ -472,8 +416,6 @@ DATA IMPLEMENTATION Status_Buffer_Max.impl
-- Buffer to hold a marshalled data of type Status
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (24); -- Size of the buffer
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END Status_Buffer_Max.impl;
......@@ -487,7 +429,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 40 Bytes; -- Size of the buffer in bytes
END Status_Buffer.impl;
DATA T_Boolean
......@@ -497,9 +438,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 1; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Boolean";
TASTE::Position_In_File => [ line => 14 ; column => 1 ; ];
......@@ -517,8 +455,6 @@ 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::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Boolean_Buffer_Max.impl;
......@@ -532,7 +468,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END T_Boolean_Buffer.impl;
DATA T_Int32
......@@ -542,9 +477,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int32";
TASTE::Position_In_File => [ line => 6 ; column => 1 ; ];
......@@ -562,8 +494,6 @@ 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::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int32_Buffer_Max.impl;
......@@ -577,7 +507,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END T_Int32_Buffer.impl;
DATA T_Int8
......@@ -587,9 +516,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-Int8";
TASTE::Position_In_File => [ line => 10 ; column => 1 ; ];
......@@ -607,8 +533,6 @@ 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::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_Int8_Buffer_Max.impl;
......@@ -622,7 +546,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END T_Int8_Buffer.impl;
DATA T_UInt32
......@@ -632,9 +555,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt32";
TASTE::Position_In_File => [ line => 8 ; column => 1 ; ];
......@@ -652,8 +572,6 @@ 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::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt32_Buffer_Max.impl;
......@@ -667,7 +585,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END T_UInt32_Buffer.impl;
DATA T_UInt8
......@@ -677,9 +594,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "TASTE_BasicTypes";
Deployment::ASN1_Module_Name => "TASTE-BasicTypes";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 8; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "T-UInt8";
TASTE::Position_In_File => [ line => 12 ; column => 1 ; ];
......@@ -697,8 +611,6 @@ 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::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END T_UInt8_Buffer_Max.impl;
......@@ -712,7 +624,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END T_UInt8_Buffer.impl;
DATA UpDown
......@@ -722,9 +633,6 @@ PROPERTIES
TASTE::Ada_Package_Name => "Lift_dataview";
Deployment::ASN1_Module_Name => "Lift-dataview";
Source_Language => (ASN1);
-- Size of a buffer to cover all forms of message representation:
-- Real message size is 4; suggested aligned message buffer is...
Source_Data_Size => 8 Bytes;
-- name of the corresponding data type in the source file:
Type_Source_Name => "UpDown";
TASTE::Position_In_File => [ line => 4 ; column => 1 ; ];
......@@ -742,8 +650,6 @@ DATA IMPLEMENTATION UpDown_Buffer_Max.impl
-- Buffer to hold a marshalled data of type UpDown
PROPERTIES
Data_Model::Data_Representation => array;
Data_Model::Dimension => (8); -- Size of the buffer
Source_Data_Size => 8 Bytes; -- Size of the buffer in bytes
Data_Model::Base_Type => (classifier (DataView::Stream_Element_Buffer));
END UpDown_Buffer_Max.impl;
......@@ -757,7 +663,6 @@ SUBCOMPONENTS
Length : data Base_Types::Unsigned_32;
PROPERTIES
Data_Model::Data_Representation => Struct;
Source_Data_Size => 24 Bytes; -- Size of the buffer in bytes
END UpDown_Buffer.impl;
SYSTEM Taste_DataView
......
......@@ -46,7 +46,7 @@ Cabin-button ::= CHOICE {
Start-condition ::= CHOICE {
forever BOOLEAN,
nb-of-cycle INTEGER (50 .. 255)
nb-of-cycle INTEGER (0 .. 255)
}
Status ::= SEQUENCE {
......
#!/usr/bin/env python
#
# Automatically generated Python sequence chart (MSC) implementation
import os
import sys
import signal
taste_inst = os.popen('taste-config --prefix').readlines()[0].strip()
sys.path.append(taste_inst+'/share/asn1-editor')
from Scenario import Scenario, PollerThread
from PySide.QtCore import QCoreApplication, Qt
from udpcontroller import tasteUDP
status = 0
# Generated due to "user_trace_201212131443.msc"
# From the section: MSCDOCUMENT automade
@Scenario
def Exercise_user(self):
'''user processing'''
global status
self.sendMsg('Manual_Control', '{ door door-open, direction down, brake off, motor on }', lineNo=17)
self.sendMsg('Start', 'nb-of-cycle:100', lineNo=18)
while True:
(msgId, val) = self.getNextMsg(timeout=1)
if not msgId:
break
if msgId == 'position':
continue
elif msgId == 'door_status':
print 'Received door status, value=', val.Get()
return 0
def runScenario(udpController=None, callback=None):
global user
global poller
poller = None
if udpController:
user = Exercise_user()
udpController.slots.append(user.Q)
user.wait()
udpController.slots.remove(user.Q)
if callback:
user.done.connect(callback)
return user.status
else:
# Use old-style message queue
poller = PollerThread()
user = Exercise_user()
if callback:
user.done.connect(callback)
poller.slots.append(user.Q)
poller.start()
user.start()
def killThreads():
global user
user.wait()
user = None
if poller:
poller._bDie = True
poller.wait()
if __name__ == "__main__":
signal.signal(signal.SIGINT, signal.SIG_DFL)
udpController = None
if '--udp' in sys.argv:
# Create UDP Controller with default IP/Port values (127.0.0.1:7755:7756)
udpController = tasteUDP()
app = QCoreApplication(sys.argv)
app.aboutToQuit.connect(killThreads)
status = runScenario(udpController, app.quit)
app.exec_()
sys.exit(status)
Supports Markdown
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