ADD: added orders and implemented order and moveorder and test for moveorder

This commit is contained in:
Henry Winkel
2023-02-17 16:00:41 +01:00
parent 00e28e66bd
commit 9fe27e254d
29 changed files with 5075 additions and 18 deletions

44
include/Orders/Order.hpp Normal file
View File

@@ -0,0 +1,44 @@
#pragma once
#include <WHISPER/Messages/Message.hpp>
#include <SimCore/Identifier.hpp>
namespace Orders
{
enum OrderType: uint8_t
{
HOLD_ORDER,
MOVE_ORDER,
ENGAGE_ORDER,
SYSTEM_STATE_ORDER
};
class Order
{
public:
Order(const SimCore::Identifier id,const SimCore::Identifier orderingEntity,const SimCore::Identifier orderedEntity,const WHISPER::SourceType srcType, const Orders::OrderType OrderType_);
const SimCore::Identifier getOrderID();
const SimCore::Identifier getOrderingEntity();
const SimCore::Identifier getOrderedEntity();
const WHISPER::SourceType srcType;
const Orders::OrderType getOrderType();
protected:
virtual WHISPER::Message buildMessage(SimCore::Identifier parentID) = 0;
private:
const SimCore::Identifier orderID_;
const SimCore::Identifier orderingEntity_;
const SimCore::Identifier orderedEntity_;
const Orders::OrderType OrderType_;
};
}