# encoding: sjis# -*- coding: shift-jis -*# encoding: sjis=begin# -*- coding: shift-jis -*==============================================================================# encoding: sjis=beginRBF_BaseAPI for Windows Ruby Sample# -*- coding: shift-jis -*==============================================================================# encoding:=beginRBF_BaseAPI forWindows RubySample sjis# -*- coding: shift-jis -*==============================================================================Windows OS=beginRBF_BaseAPI forWindows Ruby SampleWindows==============================================================================MagicPacketRBF_BaseAPI for Windows Ruby Sample
IEIE1.

WindowsRBF()RBF1. MagicPacketSend() IE Professional( 1)RBFVer.1.1.0==============================================================================1. new(): Robotic base API Method Class Instance1. Windows RBF=end2. Open()
:(
)(
)2.
3. Close():()require 'RBF_BaseAPI'1. Shutdown()4. LastErrorCode() :2. WindowsAutoLogon()Professional5. LastErrorMsg() :GUI#-----------------------------------------------------------------------------#&Windows GUI(1)FindWindowHnd()#-----------------------------------------------------------------------------Ver.1.1.1module Terminate #{==============================================================================4Zmodule_function=enddef Exit(gai)Ver.1.1.0printf("Error Code[%d]¥n", gai.LastErrorCode())
require 'RBF_BaseAPI'==============================================================================printf("%s¥n", gai.LastErrorMsg())=endgai.Close()#-----------------------------------------------------------------------------1. GeWindowText()exit(1)#&(1)requireend'RBF_BaseAPI'#-----------------------------------------------------------------------------Ver.1.1.0endmodule Terminate #{#-----------------------------------------------------------------------------==============================================================================module_function#&(1)=end#----------------------------------------------------------------------------def Exit(gai)#-----------------------------------------------------------------------------# Robotic base API Class Instancemodule Terminate #{ printf("Error Code[%d]¥n", gai.LastErrorCode())
require 'RBF_BaseAPI'#----------------------------------------------------------------------------printf("%s¥n",gai.LastErrorMsg())
module_functioninit_def = {gai.Close() def Exit(gai)#-----------------------------------------------------------------------------:timeout => 10exit(1)##&(1)}endprintf("Error Code[%d]¥n", gai.LastErrorCode())#-----------------------------------------------------------------------------gai = RBF_Base::RoboticAPI.new(init_def)
end#module Terminate #{printf("%s¥n", gai.LastErrorMsg())
module_function#----------------------------------------------------------------------------gai.Close()def Exit(gai)#----------------------------------------------------------------------------# Robotic base API Class Instanceexit(1)printf("Error Code[%d]¥n",gai.LastErrorCode())# PCRBF#----------------------------------------------------------------------------endprintf("%s¥n", gai.LastErrorMsg())#----------------------------------------------------------------------------gai = RBF_Base::RoboticAPI.new()endgai.Close()connect = {exit(1):rbf_server => '127.0.0.1',# RBFIP#-----------------------------------------------------------------------------:host_charcode end=> 'Shift_JIS',#RBF#----------------------------------------------------------------------------# RoboticAPIend:host_os=> 'Windows',#RBF
OS##-----------------------------------------------------------------------------}#----------------------------------------------------------------------------init_def = {#----------------------------------------------------------------------------relay_host = [ '192.168.0.2' ]#RBFIP# Robotic base#2 API Class InstanceRBFIP () #----------------------------------------------------------------------------# RBFAPI( ) (Default: 180)#connect = {# :timeoutRBFAPIgai = RBF_Base::RoboticAPI.new()#:rbf_server => '127.0.0.1',# RBFIP# :timeout(:relay_host => relay_host,##2.

:timeout => 60#----------------------------------------------------------------------------}RBF# PCgai = RBF_Base::RoboticAPI.new(init_def):# RBJava(RBF

RBFint timeout = 30;gai = RBF_Base::RoboticAPI.new)RBF_BaseAPI.Open connect = new RBF_BaseAPI.Open();RBF_BaseAPI.GetPID pids = new RBF_BaseAPI.GetPID();pids.proc_name = "RBF_Server.exe";(if(gai.GetPID(pids)){
Exit(gai);})System.out.printf("PID [%d] %n", pids.pid[0]);RBFgai.Close()Ruby, Java, PHP, C#192.168.0.0/24

RBF127.0.0.1172.16.0.0/25

RBF192.168.0.3192.168.0.2

RBF172.16.0.2172.16.0.310.0.0.2:connect[:rbf_server] = '127.0.0.1'connect[:relay_host] = [ '192.168.0.2', '192.168.0.3', '172.16.0.3' ]:#if gai.Open(connect) then Terminate::Exit(gai); end:

RBF

RBF127.0.0.1IP(FQDN)172.16.0.0/25192.168.0.0/24192.168.0.2192.168.0.3:connect[:rbf_server] = '127.0.0.1'connect[:relay_host] = [ '192.168.0.2', '192.168.0.3', '172.16.0.3' ]:#if gai.Open(connect) then Terminate::Exit(gai); end:ping[:dest_addr] => '10.0.0.3'ping[:timeout]=> 5:if gai.Ping(ping) then Terminate::Exit(gai); end:172.16.0.3

RBF10.0.0.0/24ICMP/SNMP/Telnet/SSH

RBF172.16.0.2RBF_Server127.0.0.110.0.0.2HTTP/POP3/SMTP10.0.0.3RBF_ServerROBOWARE APIGetActiveProcessNum()GetCPUusageRate ()PIDAddRemovePrograms()OSCPU/ExecProcess ()FileTransfer ()SendMail()WindowCapture()KeyboardTyping()TermPrint()Telnet/SSH…etcROBOWARE – Job ManagerROBOWARE – Job ManagerPCTCPIPROBOWARE – Job Manager

DHCP

IP

Web

DMZLicenseID#2LicenseID#1

RBAManager

ID（2017年7月4日公開の情報です）