You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.4 KiB
C

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/****************************************************************************/
/* Copyright (c) 2007,许继集团有限公司 */
/* All rights reserved. */
/* */
/* 模块描述: */
/** 异步关联模块,提供网络关联、断开相关服务接口
* @file ac_assoc.h */
/* */
/* 日期 作者 注释 */
/* 2007/07/13 ZYZ 创建文件 */
/****************************************************************************/
#ifndef IEC61850_AC_ASSOC_H
#define IEC61850_AC_ASSOC_H
#include "ac_reqm.h"
#ifdef __cplusplus
extern "C" {
#endif
//下面两个值最终由关联时协商确定,以小的为实际值
#define MAX_REQ_CALLING 30 //客户端可以下发的最大请求个数
#define MAX_REQ_CALLED 30 //服务器所能支持的最大请求个数
/**
* 异步关联请求服务函数接口,用户调用该函数连接服务器
* @param srv_id 服务器ID
* @param time_out 请求返回超时时间,单位为秒
* @param chnl 通道号,通过此通道下发请求
* @param u_assoc_done acsi服务返回给应用层的用户回调函数指针
* @retval SD_SUCCESS 发送关联请求成功
* @retval SD_FAILURE 发送关联请求失败
*/
ST_RET ac_assoc_chnl(ST_INT srv_id, ST_INT time_out, AC_CHANNEL chnl, U_AC_REQ_DONE u_assoc_done);
/**
* 异步断开关联请求服务函数接口.
* 本函数为平滑的中断连接对应于ac_abort突然中断连接
* @param srv_id 服务器ID
* @param time_out 请求返回超时时间,单位为秒
* @param chnl 通道号,通过此通道下发请求
* @param u_relea_done acsi服务返回给应用层的用户回调函数指针
* @retval SD_SUCCESS 发送断开关联请求成功
* @retval SD_FAILURE 发送断开关联请求失败
*/
ST_RET ac_release_chnl(ST_INT srv_id, ST_INT time_out, AC_CHANNEL chnl, U_AC_REQ_DONE u_relea_done);
/**
* 异常中断连接函数接口.
* 本函数为突然的中断连接对应于ac_release平滑中断连接
* @param srv_id 服务器ID
* @param chnl 通道号,通过此通道下发请求
* @retval SD_SUCCESS abort服务成功
* @retval SD_FAILURE abort服务失败
*/
ST_RET ac_abort_chnl(ST_INT srv_id, AC_CHANNEL chnl);
#ifdef __cplusplus
}
#endif
#endif /** IEC61850_AC_ASSOC_H */