Classes | Enumerations | Functions | Variables
m4api.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  m4ConfigField
struct  m4DiagField
struct  m4Diagnostics
struct  m4Version

Enumerations

enum  m4FieldID {
  M4_IGN_HIGH, M4_IGN_LOW, M4_IGN_DBC, M4_PSU_DELAY,
  M4_VIN_MIN_START, M4_VIN_MIN_ON, M4_VIN_MIN_5V, M4_VIN_MAX,
  M4_12V_MAX, M4_12V_MIN, M4_5V_MAX, M4_5V_MIN,
  M4_33V_MAX, M4_33V_MIN, M4_12V_TIME, M4_33V_TIME,
  M4_PWRSW, M4_PSU_ON_TIME, M4_ON_DELAY, M4_PSU_OFF_TIME,
  M4_OFF_DELAY, M4_EMG_TIME_5VSB, M4_EMG_TIMER, M4_PS_ON_0,
  M4_PS_ON_1, M4_THUMP, M4_TEMP_MAX, M4_TEMP_MIN,
  M4_EMG_OFF_MODE, M4_5V_SBY_DLY, M4_OFF_DELAY_0, M4_OFF_HARD_0,
  M4_OFF_DELAY_1, M4_OFF_HARD_1, M4_OFF_DELAY_2, M4_OFF_HARD_2,
  M4_OFF_DELAY_3, M4_OFF_HARD_3, M4_OFF_DELAY_4, M4_OFF_HARD_4,
  M4_OFF_DELAY_5, M4_OFF_HARD_5, M4_OFF_DELAY_6, M4_OFF_HARD_6,
  M4_OFF_DELAY_7, M4_OFF_HARD_7, M4_RESET, M4_NUM_CONFIG_FIELDS
}
enum  m4Repr { M4_INTEG, M4_FLOAT, M4_TIMER }
enum  m4Type {
  M4_VLT_12_11, M4_VLT_12_07, M4_VLT_5_03, M4_VLT_33_01,
  M4_DEG, M4_SEC, M4_MSC_1_1, M4_MSC_1_2,
  M4_MSC_10_1, M4_MSC_10_2, M4_TIM, M4_TRY,
  M4_BYT
}

Functions

int m4ConfigField (char const *name)
int m4FetchDiag (struct usb_dev_handle *dev, char *buf)
int m4GetConfig (struct usb_dev_handle *dev, struct m4ConfigField *field, char *buf)
int m4GetDiag (struct usb_dev_handle *dev, struct m4Diagnostics *diag)
int m4GetFloat (struct usb_dev_handle *dev, enum m4FieldID fid, float *out)
int m4GetInteger (struct usb_dev_handle *dev, enum m4FieldID fid, int *out)
float m4GetVal (enum m4Type type, char *posn)
struct usb_dev_handle * m4Init ()
int m4ParseValue (enum m4Type type, char const *strval, char *buf)
void m4PrintDiag (char *buf)
void m4PrintVal (enum m4Type type, float val)
int m4SetConfig (struct usb_dev_handle *dev, struct m4ConfigField *field, char const *strval)
int m4SetFloat (struct usb_dev_handle *dev, enum m4FieldID fid, float val)
int m4SetInteger (struct usb_dev_handle *dev, enum m4FieldID fid, int val)

Variables

const float M4API_VERSION = 0.1
const int M4API_VERSION_MAJOR = 0
const int M4API_VERSION_MINOR = 1
struct m4ConfigField m4ConfigFields []
struct m4DiagField m4DiagFields []
char * m4TypeDescs []

Enumeration Type Documentation

