Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
ECSS Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AcubeSat-OBC
ECSS Services
Commits
8516a915
Unverified
Commit
8516a915
authored
6 years ago
by
Dimitrios Stoupis
Browse files
Options
Downloads
Patches
Plain Diff
Better compliance with the standard
parent
8eb0a44b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
inc/Services/MemMangService.hpp
+12
-5
12 additions, 5 deletions
inc/Services/MemMangService.hpp
src/Services/MemMangService.cpp
+12
-0
12 additions, 0 deletions
src/Services/MemMangService.cpp
src/main.cpp
+2
-2
2 additions, 2 deletions
src/main.cpp
with
26 additions
and
7 deletions
inc/Services/MemMangService.hpp
+
12
−
5
View file @
8516a915
...
...
@@ -3,13 +3,10 @@
#include
"Service.hpp"
#include
<memory>
#include
<iostream>
class
MemoryManagementService
:
public
Service
{
public:
MemoryManagementService
()
{
serviceType
=
6
;
}
// Memory type ID's
enum
MemoryID
{
RAM
=
0
,
...
...
@@ -17,6 +14,15 @@ public:
EXTERNAL
=
2
};
MemoryManagementService
();
/**
* Raw data memory management subservice class
*
* @details A class defining the raw data memory management subservice functions.
* As per the ECSS manual, each memory service has to have at most one raw memory
* data management subservice
*/
class
RawDataMemoryManagement
{
private:
/**
...
...
@@ -28,6 +34,7 @@ public:
MemoryManagementService
*
mainService
;
// Used to access main class's members
public:
explicit
RawDataMemoryManagement
(
MemoryManagementService
*
parent
);
/**
* TC[6,2] load raw values to memory
*
...
...
@@ -45,7 +52,7 @@ public:
* @param request: Provide the received message as a parameter
*/
void
dumpRawData
(
Message
&
request
);
};
}
rawDataMemorySubservice
;
};
#endif //ECSS_SERVICES_MEMMANGSERVICE_HPP
This diff is collapsed.
Click to expand it.
src/Services/MemMangService.cpp
+
12
−
0
View file @
8516a915
#include
"Services/MemMangService.hpp"
#include
<iostream>
// Define the constructors for the classes
MemoryManagementService
::
MemoryManagementService
()
:
rawDataMemorySubservice
(
this
)
{
serviceType
=
6
;
std
::
cout
<<
"Constructor creation debuffing MemMeang Service"
<<
std
::
endl
;
}
MemoryManagementService
::
RawDataMemoryManagement
::
RawDataMemoryManagement
(
MemoryManagementService
*
parent
)
:
mainService
(
parent
)
{}
// Function declarations for the raw data memory management subservice
void
MemoryManagementService
::
RawDataMemoryManagement
::
loadRawData
(
Message
&
request
)
{
}
...
...
@@ -12,6 +23,7 @@ void MemoryManagementService::RawDataMemoryManagement::dumpRawData(Message &requ
uint8_t
*
readData
=
nullptr
;
// Pointer to store the data read from the memory
uint16_t
readLength
=
0
;
// Data length to read (updated for each new iteration)
uint32_t
startAddress
=
0
;
// Start address for the memory read (updated in each new iteration)
MemoryManagementService
::
MemoryID
meId
;
// Read the packet's values
iterationCount
=
request
.
readUint8
();
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
2
−
2
View file @
8516a915
...
...
@@ -29,12 +29,12 @@ int main() {
testService
.
onBoardConnection
(
receivedPacket
);
// ST[06] testing
MemoryManagementService
::
RawDataMemoryManagement
memMangService
;
MemoryManagementService
memMangService
;
Message
rcvPack
=
Message
(
6
,
2
,
Message
::
TC
,
1
);
rcvPack
.
appendUint8
(
1
);
// Iteration count
rcvPack
.
appendUint32
(
0x45327845
);
// Start address
rcvPack
.
appendUint16
(
0
);
// Data read length
memMangService
.
dumpRawData
(
rcvPack
);
memMangService
.
rawDataMemorySubservice
.
dumpRawData
(
rcvPack
);
return
0
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment