This repository has been archived on 2021-11-24. You can view files and clone it, but cannot push or open issues or pull requests.
fsfw_example_public/mission/utility/PusPacketCreator.cpp

20 lines
782 B
C++

#include <fsfw/tmtcpacket/pus/TcPacketBase.h>
#include <fsfw/tmtcpacket/pus/TmPacketBase.h>
#include <fsfw/globalfunctions/arrayprinter.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <mission/utility/PusPacketCreator.h>
void PusPacketCreator::createPusPacketAndPrint() {
// TODO: use TC packet stored here instead..
// uint8_t packetStore[TcPacketBase::TC_PACKET_MIN_SIZE];
// TcPacketBase packet(packetStore);
// packet.initSpacePacketHeader(true, true, 0x73, 25);
// packet.initializeTcPacket(0x73, 25, 0, 17, 1);
// packet.setPacketDataLength(sizeof(PUSTcDataFieldHeader)
// + TcPacketBase::CRC_SIZE-1);
// packet.setErrorControl();
// sif::info << "PUS packet created: " << std::endl;
// arrayprinter::print(packet.getWholeData(), packet.getFullSize());
}