brazos-trapezoidal
Classes | Macros | Enumerations | Functions
API023MotorControl.h File Reference

Header file for API023MotorControl. More...

#include "Tsp.h"
#include "API023MotorControl_prm.h"
#include "mc_types.h"
Include dependency graph for API023MotorControl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  API023_GETDIGITAL_TYPE
 
struct  API023_DATALOG_TYPE
 

Macros

#define MOTORCONTROL_API   23
 

Enumerations

enum  API023_MOTORCONTROL_TYPE {
  API023_RUN_MOTOR = 1 , API023_STOP_MOTOR = 2 , API023_GET_DATA = 3 , API023_SEND_DATA = 4 ,
  API023_PUBLISH_ERROR = 5 , API023_RUN_ALGORITHM = 6 , API023_ALGORITHM_RESULT = 7 , API023_RESET_CTR_VAR = 8 ,
  API023_RESET_FLASH_PARAM = 9 , API023_CMD_FEEDBACK = 17
}
 
enum  API023_DATA_TYPE {
  API023_DATA_SPEEDREF = 0 , API023_DATA_SPEEDMEAS = 1 , API023_DATA_ACCEL = 2 , API023_DATA_BUS_VOLTAGE = 3 ,
  API023_DATA_BUS_CURRENT = 4 , API023_DATA_IRMS_U = 5 , API023_DATA_IRMS_V = 6 , API023_DATA_IRMS_W = 7 ,
  API023_DATA_INV_TEMP = 8 , API023_DATA_MOTOR_TEMP = 9 , API023_DATA_MOTOR_RESIST = 10 , API023_DATA_MTR_AVG_POWER = 11 ,
  API023_DATA_MTR_AVG_CURRENT = 12 , API023_DATA_DIGITAL = 13 , API023_DATA_MODULATION_INDEX = 14 , API023_DATA_POWER_ESTIMATION = 15 ,
  API023_DATA_NUM
}
 
enum  API023_SETDIGITAL_TYPE { API023_SETDIGITAL_RESETPARAM = 0 , API023_SETDIGITAL_NUM }
 
enum  API023_ALGO_TYPE {
  API023_ALGO_RESISTANCE = 0 , API023_ALGO_LOADSENSING = 1 , API023_ALGO_UNBALANCE = 2 , API023_ALGO_INSTABILITY = 3 ,
  API023_ALGO_NUM
}
 
enum  API023_CMD_TYPE {
  API023_CMD_NOTDEFINED = 0 , API023_CMD_ACCEPTED = 1 , API023_CMD_NOTACCEPTED = 2 , API023_CMD_WAITING = 3 ,
  API023_CMD_NUM
}
 

Functions

void API023MotorControl__Initialize (void)
 It Initializes the module API023MotorControl and its variables. More...
 
void API023MotorControl__ReceiveParser (TSP_TYPE *message)
 Method to handle the received messages for this API. More...
 
void API023MotorControl__Handler (void)
 API0023 Handler. More...
 
void API023MotorControl__CmdAccepted (uint8_t accepted, API023_MOTORCONTROL_TYPE cmd_id)
 Sends the command feedback. More...
 

Detailed Description

Header file for API023MotorControl.

Definition in file API023MotorControl.h.

Macro Definition Documentation

◆ MOTORCONTROL_API

#define MOTORCONTROL_API   23

-----------------------------— Theta Power Systems - CONFIDENTIAL --------------------------------------—

Definition at line 21 of file API023MotorControl.h.

Enumeration Type Documentation

◆ API023_ALGO_TYPE

enum API023_ALGO_TYPE

Definition at line 78 of file API023MotorControl.h.

◆ API023_CMD_TYPE

enum API023_CMD_TYPE

Definition at line 87 of file API023MotorControl.h.

◆ API023_DATA_TYPE

enum API023_DATA_TYPE

Definition at line 38 of file API023MotorControl.h.

◆ API023_MOTORCONTROL_TYPE

enum API023_MOTORCONTROL_TYPE

Definition at line 24 of file API023MotorControl.h.

◆ API023_SETDIGITAL_TYPE

enum API023_SETDIGITAL_TYPE

Definition at line 72 of file API023MotorControl.h.

Function Documentation

◆ API023MotorControl__CmdAccepted()

void API023MotorControl__CmdAccepted ( uint8_t  accepted,
API023_MOTORCONTROL_TYPE  cmd_id 
)

Sends the command feedback.

Parameters
uint8_taccepted: if the received cmd was valid or not
API023_MOTORCONTROL_TYPEcmd_id: command ID for reference

Definition at line 210 of file API023MotorControl.c.

◆ API023MotorControl__Handler()

void API023MotorControl__Handler ( void  )

API0023 Handler.

Should be called at 1ms rate

Definition at line 186 of file API023MotorControl.c.

◆ API023MotorControl__Initialize()

void API023MotorControl__Initialize ( void  )

It Initializes the module API023MotorControl and its variables.

Definition at line 41 of file API023MotorControl.c.

◆ API023MotorControl__ReceiveParser()

void API023MotorControl__ReceiveParser ( TSP_TYPE *  message)

Method to handle the received messages for this API.

Parameters
TSP_TYPE* message

Definition at line 59 of file API023MotorControl.c.