Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
robotran
mbsysc
Commits
65256214
Commit
65256214
authored
Apr 15, 2016
by
Nicolas Docquier
Browse files
Some modif for enabling compiling (user functions non available)
parent
de30016f
Changes
7
Hide whitespace changes
Inline
Side-by-side
MBprojects/PendulumSpringC/workR/CMakeLists.txt
View file @
65256214
...
...
@@ -112,7 +112,7 @@ init_src()
increment_src
(
${
PROJECT_SOURCE_DIR
}
/src
)
#increment_src( ${PROJECT_SOURCE_DIR}/../userfctR )
add_subdirectory
(
${
PROJECT_SOURCE_DIR
}
/../userfctR
${
CMAKE_CURRENT_BINARY_DIR
}
/userfctR
)
#
add_subdirectory( ${PROJECT_SOURCE_DIR}/../userfctR ${CMAKE_CURRENT_BINARY_DIR}/userfctR)
if
(
NOT FLAG_SEPARATE_SYMBOLIC
)
#increment_src( ${PROJECT_SOURCE_DIR}/../symbolicR )
...
...
@@ -183,10 +183,12 @@ else ( )
endif
(
)
if
(
UNIX
)
target_link_libraries
(
${
Executable
}
dl
)
endif
(
)
endif
(
)
if
(
UNIX
)
target_link_libraries
(
${
Executable
}
dl
)
endif
(
)
# separate symbolic files compilation
...
...
MBprojects/PendulumSpringC/workR/src/main.c
View file @
65256214
...
...
@@ -115,7 +115,7 @@ void mbs_get_project_functions(MbsData *mbs_data)
#endif
// user function pointers
mbs_data
->
user_JointForces
=
user_JointForces
;
/*
mbs_data->user_JointForces = user_JointForces;
mbs_data->user_init = user_init;
mbs_data->user_loop = user_loop;
mbs_data->user_finish = user_finish;
...
...
@@ -139,7 +139,7 @@ void mbs_get_project_functions(MbsData *mbs_data)
mbs_data->user_realtime_visu = user_realtime_visu;
#endif
#endif
*/
// symbolic function pointers
//mbs_data->mbs_link = mbs_link;
//mbs_data->mbs_link3D = mbs_link3D;
...
...
MBsysC/mbs_common/CMakeLists.txt
View file @
65256214
...
...
@@ -48,7 +48,9 @@ add_subdirectory ( mbs_struct/ ${CMAKE_CURRENT_BINARY_DIR}/mbs_struct/ )
add_subdirectory
(
mbs_utilities/
${
CMAKE_CURRENT_BINARY_DIR
}
/mbs_utilities/
)
add_subdirectory
(
mbs_load_xml/
${
CMAKE_CURRENT_BINARY_DIR
}
/mbs_load_xml/
)
add_subdirectory
(
mbs_module/
${
CMAKE_CURRENT_BINARY_DIR
}
/mbs_module/
)
add_subdirectory
(
mbs_realtime/
${
CMAKE_CURRENT_BINARY_DIR
}
/mbs_realtime/
)
#if(FLAG_REAL_TIME)
add_subdirectory
(
mbs_realtime/
${
CMAKE_CURRENT_BINARY_DIR
}
/mbs_realtime/
)
#endif()
# add parent scope if needed
get_directory_property
(
hasParent PARENT_DIRECTORY
)
...
...
MBsysC/mbs_common/mbs_load_xml/CMakeLists.txt
View file @
65256214
...
...
@@ -29,7 +29,7 @@ if(FLAG_SHARED_LIB)
include
(
GenerateExportHeader
)
add_library
(
MBsysC_loadXML SHARED
${
SOURCE_FILES
}
${
INCLUDE_DIR
}
)
target_link_libraries
(
MBsysC_loadXML
${
LIBXML2_LIBRARIES
}
MBsysC_utilities
)
target_link_libraries
(
MBsysC_loadXML Project_userfct
)
#
target_link_libraries(MBsysC_loadXML Project_userfct )
GENERATE_EXPORT_HEADER
(
MBsysC_loadXML
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
install
(
TARGETS MBsysC_loadXML DESTINATION
${
CMAKE_INSTALL_PREFIX
}
)
...
...
MBsysC/mbs_common/mbs_load_xml/mbs_load_xml.c
View file @
65256214
...
...
@@ -365,8 +365,8 @@ MbsData* MDS_create_MBSdataStruct(MDS_gen_strct* mds_gen_strct)
// user_model
if
(
s
->
Nuser_model
)
{
s
->
user_model
=
mbs_new_user_model
();
mbs_load_user_model_xml
(
mds_gen_strct
,
s
->
user_model
);
s
->
user_model
=
s
->
mbs_new_user_model
();
s
->
mbs_load_user_model_xml
(
mds_gen_strct
,
s
->
user_model
);
}
else
{
...
...
@@ -400,7 +400,7 @@ MbsData* MDS_create_MBSdataStruct(MDS_gen_strct* mds_gen_strct)
s
->
ux0
=
NULL
;
}
s
->
user_IO
=
mbs_new_user_IO
(
s
);
s
->
user_IO
=
s
->
mbs_new_user_IO
(
s
);
#endif
...
...
@@ -525,9 +525,9 @@ void mbs_delete_data(MbsData *s)
// User models
if
(
s
->
Nuser_model
)
{
mbs_delete_user_model
(
s
->
user_model
);
s
->
mbs_delete_user_model
(
s
->
user_model
);
}
mbs_delete_user_IO
(
s
->
user_IO
);
s
->
mbs_delete_user_IO
(
s
->
user_IO
);
#endif
// Other
...
...
MBsysC/mbs_common/mbs_struct/mbs_data.h
View file @
65256214
...
...
@@ -131,6 +131,12 @@ struct MbsData
user_cons_jdqd_ptr
user_cons_jdqd
;
user_LinkForces_ptr
user_LinkForces
;
mbs_new_user_IO_ptr
mbs_new_user_IO
;
mbs_new_user_model_ptr
mbs_new_user_model
;
mbs_delete_user_model_ptr
mbs_delete_user_model
;
mbs_delete_user_IO_ptr
mbs_delete_user_IO
;
mbs_load_user_model_xml_ptr
mbs_load_user_model_xml
;
#ifdef REAL_TIME
user_realtime_options_ptr
user_realtime_options
;
...
...
MBsysC/mbs_common/mbs_struct/mbs_project_fct_ptr.h
View file @
65256214
...
...
@@ -22,6 +22,18 @@ typedef void (*user_cons_jdqd_ptr)(double *jdqd, MbsData *s, double tsim);
typedef
double
(
*
user_LinkForces_ptr
)(
double
Z
,
double
Zd
,
MbsData
*
mbs_data
,
double
tsim
,
int
ilnk
);
typedef
double
(
*
user_LinkForces_ptr
)(
double
Z
,
double
Zd
,
MbsData
*
mbs_data
,
double
tsim
,
int
ilnk
);
typedef
struct
MDS_gen_strct
MDS_gen_strct
;
typedef
UserIO
*
(
*
mbs_new_user_IO_ptr
)();
typedef
UserModel
*
(
*
mbs_new_user_model_ptr
)();
typedef
void
(
*
mbs_delete_user_model_ptr
)(
UserModel
*
ums
);
typedef
void
(
*
mbs_delete_user_IO_ptr
)(
UserIO
*
uvs
);
typedef
void
(
*
mbs_load_user_model_xml_ptr
)(
MDS_gen_strct
*
gen
,
UserModel
*
ums
);
#ifdef REAL_TIME
typedef
struct
Realtime_option
Realtime_option
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment