?? bocom.pas
字號:
function TBocom.MaxRGBShow(MaxRGBShow_Source:string;MaxRGBShow_Left:integer;MaxRGBShow_Top:integer;MaxRGBShow_Width:integer;MaxRGBShow_Hight:integer;MaxRGBShow_ID:integer;MaxRGBShow_RowCount:integer;MaxRGBShow_ColCount:integer):string; //開RGB信號
begin
CommandStr:=MaxRGBShow_Cmd+' '+MaxRGBShow_Source+' '+inttostr(MaxRGBShow_Left)+' '+inttostr(MaxRGBShow_Top)+' '+inttostr(MaxRGBShow_Width)+' '+inttostr(MaxRGBShow_Hight)+' '+inttostr(MaxRGBShow_ID)+' '+inttostr(MaxRGBShow_RowCount)+' '+ inttostr(MaxRGBShow_ColCount);
result:=SendMessage;
end;
function TBocom.MaxRGBClose(MaxRGBClose_Source:string):string; //關閉RGB信號
begin
CommandStr:=MaxRGBClose_Cmd+' '+MaxRGBClose_Source;
result:=SendMessage;
end;
// --------------------------------------------------------------------------------------------
function TBocom.MaxVideoShow(MaxVideoShow_Source:string;MaxVideoShow_Left:integer;MaxVideoShow_Top:integer;MaxVideoShow_Width:integer;MaxVideoShow_Hight:integer;MaxVideoShow_ID:integer;MaxVideoShow_RowCount:integer;MaxVideoShow_ColCount:integer):string; //開VIDEO信號
begin
CommandStr:=MaxVideoShow_Cmd+' '+MaxVideoShow_Source+' '+inttostr(MaxVideoShow_Left)+' '+inttostr(MaxVideoShow_Top)+' '+inttostr(MaxVideoShow_Width)+' '+inttostr(MaxVideoShow_Hight)+' '+inttostr(MaxVideoShow_ID)+' '+inttostr(MaxVideoShow_RowCount)+' '+ inttostr(MaxVideoShow_ColCount);
result:=SendMessage;
end;
function TBocom.MaxVideoClose(MaxVideoClose_Source:string):string; //關閉VIDEO信號
begin
CommandStr:=MaxVideoClose_Cmd+' '+MaxVideoClose_Source;
result:=SendMessage;
end;
//---------------------------------------------------------------------------------------------------------------------------------------
function TBocom.ProjectorShow(ProjectorShow_Source:string;ProjectorShow_Left:integer;ProjectorShow_Top:integer;ProjectorShow_Width:integer;ProjectorShow_Hight:integer;ProjectorShow_ID:integer;ProjectorShow_RowCount:integer;ProjectorShow_ColCount:integer):string; //開投影機信燈
begin
CommandStr:=ProjectorShow_Cmd+' '+ProjectorShow_Source+' '+inttostr(ProjectorShow_Left)+' '+inttostr(ProjectorShow_Top)+' '+inttostr(ProjectorShow_Width)+' '+inttostr(ProjectorShow_Hight)+' '+inttostr(ProjectorShow_ID)+' '+inttostr(ProjectorShow_RowCount)+' '+ inttostr(ProjectorShow_ColCount);
result:=SendMessage;
end;
function TBocom.ProjectorClose(ProjectorClose_Source:string):string; //關閉投影機信燈
begin
CommandStr:=ProjectorClose_Cmd+' '+ProjectorClose_Source;
result:=SendMessage;
end;
//-----------------------------------------------------------------------------------------------------------------------------------
function TBocom.Login(Login_UserID:string;Login_Password:string):string; //登記用戶
begin
CommandStr:=Login_Cmd+' '+Login_UserID+' '+Login_Password;
result:=SendMessage;
end;
function TBocom.ListCamera():string; //列出攝像機信號
begin
CommandStr:=ListCamera_Cmd;
result:=SendMessage;
end;
function TBocom.ListNetPc():string; //列出netpc信號
begin
CommandStr:=ListNetPc_Cmd;
result:=SendMessage;
end;
function TBocom.ListRGB():string; //列出rgbpc信號
begin
CommandStr:=ListRGB_Cmd;
result:=SendMessage;
end;
function TBocom.ListScheme():string; //列出預案
begin
CommandStr:=ListScheme_Cmd;
result:=SendMessage;
end;
function TBocom.ListDirectChannel():string; //列出直接通信號
begin
CommandStr:=ListDirectChannel_Cmd;
result:=SendMessage;
end;
function TBocom.ListLiveWnd():string; //列出當前顯示窗
begin
CommandStr:=ListLiveWnd_Cmd;
result:=SendMessage;
end;
function TBocom.Unlogin():string; //注銷用戶
begin
CommandStr:=Unlogin_Cmd;
result:=SendMessage;
end;
{ ====================================================以下命令很少用到===========================================================
//直接通道信號控制---------------------------------------------------------------------------------------------------------------------
function TBocom.DChannelShow(DChannelShow_Source:string;DChannelShow_Left:integer;DChannelShow_Top:integer;DChannelShow_Width:integer;DChannelShow_Hight:integer;DChannelShow_ID:integer):string; //開通道信號
begin
CommandStr:=DChannelShow_Cmd+' '+DChannelShow_Source+' '+inttostr(DChannelShow_Left)+' '+inttostr(DChannelShow_Top)+' '+inttostr(DChannelShow_Width)+' '+inttostr(DChannelShow_Hight)+' '+inttostr(DChannelShow_ID)+' -1 -1' ;
result:=SendMessage;
end;
function TBocom.DChannelMove(DChannelMove_Source:string;DChannelMove_Left:integer;DChannelMove_Top:integer):string; //移動位置
begin
CommandStr:=DChannelMove_Cmd+' '+DChannelMove_Source+' '+inttostr(DChannelMove_Left)+' '+inttostr(DChannelMove_Top) ;
result:=SendMessage;
end;
function TBocom.DChannelTop(DChannelTop_Source:string):string; //前置窗口
begin
CommandStr:=DChannelTop_Cmd+' '+DChannelTop_Source;
result:=SendMessage;
end;
function TBocom.DChannelSize(DChannelSize_Source:string;DChannelSize_Left:integer;DChannelSize_Top:integer):string; //調整大小
begin
CommandStr:=DChannelSize_Cmd+' '+DChannelSize_Source+' '+inttostr(DChannelSize_Left)+' '+inttostr(DChannelSize_Top);
result:=SendMessage;
end;
function TBocom.DChannelClose(DChannelClose_Source:string):string; //關通道信號
begin
CommandStr:=DChannelClose_Cmd+' '+DChannelClose_Source;
result:=SendMessage;
end;
function TBocom.DChannelN(DChannelN_Mode:string;DChannelN_Source:string):string; //信號制式ntsc
begin
CommandStr:=DChannelN_Cmd+' '+DChannelN_Mode+' '+DChannelN_Source ;
result:=SendMessage;
end;
function TBocom.DChannelS(DChannelS_Mode:string;DChannelS_Source:string):string; //信號制式secam
begin
CommandStr:=DChannelS_Cmd+' '+DChannelS_Mode+' '+DChannelS_Source ;
end;
function TBocom.DChannelP(DChannelP_Mode:string;DChannelP_Source:string):string; //信號制式pal
begin
CommandStr:=DChannelP_Cmd+' '+DChannelP_Mode+' '+DChannelP_Source ;
result:=SendMessage;
end;
function TBocom.DChannelBright(DChannelBright_Source:string;DChannelBright_Value:integer):string; //調整亮度
begin
CommandStr:=DChannelBright_Cmd+' '+DChannelBright_Source+' '+inttostr(DChannelBright_Value) ;
result:=SendMessage;
end;
function TBocom.DChannelContrast(DChannelContrast_Source:string;DChannelContrast_Value:integer):string; //調整對比度
begin
CommandStr:=DChannelContrast_Cmd+' '+DChannelContrast_Source+' '+inttostr(DChannelContrast_Value) ;
result:=SendMessage;
end;
function TBocom.DChannelHue(DChannelHue_Source:string;DChannelHue_Value:integer):string; //調整色度
begin
CommandStr:=DChannelHue_Cmd+' '+DChannelHue_Source+' '+inttostr(DChannelHue_Value) ;
result:=SendMessage;
end;
function TBocom.DChannelChange(DChannelChange_Source:string;DChannelChange_Value:integer):string; //更改信號源
begin
CommandStr:=DChannelChange_Cmd+' '+DChannelChange_Source+' '+inttostr(DChannelChange_Value) ;
result:=SendMessage;
end;
//---------------------------------------------------------------------------------------------------------------
function TBocom.MaxVideoToRGB1():string; //maxvideo switch RGB1
begin
CommandStr:=MaxVideoToRGB1_Cmd;
result:=SendMessage;
end;
function TBocom.MaxVideoToRGB2():string; //maxvideo switch RGB2
begin
CommandStr:=MaxVideoToRGB2_Cmd;
result:=SendMessage;
end;
function TBocom.MaxVideoToVideo():string; // maxvideo switch VIDEO
begin
CommandStr:=MaxVideoToVideo_Cmd;
result:=SendMessage;
end;
function TBocom.MaxVideoOnAll():string; //maxvideo power onall
begin
CommandStr:=MaxVideoOnAll_Cmd;
result:=SendMessage;
end;
function TBocom.MaxVideoOffAll():string; //maxvideo power Offall
begin
CommandStr:=MaxVideoOffAll_Cmd;
result:=SendMessage;
end;
}
//***********************************打開連接***********************************
procedure TBocom.Connection(Ip:string;Port:integer);
begin
client.host:=Ip;
client.port:=Port;
client.open;
end;
//*****************************************************************************
//***********************************斷開連接***********************************
procedure TBocom.DisConnection;
begin
client.close;
end;
//******************************************************************************
//***********************************發送數據***********************************
function TBocom.SendMessage:string;
var TimeFlag:boolean;
StartTime,StopTime:TdateTime;
begin
client.Socket.SendText(CommandStr+#13);
StartTime:=now();
TimeFlag:=True;
while TimeFlag do
begin
StopTime:=now();
if SecondsBetween(StartTime,StopTime)>DelayTime then
begin
TimeFlag:=false;
// showmessage('good luck!');
end;
application.ProcessMessages;
end;
result:=BackMessage;
CommandStr:=''; // 發送完成各命令清除
end;
//******************************************************************************
//***********************************讀取返回值*********************************
procedure TBocom.ReadMessage(Sender: TObject;Socket: TCustomWinSocket);
begin
BackMessage:=copy(Socket.ReceiveText,4,20); //讀取反饋信息
end;
//*****************************************************************************
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -