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.

103 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_read.h
* @author yh huiy@xjgc.com */
/* */
/* 日期 作者 注释 */
/* 2007/07/16 YH 创建文件 */
/****************************************************************************/
#ifndef IEC61850_READ_INCLUDED
#define IEC61850_READ_INCLUDED
#include "ac_reqm.h"
#include "ac_srvm.h"
#include "ai_objid.h"
#include "ai_sem.h"
#include "ai_obj.h"
#include "ai_objrw.h"
#include "ai_objval.h"
#ifdef __cplusplus
extern "C" {
#endif
/** 读服务请求所需信息结构定义*/
typedef struct
{
AI_OBJ_ID *obj_ids; /**< 命名变量ID数组*/
ST_INT num_obj; /**< 命名变量个数如果是DS则是DS的数据成员的个数*/
U_AC_REQ_DONE u_read_done; /**< 用户回调函数指针*/
}AC_READ_REQ_INFO;
/**
* 读服务请求构造、并加入待发送请求队列
* @param srvId SRVID
* @param ac_reqInfo 请求结构指针
* @param time_out 请求超时时间
* @param ac_reqCtrl_out 请求结构(输出)
* @retval SD_FAILURE 失败
* @retval SD_SUCCESS 发送
*/
ST_RET ac_read_obj_value(ST_INT srv_id, AC_READ_REQ_INFO* ac_reqInfo, ST_INT time_out, AC_REQ_CTRL **ac_reqCtrl_out);
/**
* 释放AC_READ_REQ_CTRL结构成员所占资源
* obj_ids、obj_vals、results成员资源
* @param reqCtrl 请求结构指针
* @return ST_VOID
*/
ST_VOID ac_cleanup_readReqCtrl(AC_READ_REQ_CTRL *reqCtrl);
/**
* 将读请求转换为MMS格式的请求信息并发送请求
* @param acReqCtrl 请求结构指针
* @retval SD_FAILURE 失败
* @retval SD_SUCCESS 成功
*/
ST_RET ac_send_read_req(AC_REQ_CTRL *acReqCtrl);
/**
* 释放对象数据存储内存接口
* @param parseInfo 对象数据结构指针
* @param num 对象个数
* @param ac_reqCtrl 请求结构指针
* @return ST_VOID
*/
ST_VOID ac_destroy_readRespParseInfo(MVL_READ_RESP_PARSE_INFO *parseInfo, ST_INT num, AC_REQ_CTRL *ac_reqCtrl);
/**
* 读服务请求构造、并加入待发送请求队列
* @param srvId SRVID
* @param ac_reqInfo 请求结构指针
* @param time_out 请求超时时间
* @param ac_reqCtrl_out 请求结构(输出)
* @param chnl 下发的通道
* @retval SD_FAILURE 失败
* @retval SD_SUCCESS 发送
*/
ST_RET ac_read_obj_value_chnl(ST_INT srv_id, AC_READ_REQ_INFO* ac_reqInfo,
ST_INT time_out, AC_REQ_CTRL **ac_reqCtrl_out, AC_CHANNEL chnl);
#ifdef __cplusplus
}
#endif
#endif /** ACSI_READ_INCLUDE */