点击或拖拽改变大小

ABBWebApiServer 类

[商业授权] ABB机器人的虚拟服务器,基于WebApi协议构建,可用于读取一些数据信息
[Authorization]The virtual server of ABB robot, built based on the WebApi protocol, can be used to read some data information
继承层次
SystemObject
  HslCommunication.EnthernetHttpServer
    HslCommunication.Robot.ABBABBWebApiServer

命名空间:  HslCommunication.Robot.ABB
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public class ABBWebApiServer : HttpServer

ABBWebApiServer 类型公开以下成员。

构造函数
  名称说明
公共方法ABBWebApiServer
初始化 ABBWebApiServer 类的一个新实例
Top
属性
  名称说明
公共属性ApiCalledAction
获取或设置当前接口调用信息处理的委托,可以用于对接口调用的二次分析,在接口调用完成的时候,将触发本委托
Obtain or set the delegate for the current interface call information processing, which can be used for secondary analysis of the interface call, and the delegate will be triggered when the interface call is completed
(继承自 HttpServer。)
公共属性DealWithHttpListenerRequest
额外的处理请求信息的委托定义,将可以自定义处理一些特殊的请求头数据,例如一些账户相关的其他属性,语言属性等等。
Additional delegate definitions for processing request information will be able to customize some special request header data, such as some other account-related attributes, language attributes, and so on.
(继承自 HttpServer。)
公共属性HandleFileUpload
获取或设置当前的自定义处理文件上传的信息,自动解析好文件的基本信息
Obtain or set the current custom processing file upload information, and automatically parse the basic information of the file
(继承自 HttpServer。)
公共属性HandleRequestFunc
获取或设置当前的自定义的处理信息,如果不想继承实现方法,可以使用本属性来关联你自定义的方法。
Get or set the current custom processing information. If you don't want to inherit the implementation method, you can use this attribute to associate your custom method.
(继承自 HttpServer。)
公共属性IsCrossDomain
获取或设置是否支持跨域操作
Get or set whether to support cross-domain operations
(继承自 HttpServer。)
公共属性代码示例LogNet
组件的日志工具,支持日志记录,只要实例化后,当前网络的基本信息,就以DEBUG等级进行输出
The component's logging tool supports logging. As long as the instantiation of the basic network information, the output will be output at DEBUG
(继承自 HttpServer。)
公共属性LogStatistics
获取当前的日志统计信息,可以获取到每个API的每天的调度次数信息,缓存60天数据,如果需要存储本地,需要调用SaveToFile(String)方法。
Get the current log statistics, you can get the daily scheduling times information of each API, and cache 60-day data. If you need to store it locally, you need to call the SaveToFile(String) method.
(继承自 HttpServer。)
公共属性Port
获取当前的端口号信息
Get current port number information
(继承自 HttpServer。)
公共属性ServerEncoding
获取或设置当前服务器的编码信息,默认为UTF8编码
Get or set the encoding information of the current server, the default is UTF8 encoding
(继承自 HttpServer。)
Top
方法
  名称说明
公共方法Close
关闭服务器
Shut down the server
(继承自 HttpServer。)
公共方法Equals (继承自 Object。)
受保护的方法Finalize (继承自 Object。)
公共方法GetAllRpcApiInfo
获取当前所有注册的RPC接口信息,将返回一个数据列表。
Get all currently registered RPC interface information, and a data list will be returned.
(继承自 HttpServer。)
公共方法GetHashCode (继承自 Object。)
公共方法GetType (继承自 Object。)
受保护的方法HandleRequest
根据客户端的请求进行处理的核心方法,可以返回自定义的数据内容,只需要集成重写即可。
The core method of processing according to the client's request can return custom data content, and only needs to be integrated and rewritten.
(重写 HttpServerHandleRequest(HttpListenerRequest, HttpListenerResponse, Byte).)
受保护的方法MemberwiseClone (继承自 Object。)
公共方法RegisterHttpRpcApi(Object)
注册一个RPC的服务接口,可以指定当前的控制器名称,以及提供RPC服务的原始对象
Register an RPC service interface, you can specify the current controller name, and the original object that provides the RPC service
(继承自 HttpServer。)
公共方法RegisterHttpRpcApi(String, Object)
注册一个RPC的服务接口,可以指定当前的控制器名称,以及提供RPC服务的原始对象
Register an RPC service interface, you can specify the current controller name, and the original object that provides the RPC service
(继承自 HttpServer。)
公共方法SetLoginAccessControl
设置登录的账户信息,如果需要自己控制,可以自己实现委托HandleRequestFunc
Set the login account information, if you need to control by yourself, you can implement the delegation by yourselfHandleRequestFunc
(继承自 HttpServer。)
公共方法SetLoginAccount
设置用户的登录信息,用户名和密码信息
Set user login information, user name and password information
公共方法Start
启动服务器,正常调用该方法时,应该使用try...catch...来捕获错误信息
Start the server and use try...catch... to capture the error message when calling this method normally
(继承自 HttpServer。)
公共方法ToString (重写 HttpServerToString.)
Top
扩展方法
  名称说明
公共扩展器方法ToJsonString
获取当前对象的JSON格式表示的字符串。
Gets the string represented by the JSON format of the current object.
(由 HslExtension 定义。)
Top
备注
本虚拟服务器实例化之后,就可以启动了,需要注意的是,程序需要管理员模式运行,否则启动服务的时候会报错,显示拒绝当前的操作。 支持和ABBWebApiClient进行测试通信。本服务器的运行需要商业授权支持,否则只能运行24小时。
参见