1 / 46
文档名称:

OPEN3000商用库接口说明.doc

格式:doc   大小:210KB   页数:46页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

OPEN3000商用库接口说明.doc

上传人:sanshenglu2 2021/1/22 文件大小:210 KB

下载得到文件列表

OPEN3000商用库接口说明.doc

文档介绍

文档介绍:商用库接口说明
一 QuerySample查询类
query_sample_service_interface类
建立QuerySample客户端时必须构造一个query_sample_service_interface类的对象,由该类的接口负责与服务端通信。该类主要提供一系列的接口函数完成采样数据的查询/统计功能。
包含头文件:db_com/query_sample_service_interface。h
连接动态库:

query_sample_service_interface ( int app_id, int policy, const int port_no,char * server_object, const vector<T_Corba_Props> &props_vec, short context = 0,  char * orb_name = NULL );
接口参数
输入/输出
参数(返回值)说明
备注
int app_id
In
应用号
int policy
In
策略
一般为1,代表由系统管理指定主机
int port_no
In
端口号
char* server_object
In
QuarySample服务端进程名
vector<T_Corba_Props> &props_vec
In
ORB性能参数管理
short context
In
态号
缺省为0,表示当前态
char* orb_name
In
缺省为NULL
query_sample_service_interface(int app_id, char * specify_host_name, const int specify_port_no, char * specify_server_object, vector〈T_Corba_Props> &props_vec, short context = 0, char * orb_name= NULL);
接口参数
输入/输出
参数(返回值)说明
备注
int app_id
In
应用号
char* specify_host_name
In
指定主机名
int specify_port_no
In
指定端口号
char* specify_server_object
In
指定QuarySample服务端进程名
vector<T_Corba_Props> &props_vec
In
ORB性能参数管理
short context
In
态号
缺省为0,表示当前态
char* orb_name
In
缺省为NULL
2.以同步方式查询采样数据:GetQuerySampleResult
short GetQuerySampleResult(const TQuerySampleInParm& in_para,
               TQuerySampleOutParm_out out_para);
接口参数
输入/输出
参数(返回值)说明
备注
TQuerySampleInParm& in_para
In
查询条件
TQuerySampleOutParm_out out_para
Out
查询结果
返回值
Out
0:成功 —1:失败,但服务端接口调用成功 〈-1:服务端接口调用失败
注:指定超时时间参数时,如果出现指定时间无效情况时,请在构造函数中指定orb_name(该参数默认为空)即可。
例如下面程序片断指定调用query_sample_server时等待50秒后认为调用超时。orb_name 指定为" alias_query_sample_server "
如果不指定该参数(orb_name)可能导致props_all参数无效
使用方法举例
//初始化系统管理主机,设置ORB性能参数管理
vector<T_Corba_Props> props_all(3);
strcpy(props_all[0].prop_name , "ooc。。connections");
strcpy(props_all[0].prop_value, "3");
strcpy(props_all[1].prop_name , "ooc.orb.");
strcpy(