Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Smart Grid Modell
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Armin Co
Smart Grid Modell
Commits
b0cb49e6
Commit
b0cb49e6
authored
4 years ago
by
Armin Co
Browse files
Options
Downloads
Patches
Plain Diff
Socket debugging
Read error an RPI (bad address)
parent
f059ae1f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/com/Socket.cpp
+1
-0
1 addition, 0 deletions
src/com/Socket.cpp
src/manual_control/sample_client.cpp
+1
-1
1 addition, 1 deletion
src/manual_control/sample_client.cpp
src/smg_server.cpp
+4
-4
4 additions, 4 deletions
src/smg_server.cpp
with
6 additions
and
5 deletions
src/com/Socket.cpp
+
1
−
0
View file @
b0cb49e6
...
...
@@ -73,6 +73,7 @@ void Socket::close()
}
}
}
spdlog
::
debug
(
"socket closed"
);
m_fd
=
-
1
;
}
...
...
This diff is collapsed.
Click to expand it.
src/manual_control/sample_client.cpp
+
1
−
1
View file @
b0cb49e6
...
...
@@ -9,7 +9,7 @@
int
main
(
int
argc
,
char
**
argv
)
{
spdlog
::
set_level
(
spdlog
::
level
::
info
);
spdlog
::
set_level
(
spdlog
::
level
::
debug
);
if
(
argc
!=
3
)
{
...
...
This diff is collapsed.
Click to expand it.
src/smg_server.cpp
+
4
−
4
View file @
b0cb49e6
...
...
@@ -62,10 +62,10 @@ constexpr double power_wind[] {
1612
,
1890
,
2000
,
2100
};
class
Day
class
ModelState
{
public:
Day
()
ModelState
()
{
std
::
srand
(
std
::
time
(
nullptr
));
}
...
...
@@ -168,7 +168,7 @@ void run_sim()
modell
.
put_modell_into_state
(
SmartGridModell
::
DefaultState
::
Off
);
Day
day
{};
ModelState
day
{};
bool
active
{
true
};
while
(
active
)
...
...
@@ -190,7 +190,7 @@ void test_x64()
ServerSocket
server
(
8080
);
bool
finished
{
false
};
Day
day
{};
ModelState
day
{};
while
(
!
finished
)
{
DataSocket
accept
=
server
.
accept
();
...
...
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