Skip to content

Commit 35f10f1

Browse files
authored
Merge pull request #42 from fprime-community/devel
Merge devel into main for v3.5.0 release
2 parents bfd4c57 + 2c6674e commit 35f10f1

File tree

8 files changed

+37
-44
lines changed

8 files changed

+37
-44
lines changed

Components/MathReceiver/MathReceiver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ namespace MathModule {
9595
NATIVE_UINT_TYPE context
9696
)
9797
{
98-
U32 numMsgs = this->m_queue.getNumMsgs();
98+
U32 numMsgs = this->m_queue.getMessagesAvailable();
9999
for (U32 i = 0; i < numMsgs; ++i) {
100100
(void) this->doDispatch();
101101
}

MathDeployment/Main.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#include <getopt.h>
1212
// Used for printf functions
1313
#include <cstdlib>
14+
// Os Console
15+
#include <Os/Console.hpp>
1416

1517
/**
1618
* \brief print command line help message
@@ -49,7 +51,7 @@ int main(int argc, char* argv[]) {
4951
U32 port_number = 0;
5052
I32 option = 0;
5153
char* hostname = nullptr;
52-
54+
Os::Console::init();
5355
// Loop while reading the getopt supplied options
5456
while ((option = getopt(argc, argv, "hp:a:")) != -1) {
5557
switch (option) {

MathDeployment/Top/MathDeploymentPackets.xml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@
5252
<channel name="systemResources.NON_VOLATILE_TOTAL"/>
5353
<channel name="systemResources.NON_VOLATILE_FREE"/>
5454
</packet>
55-
56-
<packet name="SystemRes2" id="6" level="2">
57-
<channel name="systemResources.FRAMEWORK_VERSION"/>
58-
<channel name="systemResources.PROJECT_VERSION"/>
59-
</packet>
60-
55+
6156
<packet name="SystemRes3" id="7" level="2">
6257
<channel name="systemResources.CPU"/>
6358
<channel name="systemResources.CPU_00"/>

MathDeployment/Top/MathDeploymentTopology.cpp

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
// Necessary project-specified types
1111
#include <Fw/Types/MallocAllocator.hpp>
12-
#include <Os/Log.hpp>
1312
#include <Svc/FramingProtocol/FprimeProtocol.hpp>
1413

1514
// Used for 1Hz synthetic cycling
@@ -18,9 +17,6 @@
1817
// Allows easy reference to objects in FPP/autocoder required namespaces
1918
using namespace MathDeployment;
2019

21-
// Instantiate a system logger that will handle Fw::Logger::logMsg calls
22-
Os::Log logger;
23-
2420
// The reference topology uses a malloc-based allocator for components that need to allocate memory during the
2521
// initialization phase.
2622
Fw::MallocAllocator mallocator;
@@ -62,18 +58,18 @@ enum TopologyConstants {
6258

6359
// Ping entries are autocoded, however; this code is not properly exported. Thus, it is copied here.
6460
Svc::Health::PingEntry pingEntries[] = {
65-
{PingEntries::blockDrv::WARN, PingEntries::blockDrv::FATAL, "blockDrv"},
66-
{PingEntries::tlmSend::WARN, PingEntries::tlmSend::FATAL, "chanTlm"},
67-
{PingEntries::cmdDisp::WARN, PingEntries::cmdDisp::FATAL, "cmdDisp"},
68-
{PingEntries::cmdSeq::WARN, PingEntries::cmdSeq::FATAL, "cmdSeq"},
69-
{PingEntries::eventLogger::WARN, PingEntries::eventLogger::FATAL, "eventLogger"},
70-
{PingEntries::fileDownlink::WARN, PingEntries::fileDownlink::FATAL, "fileDownlink"},
71-
{PingEntries::fileManager::WARN, PingEntries::fileManager::FATAL, "fileManager"},
72-
{PingEntries::fileUplink::WARN, PingEntries::fileUplink::FATAL, "fileUplink"},
73-
{PingEntries::prmDb::WARN, PingEntries::prmDb::FATAL, "prmDb"},
74-
{PingEntries::rateGroup1::WARN, PingEntries::rateGroup1::FATAL, "rateGroup1"},
75-
{PingEntries::rateGroup2::WARN, PingEntries::rateGroup2::FATAL, "rateGroup2"},
76-
{PingEntries::rateGroup3::WARN, PingEntries::rateGroup3::FATAL, "rateGroup3"},
61+
{PingEntries::MathDeployment_blockDrv::WARN, PingEntries::MathDeployment_blockDrv::FATAL, "blockDrv"},
62+
{PingEntries::MathDeployment_tlmSend::WARN, PingEntries::MathDeployment_tlmSend::FATAL, "chanTlm"},
63+
{PingEntries::MathDeployment_cmdDisp::WARN, PingEntries::MathDeployment_cmdDisp::FATAL, "cmdDisp"},
64+
{PingEntries::MathDeployment_cmdSeq::WARN, PingEntries::MathDeployment_cmdSeq::FATAL, "cmdSeq"},
65+
{PingEntries::MathDeployment_eventLogger::WARN, PingEntries::MathDeployment_eventLogger::FATAL, "eventLogger"},
66+
{PingEntries::MathDeployment_fileDownlink::WARN, PingEntries::MathDeployment_fileDownlink::FATAL, "fileDownlink"},
67+
{PingEntries::MathDeployment_fileManager::WARN, PingEntries::MathDeployment_fileManager::FATAL, "fileManager"},
68+
{PingEntries::MathDeployment_fileUplink::WARN, PingEntries::MathDeployment_fileUplink::FATAL, "fileUplink"},
69+
{PingEntries::MathDeployment_prmDb::WARN, PingEntries::MathDeployment_prmDb::FATAL, "prmDb"},
70+
{PingEntries::MathDeployment_rateGroup1::WARN, PingEntries::MathDeployment_rateGroup1::FATAL, "rateGroup1"},
71+
{PingEntries::MathDeployment_rateGroup2::WARN, PingEntries::MathDeployment_rateGroup2::FATAL, "rateGroup2"},
72+
{PingEntries::MathDeployment_rateGroup3::WARN, PingEntries::MathDeployment_rateGroup3::FATAL, "rateGroup3"},
7773
};
7874

7975
/**
@@ -156,7 +152,7 @@ void setupTopology(const TopologyState& state) {
156152
Os::TaskString name("ReceiveTask");
157153
// Uplink is configured for receive so a socket task is started
158154
comDriver.configure(state.hostname, state.port);
159-
comDriver.startSocketTask(name, true, COMM_PRIORITY, Default::STACK_SIZE);
155+
comDriver.start(name, true, COMM_PRIORITY, Default::STACK_SIZE);
160156
}
161157
}
162158

@@ -172,7 +168,7 @@ void startSimulatedCycle(U32 milliseconds) {
172168
// Main loop
173169
while (cycling) {
174170
MathDeployment::blockDrv.callIsr();
175-
Os::Task::delay(milliseconds);
171+
Os::Task::delay(Fw::TimeInterval(milliseconds/1000, milliseconds % 1000));
176172

177173
cycleLock.lock();
178174
cycling = cycleFlag;
@@ -192,8 +188,8 @@ void teardownTopology(const TopologyState& state) {
192188
freeThreads(state);
193189

194190
// Other task clean-up.
195-
comDriver.stopSocketTask();
196-
(void)comDriver.joinSocketTask(nullptr);
191+
comDriver.stop();
192+
(void)comDriver.join();
197193

198194
// Resource deallocation
199195
cmdSeq.deallocateBuffer(mallocator);

MathDeployment/Top/MathDeploymentTopologyDefs.hpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,40 +48,40 @@ struct TopologyState {
4848
* ```
4949
*/
5050
namespace PingEntries {
51-
namespace blockDrv {
51+
namespace MathDeployment_blockDrv {
5252
enum { WARN = 3, FATAL = 5 };
5353
}
54-
namespace tlmSend {
54+
namespace MathDeployment_tlmSend {
5555
enum { WARN = 3, FATAL = 5 };
5656
}
57-
namespace cmdDisp {
57+
namespace MathDeployment_cmdDisp {
5858
enum { WARN = 3, FATAL = 5 };
5959
}
60-
namespace cmdSeq {
60+
namespace MathDeployment_cmdSeq {
6161
enum { WARN = 3, FATAL = 5 };
6262
}
63-
namespace eventLogger {
63+
namespace MathDeployment_eventLogger {
6464
enum { WARN = 3, FATAL = 5 };
6565
}
66-
namespace fileDownlink {
66+
namespace MathDeployment_fileDownlink {
6767
enum { WARN = 3, FATAL = 5 };
6868
}
69-
namespace fileManager {
69+
namespace MathDeployment_fileManager {
7070
enum { WARN = 3, FATAL = 5 };
7171
}
72-
namespace fileUplink {
72+
namespace MathDeployment_fileUplink {
7373
enum { WARN = 3, FATAL = 5 };
7474
}
75-
namespace prmDb {
75+
namespace MathDeployment_prmDb {
7676
enum { WARN = 3, FATAL = 5 };
7777
}
78-
namespace rateGroup1 {
78+
namespace MathDeployment_rateGroup1 {
7979
enum { WARN = 3, FATAL = 5 };
8080
}
81-
namespace rateGroup2 {
81+
namespace MathDeployment_rateGroup2 {
8282
enum { WARN = 3, FATAL = 5 };
8383
}
84-
namespace rateGroup3 {
84+
namespace MathDeployment_rateGroup3 {
8585
enum { WARN = 3, FATAL = 5 };
8686
}
8787
} // namespace PingEntries

MathDeployment/Top/topology.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ module MathDeployment {
8585

8686
comStub.comStatus -> framer.comStatusIn
8787
framer.comStatusOut -> comQueue.comStatusIn
88-
comStub.drvDataOut -> comDriver.send
88+
comStub.drvDataOut -> comDriver.$send
8989

9090
}
9191

docs/creating-components-4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void MathReceiver ::
8585
NATIVE_UINT_TYPE context
8686
)
8787
{
88-
U32 numMsgs = this->m_queue.getNumMsgs();
88+
U32 numMsgs = this->m_queue.getMessagesAvailable();
8989
for (U32 i = 0; i < numMsgs; ++i) {
9090
(void) this->doDispatch();
9191
}
@@ -166,4 +166,4 @@ fprime-util build
166166

167167
Congratulations, you have finished `MathReceiver`!
168168

169-
**Next:** [Developing Deployments](./developing-deployments.md)
169+
**Next:** [Developing Deployments](./developing-deployments.md)

fprime

Submodule fprime updated 1144 files

0 commit comments

Comments
 (0)