Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
taste-setup
Commits
bbabaf97
Commit
bbabaf97
authored
Oct 16, 2017
by
Maxime Perrotin
Browse files
Create simpler dataviews
parent
aa4b5e3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
misc/helper-scripts/taste-create-data-view
View file @
bbabaf97
...
...
@@ -42,39 +42,51 @@ else
BEGIN
IMPORTS T-Int32, T-UInt32, T-Int8, T-UInt8, T-Boolean FROM TASTE-BasicTypes;
TASTE-Boolean ::= BOOLEAN
-- 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)
-- Simple types:
MyInteger ::= INTEGER (0..255)
MyReal ::= REAL (0.0 .. 1000.0)
MyBool ::= BOOLEAN
MyEnum ::= ENUMERATED { hello, world, how-are-you }
--
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,
validity ENUMERATED { valid, invalid }
}
MyChoice ::= CHOICE {
a BOOLEAN,
b MySeq
}
MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
-- MySeq ::= SEQUENCE {
-- input-data MyInteger,
-- output-data MyInteger,
-- validity ENUMERATED { valid, invalid }
-- }
--
-- MyChoice ::= CHOICE {
-- a BOOLEAN,
-- b MySeq
-- }
--
-- MySeqOf ::= SEQUENCE (SIZE (2)) OF MyEnum
--
-- MyOctStr ::= OCTET STRING (SIZE (3))
--
-- -- You can also declare constants
-- myVar MySeqOf ::= { hello, world }
MyOctStr ::= OCTET STRING (SIZE (3))
END
'
>
DataView.asn
echo
'TASTE-Dataview DEFINITIONS ::= BEGIN
-- You can also declare constants
myVar MySeqOf ::= { hello, world }
-- 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 ACN user manual for details.
-- TASTE-Boolean []
END
'
>
DataView.a
s
n
'
>
DataView.a
c
n
fi
if
[
-z
$NONINTERACTIVE
]
...
...
@@ -83,7 +95,7 @@ then
echo
-e
"
${
INFO
}
Converting the data view to AADL..."
fi
cp
$(
taste-config
--prefix
)
/share/taste-types/taste-types.asn
.
#
cp $(taste-config --prefix)/share/taste-types/taste-types.asn .
taste-update-data-view
...
...
misc/helper-scripts/taste-create-project
View file @
bbabaf97
...
...
@@ -25,7 +25,7 @@ if [ ! -f DataView.aadl ]
then
echo
-e
"
${
INFO
}
Creating a default ASN.1 data model."
NONINTERACTIVE
=
1 taste-create-data-view
NONINTERACTIVE
=
1 taste-create-acn-model
#
NONINTERACTIVE=1 taste-create-acn-model
else
echo
-e
"
${
INFO
}
Using existing DataView.aadl"
fi
...
...
misc/helper-scripts/taste-progress-dialog.py
View file @
bbabaf97
...
...
@@ -127,7 +127,7 @@ class MyDialog(QDialog):
def
periodic_update
(
self
):
self
.
current_value
+=
5
if
self
.
current_value
>=
self
.
target_value
:
self
.
current_value
=
self
.
target_value
-
1
self
.
current_value
=
self
.
target_value
else
:
QTimer
.
singleShot
(
200
,
self
.
periodic_update
)
self
.
bar
.
setValue
(
self
.
current_value
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment