RobotSystem-Lite
Loading...
Searching...
No Matches
motor.h File Reference

Generic motors (actuation/signal output) functions. More...

#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef struct _MotorData MotorData
 Single motor internal data structure.
 
typedef MotorDataMotor
 Opaque reference to motor internal data structure.
 

Functions

Motor Motor_Init (const char *configName)
 Creates and initializes motor data structure based on given information.
 
void Motor_End (Motor motor)
 Deallocates internal data of given motor.
 
bool Motor_Enable (Motor motor)
 Allows hardware/virtual device of given motor to output signal.
 
void Motor_Disable (Motor motor)
 Prevents hardware/virtual device of given motor from outputing signal.
 
void Motor_SetOffset (Motor motor)
 Enables motor setpoint offset acquisition.
 
void Motor_SetOperation (Motor motor)
 Enables motor output/operation.
 
void Motor_WriteControl (Motor motor, double setpoint)
 Writes specified value to given motor ouput device.
 

Detailed Description

Generic motors (actuation/signal output) functions.

Interface for configurable motor control. Specific underlying implementation (plug-in) and further configuration are defined as explained in Motor Configuration

Function Documentation

◆ Motor_Disable()

void Motor_Disable ( Motor motor)

Prevents hardware/virtual device of given motor from outputing signal.

Parameters
[in]motorreference to motor

◆ Motor_Enable()

bool Motor_Enable ( Motor motor)

Allows hardware/virtual device of given motor to output signal.

Parameters
[in]motorreference to motor
Returns
true on enabled output, false otherwise

◆ Motor_End()

void Motor_End ( Motor motor)

Deallocates internal data of given motor.

Parameters
[in]motorreference to motor

◆ Motor_Init()

Motor Motor_Init ( const char * configName)

Creates and initializes motor data structure based on given information.

Parameters
[in]configNamename of file containing configuration parameters, as explained at Motor Configuration
Returns
reference/pointer to newly created and initialized motor data structure

◆ Motor_SetOffset()

void Motor_SetOffset ( Motor motor)

Enables motor setpoint offset acquisition.

Parameters
[in]motorreference to motor

◆ Motor_SetOperation()

void Motor_SetOperation ( Motor motor)

Enables motor output/operation.

Parameters
[in]motorreference to motor

◆ Motor_WriteControl()

void Motor_WriteControl ( Motor motor,
double setpoint )

Writes specified value to given motor ouput device.

Parameters
[in]motorreference to motor
[in]setpointvalue to be written/generated