Commit 86c5d81f authored by Daniel Tuulik's avatar Daniel Tuulik

Update C mains for QGen simulation tests

parent 222e0a30
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
void orchestrator_RI_telemetry(asn1SccMyEnum * param){}
int main()
{
printf("[C Code] Running test\n");
orchestrator_initStates();
return 0;
}
......@@ -3,7 +3,7 @@
#include "dataview-uniq.h"
extern void expressions_initStates (void);
extern void expressions_run (void);
extern void expressions_PI_run (void);
void expressions_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
if (!*res) {
......@@ -15,7 +15,7 @@ void expressions_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
int main() {
expressions_initStates();
expressions_run();
expressions_PI_run();
return 0;
}
void orchestrator_RI_telemetry(void *_){}
int main()
{
printf("[C Code] Running test\n");
orchestrator_initStates();
return 0;
}
......@@ -18,8 +18,8 @@ int main()
{
adainit();
challenge_initStates();
challenge_run();
challenge_go_off();
challenge_PI_run();
challenge_PI_go_off();
return 0;
}
......
int main()
{
// CInit();
challenge_initStates();
challenge_PI_run();
challenge_PI_go_off();
return 0;
}
void telemetry(void *_){}
void orchestrator_RI_telemetry(void *_){}
int main()
{
printf("[C Code] Running test\n");
CInit();
runTransition(0);
orchestrator_initStates();
return 0;
}
void orchestrator_RI_telemetry(void *_){}
int main()
{
printf("[C Code] Running test\n");
orchestrator_initStates();
return 0;
}
#include "dataview-uniq.h"
void operators_RI_assert(asn1SccBoolean *res, asn1SccCharString *msg) {
if (!*res) {
printf("%.*s\n", (int)msg->nCount, msg->arr);
exit(1);
}
}
int main() {
operators_initStates();
operators_PI_run();
return 0;
}
int main()
{
og_initStates();
return 0;
}
#include <stdio.h>
#include "dataview-uniq.h"
void myfunction_RI_result_data(long long *val)
{
printf("[C] result_data: %lld\n", *val);
}
int main()
{
asn1SccT_Int32 test = 5;
printf("[C Code] Running test\n");
myfunction_initStates();
myfunction_PI_start_something(&test);
return 0;
}
#include <math.h>
#include <stdio.h>
/* Provide code called by the Ada state machine as external procedure */
void challenge_RI_pow(long long *a, long long *b, long long *res)
{
*res = (long long)pow((double)*a, (double)*b);
}
int main()
{
challenge_initStates();
challenge_PI_run();
challenge_PI_run();
//printf("Internal state: %lld\n", l_result);
challenge_PI_any_one();
challenge_PI_run();
return 0;
}
int main() {
og_initStates();
og_run();
return 0;
}
......
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
void orchestrator_RI_telemetry(void *_){}
void orchestrator_RI_S_SET_GNC_LV_SIM_CONTEXT_FOR_NEXT_MAJOR_CYCLE(void *_){}
void orchestrator_RI_Scheduler(void *_){}
void orchestrator_RI_VESAT_Simulation_Step(void *_){}
void plot(void *_) {}
void orchestrator_RI_S_JUMP_TO_NEXT_MAJOR_CYCLE() {}
void orchestrator_RI_S_GET_GNC_LV_SIM_INPUTS_FOR_NEXT_MAJOR_CYCLE(void *_){}
int main()
{
printf("[C Code] Running test\n");
orchestrator_initStates();
return 0;
}
#include <signal.h>
#include "dataview-uniq.h"
void myfunction_RI_result_data(long long *val)
{
printf("[C] result_data: %lld\n", *val);
}
volatile sig_atomic_t keep_going = 1;
void timer_expired()
{
myfunction_PI_myTimer();
keep_going = 0;
}
void SET_mytimer(asn1SccT_Int32 *val)
{
printf("[C] SET MyTimer: %d\n", *val);
alarm(((int)*val) / 1000);
}
int main()
{
asn1SccT_Int32 test = 5;
signal(SIGALRM, timer_expired);
myfunction_initStates();
printf("[C Code] Running test\n");
myfunction_PI_start_something(&test);
while (keep_going);
return 0;
}
#include <math.h>
#include <stdio.h>
#include "dataview-uniq.h"
void orchestrator_RI_VESAT_one_step(asn1SccT_GNC_LV_SIM_INPUTS *inp)
{
printf("[C Code] Received T_GNC_LV_SIM_INPUTS\n");
}
int main()
{
printf("[C Code] Running test\n");
orchestrator_initStates();
return 0;
}
Markdown is supported
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