Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
regression-suites
Commits
37b9bbb1
Commit
37b9bbb1
authored
Sep 08, 2017
by
Damien George
Browse files
Update Demo_uPy_WithC to pass int and float to MicroPython code.
parent
e00d57f2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Demo_uPy_WithC/InterfaceView.aadl
View file @
37b9bbb1
...
...
@@ -24,6 +24,8 @@ FEATURES
a : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
PROPERTIES
Taste::Associated_Queue_Size => 1;
END PI_TM;
SUBPROGRAM IMPLEMENTATION PI_TM.others
...
...
@@ -34,6 +36,12 @@ FEATURES
a : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
b : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
c : IN PARAMETER DataView::MyReal {
Taste::encoding => NATIVE;
};
END RI_TC;
SUBPROGRAM IMPLEMENTATION RI_TC.others
...
...
@@ -52,6 +60,12 @@ FEATURES
a : IN PARAMETER DataView::MyBool {
Taste::encoding => NATIVE;
};
b : IN PARAMETER DataView::MyInteger {
Taste::encoding => NATIVE;
};
c : IN PARAMETER DataView::MyReal {
Taste::encoding => NATIVE;
};
END PI_TC;
SUBPROGRAM IMPLEMENTATION PI_TC.others
...
...
@@ -90,6 +104,7 @@ FEATURES
PI_TM : PROVIDES SUBPROGRAM ACCESS interfaceview::FV::GND::PI_TM.others {
Taste::coordinates => "1246 1185";
Taste::RCMoperationKind => unprotected;
Taste::RCMperiod => 0 ms;
Taste::Deadline => 0 ms;
Taste::InterfaceName => "TM";
};
...
...
Demo_uPy_WithC/InterfaceView.md5
View file @
37b9bbb1
44a97ceb63adbe8df866dd3740da7d6f
InterfaceView.aadl
b468036a71fbc1a1e19c30c44c0f055b
InterfaceView.aadl
Demo_uPy_WithC/gnd/gnd.c
View file @
37b9bbb1
...
...
@@ -3,22 +3,28 @@
#include
<stdio.h>
#include
"gnd.h"
static
asn1SccMyBool
state
;
static
asn1SccMyBool
stateBool
;
static
asn1SccMyInteger
stateInt
;
static
asn1SccMyReal
stateReal
;
void
gnd_startup
()
{
/* Write your initialization code here,
but do not make any call to a required interface. */
printf
(
"gnd_startup
\n
"
);
state
=
false
;
stateBool
=
false
;
stateInt
=
42
;
stateReal
=
1
.
23
;
}
void
gnd_PI_CYCLE
()
{
/* Write your code here! */
printf
(
"gnd_PI_CYCLE --->
\n
"
);
gnd_RI_TC
(
&
state
);
state
=
!
state
;
gnd_RI_TC
(
&
stateBool
,
&
stateInt
,
&
stateReal
);
stateBool
=
!
stateBool
;
stateInt
=
45
-
stateInt
;
stateReal
=
1
.
0
/
stateReal
;
}
void
gnd_PI_TM
(
const
asn1SccMyBool
*
IN_a
)
...
...
Demo_uPy_WithC/gnd/gnd.h
View file @
37b9bbb1
...
...
@@ -17,7 +17,9 @@ void gnd_PI_CYCLE();
void
gnd_PI_TM
(
const
asn1SccMyBool
*
);
extern
void
gnd_RI_TC
(
const
asn1SccMyBool
*
);
extern
void
gnd_RI_TC
(
const
asn1SccMyBool
*
,
const
asn1SccMyInteger
*
,
const
asn1SccMyReal
*
);
#ifdef __cplusplus
}
...
...
Demo_uPy_WithC/payload/payload.py
View file @
37b9bbb1
...
...
@@ -11,8 +11,10 @@ def payload_startup():
print
(
'payload_startup'
)
micropython
.
heap_lock
()
def
payload_PI_TC
(
IN_a
):
def
payload_PI_TC
(
IN_a
,
IN_b
,
IN_c
):
# Write your code here!
print
(
' payload_PI_TC'
,
IN_a
)
print
(
' payload_PI_TC'
,
IN_a
,
IN_b
,
IN_c
)
print
(
' <--/'
)
payload_RI_TM
(
not
IN_a
)
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