-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestInterface.cxx
43 lines (32 loc) · 961 Bytes
/
TestInterface.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Catch2 Test
#include <catch2/catch.hpp>
#include <unistd.h>
#include <iostream>
#include <future>
#include "SimulinkIPC.h"
TEST_CASE("Swarm Mission Control Interface", "[SwarmMission]")
{
SimulinkIPC myIPC;
// myIPC.rlseAlgStart();
auto _ = std::async(std::launch::async, [&]()
{while (true)
{
FCUCMD FlightCMD;
myIPC.rcvFlightCMD(FlightCMD);
// IndividualUAVCmd CmdFB;
// myIPC.rcvMissionCmdFB(CmdFB);
TaskStatus TaskState{};
myIPC.rcvTaskStatus(TaskState);
RealUAVStateBus FlightState{};
myIPC.SndFlightState(FlightState);
VectorSpeed VecSpd{};
myIPC.sndVecSpd(VecSpd);
uint8_T FlightMode{};
myIPC.sndFlightMode(FlightMode);
RealUAVStateBus NbrState{};
myIPC.SetNbrUAVState(NbrState);
} });
IndividualUAVCmd myCMD{};
myIPC.sndMissionCmd(myCMD);
myIPC.rcvMissionCmdFB(myCMD);
}