enum m4FieldID
Enumerator:
M4_IGN_HIGH 
M4_IGN_LOW 
M4_IGN_DBC 
M4_PSU_DELAY 
M4_VIN_MIN_START 
M4_VIN_MIN_ON 
M4_VIN_MIN_5V 
M4_VIN_MAX 
M4_12V_MAX 
M4_12V_MIN 
M4_5V_MAX 
M4_5V_MIN 
M4_33V_MAX 
M4_33V_MIN 
M4_12V_TIME 
M4_33V_TIME 
M4_PWRSW 
M4_PSU_ON_TIME 
M4_ON_DELAY 
M4_PSU_OFF_TIME 
M4_OFF_DELAY 
M4_EMG_TIME_5VSB 
M4_EMG_TIMER 
M4_PS_ON_0 
M4_PS_ON_1 
M4_THUMP 
M4_TEMP_MAX 
M4_TEMP_MIN 
M4_EMG_OFF_MODE 
M4_5V_SBY_DLY 
M4_OFF_DELAY_0 
M4_OFF_HARD_0 
M4_OFF_DELAY_1 
M4_OFF_HARD_1 
M4_OFF_DELAY_2 
M4_OFF_HARD_2 
M4_OFF_DELAY_3 
M4_OFF_HARD_3 
M4_OFF_DELAY_4 
M4_OFF_HARD_4 
M4_OFF_DELAY_5 
M4_OFF_HARD_5 
M4_OFF_DELAY_6 
M4_OFF_HARD_6 
M4_OFF_DELAY_7 
M4_OFF_HARD_7 
M4_RESET 
M4_NUM_CONFIG_FIELDS 

Definition at line 46 of file m4api.h.

enum m4Repr
Enumerator:
M4_INTEG 
M4_FLOAT 
M4_TIMER 

Definition at line 97 of file m4api.h.

enum m4Type
Enumerator:
M4_VLT_12_11 
M4_VLT_12_07 
M4_VLT_5_03 
M4_VLT_33_01 
M4_DEG 
M4_SEC 
M4_MSC_1_1 
M4_MSC_1_2 
M4_MSC_10_1 
M4_MSC_10_2 
M4_TIM 
M4_TRY 
M4_BYT 

Definition at line 30 of file m4api.h.


Function Documentation

int m4ConfigField ( char const *  name)

Definition at line 500 of file m4api.c.

int m4FetchDiag ( struct usb_dev_handle *  dev,
char *  buf 
)

Definition at line 224 of file m4api.c.

int m4GetConfig ( struct usb_dev_handle *  dev,
struct m4ConfigField field,
char *  buf 
)

Definition at line 335 of file m4api.c.

int m4GetDiag ( struct usb_dev_handle *  dev,
struct m4Diagnostics diag 
)

Definition at line 250 of file m4api.c.

int m4GetFloat ( struct usb_dev_handle *  dev,
enum m4FieldID  fid,
float *  out 
)

Definition at line 389 of file m4api.c.

int m4GetInteger ( struct usb_dev_handle *  dev,
enum m4FieldID  fid,
int *  out 
)

Definition at line 423 of file m4api.c.

float m4GetVal ( enum m4Type  type,
char *  posn 
)

Definition at line 267 of file m4api.c.

struct usb_dev_handle* m4Init ( ) [read]

Definition at line 200 of file m4api.c.

int m4ParseValue ( enum m4Type  type,
char const *  strval,
char *  buf 
)

Definition at line 353 of file m4api.c.

void m4PrintDiag ( char *  buf)

Definition at line 487 of file m4api.c.

void m4PrintVal ( enum m4Type  type,
float  val 
)

Definition at line 303 of file m4api.c.

int m4SetConfig ( struct usb_dev_handle *  dev,
struct m4ConfigField field,
char const *  strval 
)

Definition at line 456 of file m4api.c.

int m4SetFloat ( struct usb_dev_handle *  dev,
enum m4FieldID  fid,
float  val 
)

Definition at line 403 of file m4api.c.

int m4SetInteger ( struct usb_dev_handle *  dev,
enum m4FieldID  fid,
int  val 
)

Definition at line 437 of file m4api.c.


Variable Documentation

const float M4API_VERSION = 0.1

Definition at line 28 of file m4api.h.

const int M4API_VERSION_MAJOR = 0

Definition at line 26 of file m4api.h.

const int M4API_VERSION_MINOR = 1

Definition at line 27 of file m4api.h.

Definition at line 76 of file m4api.c.

Definition at line 65 of file m4api.c.

char* m4TypeDescs[]

Definition at line 58 of file m4api.c.



m4atx_battery_monitor
Author(s): Ken Tossell , Chris Dunkers , Russell Toris
autogenerated on Sun Mar 6 2016 12:02:34