release 0.0.1 of fsfw added as a core
This commit is contained in:
fsfw
.gitignore.gitmodulesFSFWVersion.hLICENSENOTICEREADME.md
action
ActionHelper.cppActionHelper.hActionMessage.cppActionMessage.hCommandActionHelper.cppCommandActionHelper.hCommandsActionsIF.hHasActionsIF.hSimpleActionHelper.cppSimpleActionHelper.h
container
ArrayList.hBinaryTree.hDynamicFIFO.hFIFO.hFIFOBase.hFIFOBase.tppFixedArrayList.hFixedMap.hFixedOrderedMultimap.hFixedOrderedMultimap.tppHybridIterator.hIndexedRingMemoryArray.hPlacementFactory.hRingBufferBase.hSharedRingBuffer.cppSharedRingBuffer.hSimpleRingBuffer.cppSimpleRingBuffer.hSinglyLinkedList.hgroup.h
contrib
controller
coordinates
CoordinateTransformations.cppCoordinateTransformations.hJgm3Model.hSgp4Propagator.cppSgp4Propagator.h
datalinklayer
BCFrame.hCCSDSReturnValuesIF.hClcw.cppClcw.hClcwIF.hDataLinkLayer.cppDataLinkLayer.hFarm1StateIF.hFarm1StateLockout.cppFarm1StateLockout.hFarm1StateOpen.cppFarm1StateOpen.hFarm1StateWait.cppFarm1StateWait.hMapPacketExtraction.cppMapPacketExtraction.hMapPacketExtractionIF.hTcTransferFrame.cppTcTransferFrame.hTcTransferFrameLocal.cppTcTransferFrameLocal.hVirtualChannelReception.cppVirtualChannelReception.hVirtualChannelReceptionIF.h
datapool
ControllerSet.cppControllerSet.hDataPool.cppDataPool.hDataPoolAdmin.cppDataPoolAdmin.hDataPoolParameterWrapper.cppDataPoolParameterWrapper.hDataSet.cppDataSet.hDataSetIF.hHkSwitchHelper.cppHkSwitchHelper.hPIDReader.hPIDReaderList.hPoolEntry.cppPoolEntry.hPoolEntryIF.hPoolRawAccess.cppPoolRawAccess.hPoolVarList.hPoolVariable.hPoolVariableIF.hPoolVector.h
defaultcfg
README.md
fsfwconfig
FSFWConfig.hOBSWConfig.hOBSWVersion.h
devices
events
fsfwconfig.mkipc
objects
pollingsequence
returnvalues
tmtc
devicehandlers
AcceptsDeviceResponsesIF.hAssemblyBase.cppAssemblyBase.hChildHandlerBase.cppChildHandlerBase.hChildHandlerFDIR.cppChildHandlerFDIR.hCookieIF.hDeviceCommunicationIF.hDeviceHandlerBase.cppDeviceHandlerBase.hDeviceHandlerFailureIsolation.cppDeviceHandlerFailureIsolation.hDeviceHandlerIF.hDeviceHandlerMessage.cppDeviceHandlerMessage.hDeviceTmReportingWrapper.cppDeviceTmReportingWrapper.hHealthDevice.cppHealthDevice.h
events
Event.cppEvent.hEventManager.cppEventManager.hEventManagerIF.hEventMessage.cppEventMessage.hEventReportingProxyIF.h
eventmatching
EventIdRangeMatcher.cppEventIdRangeMatcher.hEventMatchTree.cppEventMatchTree.hEventRangeMatcherBase.hReporterRangeMatcher.cppReporterRangeMatcher.hSeverityRangeMatcher.cppSeverityRangeMatcher.heventmatching.h
fwSubsystemIdRanges.hfdir
ConfirmsFailuresIF.hEventCorrelation.cppEventCorrelation.hFailureIsolationBase.cppFailureIsolationBase.hFaultCounter.cppFaultCounter.h
fsfw.mkglobalfunctions
AsciiConverter.cppAsciiConverter.hCRC.cppCRC.hDleEncoder.cppDleEncoder.hPeriodicOperationDivider.cppPeriodicOperationDivider.hType.cppType.harrayprinter.cpparrayprinter.hconstants.h
matching
math
sign.htimevalOperations.cpptimevalOperations.hhealth
HasHealthIF.hHealthHelper.cppHealthHelper.hHealthMessage.cppHealthMessage.hHealthTable.cppHealthTable.hHealthTableIF.hManagesHealthIF.h
internalError
ipc
CommandMessage.cppCommandMessage.hCommandMessageCleaner.cppCommandMessageCleaner.hCommandMessageIF.hFwMessageTypes.hMessageQueueIF.hMessageQueueMessage.cppMessageQueueMessage.hMessageQueueMessageIF.hMessageQueueSenderIF.hMutexFactory.hMutexHelper.hMutexIF.hQueueFactory.hmessageQueueDefinitions.h
logo
memory
AcceptsMemoryMessagesIF.hHasMemoryIF.hMemoryHelper.cppMemoryHelper.hMemoryMessage.cppMemoryMessage.h
modes
monitoring
AbsLimitMonitor.hHasMonitorsIF.hLimitMonitor.hLimitViolationReporter.cppLimitViolationReporter.hMonitorBase.hMonitorReporter.hMonitoringIF.hMonitoringMessage.cppMonitoringMessage.hMonitoringMessageContent.hReceivesMonitoringReportsIF.hTriplexMonitor.hTwoValueLimitMonitor.h
objectmanager
ObjectManager.cppObjectManager.hObjectManagerIF.hSystemObject.cppSystemObject.hSystemObjectIF.hframeworkObjects.h
osal
Endiness.h
FreeRTOS
BinSemaphUsingTask.cppBinSemaphUsingTask.hBinarySemaphore.cppBinarySemaphore.hClock.cppCountingSemaphUsingTask.cppCountingSemaphUsingTask.hCountingSemaphore.cppCountingSemaphore.hFixedTimeslotTask.cppFixedTimeslotTask.hFreeRTOSTaskIF.hMessageQueue.cppMessageQueue.hMutex.cppMutex.hMutexFactory.cppPeriodicTask.cppPeriodicTask.hQueueFactory.cppREADME.mdSemaphoreFactory.cppTaskFactory.cppTaskManagement.cppTaskManagement.hTimekeeper.cppTimekeeper.h
InternalErrorCodes.hhost
Clock.cppFixedTimeslotTask.cppFixedTimeslotTask.hMessageQueue.cppMessageQueue.hMutex.cppMutex.hMutexFactory.cppPeriodicTask.cppPeriodicTask.hQueueFactory.cppQueueMapManager.cppQueueMapManager.hSemaphoreFactory.cppTaskFactory.cpp
linux
BinarySemaphore.cppBinarySemaphore.hClock.cppCountingSemaphore.cppCountingSemaphore.hFixedTimeslotTask.cppFixedTimeslotTask.hInternalErrorCodes.cppMessageQueue.cppMessageQueue.hMutex.cppMutex.hMutexFactory.cppPeriodicPosixTask.cppPeriodicPosixTask.hPosixThread.cppPosixThread.hQueueFactory.cppSemaphoreFactory.cppTaskFactory.cppTcUnixUdpPollingTask.cppTcUnixUdpPollingTask.hTimer.cppTimer.hTmTcUnixUdpBridge.cppTmTcUnixUdpBridge.h
rtems
Clock.cppCpuUsage.cppCpuUsage.hInitTask.cppInitTask.hInternalErrorCodes.cppMessageQueue.cppMessageQueue.hMultiObjectTask.cppMultiObjectTask.hMutex.cppMutex.hMutexFactory.cppPollingTask.cppPollingTask.hQueueFactory.cppRtemsBasic.cppRtemsBasic.hTaskBase.cppTaskBase.hTaskFactory.cpp
windows
parameters
HasParametersIF.hParameterHelper.cppParameterHelper.hParameterMessage.cppParameterMessage.hParameterWrapper.cppParameterWrapper.hReceivesParameterMessagesIF.h
power
Fuse.cppFuse.hPowerComponent.cppPowerComponent.hPowerComponentIF.hPowerSensor.cppPowerSensor.hPowerSwitchIF.hPowerSwitcher.cppPowerSwitcher.h
pus
CService200ModeCommanding.cppCService200ModeCommanding.hService17Test.cppService17Test.hService1TelecommandVerification.cppService1TelecommandVerification.hService2DeviceAccess.cppService2DeviceAccess.hService5EventReporting.cppService5EventReporting.hService8FunctionManagement.cppService8FunctionManagement.hService9TimeManagement.cppService9TimeManagement.h
servicepackets
returnvalues
rmap
RMAP.cppRMAP.hRMAPChannelIF.hRMAPCookie.cppRMAPCookie.hRmapDeviceCommunicationIF.cppRmapDeviceCommunicationIF.hrmapStructs.h
serialize
EndianConverter.hSerialArrayListAdapter.hSerialBufferAdapter.cppSerialBufferAdapter.hSerialFixedArrayListAdapter.hSerialLinkedListAdapter.hSerializeAdapter.hSerializeElement.hSerializeIF.h
serviceinterface
ServiceInterfaceBuffer.cppServiceInterfaceBuffer.hServiceInterfaceStream.cppServiceInterfaceStream.h
storagemanager
ConstStorageAccessor.cppConstStorageAccessor.hLocalPool.hLocalPool.tppPoolManager.hPoolManager.tppStorageAccessor.cppStorageAccessor.hStorageManagerIF.hstoreAddress.h
subsystem
tasks
ExecutableObjectIF.hFixedSequenceSlot.cppFixedSequenceSlot.hFixedSlotSequence.cppFixedSlotSequence.hFixedTimeslotTaskIF.hPeriodicTaskIF.hSemaphoreFactory.hSemaphoreIF.hTaskFactory.hTypedef.h
tcdistribution
CCSDSDistributor.cppCCSDSDistributor.hCCSDSDistributorIF.hPUSDistributor.cppPUSDistributor.hPUSDistributorIF.hTcDistributor.cppTcDistributor.hTcPacketCheck.cppTcPacketCheck.h
thermal
AbstractTemperatureSensor.cppAbstractTemperatureSensor.hCoreComponent.cppCoreComponent.hHeater.cppHeater.hRedundantHeater.cppRedundantHeater.hTemperatureSensor.hThermalComponent.cppThermalComponent.hThermalComponentIF.hThermalModule.cppThermalModule.hThermalModuleIF.hThermalMonitor.cppThermalMonitor.htcsDefinitions.h
timemanager
CCSDSTime.cppCCSDSTime.hClock.hCountdown.cppCountdown.hReceivesTimeInfoIF.hStopwatch.cppStopwatch.hTimeMessage.cppTimeMessage.hTimeStamper.cppTimeStamper.hTimeStamperIF.h
tmstorage
tmtcpacket
tmtcservices
AcceptsTelecommandsIF.hAcceptsTelemetryIF.hAcceptsVerifyMessageIF.hCommandingServiceBase.cppCommandingServiceBase.hPusServiceBase.cppPusServiceBase.hPusVerificationReport.cppPusVerificationReport.hServiceTypes.hSourceSequenceCounter.hTmTcBridge.cppTmTcBridge.hTmTcMessage.cppTmTcMessage.hVerificationCodes.hVerificationReporter.cppVerificationReporter.h
unittest
README.md
core
internal
InternalUnitTester.cppInternalUnitTester.hUnittDefinitions.cppUnittDefinitions.hinternal.mk
lcov.shosal
serialize
testcfg
FSFWConfig.hMakefile-FSFW-TestsTestsConfig.h
cdatapool
devices
events
ipc
objects
pollingsequence
returnvalues
testcfg.mktmtc
tests
action
container
RingBufferTest.cppTestArrayList.cppTestDynamicFifo.cppTestFifo.cppTestFixedArrayList.cppTestFixedMap.cppTestFixedOrderedMultimap.cppTestPlacementFactory.cpp
osal
serialize
storagemanager
tests.mktesttemplate
unlockRealtime.sh
52
fsfw/unittest/internal/osal/IntTestMq.cpp
Normal file
52
fsfw/unittest/internal/osal/IntTestMq.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
#include <fsfw/ipc/MessageQueueIF.h>
|
||||
#include <fsfw/ipc/QueueFactory.h>
|
||||
#include <fsfw/unittest/internal/osal/IntTestMq.h>
|
||||
#include <fsfw/unittest/internal/UnittDefinitions.h>
|
||||
|
||||
#include <array>
|
||||
|
||||
using retval = HasReturnvaluesIF;
|
||||
|
||||
void testmq::testMq() {
|
||||
std::string id = "[testMq]";
|
||||
MessageQueueIF* testSenderMq =
|
||||
QueueFactory::instance()->createMessageQueue(1);
|
||||
MessageQueueId_t testSenderMqId = testSenderMq->getId();
|
||||
|
||||
MessageQueueIF* testReceiverMq =
|
||||
QueueFactory::instance()->createMessageQueue(1);
|
||||
MessageQueueId_t testReceiverMqId = testReceiverMq->getId();
|
||||
std::array<uint8_t, 20> testData { 0 };
|
||||
testData[0] = 42;
|
||||
MessageQueueMessage testMessage(testData.data(), 1);
|
||||
testSenderMq->setDefaultDestination(testReceiverMqId);
|
||||
|
||||
|
||||
auto result = testSenderMq->sendMessage(testReceiverMqId, &testMessage);
|
||||
if(result != retval::RETURN_OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
MessageQueueMessage recvMessage;
|
||||
result = testReceiverMq->receiveMessage(&recvMessage);
|
||||
if(result != retval::RETURN_OK or recvMessage.getData()[0] != 42) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
|
||||
result = testSenderMq->sendMessage(testReceiverMqId, &testMessage);
|
||||
if(result != retval::RETURN_OK) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
MessageQueueId_t senderId = 0;
|
||||
result = testReceiverMq->receiveMessage(&recvMessage,&senderId);
|
||||
if(result != retval::RETURN_OK or recvMessage.getData()[0] != 42) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
if(senderId != testSenderMqId) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
senderId = testReceiverMq->getLastPartner();
|
||||
if(senderId != testSenderMqId) {
|
||||
unitt::put_error(id);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user