76 lines
2.4 KiB
C
76 lines
2.4 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_CUSAPP_STA_H
|
|
#define IOT_CUSAPP_STA_H
|
|
|
|
#include "iot_errno_api.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#if PLC_SUPPORT_STA_ROLE
|
|
|
|
/**
|
|
* @brief iot_cusapp_sta_init() - init cusapp sta role device specific
|
|
* operation.
|
|
* @return: ERR_OK - for success case
|
|
* @return: otherwise - error number
|
|
*/
|
|
uint32_t iot_cusapp_sta_init();
|
|
|
|
/**
|
|
* @brief iot_cusapp_sta_deinit() - deinit cusapp sta role device specific
|
|
* operation.
|
|
*/
|
|
void iot_cusapp_sta_deinit();
|
|
|
|
/**
|
|
* @brief: iot_cusapp_send_mr_cmd_to_sg() - send meter reading command to sg.
|
|
* @param proto_type: proto type, see GW_APP_DATA_TYPE_XXX.
|
|
* @param timeout: commad timeout.
|
|
* @param sn: sequence number.
|
|
* @param queue_front: flag to mark if join the queue in front.
|
|
* @param len: meter reading data length.
|
|
* @param data: meter reading data.
|
|
*/
|
|
void iot_cusapp_send_mr_cmd_to_sg(uint8_t proto_type, uint8_t timeout,
|
|
uint8_t sn, uint8_t queue_front, uint16_t len, uint8_t *data);
|
|
|
|
/**
|
|
* @brief: iot_cusapp_sta_send_expand_stop_cmd_to_sg() - send stop expand
|
|
* function command to sg.
|
|
*/
|
|
void iot_cusapp_sta_send_expand_stop_cmd_to_sg();
|
|
|
|
#else /* PLC_SUPPORT_STA_ROLE */
|
|
|
|
#define iot_cusapp_sta_init() (ERR_FAIL)
|
|
|
|
#define iot_cusapp_sta_deinit()
|
|
|
|
#define iot_cusapp_send_mr_cmd_to_sg(proto_type, timeout, sn, queue_front, \
|
|
len, data)
|
|
|
|
#define iot_cusapp_sta_send_expand_stop_cmd_to_sg()
|
|
|
|
#endif /* PLC_SUPPORT_STA_ROLE */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* IOT_CUSAPP_STA_H */
|