| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 | 
							- /*
 
-  * megatec.h
 
-  *
 
-  *  Created on: 22.05.2017
 
-  *      Author: balbekova
 
-  */
 
- #ifndef MEGATEC_H_
 
- #define MEGATEC_H_
 
- #include <stdbool.h>
 
- #include <stdint.h>
 
- #include <stdlib.h>
 
- typedef enum{
 
- 	ups_status_req,
 
- 	ups_test_10sec,
 
- 	ups_test_low_bat,
 
- 	ups_test_time,
 
- 	ups_beep,
 
- 	ups_shutdown,
 
- 	ups_shutdown_restore,
 
- 	ups_cancel_shut_down,
 
- 	ups_cancel_test,
 
- 	ups_info,
 
- 	ups_rating_info,
 
- 	ups_remain_time_reg,
 
- 	ups_general_status_req,
 
- 	ups_akb_info,
 
- 	ups_model_req,
 
- 	ups_version_req,
 
- 	ups_version2_req,
 
- 	ups_serial_req,
 
- 	ups_protocol_id_req,
 
- 	ups_offline_status_req,
 
- 	ups_passw_req,
 
- 	MegaTec_cmd_max
 
- } cmdMegaTecEnums_t;
 
- typedef struct{
 
- 	float Freq_in;
 
- 	float VAC_in;
 
- 	float VAC_out;
 
- 	float Temp;
 
- 	uint8_t Load;
 
- 	uint8_t SOC;
 
- 	uint16_t work_time;
 
- 	uint32_t akb_work_time;
 
- 	uint8_t Status;
 
- 	uint8_t Alarm;
 
- 	char model[16];
 
- 	char vertion[18];
 
- 	char serial[15];
 
- 	uint8_t cnt_err_ups;
 
- 	bool Present;
 
- 	bool Flag_Present;
 
- }UPS_value_t;
 
- extern UPS_value_t UPS;
 
- extern uint16_t TimeParam;
 
- extern uint16_t TimeParam2;
 
- extern float TimeParamFloat;
 
- int ups_metac_service_pdu(cmdMegaTecEnums_t command);
 
- void ups_megatec_init(void);
 
- #endif /* MEGATEC_H_ */
 
 
  |