106 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			106 lines
		
	
	
		
			3.6 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
/****************************************************************************
 | 
						|
 | 
						|
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
 | 
						|
 | 
						|
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
 | 
						|
be copied by any method or incorporated into another program without
 | 
						|
the express written consent of Aerospace C.Power. This Information or any portion
 | 
						|
thereof remains the property of Aerospace C.Power. The Information contained herein
 | 
						|
is believed to be accurate and Aerospace C.Power assumes no responsibility or
 | 
						|
liability for its use in any way and conveys no license or title under
 | 
						|
any patent or copyright and makes no representation or warranty that this
 | 
						|
Information is free from patent or copyright infringement.
 | 
						|
 | 
						|
****************************************************************************/
 | 
						|
#ifndef IOT_SG_CCO_CMD_H
 | 
						|
#define IOT_SG_CCO_CMD_H
 | 
						|
 | 
						|
/* os shim includes */
 | 
						|
#include "os_types_api.h"
 | 
						|
 | 
						|
/* utils includes */
 | 
						|
#include "iot_addr_hash_table_api.h"
 | 
						|
 | 
						|
/* smart grid internal header files */
 | 
						|
#include "iot_sg_fr.h"
 | 
						|
 | 
						|
#ifdef __cplusplus
 | 
						|
extern "C" {
 | 
						|
#endif
 | 
						|
 | 
						|
#define IOT_SG_CMD_QUEUE_SIZE      30
 | 
						|
 | 
						|
#if PLC_SUPPORT_CCO_ROLE
 | 
						|
 | 
						|
/* iot_sg_set_sec_node_reg_status - set secondary node registration status
 | 
						|
 * @intf_type:  type of the caller. CLI or concentrator driver.
 | 
						|
 *              see IOT_SG_CALLER_TYPE_XX.
 | 
						|
 * @start:      1 for start secondary node registration. 0 for stop.
 | 
						|
 * @return:     the updated secondary node registration status.
 | 
						|
 */
 | 
						|
uint8_t iot_sg_set_sec_node_reg_state(uint8_t intf_type, uint8_t start);
 | 
						|
 | 
						|
/* iot_sg_get_sec_node_reg_status - get secondary node registration status
 | 
						|
 * @return:     the secondary node registration status.
 | 
						|
 */
 | 
						|
uint8_t iot_sg_get_sec_node_reg_state();
 | 
						|
 | 
						|
/* iot_sg_set_evt_rpt_state - set event report enable state
 | 
						|
 * @intf_type:  type of the caller. CLI or concentrator driver.
 | 
						|
 *              see IOT_SG_CALLER_TYPE_XX.
 | 
						|
 * @start_flag: 1 to start event report. 0 to disable event report.
 | 
						|
 * return:
 | 
						|
 *          the updated event report state
 | 
						|
 */
 | 
						|
uint8_t iot_sg_set_evt_rpt_state(uint8_t intf_type, uint8_t start_flag);
 | 
						|
 | 
						|
/* iot_sg_get_evt_rpt_state - get the event report state
 | 
						|
 * return:  the event report enable state
 | 
						|
 */
 | 
						|
uint8_t iot_sg_get_evt_rpt_state();
 | 
						|
 | 
						|
/* iot_sg_set_rt_mr_state - set route meter reading status
 | 
						|
 * @intf_type:  type of the caller. CLI or concentrator driver.
 | 
						|
 *              see IOT_SG_CALLER_TYPE_XX.
 | 
						|
 * @start_mr:   1 for start route meter reading. 0 for stop.
 | 
						|
 * @return:     the updated route meter reading status.
 | 
						|
 */
 | 
						|
uint8_t iot_sg_set_rt_mr_state(uint8_t intf_type, uint8_t start_mr);
 | 
						|
 | 
						|
/* iot_sg_get_rt_mr_state - get route meter reading status
 | 
						|
 * @return: route meter reading status, see IOT_SG_CALLER_TYPE_XX.
 | 
						|
 */
 | 
						|
uint8_t iot_sg_get_rt_mr_state();
 | 
						|
 | 
						|
/* iot_sg_set_tsfm_detect_mode - set transform detection mode.
 | 
						|
 * @mode_type:  transform detection mode, see IOT_SG_CCO_TSFM_DETECT_MODE_xxx.
 | 
						|
 * @start:      1 for start transform detection. 0 for stop.
 | 
						|
 * @return:     the updated transform detect mode.
 | 
						|
 */
 | 
						|
uint8_t iot_sg_set_tsfm_detect_mode(uint8_t mode_type, uint8_t start);
 | 
						|
 | 
						|
/* iot_sg_get_tsfm_detect_mode - get transform detection mode.
 | 
						|
 * @return:     transform detection mode.
 | 
						|
 */
 | 
						|
uint8_t iot_sg_get_tsfm_detect_mode();
 | 
						|
 | 
						|
/**
 | 
						|
 * @brief iot_sg_cco_update_link_load() - set hplc link traffic load to cco
 | 
						|
 */
 | 
						|
void iot_sg_cco_update_link_load();
 | 
						|
 | 
						|
/**
 | 
						|
 * @brief iot_sg_cco_get_link_load() - get hplc link traffic load
 | 
						|
 * @return:    percentage value: 0 - 100. 0 means light, 100 means heavy.
 | 
						|
 */
 | 
						|
uint8_t iot_sg_cco_get_link_load();
 | 
						|
 | 
						|
#endif /* PLC_SUPPORT_CCO_ROLE */
 | 
						|
 | 
						|
 | 
						|
#ifdef __cplusplus
 | 
						|
}
 | 
						|
#endif
 | 
						|
 | 
						|
#endif  /* IOT_SG_CCO_CMD_H */
 |