Robotran C Documentation
Classes | Enumerations | Functions
mbs_loader.h File Reference
#include "mbs_binder_public.h"
#include "mbs_data.h"

Go to the source code of this file.

Classes

struct  MbsLoadOptions
 
struct  MbsLoader
 

Enumerations

enum  { LOAD_NONE, LOAD_SYMBOLIC, LOAD_ALL }
 Enumeration of the possible project function to load. More...
 

Functions

MbsDatambs_new_data ()
 Allocate an MbsData structure with default field values (NULL, 0). More...
 
MbsDatambs_load (const char *mbs_filename, const char *build_name)
 Load the data from the given *.mbs file (data in the xml format). More...
 
MbsDatambs_load_with_loader (const char *mbs_filename, const char *build_path, MbsLoader *mbs_loader)
 Load the data from the given MbsInfos. More...
 
MbsLoadOptionsmbs_new_load_options ()
 Create a new structure with options for the loading. More...
 
void mbs_delete_load_options (MbsLoadOptions *opts)
 Free the memory associated to the given MbsLoadOptions. More...
 
MbsLoadermbs_new_loader ()
 Create a new structure loader used for the loading with options. More...
 
void mbs_delete_loader (MbsLoader *loader)
 Free the memory associated to the given MbsLoader. More...
 
void mbs_set_symb_fun_null (MbsData *s)
 Set the pointer to project symbolic functions to NULL. More...
 
void mbs_set_user_fun_null (MbsData *s)
 Set the pointer to project user functions to NULL. More...
 
void mbs_delete_data (MbsData *s)
 Free the memory used by the given MbsData structure. More...
 
void mbs_load_user_model (MbsInfos *mbs_infos, UserModel *ums)
 Load the user model data. More...
 
void mbs_bind_user_model (MbsInfos *mbs_infos, UserModel *ums)
 Bind the user model data to the MbsInfos memory pointers. More...
 
MbsDatambs_info_to_data (MbsInfos *mbs_infos, MbsData *s)
 Retrieve a MbsData structure from the given MbsInfos. More...
 
void mbs_info_structurer (MbsInfos *mbs_infos)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Enumeration of the possible project function to load.

This value is compared to the 'MbsLoadOptions::load_symb_user'

  • LOAD_NONE : Do not load any project-secific function.
  • LOAD_SYMBOLIC : Only load the symbolic functions.
  • LOAD_SYMBOLIC : Only load the symbolic functions.
  • LOAD_ALL : Load the symbolic and the user functions.

Default: ALL

Enumerator
LOAD_NONE 
LOAD_SYMBOLIC 
LOAD_ALL 

Function Documentation

◆ mbs_bind_user_model()

void mbs_bind_user_model ( MbsInfos mbs_infos,
UserModel ums 
)

Bind the user model data to the MbsInfos memory pointers.

◆ mbs_delete_data()

void mbs_delete_data ( MbsData s)

Free the memory used by the given MbsData structure.

Parameters
sthe structure to be freed.

◆ mbs_delete_load_options()

void mbs_delete_load_options ( MbsLoadOptions opts)

Free the memory associated to the given MbsLoadOptions.

! For the moment, does not free the char* fields !

Parameters
optsthe MbsLoadOptions to delete

◆ mbs_delete_loader()

void mbs_delete_loader ( MbsLoader loader)

Free the memory associated to the given MbsLoader.

Parameters
optsthe MbsLoader to delete

◆ mbs_info_structurer()

void mbs_info_structurer ( MbsInfos mbs_infos)

◆ mbs_info_to_data()

MbsData* mbs_info_to_data ( MbsInfos mbs_infos,
MbsData s 
)

Retrieve a MbsData structure from the given MbsInfos.

Parameters
[in]mbs_infosthe MbsInfos structure already filled to be used to fill the MbsData structure.
[in,out]sthe MbsData structure that will be completed according to the MbsInfos structure.

◆ mbs_load()

MbsData* mbs_load ( const char *  mbs_filename,
const char *  build_name 
)

Load the data from the given *.mbs file (data in the xml format).

The memory of a new MbsData is allocated.

Parameters
mbs_filenamepath to the file to load including filename and extension.
build_path,pathto the build folder (including build) of MBsysC libraries

◆ mbs_load_user_model()

void mbs_load_user_model ( MbsInfos mbs_infos,
UserModel ums 
)

Load the user model data.

◆ mbs_load_with_loader()

MbsData* mbs_load_with_loader ( const char *  mbs_filename,
const char *  build_path,
MbsLoader mbs_loader 
)

Load the data from the given MbsInfos.

The memory of a new MbsData is allocated. Options on paths (symbolic and/or user librairies) can be passed.

Parameters
mbs_filenamepath to the file to load including filename and extension.
build_pathpath to the build folder (including build) of MBsysC libraries
mbs_load_optsoptions for loading (mainly a collection of paths and names)
Returns
A fully loaded MbsData strucutre or NULL ptr in case of failure.

◆ mbs_new_data()

MbsData* mbs_new_data ( )

Allocate an MbsData structure with default field values (NULL, 0).

Returns
the allocated structure.

◆ mbs_new_load_options()

MbsLoadOptions* mbs_new_load_options ( )

Create a new structure with options for the loading.

The memory of a new MbsLoadOptions is allocated. The options mainly consist in char variables that can contain name and path for separate libraries.

◆ mbs_new_loader()

MbsLoader* mbs_new_loader ( )

Create a new structure loader used for the loading with options.

The memory of a new MbsLoader and its options is allocated. The memory for the "mds" field is not allocated (left to the user if needed)

◆ mbs_set_symb_fun_null()

void mbs_set_symb_fun_null ( MbsData s)

Set the pointer to project symbolic functions to NULL.

Parameters
[in,out]fctthe MbsData instance containing the pointer of functions

◆ mbs_set_user_fun_null()

void mbs_set_user_fun_null ( MbsData s)

Set the pointer to project user functions to NULL.

Parameters
[in,out]fctthe MbsData instance containing the pointer of functions