Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
ros-msgs-mbed-lib
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CdF
CdF 2020-2021
modules
libraries
communication
messages
ros-msgs-mbed-lib
Commits
c01d22c9
Commit
c01d22c9
authored
4 years ago
by
Compiler bot
Browse files
Options
Downloads
Patches
Plain Diff
autogen lib 2021-06-02T19:11:37+02:00
parent
41a72b73
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mccd_srvs/EnablePwm.h
+133
-0
133 additions, 0 deletions
mccd_srvs/EnablePwm.h
nav_msgs/GetPlan.h
+1
-1
1 addition, 1 deletion
nav_msgs/GetPlan.h
with
134 additions
and
1 deletion
mccd_srvs/EnablePwm.h
0 → 100644
+
133
−
0
View file @
c01d22c9
#ifndef _ROS_SERVICE_EnablePwm_h
#define _ROS_SERVICE_EnablePwm_h
#include
<stdint.h>
#include
<string.h>
#include
<stdlib.h>
#include
"ros/msg.h"
namespace
mccd_srvs
{
static
const
char
ENABLEPWM
[]
=
"mccd_srvs/EnablePwm"
;
class
EnablePwmRequest
:
public
ros
::
Msg
{
public:
typedef
bool
_enable_type
;
_enable_type
enable
;
typedef
uint8_t
_motor_type
;
_motor_type
motor
;
enum
{
LEFT
=
0
};
enum
{
RIGHT
=
1
};
enum
{
BOTH
=
1
};
EnablePwmRequest
()
:
enable
(
0
),
motor
(
0
)
{
}
virtual
int
serialize
(
unsigned
char
*
outbuffer
)
const
override
{
int
offset
=
0
;
union
{
bool
real
;
uint8_t
base
;
}
u_enable
;
u_enable
.
real
=
this
->
enable
;
*
(
outbuffer
+
offset
+
0
)
=
(
u_enable
.
base
>>
(
8
*
0
))
&
0xFF
;
offset
+=
sizeof
(
this
->
enable
);
*
(
outbuffer
+
offset
+
0
)
=
(
this
->
motor
>>
(
8
*
0
))
&
0xFF
;
offset
+=
sizeof
(
this
->
motor
);
return
offset
;
}
virtual
int
deserialize
(
unsigned
char
*
inbuffer
)
override
{
int
offset
=
0
;
union
{
bool
real
;
uint8_t
base
;
}
u_enable
;
u_enable
.
base
=
0
;
u_enable
.
base
|=
((
uint8_t
)
(
*
(
inbuffer
+
offset
+
0
)))
<<
(
8
*
0
);
this
->
enable
=
u_enable
.
real
;
offset
+=
sizeof
(
this
->
enable
);
this
->
motor
=
((
uint8_t
)
(
*
(
inbuffer
+
offset
)));
offset
+=
sizeof
(
this
->
motor
);
return
offset
;
}
virtual
const
char
*
getType
()
override
{
return
ENABLEPWM
;
};
virtual
const
char
*
getMD5
()
override
{
return
"a085f2523ab3e452c0d66f435a4326bd"
;
};
};
class
EnablePwmResponse
:
public
ros
::
Msg
{
public:
typedef
bool
_success_type
;
_success_type
success
;
typedef
const
char
*
_message_type
;
_message_type
message
;
EnablePwmResponse
()
:
success
(
0
),
message
(
""
)
{
}
virtual
int
serialize
(
unsigned
char
*
outbuffer
)
const
override
{
int
offset
=
0
;
union
{
bool
real
;
uint8_t
base
;
}
u_success
;
u_success
.
real
=
this
->
success
;
*
(
outbuffer
+
offset
+
0
)
=
(
u_success
.
base
>>
(
8
*
0
))
&
0xFF
;
offset
+=
sizeof
(
this
->
success
);
uint32_t
length_message
=
strlen
(
this
->
message
);
varToArr
(
outbuffer
+
offset
,
length_message
);
offset
+=
4
;
memcpy
(
outbuffer
+
offset
,
this
->
message
,
length_message
);
offset
+=
length_message
;
return
offset
;
}
virtual
int
deserialize
(
unsigned
char
*
inbuffer
)
override
{
int
offset
=
0
;
union
{
bool
real
;
uint8_t
base
;
}
u_success
;
u_success
.
base
=
0
;
u_success
.
base
|=
((
uint8_t
)
(
*
(
inbuffer
+
offset
+
0
)))
<<
(
8
*
0
);
this
->
success
=
u_success
.
real
;
offset
+=
sizeof
(
this
->
success
);
uint32_t
length_message
;
arrToVar
(
length_message
,
(
inbuffer
+
offset
));
offset
+=
4
;
for
(
unsigned
int
k
=
offset
;
k
<
offset
+
length_message
;
++
k
){
inbuffer
[
k
-
1
]
=
inbuffer
[
k
];
}
inbuffer
[
offset
+
length_message
-
1
]
=
0
;
this
->
message
=
(
char
*
)(
inbuffer
+
offset
-
1
);
offset
+=
length_message
;
return
offset
;
}
virtual
const
char
*
getType
()
override
{
return
ENABLEPWM
;
};
virtual
const
char
*
getMD5
()
override
{
return
"937c9679a518e3a18d831e57125ea522"
;
};
};
class
EnablePwm
{
public:
typedef
EnablePwmRequest
Request
;
typedef
EnablePwmResponse
Response
;
};
}
#endif
This diff is collapsed.
Click to expand it.
nav_msgs/GetPlan.h
+
1
−
1
View file @
c01d22c9
...
...
@@ -4,8 +4,8 @@
#include
<string.h>
#include
<stdlib.h>
#include
"ros/msg.h"
#include
"geometry_msgs/PoseStamped.h"
#include
"nav_msgs/Path.h"
#include
"geometry_msgs/PoseStamped.h"
namespace
nav_msgs
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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