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.

97 lines
2.9 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_srvm.h */
/* */
/* 日期 作者 注释 */
/* 2007/07/14 ZYZ 创建文件 */
/****************************************************************************/
#ifndef IEC61850_AC_SRVM_H
#define IEC61850_AC_SRVM_H
#include "ac_srvmgs.h"
#ifdef __cplusplus
extern "C" {
#endif
extern ST_CHAR scd_path_name[];
/**
* 对象空间创建用户回调函数接口
*/
extern ST_VOID (*u_ac_on_srv_created)(ST_INT srv_id, CREATE_STATE cre_state);
/**
* 数据刷新完毕用户回调函数接口
*/
extern ST_VOID (*u_ac_on_srv_refreshed)(ST_INT srv_id, AC_CHANNEL chnl, REFRESH_STATE refr_state);
extern ST_VOID (*u_ac_on_print_mms_pdu)(
ST_INT srv_id, /**< IEDID*/
ST_UCHAR *pdu,
ST_INT pdu_len,
ST_BOOLEAN downFlag,AC_CHANNEL chnl);
/**
* 站点管理初始化接口.
* 初始化所有站点管理数据结构并通过文件进行Typeid、对象空间、对象ID的创建
* 数据结构的指针被保存在数组ac_srvms里
* @retval SD_SUCCESS 初始化成功
* @retval SD_FAILURE 初始化失败
*/
ST_RET ac_init_srvm();
/**
* 站点管理终止接口.
* 释放对象空间,清空请求链表,释放所有站点结构,程序退出前调用
* @return ST_VOID
*/
ST_VOID ac_uninit_srvm();
/**
* 客户端状态处理函数接口.
* 检查连接状态、对象空间创建状态、数据刷新状态并进行请求队列的处理
* @return ST_VOID
*/
ST_VOID ac_srv_state_handle();
/**
* 刷新数据函数接口.
* 该函数实现客户端刷新所有数据,在连接刚刚建立的时候需要调用此函数进行数据刷新
* @param srv_id 服务器ID
* @retval SD_SUCCESS 刷新成功
* @retval SD_FAILURE 刷新失败
*/
ST_RET ac_refresh_srv_data(ST_INT srv_id, AC_CHANNEL chnl);
/**
* 刷新报告控制块数函数接口.
* 该函数实现客户端刷新报告控制块,在连接刚刚建立的时候需要调用此函数刷新所有报告控制块数据
* @param srv_id 服务器ID
* @retval SD_SUCCESS 刷新成功
* @retval SD_FAILURE 刷新失败
*/
ST_RET ac_refresh_srv_rcb(ST_INT srv_id, AC_CHANNEL chnl);
/**
* 通道关联上用户回调接口
*/
extern ST_VOID(*u_ac_chnl_connected)(ST_INT srv_id, AC_CHANNEL chnl);
/**
* 通道断开关联用户回调接口
*/
extern ST_VOID(*u_ac_chnl_disconnected)(ST_INT srv_id, AC_CHANNEL chnl);
/**
* 主通道切换用户回调接口
*/
extern ST_VOID(*u_ac_switch_chnl)(ST_INT srv_id, AC_CHANNEL active_chnl);
#ifdef __cplusplus
}
#endif
#endif