MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
module-hid.cc File Reference
#include "mbconfig.h"
#include <cstdint>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "dataman.h"
#include "filedrv.h"
Include dependency graph for module-hid.cc:

Go to the source code of this file.

Classes

class  JoystickDrive
 
struct  JoystickDR
 

Functions

int module_init (const char *module_name, void *pdm, void *php)
 This function registers our user defined element for the math parser. More...
 

Function Documentation

int module_init ( const char *  module_name,
void *  pdm,
void *  php 
)

This function registers our user defined element for the math parser.

It is called when the "module load" statement appears in the input file.

Definition at line 437 of file module-hid.cc.

References pHP, and SetDriveData().

438 {
439 #if 0
440  DataManager *pDM = (DataManager *)pdm;
441  MBDynParser *pHP = (MBDynParser *)php;
442 #endif
443 
444  DriveRead *rf = new JoystickDR;
445 
446  if (!SetDriveData("joystick", rf)) {
447  delete rf;
448 
449  silent_cerr("JoystickDrive: "
450  "module_init(" << module_name << ") "
451  "failed" << std::endl);
452 
453  return -1;
454  }
455 
456  return 0;
457 }
bool SetDriveData(const std::string &s, DriveRead *rf)
Definition: drive_.cc:1274
static std::stack< const HighParser * > pHP
Definition: parser.cc:598

Here is the call graph for this function: