|  设为首页  |  加入收藏  
首    页 关于我们 新闻中心 产品世界 相关下载 工程案例 人才招聘 联系我们

此页面上的内容需要较新版本的 Adobe Flash Player。

获取 Adobe Flash Player

产品展示 [更多]
解决方案 [更多]
省会部分小区有了远程室温监测仪
供热期间,怎样测量室内温度更合理?
供热住户温度采集方案
温湿度监控系统产品其他应用场合
供暖测温退费新规出台
让居民过一个温暖的冬天,是我们义不
无线室温远程采集控制系统
室内测温远传系统
技术文献 [更多]
如何应对手术室室温管理的矛盾
供暖管理-无线远程测温系统
供热温度标准到底是多少?
供暖 供热温度将随气温调整
供暖测温谁说了算
供热无线测温 少些争议更舒适
供暖温度检测系统
大体积混凝土测温点布置原则
       技术文献
Author:Jwztech.com Date: 2013/7/11 Hits: 3294

obix技术应用与连网调试工具源码

ORBIX(OBIX)使对象分布配置、协调工作的软件名。由 IONA 公司开发,支持 CORBA 。Orbix 标准版是全球使用的领先 CORBA ORB,

适用于构建和部署满足企业集成需求的 SOA 系统。


关于obix的资料请参考下面链接:

http://www.niagara-central.com/ord?portal:/blog/BlogEntry/186

测试服务器见下图红框位置标示。



用户名:DemoUser  密码:Tr1diumD3mo

DELPHI工具源码,希望对大家有所帮助!

unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection, ComObj,
IdTCPClient, IdHTTP, IdCoder, IdCoder3to4, IdCoderMIME, ExtCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
IdHTTP1: TIdHTTP;
IdEncoderMIME1: TIdEncoderMIME;
ADOConnection1: TADOConnection;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
Memo1: TMemo;
TimeCheckBox: TCheckBox;
Label1: TLabel;
Timer1: TTimer;
ComboBox1: TComboBox;
Label2: TLabel;
HeaderEdit: TEdit;
Label3: TLabel;
DataEdit: TEdit;
Label4: TLabel;
URLEncodeCheckBox: TCheckBox;
Bevel1: TBevel;
procedure Button1Click(Sender: TObject);
procedure TimeCheckBoxClick(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure URLEncodeCheckBoxClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
function postXml(DataMethod,UrlMethods:integer; const xmlstr, url: WideString): WideString;
end;
var
Form1: TForm1;
times:integer;
UrlMethod:Integer;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
s:WideString;
k:integer;
begin
k:=ComboBox1.ItemIndex;
if Length(HeaderEdit.Text)=0 then
begin
ShowMessage('Header is empty!&39);
exit;
end;
if Length(DataEdit.Text)=0 then
begin
ShowMessage('Post data is empty!&39);
exit;
end;
s:=postXml(k,UrlMethod,DataEdit.Text,'http://obix.tridium.com/obix/config/PlayGround/NumericWritable/set/&39);
Memo1.Lines.Add(s+#13#10+'====================================================&39+#13#10);
end;
function TForm1.postXml(DataMethod,UrlMethods:integer; const xmlstr, url: WideString): WideString;
var
idHttp:TIdHTTP;
RStream:TStringStream;
t:TStringList;
s:string;
begin
if UrlMethods=1 then s:=' and UrlEncode'
Label1.Caption:='Method:&39+ComboBox1.Text+s;
result:=''
idHttp:= TIdHTTP.Create(nil);
RStream:=TStringStream.Create('&39);
t:=TStringList.create;
try
idHttp.HTTPOptions:=[hoKeepOrigProtocol];
idHttp.Request.Accept:='*/*'
idHttp.Request.AcceptLanguage:='zh-cn'
if UrlMethods=1 then idHttp.Request.ContentType:='application/x-www-form-urlencoded'
if UrlMethods=0 then idHttp.Request.ContentType:='text/plain'
idhttp.Request.CustomHeaders.Values['Authorization&39]:=HeaderEdit.Text;
idHttp.Request.CacheControl:='no-cache'
idHttp.Request.UserAgent:=&39Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1 HouOS)'
t.Add(xmlstr);
if DataMethod=1 then idhttp.Post(url,t,RStream);
if DataMethod=0 then idHttp.Get(url,RStream);
Sleep(1000);
Result:=RStream.DataString;
except
on E:Exception do
begin
result:=e.Message;
end;
end;
idHttp.Free;
RStream.Free;
t.Free;
end;
procedure TForm1.TimeCheckBoxClick(Sender: TObject);
begin
if TimeCheckBox.Checked=True then Timer1.Enabled:=True else Timer1.Enabled:=False;
times:=0;
label1.Caption:='计时:0'
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Inc(times);
Label1.Caption:='计时:&39+IntToStr(times);
if times=30 then
begin
times:=0;
button1.Click;
end;
end;
procedure TForm1.URLEncodeCheckBoxClick(Sender: TObject);
begin
if URLEncodeCheckBox.Checked=True then UrlMethod:=1 else UrlMethod:=0;
end;
end.
 
版权所有:唐山金万众科技有限公司  最佳浏览:1440*900分辩率    冀公网安备 13020302000819号
Copyright JWZ Science & Technology CO.,Ltd. All Rights Reserved 2006-2026