diff --git a/Demo_uPy_WithC/InterfaceView.aadl b/Demo_uPy_WithC/InterfaceView.aadl index c62be1fd71c67c28640fc5707b56df36ada68f42..2a4e2a1a1bde3f7808ce3f29764dc9d1d9a554a6 100644 --- a/Demo_uPy_WithC/InterfaceView.aadl +++ b/Demo_uPy_WithC/InterfaceView.aadl @@ -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"; }; diff --git a/Demo_uPy_WithC/InterfaceView.md5 b/Demo_uPy_WithC/InterfaceView.md5 index 1b675e51e7ad27f96df983baf2b27fc83696384c..e6551b546ca862b7b2bdad678318e97cee8e6578 100644 --- a/Demo_uPy_WithC/InterfaceView.md5 +++ b/Demo_uPy_WithC/InterfaceView.md5 @@ -1 +1 @@ -44a97ceb63adbe8df866dd3740da7d6f InterfaceView.aadl +b468036a71fbc1a1e19c30c44c0f055b InterfaceView.aadl diff --git a/Demo_uPy_WithC/gnd/gnd.c b/Demo_uPy_WithC/gnd/gnd.c index 64fd033a0951b10fe87d8e037a6722d24660aff2..c1628dabd5277007a162f3be2929d481c47be129 100644 --- a/Demo_uPy_WithC/gnd/gnd.c +++ b/Demo_uPy_WithC/gnd/gnd.c @@ -3,22 +3,28 @@ #include #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) diff --git a/Demo_uPy_WithC/gnd/gnd.h b/Demo_uPy_WithC/gnd/gnd.h index 20ad52107462f717751614dd4e8fe958a5fdf352..4472a1c6aa5759a9ef70f63d8cc23b6227f439dd 100644 --- a/Demo_uPy_WithC/gnd/gnd.h +++ b/Demo_uPy_WithC/gnd/gnd.h @@ -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 } diff --git a/Demo_uPy_WithC/payload/payload.py b/Demo_uPy_WithC/payload/payload.py index 7efc003feeb73043d85e50152153a6f1819bf935..38f502289388dd7e1b5e98911398d010d60a7cbd 100644 --- a/Demo_uPy_WithC/payload/payload.py +++ b/Demo_uPy_WithC/payload/payload.py @@ -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)