1

ORiN2.1 Specifications

Part 1: Outline

Version 2.1.0

November 18, 2008

【Remarks】

2

【Revision history】

Date Rev. Content 2005-08-25 1.0.0 First edition. 2008-11-18 2.1.0

3

Contents

1. Background ...... 4 2. outline ...... 5 3. Range of modeling ...... 6 3.1. Nonvolatile resource and volatile resource ...... 7 3.2. Pull type device and push type device ...... 7 4. Outline of CAO...... 8 4.1. Object model of CAO ...... 9 4.2. Function of CAO ...... 10 5. Outline of CRD...... 12 6. Outline of CAP ...... 14 Appendix A. Glossary ...... 15

4

1. Background

Recently, the number PC application programs in the factory is increasing. Various application programs like production management system, process control system, operation monitoring system, and trouble analysis system, etc. operate at the factory, and they are becoming keys of the system. However, most of these PC applications are developed only for a specific manufacturer and a specific model. This is because they are "a la carte" application that depends on specific proprietary networks and proprietary protocols. Once such a system is introduced in a factory, a full-time working developer is required to reside in the factory to continue the improvement of the system. Otherwise, the system will be far from really usable one, and will be left in the factory without any improvement. Such a state decreases the cost effectiveness of the system, and decreases the value of the system itself. In addition, because the product demand increase is very steep recently, failure to catch up the demand will mean the opportunity loss. Therefore, each manufacturing companies are trying achieving vertical start-up of equipment. To achieve this goal, high reusability of hardware and software throughout the equipment life cycle is very important. The reusability of “a la carte” software becomes very low. To cope with the situation, ORiN was developed to prepare standard PC application network. ORiN is an abbreviation of Open Robot/Resource Interface for the Network, and it is a framework to handle wide range of resources like robots and various FA equipments. By using ORiN, manufacturer and model independent applications can be developed, and the reusability of PC application program will be greatly improved. The ORiN project started in 1999, and ORiN Version 1 was released in 2002 as a result of the project. ORiN version 1 was applied on various FA applications, and based on the developed through the applications, new standard of ORiN version 2 (ORiN2) was released. This document is specifications of ORiN2.

Figure1: Target of ORiN 5

2. Technology outline

ORiN2 is that provides a standard program interface for FA devices (equipments) such as industrial robot, PLC or NC, and has the following features. • Independence from programming language • Independence from • Network transparency Independence from the programming language means that various programming languages can be used Independence from communication protocol means that the middleware does not rely on manufacturer proprietary protocol. Network transparency means that implemented module can be placed anywhere on the network and it can be accessed transparently from client applications. ORiN2 is composed of the following three technologies. 1 CAO-standard program interface (Chapter 2) 2 CRD-standard data schema (Chapter 3) 3 CAP-communication protocol for (Chapter 4) CAO (Controller Access Object) is based on distributed object technology, CRD (Controller Resource Definition) is based on XML technology, and CAP (Controller Access Object) is based on SOAP technology, respectively. The relationship between these technologies is shown in Figure2.

Application Add this layer for abstruction, and provide standard access procedures. ⇒ (1) Program Interface CAO

ORiN device model Provide a standard schema to represent the resources of the devices. =CRD ⇒ (2) Data Schema CRD Device(substance)

Provide a Internet-transparent access to the device =CAP ⇒ (3) Internet Transparent Protocol CAP

Figure2: ORiN2model and three technologies

6

3. Range of modeling

The specification of ORiN is defined in the viewpoint of "How are the resources in the device is opened to the public". ORiN defines a device model of abstracted FA device, and the modeled resources are shown in

Message File Task(job) …

File Task management PC ・Language Expansion Controller(main) interpretation … card Command

Robot Teach Box I/O Variabole management

Volatile resource

Non-volatile Trajectory resource

Servo FA device

Figure3. To use ORiN, not all of these resources are required, but only at least one resource that matches ORiN model is required. This lax restriction enabled utilization of ORiN with various FA devices.

Message File Task(job) …

File Task management PC ・Language Expansion Controller(main) interpretation … card Command

Robot Teach Box I/O Variabole management

Volatile resource

Non-volatile Trajectory resource

Servo FA device

7

Figure3: Object area of ORiN2

3.1. Nonvolatile resource and volatile resource Resources managed by ORiN can be classified as nonvolatile and volatile. For instance, resources like I/O and register variable of PLC (Programmable Logic Controller) exists as long as the power is supplied to the device. These types of resources are called as nonvolatile resources. On the other hand, a message character string generated by a device or command character strings sent to a device are called as nonvolatile resource. Both types of resources are modeled in ORiN

3.2. Pull type device and push type device ORiN can manage two types of devices, i.e., a pull type (store type) device and push type (event type) device. For instance, most of PLCs or robot controllers are pull type device, and their resource data is accessed from the outside. A characteristic of a pull type device is that it has "present value". Oppositely, a push type is the kind of device that pushes out data from the device, like a bar code scanner. 8

4. Outline of CAO

CAO (Controller Access Object) is a specification that becomes the nucleus of ORiN and defines a standard program interface. CAO is based on the distributed object technology. CAO consists of two parts, the engine part and the provider part. The engine part defines the sole application program interface. The aim of the engine part is to offer a generalized function that does not depend on each FA device. Oppositely, the provider part is a module that absorbs the differences between the CAO abstraction device and the actual FA device. The provider part defines the sole interface to the engine part. This is called as device interface. (Figure4)

Figure4: Outline of CAO

Because of the structure of CAO, application program developers can develop applications that do not so much depend on the devices, and device manufactures can open device functions to the public without depending on the type of the applications using the devices. Moreover, by dividing the engine part and the provider part, development of the essential function of device dependence absorption becomes easy.

Following is the framework of the CAO application. 1 A CAO application operates the device object abstracted by the CAO engine. 2 Based on the operation demand, the CAO engine executes the part of the process that doesn't depend on an actual device. 3 The CAO provider executes the part of the process that depends on the actual device and could not be processed by the CAO engine.

9

In general, "Program = algorithm + data", and CAO is designed to unify the algorithm of the programs. Unifying application program strictly limits the program specifications, but unifying algorithm enables both generality and diversity of the program. In this way, resource data expression can be defined for each manufactures and models. However, if the data expression is too much different, sharing the program becomes difficult. Therefore, ORiN introduced two ideas. One idea is system variables. Data generality can be improved by defining system variables whose meaning and purpose are laxly defined. Another idea is CAO model description language. Using the expression, a group of object necessary in assumed situations can be defined, and it is helpful to separate program algorithm and data.

4.1. Object model of CAO Figure5 shows the object tree of CAO. Because the architecture of CAO is separated to two layers (the engine part and the provider part), the object model is also separated in two.

The model of the provider part is a simple declaration model, and each object corresponds to the resource in controllers almost one by one. Please refer

Message File Task(job) …

File Task management PC ・Language Expansion Controller(main) interpretation … card Command

Robot Teach Box I/O Variabole management

Volatile resource

Non-volatile Trajectory resource

Servo FA device

Figure3 for comparison.

10

CaoEngineStatus

CaoMessage

CaoCommand

CaoCommands

to controller resources

CaoExtension

Simple model corresponding

CaoExtensions

CaoRobot

CaoProvMessage

CaoRobots

CaoProvCommand

CaoTask

CaoProvExtension

CaoTasks

CaoProvRobot

CaoFile CaoProvTask

CaoFiles

CaoProvFile

CaoVariable

CaoProvVariable

CaoVariables

CaoProvController

CaoController

CAO Provider

CaoControllers

CaoWorkspace

Collection

CaoWorkspaces

Object

CaoEngine

Legend

CAO Engine 

Figure5: Object model of CAO

Both the engine part and the provider part only includes declaration model, and operation model is minimized. Following is the reason why ORiN was designed in this way. For example, suppose resources like digital I/O. Its current value or attribute of input / output is included in declaration model. However, for the actual application programs, the model is not sufficient and various data acquisition method is necessary, like synchronous / asynchronous acquisition, or event generation when its value is changed. These methods and data processing are included in operation model. On ORiN, these operational functions are designed to be provided on various gateway applications running on CAO. ORiN is designed in this way because required operational functions so much depends on developed applications, and their variety is also very wide. Therefore, it is difficult that CAO engine include all necessary operational functions necessary in all types of applications. However, CAO engine exceptionally prepares asynchronous processing functions for CaoCommand class, because the class is naturally operational class for function expansion. In addition, in controller abstraction for CAO, not all of the actual resources are mapped, but only their subset is mapped on the model. CAO collection is a subset of actual resources. In this way, even if the controller has so many numbers of resources, application program can access to it with realistic number of instances.

4.2. Function of CAO The CAO engine has general functions like object collection management, access limitation, message management, 11 and log management, etc. These functions are separated from interface specifications to some extent, and it is possible to expand these functions in the future as long as they conform the CAO interface specifications. Therefore, it is possible to implement the engine with different functions. Because CAO is based on the distributed object technology, the module of CAO can be freely placed on the network. As a result, the object placement can be freely changed depending on the hardware configuration, software configuration, or CPU load, etc. Currently available base technologies for distributed CAO module placement are DCOM of Microsoft, CORBA of OMG, and SOAP of W3C. They can be selected according to the demanded performance and security.

PC

CAO Device Provider Provider

Proxy

Resources

Surrogate Process

,CORBA,CAP,e-CAP Application DCOM CAO Engine

CAO Provider

Proprietary Protocol

Device Proxy

Resources CAO

Process

CAO Engine Process

Process Application

Application

PC CAO

Process Application Provider

Figure6: Arrangement form of CAO module

12

5. Outline of CRD

CRD(Controller Resource Definition) is a standard to describe various, static resources of the FA device with XML(Extensible Markup Language). The [de-tasuki-ma] is called CRD schema, and the XML file described according to this CRD schema is called CRD instance. CRD is standard [de-tasuki-ma] to manage information on the FA device by a common format. CRD assumes the following two usages and is designed. (Figure 5-1 Reference) Definition of static data of device Definition of configuration of device and the entire system For instance, usage ① defines information "The length of robot A link 1 is 400mm". Such information need not communicate with the device because it is general and static, acquire, and only have to prepare the instance of CRD that stores the information on each device. Information "Equipment consists of robot A, PLC B, and operating panel C" is defined as an example of usage ②. The parameter to generate the instance of CAO(Controller Access Object) that the parameter and the device to communicate with each device offer can be stored in the CRD instance. In the CRD schema, (..the design for each element of the CAO interface and CRD to relate closely... Figure 5-1).This is based on the design policy of ORiN to be able to use each specification (CAO,CRD,CAP) independently though concepts of the ORiN2 specification are united.

CAO Engine

CaoEngine CAO Provider CRD Tag

CaoWorkspace

CaoController CaoProvController (1..*)

CaoCommand CaoProvCommand (0..*) CaoExtension CaoProvExtension (0..*) CaoFile CaoProvFile (0..*) CaoRobot CaoProvRobot (0..*) CaoTask CaoProvTask (0..*) CaoVariable CaoProvVariable (0..*) CaoMessage CaoProvMessage (0..*)

Figure 5-1 Correspondence of CAO interface and CRD tag

【 change point in CRD2.0 】 In CRD2.0 in addition to the above-mentioned two usages, Capability definition of device However. canIt has been enhanced as CRD2.0 to be more intuitively expressible though it was possible to express 13 by providing for the expression rule even in the CRD1.0 specification because the device capability is a content near usage ①. As for the instance of CRD1.0, because CRD2.0 is a complete upper compatibility of CRD1.0, the CRD2.0 schema is expressible. It came to be able to define information "Variable I was able to be used for device A, and the range of the numerical value was 1-100" for instance more intuitively because of this enhancing.

14

6. Outline of CAP

CAP(Controller Access Protocol) is a protocol to achieve the remote access between objects by way of the Internet. It communicates by using SOAP in CAP, and WSDL(Web Services Description Language) in the definition of service. This is called CAP-WSDL. It can access the CAO provider remotely by using DCOM of the CAO engine. However, the access through the Internet cannot usually do the excess of the firewall that is impossible, and exists in the enterprise etc. on substance and the remote access with the restriction on security in DCOM. Then, CAP enabled the access through the Internet by using SOAP. ..CAP.. (..the design for the CAO interface and the interface of CAP to relate closely... Figure 6-1).This is based on the design policy of ORiN to be able to use each specification (CAO,CRD,CAP) independently though concepts of the ORiN2 specification are united.

Figure 6-1 Correspondence of CAO object and CAP message

15

Appendix A. Glossary

 Distributed object technology A software technology to deploy software components (objects) that operates based on common invocation rule, and build up system based on the cooperation of these objects. Distributed object technology includes DCOM, which is developed for Windows platform by Microsoft, CORBA defined by OMG, and JavaRMI used with Java language.

 Interface A substance or rule that intermediates two things to exchange information. On IT area, interface can be categorized in “Hardware Interface”, “Software Interface”, and “User Interface.”

 XML (eXtensible Markup Language) XML is a self-extensible markup language, and the designer of the document can decide the rule to decide the document structure. (This is a reason it is "self-extensible".) By utilizing the characteristics of document designer can freely define document structure, data based on XML standard but still not bound to specific structure and has high degree of freedom in data expression, can be widely exchanged. XML has the following features. ・ Data form with meaning and content ・ Possible to define hierarchical data structure ・ Possible to describe tags logically, and to make up structured and easy-to-understand document. ・ Extensible and spreading as industry-standard data format.

 DOM (Document Object Model) DOM is standard API to treat the XML document as an object. XML document itself is a text file, but applications like browser or CAO processes each element described in XML as objects. If the way to handle XML as object is different between applications, it is big burden for developers. Therefore, W3C defined unified standard of DOM. XML API other than DOM is SAX(Simple API for XML), and both of them are widely used. DOM defines several levels, and the larger level is newer and higher performance. The latest recommendation from W3C is Level-2, and CRD provider uses this level.

 XML parser The XML document usually exists as a text file. However, XML allows various expressions, and several procedures are necessary to read the data into application. XML parser is collection of commonly used procedures to read data. A standardized API is used to call XML parser from application. Standard API includes DOM and SAX. DOM is an open standard and currently several XML parser based on DOM are released. For Windows environment, MSXML can easily used with Visual C++ and Visual Basic, and CRD provider uses MSXML. There exists 16

several versions of MSXML, and CRD provider uses MSXML4.0. To use CRD provider, checking installed MSXML version is necessary.

 XML schema The schema in XML is description of possible XML document structure. This is a description of correct arrangement of data element and attribute array, and by describing the schema, XML parser can check the correctness of XML document automatically to some extent. Typical XML schema language includes DTD, XML Schema, RELAX, or XDR, and CRD uses XML Schema.

 SOAP (Simple Object Access Protocol) SOAP is a protocol to call the object on remote PC by transmitting messages described by XML format with HTTP. There are CORBA and DCOM, etc. as a technology to call the object on remote PC. However, these technologies use its original port number for communication. If communication over firewall is necessary, firewall need to be set to allow using the port. However, because there exists worms that uses DCOM security hole recently, communication to use DCOM port is usually not allowed. To solve these problems, SOAP technology was developed. SOAP only defines message structure exchanged between object, and it uses existing HTTP and SMTP for communication protocol. As a result, if HTTP and SMTP communication is possible, using distributed object technology through the firewall becomes possible by using SOAP.

 WSDL (Web Services Description Language) WSDL is an interface description language for XML based Web service. WSDL can describe Web service information like access point (URL), used protocol (SOAP, HTTP, MIME), message format (XML Schema). For SOAP, WSDL file is equivalent to IDL (Interface Description Language) of CORBA and COM.

 DCOM (Distributed Component Object Model) Specification of distributed object technology defined by Microsoft Corp. The software parts crated based on Microsoft COM specifications (called "COM object") communicate mutually through network, and they can exchange data or process request.

 CORBA (Common Object Request Broker Architecture) Specification of distributed object technology defined by OMG (OMG is an industry group for standardization and promotion of object-oriented technology, established in 1989). CORBA does not depend on a platform, while DCOM is for the Windows platform.

 CAO (Controller Access Object) CAO is "Standard program interface" that offers a common interface and the function to the client application and controllers for FA (factory ). 17

 CAO interface (API) A CAO provided API for client application to operate FA controllers. “CAO API” means this interface.

 CAO engine CAO engine is a middleware (executable) that implements CAO interface, and it provides common function to CAO providers and CAO interface to CAO applications. Common functions for CAO provider are collection function, message output, CRD switching function, etc.

 CAO provider The CAO provider is subordinate module of CAO, and it is DLL that implements manufacture dependent process.

 CAO provider template C++ template that supports CAO Provider implementation. This template is automatically generated by ProviderWizard.

 CAP(Controller Access Protocol) A "Communication protocol for the Internet" to access CAO provider over the Internet. In CAP, SOAP based messages to access the CAO provider is defined.

 CAP provider A CAO provider to generate, send and receive CAP message.

 CAP listener A server program to receive CAP message and run CAO on remote machine.

 CAP message A SOAP message defined by CAP.

 CRD (Controller Resource Definition) A data schema that defines general-purpose data format to express manufacture and model dependent resource information of FA equipment.

 CRD resource Resource of FA equipment expressed by CRD.

 CRD data FA equipment resource data described according to CRD and described by XML. 18

 CRD data schema A schema that defines the format of the CRD data.

 CRD file A XML file describing CRD data.

 CRD provider A kind of the CAO provider to access the CRD data.

1

ORiN2.1 Specifications

Part 2: CAO

Version 2.1.8

July 3, 2012

【Remarks】

2

【Revision history】

Date Rev. Content 2005/08/25 1.0.0 First edition. 2011/04/22 2.1.5 Add @GetIfMember option. 2012/07/03 2.1.8 Add @Insensitive option

3

Contents

1. Outline...... 6 1.1. Object model of CAO...... 7 1.2. Function of CAO ...... 8 2. CAO component configuration...... 10 2.1. CAO engine ...... 10 2.2. CAO provider ...... 11 2.3. Implementation of common interface...... 11 3. Structure of CAO object ...... 12 3.1. Structure of CAO engine...... 12 3.2. Structure of CAO provider...... 13 3.3. Relation between CAO engine and CAO provider ...... 13 4. Details of CAO engine...... 15 4.1. List of class and interface ...... 15 4.2. List of method and property ...... 17 4.2.1. CaoEngine Object-engine ...... 17 4.2.2. CaoWorkspace(s) Object-workspace ...... 18 4.2.3. CaoController(s) Object-controller...... 20 4.2.4. CaoVariable(s) Object-variable...... 24 4.2.5. CaoRobot(s) Object-robot ...... 26 4.2.6. CaoFile(s) Object-file...... 31 4.2.7. CaoTask(s) Object-task ...... 34 4.2.8. CaoCommand(s) Object-command...... 37 4.2.9. CaoExtension(s) Object-enhancing board...... 39 4.2.10. CaoMessage Object-message ...... 41 4.2.11. CaoEngineStatus Object-engine status ...... 42 4.3. List of event ...... 43 4.3.1. CaoController Object-controller...... 43 4.3.2. CaoCommands Object-command ...... 43 4.4. Function specifications...... 44 4.4.1. ICaoEngine ...... 44 4.4.2. ICaoWorkspaces ...... 46 4.4.3. ICaoWorkspace...... 48 4.4.4. ICaoControllers ...... 52 4.4.5. ICaoController ...... 55 4.4.6. ICaoVariables ...... 68 4.4.7. ICaoVariable...... 71 4.4.8. ICaoRobots ...... 75 4

4.4.9. ICaoRobot ...... 78 4.4.10. ICaoFiles ...... 89 4.4.11. ICaoFile ...... 92 4.4.12. ICaoTasks...... 103 4.4.13. ICaoTask ...... 106 4.4.14. ICaoCommands ...... 113 4.4.15. ICaoCommand ...... 116 4.4.16. ICaoExtensions ...... 123 4.4.17. ICaoExtension...... 126 4.4.18. ICaoMessage ...... 131 4.4.19. ICaoEngineStatus...... 134 4.4.20. _ICaoControllerEvents ...... 137 4.4.21. _ICaoCommandsEvents...... 138 5. Details of CAO provider ...... 139 5.1. Class and list of interface...... 139 5.2. List of method and property ...... 140 5.2.1. CaoProvController Object-controller...... 140 5.2.2. CaoProvVariable Object-variable ...... 142 5.2.3. CaoProvRobot Object-robot ...... 143 5.2.4. CaoProvFile Object-file ...... 147 5.2.5. CaoProvTask Object-task...... 149 5.2.6. CaoProvCommand Object-command...... 151 5.2.7. CaoProvExtension Object-extension board...... 153 5.2.8. CaoProvMessage Object-message...... 154 5.3. Function specifications...... 155 5.3.1. ICaoProvController...... 155 5.3.2. ICaoProvVariable ...... 164 5.3.3. ICaoProvRobot...... 168 5.3.4. ICaoProvFile...... 177 5.3.5. ICaoProvTask...... 186 5.3.6. ICaoProvCommand...... 191 5.3.7. ICaoProvExtension...... 196 5.3.8. ICaoProvMessage...... 199 5.3.9. _ICaoProvControllerEvents...... 202 6. Generation of CAO object...... 203 6.1. Connection parameter of CaoWorkspace::AddController method ...... 204 7. CAO system variable ...... 205 7.1. CaoController object ...... 205 7.2. CaoRobot object ...... 206 5

7.3. CaoTask object ...... 208 7.4. CaoExtension object...... 209 8. CAO event message...... 210 9. Option character string of CAO...... 213 9.1. @EventDisenable option ...... 215 9.2. @Create option...... 215 9.3. @IfNotMember option...... 215 9.4. @GetIfMember option...... 216 9.5. @ThreadPriority option...... 216 9.6. @Insensitive option ...... 216 Appendix A. DCOM-CAO Engine IDL ...... 218 Appendix B. DCOM-CAO Provider IDL...... 231 Appendix C. CORBA-CAO Engine IDL...... 239 Appendix D. CORBA-CAO Provider IDL...... 245

6

1. Outline

CAO (Controller Access Object) is a specification that becomes the nucleus of ORiN and defines a standard program interface. CAO is based on the distributed object technology. CAO consists of two parts, the engine part and the provider part. The engine part defines the sole application program interface. The aim of the engine part is to offer a generalized function that does not depend on each FA device. Oppositely, the provider part is a module that absorbs the differences between the CAO abstraction device and the actual FA device. The provider part defines the sole interface to the engine part. This is called as device interface. (Figure 1-1)

DC

Internet Application App. App. App. OPC UPnP FDML X Y Z

Interface for Applications Abstract Dev. Device Engine B CAO Engine Interface for DevicesDevices

Provider A Co. B Co. C Co. D Co.

Figure 1-1 Outline of CAO

Because of the structure of CAO, application program developers can develop applications that do not so much depend on the devices, and device manufactures can open device functions to the public without depending on the type of the applications using the devices. Moreover, by dividing the engine part and the provider part, development of the essential function of device dependence absorption becomes easy.

Following is the framework of the CAO application. 1 A CAO application operates the device object abstracted by the CAO engine. 2 Based on the operation demand, the CAO engine executes the part of the process that doesn't depend on an actual device. 3 The CAO provider executes the part of the process that depends on the actual device and could not be processed by the CAO engine.

7

In general, "Program = algorithm + data", and CAO is designed to unify the algorithm of the programs. Unifying application program strictly limits the program specifications, but unifying algorithm enables both generality and diversity of the program. In this way, resource data expression can be defined for each manufactures and models. However, if the data expression is too much different, sharing the program becomes difficult. Therefore, ORiN introduced two ideas. One idea is system variables. Data generality can be improved by defining system variables whose meaning and purpose are laxly defined. Another idea is CAO model description language. Using the expression, a group of object necessary in assumed situations can be defined, and it is helpful to separate program algorithm and data.

1.1. Object model of CAO Figure 1-2 shows the object tree of CAO. Because the architecture of CAO is separated to two layers (the engine part and the provider part), the object model is also separated in two. The model of the provider part is a simple declaration model, and each object corresponds to the resource in controllers almost one by one.

 CAO Engine Legend CaoEngine Object CaoWorkspaces Collection CaoWorkspace CaoControllers CAO Provider CaoController CaoVariables CaoProvController CaoVariable CaoProvVariable CaoFiles CaoProvFile CaoFile CaoProvTask CaoTasks CaoProvRobot CaoTask CaoProvExtension CaoRobots CaoProvCommand CaoRobot CaoProvMessage CaoExtensions CaoExtension Simple model corresponding to controller resources CaoCommands CaoCommand CaoMessage CaoEngineStatus Figure 1-2 Object model of CAO

Both the engine part and the provider part only includes declaration model, and operation model is minimized. Following is the reason why ORiN was designed in this way. For example, suppose resources like digital I/O. Its current value or attribute of input / output is included in declaration model. However, for the actual application 8 programs, the model is not sufficient and various data acquisition method is necessary, like synchronous / asynchronous acquisition, or event generation when its value is changed. These methods and data processing are included in operation model. On ORiN, these operational functions are designed to be provided on various gateway applications running on CAO. ORiN is designed in this way because required operational functions so much depends on developed applications, and their variety is also very wide. Therefore, it is difficult that CAO engine include all necessary operational functions necessary in all types of applications. However, CAO engine exceptionally prepares asynchronous processing functions for CaoCommand class, because the class is naturally operational class for function expansion. In addition, in controller abstraction for CAO, not all of the actual resources are mapped, but only their subset is mapped on the model. CAO collection is a subset of actual resources. In this way, even if the controller has so many numbers of resources, application program can access to it with realistic number of instances.

1.2. Function of CAO The CAO engine has general functions like object collection management, access limitation, message management, and log management, etc. These functions are separated from interface specifications to some extent, and it is possible to expand these functions in the future as long as they conform the CAO interface specifications. Therefore, it is possible to implement the engine with different functions. Because CAO is based on the distributed object technology, the module of CAO can be freely placed on the network. As a result, the object placement can be freely changed depending on the hardware configuration, software configuration, or CPU load, etc. Currently available base technologies for distributed CAO module placement are DCOM of Microsoft, CORBA of OMG, and SOAP of W3C. They can be selected according to the demanded performance and security. 9

PC Application CAO Engine Application CAO Provider Process PC

Application Application Process CAO Engine Process Process CAO Provider CAO Provider Proxy Proxy

Proprietary Protocol DCOM,CORBA,CAP,e-CAP

Surrogate Process CAO Provider Resources

Resources

Device Device

Figure 1-3 Arrangement form of CAO module

10

2. CAO component configuration

shows the configuration of CAO components.

Figure 2-1 Component composition of CAO

The component of CAO has two-layer structure with the engine (kernel part) and the provider part. The engine offers the function of a common interface to client applications, and the provider offers the function to the engine to absorb the device dependent part. As a result, the device manufacture can open the function of the device to the public without depending on the client application. Application venders also can develop client applications without depending on the devices. The engine part component of CAO is called as CAO engine, and the provider part is called CAO provider. The application that uses the functions of CAO is called as CAO client application.

2.1. CAO engine The CAO engine is a component that becomes the kernel of CAO. The CAO engine exists between the CAO client application and the CAO provider, and intermediates between them to exchange data and commands. Client applications is always linked with CAO engine, the engine is linked to the necessary CAO providers depending on the request from the client applications. The link between client application ⇔CAO engine ⇔CAO providers is realized based on the specifications of DCOM or CORBA, a distributed object technology. Therefore, these links can be extended beyond the process, the PC machine, or the Internet. Using the function, client applications can easily realize remote access or load balancing. CAO engine has following functions.  CAO provider management  Object collection management 11

 Asynchronous message processing with message pool (event processing)  Message context management by handling messages as objects.  Transfer function between providers of message  Early registration of object (CAO model)  Dynamic API change by dynamic binding  Static information mergence using CRD file  Connection to remote engine

2.2. CAO provider The CAO provider is a component to absorb the difference between FA devices. The CAO provider exists between the CAO engine and the FA device, and intermediates between them to exchange data and commands. CAO provider has following functions.  Absorption of the difference between the abstract device and the real device  Access to the real device

2.3. Implementation of common interface Interface defines the rule of component implementation, but component function code is not implemented in interface class. In a word, interface is "skeleton of the class. " Implemented interface can show that classes without class hierarchy relation have common methods and properties. When ORiN target FA devices were modeled for CAO, objects corresponding to each resource in the device and its prototype class is assigned, and interface class defines common access procedure to these objects. In CAO, C++ language processing system is used to implement the common interface, and IDL file defines the interface. In this way, interface is created as an abstract class, and its member functions are pure virtual function. The class is called as an interface class. Resource classes that abstract each resource in CAO engine are named as Cao, and their interface is defined as ICao. Resource classes that abstract each resource in CAO providers are named as CaoProv, and their interface is defined as ICao. Resource classes provide common interface by inheriting corresponding interface class and implement their action.

Table2-1 Class name of implementation and interface

CAO object implementation class interface class CAO Engine Cao< resource name > ICao< resource name > CAO Provider CaoProv< resource name > ICaoProv< resource name >

12

3. Structure of CAO object

Figure 3-1 shows object layer of CAO. The top of the layer is client applications, and then, CAO engine, CAO provider, and the bottom of the layer is FA devices. CAO client applications access (read and write) the resources in FA devices through CAO engine interface.

Figure 3-1 Object layer of CAO

3.1. Structure of CAO engine Following figure shows CAO engine class structure.

Figure 3-2 Class structure of CAO Engine

13

3.2. Structure of CAO provider Following figure shows CAO provider class structure.

Figure 3-3 Class structure of CAO Provider

3.3. Relation between CAO engine and CAO provider Following figure shows relationship between CAO engine and CAO provider. 14

Figure3-4: Relationship between Engine and Provider of CAO

As shown in Figure3-4, CAO engine and CAO provider is closely linked, and CAO engine resource class and CAO provider recourse class has one-to-one correspondence. CAO engine dynamically relates its classes to CAO provider classes when CAO engine makes connection to a device and provider object is created. CRD provider object is linked to CAO engine resource class. The linkage is used by CAO engine for "static information merge processing with CRD file". Depending on the situation, CAO engine can selectively access device provider or CRD provider. CRD provider is a kind of CAO provider, and it has the same interface as normal providers. Therefore, the selection process is as simple as switching a pointer to the object. For details of CRD provider, please refer to “ORiN2.1 Specifications Part3:CRD”. 15

4. Details of CAO engine

4.1. List of class and interface

Table4-1 CAO Engine class list

Class name Object resource Explanation CaoEngine - Root class. This class is a starting point to generate each class. CaoWorkspace - Workspace class. CaoWorkspaces - Dynamic collection class of workspace class. CaoController Controller Controller class. CaoControllers - Dynamic collection class of controller class. CaoVariable Variable Variable class. CaoVariables - Dynamic collection class of variable class. CaoRobot Robot Robot class. CaoRobots - Dynamic collection class of robot class. CaoFile File File class. CaoFiles - Dynamic collection class of file class. CaoTask Task Task class. CaoTasks - Dynamic collection class of task class. CaoCommand Command Command class. CaoCommands - Dynamic collection class of command class. CaoExtension Extension board Extension board class. CaoExtensions - Dynamic collection class of extension board class. CaoMessage Message Message class. CaoEngineStatus - Status class of CAO. (to watch CAO engine)

Table4-2 Interface class list of CAO Engine

Implementation Interface name Explanation class IcaoEngine CaoEngine Engine IF class. IcaoWorkspace CaoWorkspace Workspace IF class. IcaoWorkspaces CaoWorkspaces Dynamic collection class of workspace IF class. IcaoController CaoController Controller IF class. IcaoControllers CaoControllers Dynamic collection class of controller IF class. IcaoVariable CaoVariable Variable IF class. 16

IcaoVariables CaoVariables Dynamic collection class of variable IF class. IcaoRobot CaoRobot Robot IF class. IcaoRobots CaoRobots Dynamic collection class of robot IF class. IcaoFile CaoFile File IF class. IcaoFiles CaoFiles Dynamic collection class of file IF class. IcaoTask CaoTask Task IF class. IcaoTasks CaoTasks Dynamic collection class of task IF class. IcaoCommand CaoCommand Command IF class. IcaoCommands CaoCommands Dynamic collection class of command IF class. IcaoExtension CaoEntension Extension board IF class. IcaoExtensions CaoEntensions Dynamic collection class of extension board IF class. IcaoMessage CaoMessage Message IF class. IcaoEngineStatus CaoEngineStatus CAO status IF class. IeventSink EventSink Event IF class _ICaoControllerEvents CaoController Controller event IF class _ICaoCommandsEvents CaoCommands Event IF class of command collection

17

4.2. List of method and property 4.2.1. CaoEngine Object-engine Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoEngine EngineStatus P Get engine status R Object: ICaoEngineStatus

Workspaces P Get workspace R Collection: ICaoWorkspaces collection

AddWorkspace M Add workspace S Workspace name:BSTR, Object: ICaoWorkspace Same function as CaoWorkspaces::Add(). object [Option name:BSTR]

Execute M Execute extension S Command: VARIANT Result: VARIANT For function extension (reserved) command

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

(note1)Following is the meaning of the symbols. The ON/OFF setting of CAO engine access limit function (write limit function) only affects W attribute methods and properties. R-Read: Get status and configuration of controller, provider, or engine. W-Write: Change status and configuration of controller. Execute method function has S attribute because its function depends on the command to be executed. If necessary, write protection is implemented in provider. S-Setup: Change status and configuration of provider and engine.

18

4.2.2. CaoWorkspace(s) Object-workspace Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoWorkspaces Count P Get number of R Number of registration in collection: collections long

Add M Add workspace S Workspace name: BSTR, Object: ICaoWorkspace The workspace name is an arbitrary object [Option: BSTR] character string. When the workspace name is omitted (NULL specification), a unique name is automatically named. The following one can be set to the option as CAO standard. Object automatic operation generation: File passing of @CRDFile= Existing object acquisition: @IfNotMember = True/False default value is "False. "

Clear M Release all S workspace objects

IsMember M Check registration of R Workspace name / Check result: VARIANT_BOOL workspace object number: VARIANT

Item M Get workspace R Workspace name / Object: ICaoWorkspace Default member object number: VARIANT

Remove M Release workspace S Workspace name / object number: VARIANT

CaoWorkspace Controllers P Get controller R Collection: ICaoControllers 19

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

collection

Index P Get workspace index R Workspace index: long

Name P Get workspace R Workspace name: BSTR name

ProviderNames P Get provider name R [Option: BSTR] Provider name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

AddController M Add controller object S Controller name: BSTR, Object: ICaoController Same function as CaoControllers::Add(). Provider name: BSTR, [Machine name: BSTR, [Option: BSTR]]

Execute M Execute extension S Command: VARIANT Result: VARIANT For function extension (reservation) command

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

20

4.2.3. CaoController(s) Object-controller Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoControllers Count P Get number of R Number of registration in collection: collections long

Add M Add controller object S Controller name: BSTR, Object: ICaoController The controller name is an arbitrary character Provider name: BSTR, string. [Machine name: BSTR, The following one can be set to the option as [Option: BSTR]] CAO standard. Event prohibition: @EventDisable = True/False default value is "True. " New making: Making @Create=< type > default value is 0. Existing object acquisition: @IfNotMember = True/False default value is "False. " Thread priority: Thread priority of @ThreadPriority=< > default value is three.

Clear M Release all controller S objects

IsMember M Check registration of R Controller name / number: Check result: VARIANT_BOOL controller object VARIANT

Item M Get controller object R Controller name / number: Object: ICaoController Default member VARIANT

Remove M Release controller S controller name / number: 21

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

object VARIANT

CaoController Attribute P Get attribute R Attribute: Long

CommandNames P Get command name R [Option: BSTR] Command name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

Commands P Get command R Collection: ICaoCommands collection

ExtensionNames P Get extension board R Option: BSTR Extension board name list: The option is filter condition etc. name list VARIANT(VT_VARIANT|VT_ARRAY)

Extensions P Get extension board R Collection: ICaoExtensions collection

FileNames P Get file name list R [Option: BSTR] File name list: The option is filter condition etc. VARIANT(VT_VARIANT|VT_ARRAY)

Files P Get file collection R Collection: ICaoFiles File collection of root directory.

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Index P Get controller index R Controller index: long

Name P Get controller name R Controller name: BSTR

RobotNames P Get robot name list R [Option: BSTR] Robot name list: The option is filter condition etc. VARIANT(VT_VARIANT|VT_ARRAY)

Robots P Get robot collection R Collection: ICaoRobots

Tag P Tag R/S Tag data: VARIANT Tag data: VARIANT

TaskNames P Get task name list R [Option: BSTR] Task name list: The option is filter condition etc. 22

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

VARIANT(VT_VARIANT|VT_ARRAY)

Tasks P Get task collection R Collection: ICaoTasks

VariableNames P Get variable name R [Option: BSTR] Variable name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

Variables P Get variable R Collection: ICaoVariables collection

AddCommand M Add command object S Command name: BSTR, Object: ICaoCommand The same function as [Option: BSTR] CaoCommands::Add().

AddExtension M Add extension board S Extension board name: Object: ICaoExtension The same function as object BSTR, CaoExtensions::Add(). [Option: BSTR]

AddFile M Add file object S File name: BSTR, Object: ICaoFile The same function as CaoFiles::Add(). [Option: BSTR]

AddRobot M Add robot object S Robot name: BSTR, Object: ICaoRobot The same function as CaoRobots::Add(). [Option: BSTR]

AddTask M Add task object S Task name: BSTR, Object: ICaoTask The same function as CaoTasks::Add(). [Option: BSTR]

AddVariable M Add variable object S Variable name: BSTR, Object: ICaoVariable The same function as CaoVariables::Add(). [Option: BSTR]

Execute M Execute extension S Command: VARIANT Result: VARIANT For function enhancing command

GetMessage M Get message R Message: ICaoMessage Get message from message queue in CAO 23

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

engine. Message can be acquired only if OnMessage event function is disabled.

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

24

4.2.4. CaoVariable(s) Object-variable Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoVariables Count P Get number of R Number of registration in collection: collections long

Add M Add variable object S Variable name: BSTR, Object: ICaoVariable The following one can be set to the option as [Option: BSTR] CAO standard. New making: Making @Create=< type > default value is 0. Existing object acquisition: @IfNotMember = True/False default value is "False. "

Clear M Release all variable S objects

IsMember M Check registration of R Variable identifier/number: Check result: VARIANT_BOOL variable object VARIANT

Item M Get variable object R Variable identifier/number: Object: ICaoVariable Default member VARIANT

Remove M Release variable S Variable identifier/number: object VARIANT

CaoVariable Attribute P Get attribute R Attribute: Long

DateTime P Get time and date R Time and date stamp: VARIANT stamp

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT 25

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

Index P Get variable index R Variable index: long

Microsecond P Get time and date R Time and date stamp: Long stamp (micro second)

Name P Get variable name R Variable name: BSTR System variable names start by @.

Tag P Tag R/S Tag data: VARIANT Tag data: VARIANT

Value P Get value R/W Value:VARIANT Value:VARIANT Default member

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

26

4.2.5. CaoRobot(s) Object-robot Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoRobots Count P Get number of R Number of registration in collection: collections long

Add M Add robot object S Robot name: BSTR, Object: ICaoRobot The following one can be set to the option as [Option: BSTR] CAO standard. New making: Making @Create=< type > default value is 0. Existing object acquisition: @IfNotMember = True/False default value is "False. "

Clear M Release all robot S objects

IsMember M Check registration of R Robot name/number: Check result: VARIANT_BOOL robot object VARIANT

Item M Get robot object R Robot name/number: Object: ICaoRobot Default member VARIANT

Remove M Release robot object S Robot name/number: VARIANT

CaoRobot Attribute P Get attribute R Attribute: Long

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Index P Get robot index R Robot index: long

Name P Get robot name R Robot name: BSTR 27

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

Tag P Tag R/S Tag data: VARIANT Tag data: VARIANT

VariableNames P Get variable name R [Option: BSTR] Variable name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

Variables P Get variable R Collection: ICaoVariables collection

Accelerate M Refer to ACCEL W Joint number:long, Joint number –1: Tool Center Point(TCP) statement Accel:float, acceleration/deceleration specification of [Decel:float] Joint number 0: All joint SLIM. acceleration/deceleration Other joint number is for acceleration / deceleration of specified joint.

AddVariable M Add variable object S Variable name: BSTR, Object: ICaoVariable Same function as CaoVariables::Add(). [Option: BSTR]

Change M Refer to CHANGE W Hand name: BSTR statement specification of SLIM.

Chuck M Refer to GRASP W [Option: BSTR] statement specification of SLIM.

Drive M Refer to DRIVE W Joint number:long, Unlike SLIM, multi-joint motion is not 28

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

statement Distance:float, supported. In the case, MOVE is specification of [Option:BSTR] recommended. SLIM.

Execute M Execute extension S Command: VARIANT Result: VARIANT For function enhancing command

GoHome M Refer to GOHOME W statement specification of SLIM.

Hold M Refer to the W [Option: BSTR] It is a meaning of the temporary stop of the specification of the program in SLIM or it means the temporary HOLD sentence of stop of the robot operation in CAO. SLIM.

Halt M Refer to the W [Option: BSTR] It is a meaning of the forced outage of the specification of the program in SLIM or it means the forced HALT sentence of outage of the robot operation in CAO. SLIM.

Move M Refer to MOVE W Interpolation:long, - Interpolation specification 1:PTP, 2:CP, statement Pose array: 3:Circle specification of VARIANT, - Pose specification is manufacturer SLIM. [Option:BSTR] dependent. Circle interpolation will use an array of poses. 29

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

- Default value for option is “”.

Rotate M Refer to ROTATE W Rotation plane: Specification of rotation plane is statement VARIANT, manufacturer dependant. specification of Angle: Float, SLIM. Rotation center: VARIANT, [Option:BSTR]

Speed M Refer to SPEED / W Joint number:long, Joint number –1: TCP speed JSPEED statement Speed:float Joint number 0: All joint speed specification of Other joint number is for speed of specified SLIM. joint.

Unchuck M Refer to RELEASE W [Option: BSTR] SLIM statement name RELEASE is changed statement to Chuck/Unchuck, because original SLIM specification of statement name Release is already used in SLIM. ORiN.

Unhold M Release of HOLD W [Option: BSTR] Because it means the temporary stop of the sentence of SLIM robot operation in CAO, it uses it for the restart though the command of the restart is not provided because the HOLD sentence is a meaning of the temporary stop of the program in SLIM.

30

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

31

4.2.6. CaoFile(s) Object-file Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoFiles Count P Get number of R Number of registration in collection: collections long

Add M Add file object S Variable name: BSTR, Object: ICaoFile The following one can be set to the option as [Option: BSTR] CAO standard. New making: Making @Create=< type > default value is 0. Existing object acquisition: @IfNotMember = True/False default value is "False. "

Clear M Release all file S objects

IsMember M Check registration of R File name/number: Check result: VARIANT_BOOL file object VARIANT

Item M Get file object R File name/number: Object: ICaoFile Default member VARIANT

Remove M Release file object S File name/number: VARIANT

CaoFile Attribute P Get attribute R Attribute: long

DateCreated P Get creation date R Creation date: VARIANT.

DateLastAccessed P Get last access date R Last access date: VARIANT

DateLastModified P Get last change date R Last change date: VARIANT

FileNames P Get file name list R [Option: BSTR] File name list: The option is filter condition etc. 32

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

VARIANT(VT_VARIANT|VT_ARRAY) Returns child file name list when the attribute is a directory.

Files P Get file collection R Collection: ICaoFiles

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Index P Get file index R File index: long

Name P Get file name R File name: BSTR

Path P Get file path R Path name: BSTR Returns absolute path. File name is not included. The last delimiter is included..

Size P Get file size R File size: long

Tag P Tag R/S Tag data: VARIANT Tag data: VARIANT

Type P Get file type R File type: BSTR

Value P File data R/W Data: VARIANT Data: VARIANT Default member

VariableNames P Get variable name R [Option: BSTR] Variable name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

Variables P Get variable R Collection: ICaoVariables collection

AddFile M Add file object S File name: BSTR, Object: ICaoFile The same function as CaoFiles::Add(). [Option: BSTR]

AddVariable M Add variable object S Variable name: BSTR, Object: ICaoVariable The same function as CaoVariables::Add(). [Option: BSTR]

Copy M Copy file W Destination file name: 33

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

BSTR [Option: BSTR]

Delete M Delete file W [Option: BSTR]

Execute M Execute extension S Command: VARIANT Result: VARIANT For function enhancing command

Move M Move file W Destination file name: BSTR [Option: BSTR]

Run M Create task W [Option: BSTR] Task name: BSTR

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

34

4.2.7. CaoTask(s) Object-task Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoTasks Count P Get number of R Number of registration in collection: collections long

Add M Add task object S Task name: BSTR, Object: ICaoTask オプションには,CAO 標準として以下のような [Option: BSTR] ものを設定できます. 新規作成: @Create=<作成タイプ> デフォル ト値は 0 既存オブジェクト取得: @IfNotMember[=True/False] デフォルト値は "False"

Clear M Release all task S objects

IsMember M Check registration of R Task name/number: Check result: VARIANT_BOOL task object VARIANT

Item M Get task object R Task name/number: Object: ICaoTask Default member VARIANT

Remove M Release task object S Task name/number: VARIANT

CaoTask Attribute P Get attribute R Attribute: long

FileName P Get corresponding R File name: BSTR file name

Help P Help R Help character string: BSTR 35

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

ID P ID R/W ID:VARIANT ID:VARIANT

Index P Get task index R Task index: long

Name P Get task name R Task name: BSTR

Tag P Tag R/S Tag data: VARIANT Tag data: VARIANT

VariableNames P Get variable name R [Option: BSTR] Variable identifier list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

Variables P Get variable R Collection: ICaoVariables collection

AddVariable M Add variable object S Variable name: BSTR, Object: ICaoVariable Same function as CaoVariables::Add(). [Option: BSTR]

Delete M Delete task W [Option: BSTR]

Execute M Execute extension S Command: VARIANT Result: VARIANT For function enhancing command

Start M Start task W Mode: long, Mode=1: One cycle execution [Option: BSTR] Mode=2: Continuous cycle execution Mode=3: One step forward execution Mode=4: One step backward execution Option specifies start position, etc.

Stop M Stop task W Mode: long, Mode=0: Default stop [Option: BSTR] Mode=1: Immediate stop Mode=2: Step stop Mode=3: Cycle stop 36

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

Mode=4: Initialization stop (Note) Default stop is one of above mentioned stop type.

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

37

4.2.8. CaoCommand(s) Object-command Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoCommands Count P Get number of R Number of registration in collection: collections long

Add M Add command object S Command name: BSTR, Object: ICaoCommand The following one can be set to the option as [Option: BSTR] CAO standard. New making: Making @Create=< type > default value is 0. Existing object acquisition: @IfNotMember = True/False default value is "False. "

Clear M Release all S command objects

IsMember M Check registration of R Command name/number: Check result: VARIANT_BOOL command object VARIANT

Item M Get command object R Command name/number: Object: ICaoCommand Default member VARIANT

Remove M Release command S Command name/number: object VARIANT

CaoCommand Attribute P Get attribute R Attribute: long

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Index P Get command index R Command index: long

Name P Get command name R Command name: BSTR 38

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

Parameters P Command R/W Command parameter: Command parameter: VARIANT parameter VARIANT

Result P Execution result of R Execution result: VARIANT latest Execute()

State P Get state R State: long Status-bit1 0: Waiting, 1: Running Meanings of other bits are provider dependent.

Tag P Tag R/S Tag data: VARIANT Tag data: VARIANT

Timeout P Time-out R/W Time-out: Long Time-out: Long

Cancel M Cancel execution of S command

Execute M Execute command S Mode: long Mode=0: synchronous execution Mode=1: asynchronous execution Returns S_FALSE when command is executed asynchronously.

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

39

4.2.9. CaoExtension(s) Object-enhancing board Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoExtensions Count P Get number of R Number of registration in collection: collections long

Add M Add extension board S Extension board name: Object: ICaoExtension The following one can be set to the option as object BSTR, CAO standard. [Option: BSTR] New making: Making @Create=< type > default value is 0. Existing object acquisition: @IfNotMember = True/False default value is "False. "

Clear M Clear of all extension S board objects

IsMember M Check registration of R Extension board name / Check result: VARIANT_BOOL extension board number: VARIANT object

Item M Get extension board R Extension board Object: ICaoExtension Default member object name/number: VARIANT

Remove M Release extension S Extension board name / board object number: VARIANT

CaoExtension Attribute P Get attribute R Attribute: long

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Index P Get extension board R Extension board index: long 40

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

index

Name P Get extension board R Extension board name: BSTR name

Tag P Tag R/S Tag data: VARIANT Tag data: VARIANT

VariableNames P Get variable name R [Option: BSTR] Variable name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

Variables P Get variable R Collection: ICaoVariables collection

AddVariable M Add variable object S Variable name: BSTR, Object: ICaoVariable Same function as CaoVariables::Add(). [Option: BSTR]

Execute M Execute extension S Command: VARIANT Result: VARIANT For function enhancing command

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

41

4.2.10. CaoMessage Object-message Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoMessage DateTime P Creation date R Creation: VARIANT

Description P Message description R Description: BSTR

Destination P Message destination R Destination: BSTR

Number P Message number R Message number: long

SerialNumber P Message serial R Message serial number: long CAO engine automatically assign serial number number from 0 to LONG_MAX. Serial number is cleared to 0 when it reaches LONG_MAX.

Source P Message source R Message source: BSTR

Value P Message text R Message text: VARIANT

Clear M Clear message W

Reply M Reply message W

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

42

4.2.11. CaoEngineStatus Object-engine status Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CurrentDateTime P Current date and R Current date and time: VARIANT CaoEngineStatus time

ComputerName P Computer name R Computer name: BSTR

ObjectCounts P Number of objects in R Class name/number: Number of objects: long each class VARIANT

StartDateTime P Start date and time R Start date and time: VARIANT

Values P (reservation for R Status name/number: Data: VARIANT future VARIANT enhancement)

Version P Get CAO engine R Version: BSTR . . version

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

43

4.3. List of event 4.3.1. CaoController Object-controller Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoController OnMessage E Message reception R Message: ICaoMessage - Realizes Provider(controller) -> CAO event engine -> Client calling event. - Negative message number is reserved in ORiN. - Nullification of event is specified by the option of AddController().

Meaning of a E:Event symbol

4.3.2. CaoCommands Object-command Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoCommands ExecuteComplete E Command execution Command number: long Get execution result from Result property. completion event

Meaning of a E:Event ・Arguments in [] are optional.. symbol

44

4.4. Function specifications 4.4.1. ICaoEngine get_EngineStatus Format HRESULT ICaoEngine::get_EngineStatus ( [out, retval] ICaoEngineStatus** ppICaoEngineStatus )

Function Get engine status

Parameter [out] ppICaoEngineStatus Address of CaoEngineStatus IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoEngineStatus object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

get_Workspaces Format HRESULT ICaoEngine::get_Workspaces ( [out, retval] ICaoWorkspaces** ppICaoWSs )

Function Get workspace collection

Parameter [out] ppICaoWSs Address of CaoWorkspaces IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoWorkspaces object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

AddWorkspace Format HRESULT ICaoEngine::AddWorkspace ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, 45

[out, retval] ICaoWorkspace** ppICaoWS )

Function Add workspace object

Parameter [in] bstrName Workspace name. When NULL is specified, the workspace name is automatically assigned.

[in] bstrOption Option Currently not used. All setting is neglected.

[out] ppICaoWS Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoWorkspaces object, and acquire it. The created object is automatically registered in ICaoWorkspaces. Reference counter of the created object is incremented by one. Execute Release method to release the object. Execute the ICaoWorkspaces::Remove method to delete from IcaoWorkspaces registration.

Execute Format HRESULT ICaoEngine::Execute ( [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Currently not implemented. When executed, do nothing and always return S_OK.

46

4.4.2. ICaoWorkspaces get_Count Format HRESULT ICaoWorkspaces::get_Count ( [out, retval] long* pVal )

Function Get number of collections

Parameter [out] pVal Number of registration in collections

Return value HRESULT Return S_OK when succeeded.

Explanation Get number of registered objects in the collection

Add Format HRESULT ICaoWorkspaces::Add ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoWorkspace** ppICaoWS )

Function Add workspace object

Parameter [in] bstrName Workspace name. When NULL is specified, the workspace name is automatically assigned.

[in] bstrOption Option Currently not used. All setting is neglected.

[out] ppICaoWSs Address of CaoWorkspaces IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoWorkspaces object, and acquire it. The created object is automatically registered in ICaoWorkspaces. Reference counter of the created object is incremented by one. Execute Release method to release the object. 47

Execute the ICaoWorkspaces::Remove method to delete from IcaoWorkspaces registration.

Clear Format HRESULT ICaoWorkspaces::Clear ( )

Function Release all workspace objects

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Release all objects registered in ICaoWorkspaces. When clients hold released ICaoWorkspace object, the object is not released from memory. To release them execute ICaoWorkspace::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

IsMember Format HRESULT ICaoWorkspaces::IsMember ( [in] VARIANT Index, [out, retval] VARIANT_BOOL* pVal )

Function Check registration of workspace object

Parameter [in] bstrName Workspace name/index

[out] pVal Registration reference result VARIANT_TRUE: Registered VARIANT_FALSE: Not registered

Return value HRESULT Return S_OK when succeeded.

Explanation Confirm whether specified workspace index or workspace name is registered in the collection.

Item Format HRESULT ICaoControllers::Item ( 48

[in] VARIANT Index, [out, retval] ICaoWorkspace** ppICaoWSs )

Function Get controller object

Parameter [in] bstrName Controller name/ index

[out] ppICaoWSs Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoController object corresponding to the specified controller index or controller name. Reference counter of the created object is incremented by one. Execute Release method to release the object.

Remove Format HRESULT ICaoWorkspaces::Remove ( [in] VARIANT Index )

Function Release workspace object

Parameter [in] bstrName Workspace name/ index

Return value HRESULT Return S_OK when succeeded.

Explanation Release the ICaoWorkspace object corresponding to specified workspace index or workspace name. When clients hold released ICaoWorkspace object, the object is not released from memory. To release them execute ICaoWorkspace::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

4.4.3. ICaoWorkspace get_Controllers Format HRESULT ICaoWorkspace::get_Controllers ( [out, retval] ICaoControllers** ppICaoCtrls 49

)

Function Get controller collection

Parameter [out] ppICaoCtrls Address of CaoControllers IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoControllers object. Reference counter of the created object is incremented by one. Execute Release method to release the object.

get_Index Format HRESULT ICaoWorkspace::get_Index ( [out, retval] long* pVal )

Function Get workspace index

Parameter [out] pVal Workspace index

Return value HRESULT Return S_OK when succeeded.

Explanation Get workspace index of the object.

get_Name Format HRESULT ICaoWorkspace::get_Name ( [out, retval] BSTR* pVal )

Function Get workspace name

Parameter [out] pVal Workspace name

Return value HRESULT Return S_OK when succeeded.

Explanation Get workspace name of the object. 50

get_ProviderNames Format HRESULT ICaoWorkspace::get_ProviderNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get provider name list

Parameter [in] bstrOption Option Currently not used. All setting is neglected.

[out] pVal Provider name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get list of the CAO provider registered in a local machine.

AddController Format HRESULT ICaoWorkspace::AddController ( [in] BSTR bstrController, [in] BSTR bstrProvider, [in, defaultvalue("")] BSTR bstrMachine, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoController** ppICaoCtrl )

Function Add controller object

Parameter [in] bstrController Controller name. When NULL is specified, the workspace name is automatically assigned.

[in] bstrProvider Provider name. Specify program ID of the CAO provider to start. Following is how to start CAO engine in remote machine and specify CAO provider. < provider name >:< remote machine name > 51

[in] bstrMachine Machine name. To start CAO provider in remote machine, specify the machine name or IP address.

[in] bstrOption Option Currently not used. All settings are neglected.

[out] ppICaoCtrl Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoController object, and acquire it. The created object is automatically registered in ICaoControllers. When the object is created, a provider specified by bstrProvider is started, and it wraps CAO provider controller. At the time, CaoProvController::Connect method of CAO provider is executed. Reference counter of the created object is incremented by one. Execute ICaoWorkspaces::Release method to release the object. Execute the ICaoWorkspaces::Remove method to delete from IcaoWorkspaces registration.

Execute Format HRESULT ICaoWorkspace::Execute ( [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Currently not implemented. When executed, do nothing and always return S_OK.

52

4.4.4. ICaoControllers get_Count Format HRESULT ICaoControllers::get_Count ( [out, retval] long* pVal )

Function Get number of collections

Parameter [out] pVal Number of registration in collection

Return value HRESULT Return S_OK when succeeded.

Explanation Get number of registrated objects in the collection

Add Format HRESULT ICaoControllers::Add ( [in] BSTR bstrController, [in] BSTR bstrProvider, [in, defaultvalue("")] BSTR bstrMachine, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoController** ppICaoCtrl )

Function Add controller object

Parameter [in] bstrController Controller name. When NULL is specified, the controller name is automatically assigned.

[in] bstrProvider Provider name. Specify program ID of the CAO provider to start. Following is how to start CAO engine in remote machine and specify CAO provider. < provider name >:< remote machine name >

[in] bstrMachine Machine name. To start CAO provider in remote machine, specify the machine name or IP address.

[in] bstrOption 53

Option Currently not used. All setting is neglected.

[out] ppICaoCtrl Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoController object, and acquire it. The created object is automatically registered in ICaoControllers. When the object is created, a provider specified by bstrProvider is started, and it wraps CAO provider controller. At the time, CaoProvController::Connect method of CAO provider is executed. Reference counter of the created object is incremented by one. Execute ICaoWorkspaces::Release method to release the object. Execute the ICaoWorkspaces::Remove method to delete from IcaoWorkspaces registration.

Clear Format HRESULT ICaoControllers::Clear ( )

Function Release all controller objects

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Release all objects registered in ICaoControllers. When clients hold released ICaoController object, the object is not released from memory. To release them execute ICaoController::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

IsMember Format HRESULT ICaoControllers::IsMember ( [in] VARIANT Index, [out, retval] VARIANT_BOOL* pVal )

Function Check registration of controller object 54

Parameter [in] bstrName Controller name/ index

[out] pVal Registration reference result VARIANT_TRUE: Registered VARIANT_FALSE: Not registered

Return value HRESULT Return S_OK when succeeded.

Explanation Confirm whether specified controller number or controller name is registered in the collection.

Item Format HRESULT ICaoControllers::Item ( [in] VARIANT Index, [out, retval] ICaoController** ppICaoCtrl )

Function Get controller object

Parameter [in] bstrName Controller name/ index

[out] ppICaoCtrl Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoController object corresponding to the specified controller index or controller name. Reference counter of the created object is incremented by one. Execute Release method to release the object.

Remove Format HRESULT ICaoControllers::Remove ( [in] VARIANT Index )

Function Release controller object

Parameter [in] bstrName 55

Controller name/ index

Return value HRESULT Return S_OK when succeeded.

Explanation Release the ICaoController object corresponding to specified controller index or controller name. When clients hold released ICaoController object, the object is not released from memory. To release it execute ICaoController::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

4.4.5. ICaoController get_Attribute Format HRESULT ICaoController::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get the attribute value of the controller. Executes the CaoProvController::Attribute method of the CAO provider.

get_CommandNames Format HRESULT ICaoController::get_CommandNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get command name list

Parameter [in] bstrOption Option

[out] pVal Command name list 56

Return value HRESULT Return S_OK when succeeded.

Explanation Get command name list. Executes the CaoProvController::CommandNames method of the CAO provider.

get_Commands Format HRESULT ICaoController::get_Commands ( [out, retval] ICaoCommands** ppICaoCommands )

Function Get command collection

Parameter [out] ppICaoCommands Address of CaoCommands IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Acquire ICaoCommands object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

get_ExtensionNames Format HRESULT ICaoController::get_ExtensionNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get extension board name list

Parameter [in] bstrOption Option

[out] pVal Extension board name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board name list. Execute the CaoProvController::ExtensionNames method of the CAO provider. 57

get_Extensions Format HRESULT ICaoController::get_Extensions ( [out, retval] ICaoExtensions** ppICaoExtensions )

Function Get extension board collection

Parameter [out] ppICaoExtensions Address of CaoExtensions IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Acquire ICaoExtensions object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

get_FileNames Format HRESULT ICaoController::get_FileNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get file name list

Parameter [in] bstrOption Option

[out] pVal File name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name list. Execute the CaoProvController::FileNames method of the CAO provider.

get_Files Format HRESULT ICaoController::get_Files ( [out, retval] ICaoFiles** ppICaoFiles 58

)

Function Get file collection

Parameter [out] ppICaoFiles Address of CaoFiles IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Acquire the ICaoFiles object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

get_Help Format HRESULT ICaoController::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the controller. Execute the CaoProvController::Help method of the CAO provider.

put_ID Format HRESULT ICaoController::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded. 59

Explanation Set controller's ID. Execute the CaoProvController::ID method of the CAO provider.

get_ID Format HRESULT ICaoController::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller's ID. Execute the CaoProvController::ID method of the CAO provider.

get_Index Format HRESULT ICaoController::get_Index ( [out, retval] long* pVal )

Function Get controller index

Parameter [out] pVal Controller number

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller index of the object.

get_Name Format HRESULT ICaoController::get_Name ( [out, retval] BSTR* pVal ) 60

Function Get controller name

Parameter [out] pVal Controller name

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller name of the object.

get_RobotNames Format HRESULT ICaoController::get_RobotNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get robot name list

Parameter [in] bstrOption Option

[out] pVal Robot name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get robot name list. Execute the CaoProvController::RobotNames method of the CAO provider.

get_Robots Format HRESULT ICaoController::get_Robots ( [out, retval] ICaoRobots** ppICaoRobots )

Function Get robot collection

Parameter [out] ppICaoRobots Address of CaoRobots IF pointer

Return value HRESULT Return S_OK when succeeded. 61

Explanation Get ICaoRobots object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

put_Tag Format HRESULT ICaoController::put_Tag ( [in] VARIANT newVal )

Function Set tag

Parameter [in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set controller's tag.

get_Tag Format HRESULT ICaoController::get_Tag ( [out, retval] VARIANT* pVal )

Function Get tag

Parameter [out] pVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller's tag.

get_TaskNames Format HRESULT ICaoController::get_TaskNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal ) 62

Function Get task name list

Parameter [in] bstrOption Option

[out] pVal Task name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get task name list. Execute the CaoProvController::TaskNames method of the CAO provider.

get_Tasks Format HRESULT ICaoController::get_Tasks ( [out, retval] ICaoTasks** ppICaoTasks )

Function Get task collection

Parameter [out] ppICaoTasks Address of CaoTasks IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoTasks object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

get_VariableNames Format HRESULT ICaoController::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] bstrOption Option

[out] pVal 63

Variable name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list. Execute the CaoProvController::VariableNames method of the CAO provider.

get_Variables Format HRESULT ICaoController::get_Variables ( [out, retval] ICaoVariables** ppICaoVariables )

Function Get variable collection

Parameter [out] ppICaoVariables Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoVariable object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

AddCommand Format HRESULT ICaoController::AddCommand ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoCommand** ppICaoCommand )

Function Add command object

Parameter [in] bstrName Command name.

[in] bstrOption Option

[out] ppICaoCommand Address of CaoCommand IF pointer 64

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoCommand object, and acquire it. The created object is automatically registered in ICaoCommands. Reference counter of the created object is incremented by one. Execute ICaoCommand::Release method to release the object. Execute the ICaoCommands::Remove method to delete from ICaoCommands registration.

AddExtension Format HRESULT ICaoController::AddExtension ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoExtension** ppICaoExtension )

Function Add extension board object

Parameter [in] bstrName Extension board name.

[in] bstrOption Option

[out] ppICaoExtension Address of CaoExtension IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoExtension object, and acquire it. The created object is automatically registered in ICaoExtensions. Reference counter of the created object is incremented by one. Execute ICaoExtension::Release method to release the object. Execute the ICaoExtensions::Remove method to delete from ICaoExtensions registration.

AddFile Format HRESULT ICaoController::AddFile ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoFile** ppICaoFile 65

)

Function Add file object

Parameter [in] bstrName File name.

[in] bstrOption Option

[out] ppICaoFile Address of CaoFile IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoFile object, and acquire it. The created object is automatically registered in ICaoFiles. Reference counter of the created object is incremented by one. Execute ICaoFile::Release method to release the object. Execute the ICaoFiles::Remove method to delete from IcaoFiles registration.

AddRobot Format HRESULT ICaoController::AddRobot ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoRobot** ppICaoRobot )

Function Add robot object

Parameter [in] bstrName Robot name.

[in] bstrOption Option

[out] ppICaoRobot Address of CaoRobot IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoRobot object, and acquire it. The created object is automatically registered in ICaoRobots. 66

Reference counter of the created object is incremented by one. Execute ICaoRobot::Release method to release the object. Execute the ICaoRobots::Remove method to delete from IcaoRobots registration.

AddTask Format HRESULT ICaoController::AddTask ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoTask** ppICaoTask )

Function Add task object

Parameter [in] bstrName Task name.

[in] bstrOption Option

[out] ppICaoTask Address of CaoTask IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoTask object, and acquire it. The created object is automatically registered in ICaoTasks. Reference counter of the created object is incremented by one. Execute ICaoTask::Release method to release the object. Execute the ICaoTasks::Remove method to delete from ICaoTasks registration.

AddVariable Format HRESULT ICaoController::AddVariable ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable** ppICaoVar )

Function Add variable object

Parameter [in] bstrName 67

Variable identifier.

[in] bstrOption Option

[out] ppICaoVar Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoVariable object, and acquire it. The created object is automatically registered in ICaoVariables. Reference counter of the created object is incremented by one. Execute ICaoVariable::Release method to release the object. Execute the ICaoVariables::Remove method to delete from ICaoVariables registration.

Execute Format HRESULT ICaoController::Execute ( [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command. Execute the CaoProvController::Execute method of the CAO provider.

GetMessage Format HRESULT ICaoController::GetMessage ( [out, retval] ICaoMessage** ppICaoMessage ) 68

Function Get message

Parameter [out] ppICaoMessage Address of CaoMessage IF pointer

Return value HRESULT Returns S_OK when a message is received, S_FALSE when no massage is available.

Explanation Get ICaoMessage object. This method can be used only if @EventDisenable option is specified as TRUE in AddController method execution. If provider does not send message, return value is S_FALSE and message is not acquired.

4.4.6. ICaoVariables get_Count Format HRESULT ICaoVariables::get_Count ( [out, retval] long* pVal )

Function Get number of collections

Parameter [out] pVal Number of registration in collections

Return value HRESULT Return S_OK when succeeded.

Explanation Get number of registered objects in the collection

Add Format HRESULT ICaoVariables::Add ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable** ppICaoVar )

Function Add variable object

Parameter [in] bstrName Variable identifier.

[in] bstrOption 69

Option

[out] ppICaoVar Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoVariable object, and acquire it. The created object is automatically registered in ICaoVariables. Reference counter of the created object is incremented by one. Execute ICaoVariable::Release method to release the object. Execute the ICaoVariables::Remove method to delete from ICaoVariables registration.

Clear Format HRESULT ICaoVariables::Clear ( )

Function Release all variable objects

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Release objects registered in ICaoVariables. When clients hold released ICaoVariable object, the object is not released from memory. To release them execute ICaoVariable::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

IsMember Format HRESULT ICaoVariables::IsMember ( [in] VARIANT Index, [out, retval] VARIANT_BOOL* pVal )

Function Check registration of variable object

Parameter [in] bstrName Variable name/ index

[out] pVal Registration reference result 70

VARIANT_TRUE: Registered VARIANT_FALSE: Not registered

Return value HRESULT Return S_OK when succeeded.

Explanation Confirm whether specified variable name or variable index is registered in the collection.

Item Format HRESULT ICaoVariables::Item ( [in] VARIANT Index, [out, retval] ICaoVariable** ppICaoVar )

Function Get variable object

Parameter [in] bstrName Variable name/ index

[out] ppICaoVar Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoVariable object corresponding to specified variable index or variable name. Reference counter of the created object is incremented by one. Execute Release method to release the object.

Remove Format HRESULT ICaoVariables::Remove ( [in] VARIANT Index )

Function Release variable object

Parameter [in] bstrName Variable name/ index

Return value HRESULT Return S_OK when succeeded. 71

Explanation Release ICaoVariable object corresponding to specified variable index or variable name. When clients hold released ICaoVariable object, the object is not released from memory. To release them execute ICaoVariable::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

4.4.7. ICaoVariable get_Attribute Format HRESULT ICaoVariable::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get the attribute value of the variable. Execute the CaoProvVariable::Attribute method of the CAO provider.

get_DateTime Format HRESULT ICaoVariable::get_DateTime ( [out, retval] VARIANT* pVal )

Function Get time and date stamp (date)

Parameter [out] pVal Time and date stamp (date)

Return value HRESULT Return S_OK when succeeded.

Explanation Get the time and date stamp (date) of a variable. Execute the CaoProvVariable::DateTime method of the CAO provider.

72 get_Help Format HRESULT ICaoVariable::get_Help ( [out, retval] BSTR* pVal )

Function Get help string

Parameter [out] pVal Help string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the variable. Execute the CaoProvVariable::Help method of the CAO provider.

put_ID Format HRESULT ICaoVariable::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the variable. Execute the CaoProvVariable::ID method of the CAO provider.

get_ID Format HRESULT ICaoVariable::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID 73

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the variable. Execute the CaoProvVariable::ID method of the CAO provider.

get_Index Format HRESULT ICaoVariable::get_Index ( [out, retval] long* pVal )

Function Get variable index

Parameter [out] pVal Variable index

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable index of the object.

get_Microsecond Format HRESULT ICaoVariable::get_Microsecond ( [out, retval] long* pVal )

Function Get time and date stamp (micro second)

Parameter [out] pVal Time and date stamp(micro second)

Return value HRESULT Return S_OK when succeeded.

Explanation Get time and date stamp of the variable (micro second). Execute the CaoProvVariable::Microsecond method of the CAO provider.

get_Name Format HRESULT ICaoVariable::get_Name ( [out, retval] BSTR* pVal 74

)

Function Get variable name

Parameter [out] pVal Variable name

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name of the object.

put_Tag Format HRESULT ICaoVariable::put_Tag ( [in] VARIANT newVal )

Function Set tag

Parameter [in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set tag of the variable.

get_Tag Format HRESULT ICaoVariable::get_Tag ( [out, retval] VARIANT* pVal )

Function Get tag

Parameter [out] pVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Get tag of the variable.

75

put_Value Format HRESULT ICaoVariable::put_Value ( [in] VARIANT newVal )

Function Set value

Parameter [in] newVal Variable value

Return value HRESULT Return S_OK when succeeded.

Explanation Set variable value. Execute the CaoProvVariable::Value method of the CAO provider.

get_Value Format HRESULT ICaoVariable::get_Value ( [out, retval] VARIANT* pVal )

Function Get value

Parameter [out] pVal Variable value

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable value. Execute the CaoProvVariable::Value method of the CAO provider.

4.4.8. ICaoRobots get_Count Format HRESULT ICaoRobots::get_Count ( [out, retval] long* pVal )

Function Get number of collections 76

Parameter [out] pVal Number of registration of collections

Return value HRESULT Return S_OK when succeeded.

Explanation Get number of registered objects in the collection

Add Format HRESULT ICaoRobots::Add ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoRobot** ppICaoRobot )

Function Add robot object

Parameter [in] bstrName Robot name.

[in] bstrOption Option

[out] ppICaoRobot Address of CaoRobot IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoRobot object, and acquire it. The created object is automatically registered in ICaoRobots. Reference counter of the created object is incremented by one. Execute ICaoRobot::Release method to release the object. Execute the ICaoRobots::Remove method to delete from ICaoRobots registration.

Clear Format HRESULT ICaoRobots::Clear ( )

Function Release all robot objects

Parameter None. 77

Return value HRESULT Return S_OK when succeeded.

Explanation Release objects registered in ICaoRobots. When clients hold released ICaoRobot object, the object is not released from memory. To release them execute IcaoRobot::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

IsMember Format HRESULT ICaoRobots::IsMember ( [in] VARIANT Index, [out, retval] VARIANT_BOOL* pVal )

Function Check registration of robot object

Parameter [in] bstrName Robot name/number

[out] pVal Registration reference result VARIANT_TRUE : Registered VARIANT_FALSE: Not registered

Return value HRESULT Return S_OK when succeeded.

Explanation Confirm whether specified robot number or robot name is registered in the collection.

Item Format HRESULT ICaoRobots::Item ( [in] VARIANT Index, [out, retval] ICaoRobot** ppICaoRobot )

Function Get robot object

Parameter [in] bstrName Robot name/index

[out] ppICaoRobot 78

Address of CaoRobot IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoRobot object corresponding to specified robot index or robot name. Reference counter of the created object is incremented by one. Execute Release method to release the object.

Remove Format HRESULT ICaoRobots::Remove ( [in] VARIANT Index )

Function Release robot object

Parameter [in] bstrName Robot name/index

Return value HRESULT Return S_OK when succeeded.

Explanation Release ICaoRobot object corresponding to specified robot index or robot name. When clients hold released ICaoRobot object, the object is not released from memory. To release them execute ICaoRobot::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

4.4.9. ICaoRobot get_Attribute Format HRESULT ICaoRobot::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the robot. 79

Execute the CaoProvRobot::Attribute method of the CAO provider.

get_Help Format HRESULT ICaoRobot::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the robot. Execute the CaoProvRobot::Help method of the CAO provider.

put_ID Format HRESULT ICaoRobot::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set robot ID. Execute the CaoProvRobot::ID method of the CAO provider.

get_ID Format HRESULT ICaoRobot::get_ID ( [out, retval] VARIANT* pVal ) 80

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get robot ID. Execute the CaoProvRobot::ID method of the CAO provider.

get_Index Format HRESULT ICaoRobot::get_Index ( [out, retval] long* pVal )

Function Get robot index

Parameter [out] pVal Robot index

Return value HRESULT Return S_OK when succeeded.

Explanation Get robot index of the object.

get_Name Format HRESULT ICaoRobot::get_Name ( [out, retval] BSTR* pVal )

Function Get robot name

Parameter [out] pVal Robot name

Return value HRESULT Return S_OK when succeeded.

Explanation Get robot name of the object.

81 put_Tag Format HRESULT ICaoRobot::put_Tag ( [in] VARIANT newVal )

Function Set tag

Parameter [in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set robot tag.

get_Tag Format HRESULT ICaoRobot::get_Tag ( [out, retval] VARIANT* pVal )

Function Get tag

Parameter [out] pVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Get robot tag.

get_VariableNames Format HRESULT ICaoRobot::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] bstrOption Option 82

[out] pVal Variable identifier list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list. Execute the CaoProvRobot::VariableNames method of the CAO provider.

get_Variables Format HRESULT ICaoRobot::get_Variables ( [out, retval] ICaoVariables** ppICaoVariables )

Function Get variable collection

Parameter [out] ppICaoVariables Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoVariable object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

Accelerate Format HRESULT ICaoRobot::Accelerate ( [in] long lAxis, [in] float fAccel, [in, defaultvalue(0)] float fDecel )

Function Execute ACCEL statement

Parameter [in] lAxis Joint number -1: Tool Center Point(TCP) acceleration/deceleration 0: All joint acceleration/deceleration Other joint number: acceleration / deceleration of specified joint.

[in] fAccel 83

Acceleration

[in] fDecel Deceleration

Return value HRESULT Return S_OK when succeeded.

Explanation Set acceleration and deceleration of robot motion. Refer to the specification of the ACCEL statement of SLIM for details. Execute the CaoProvRobot::Accelerate method of the CAO provider.

AddVariable Format HRESULT ICaoRobot::AddVariable ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable** ppICaoVar )

Function Add variable object

Parameter [in] bstrName Variable name.

[in] bstrOption Option

[out] ppICaoVar Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoVariable object, and acquire it. The created object is automatically registered in ICaoVariables. Reference counter of the created object is incremented by one. Execute ICaoVariable::Release method to release the object. Execute the ICaoVariables::Remove method to delete from ICaoVariables registration.

Change Format HRESULT ICaoRobot::Change ( [in] BSTR bstrName 84

)

Function Execute CHANGE statement

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the CHANGE statement of SLIM for details. Execute the CaoProvRobot::Change method of the CAO provider.

Chuck Format HRESULT ICaoRobot::Chuck ( [in, defaultvalue("")] BSTR bstrOption )

Function Execute GRASP statement

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the GRASP statement of SLIM for details. Execute the CaoProvRobot::Chuck method of the CAO provider.

Drive Format HRESULT ICaoRobot::Drive ( [in] long lNo, [in] float fMov, [in, defaultvalue("")] BSTR bstrOpt )

Function Execute DRIVE statement

Parameter [in] lNo Axis number

[in] fMov 85

Amount of movement

[in] bstrOpt Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the DRIVE statement of SLIM for details. Execute the CaoProvRobot::Drive method of the CAO provider. Unlike SLIM, multi-joint motion is not supported. In the case, use CaoRobot::Move method.

Execute Format HRESULT ICaoRobot::Execute ( [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command. Execute the CaoProvRobot::Execute method of the CAO provider.

GoHome Format HRESULT ICaoRobot::GoHome ( )

Function Execute GOHOME statement

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the GOHOME statement of SLIM for details. 86

Execute the CaoProvRobot::GoHome method of the CAO provider.

Hold Format HRESULT ICaoRobot::Hold ( [in, defaultvalue("")] BSTR bstrOpt )

Function Execution of HOLD sentence

Parameter [In] BstrOpt option

Return value When HRESULT succeeds, S_OK is returned.

Explanation Please refer to the specification of the HOLD sentence of SLIM for details. The CaoProvRobot::Hold method of the CAO provider is executed.

Halt Format HRESULT ICaoRobot::Halt ( [in, defaultvalue("")] BSTR bstrOpt )

Function Execution of HALT sentence

Parameter [In] BstrOpt option

Return value When HRESULT succeeds, S_OK is returned.

Explanation Please refer to the specification of the HALT sentence of SLIM for details. The CaoProvRobot::Halt method of the CAO provider is executed.

Move Format HRESULT ICaoRobot::Move ( [in] long lComp, [in] VARIANT vntPose, [in, defaultvalue("")] BSTR bstrOpt ) 87

Function Execute MOVE statement

Parameter [in] lComp Interpolation specification. 1:PTP(point to point), 2: CP(continuous path), 3: Circular arc.

[in] vntPose Posed array Pose specification is manufacturer dependent.

[in] bstrOpt Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the MOVE statement of SLIM for details. Execute the CaoProvRobot::Move method of the CAO provider.

Rotate Format HRESULT ICaoRobot::Rotate ( [in] VARIANT vntRotSuf, [in] float fDeg, [in] VARIANT vntPivot, [in, defaultvalue("")] BSTR bstrOpt )

Function Execute ROTATE statement

Parameter [in] vntRotSuf Rotation plane The specification method is manufacturer dependent.

[in] fDeg Angle

[in] vntPivot Rotation center

[in] bstrOpt Option

Return value HRESULT Return S_OK when succeeded. 88

Explanation Refer to the specification of the ROTATE statement of SLIM for details. Execute the CaoProvRobot::Rotate method of the CAO provider.

Speed Format HRESULT ICaoRobot::Speed ( [in] long lAxis, [in] float fSpeed )

Function ExecuteSPEED/JSPEED statement

Parameter [in] lAxis Joint number ‐1: TCP speed, 0: All joint speed, other: speed for specified joint

[in] fSpeed Speed

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the SPEED/JSPEED statement of SLIM for details. Execute the CaoProvRobot::Speed method of the CAO provider.

Unchuck Format HRESULT ICaoRobot::Unchuck ( [in, defaultvalue("")] BSTR bstrOption )

Function Execute RELEASE statement

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the RELEASE statement of SLIM for details. Execute the CaoProvRobot::Unchuck method of the CAO provider.

89

Unhold Format HRESULT ICaoRobot::Unhold ( [in, defaultvalue("")] BSTR bstrOption )

Function Release of HOLD sentence

Parameter [in] bstrOption Option

Return value HRESULT When succeeding, S_OK is returned.

Explanation Please refer to the specification of the HOLD sentence of SLIM for details. The CaoProvRobot::Unhold method of the CAO provider is executed.

4.4.10. ICaoFiles get_Count Format HRESULT ICaoFiles::get_Count ( [out, retval] long* pVal )

Function Get number of collections

Parameter [out] pVal Number of registration of collections

Return value HRESULT Return S_OK when succeeded.

Explanation Get number of registered objects in the collection

Add Format HRESULT ICaoFiles::Add ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoFile** ppICaoFile )

Function Add file object 90

Parameter [in] bstrName File name.

[in] bstrOption Option

[out] ppICaoFile Address of CaoFile IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoFile object, and acquire it. The created object is automatically registered in ICaoFiles. Reference counter of the created object is incremented by one. Execute ICaoFile::Release method to release the object. Execute the ICaoFiles::Remove method to delete from ICaoFiles registration.

Clear Format HRESULT ICaoFiles::Clear ( )

Function Release all file objects

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Release all objects registered in ICaoFiles. When clients hold released ICaoFile object, the object is not released from memory. To release them execute ICaoFiles::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

IsMember Format HRESULT ICaoFiles::IsMember ( [in] VARIANT Index, [out, retval] VARIANT_BOOL* pVal )

Function Check registration of variable object

Parameter [in] bstrName 91

File name/number

[out] pVal Registration reference result VARIANT_TRUE: Registered VARIANT_FALSE: Not registered

Return value HRESULT Return S_OK when succeeded.

Explanation Confirm whether specified variable number or variable index is registered in the collection.

Item Format HRESULT ICaoFiles::Item ( [in] VARIANT Index, [out, retval] ICaoFile** ppICaoFile )

Function Get File object

Parameter [in] bstrName File name/number

[out] ppICaoFile Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoFile object corresponding to specified file index or file name. Reference counter of the created object is incremented by one. Execute Release method to release the object.

Remove Format HRESULT ICaoFiles::Remove ( [in] VARIANT Index )

Function Release file object

Parameter [in] bstrName File name/number 92

Return value HRESULT Return S_OK when succeeded.

Explanation Release ICaoFile object corresponding to specified file index or file name. When clients hold released ICaoFile object, the object is not released from memory. To release them execute ICaoFile::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

4.4.11. ICaoFile get_Attribute Format HRESULT ICaoFile::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of a file. Execute the CaoProvFile::Attribute method of the CAO provider.

get_DateCreated Format HRESULT ICaoFile::get_DateCreated ( [out, retval] VARIANT* pVal )

Function Get file creation date

Parameter [out] pVal File creation date

Return value HRESULT Return S_OK when succeeded.

Explanation Get file creation date. Execute the CaoProvFile::DateCreated method of the CAO provider.

93 get_DateLastAccessed Format HRESULT ICaoFile::get_DateLastAccessed ( [out, retval] VARIANT* pVal )

Function Get last file access date

Parameter [out] pVal The last file access date

Return value HRESULT Return S_OK when succeeded.

Explanation Get last file access date. Execute the CaoProvFile::DateLastAccessed method of the CAO provider.

get_DateLastModified Format HRESULT ICaoFile::get_DateLastModified ( [out, retval] VARIANT* pVal )

Function Get last file modification date

Parameter [out] pVal The last file modification date

Return value HRESULT Return S_OK when succeeded.

Explanation Get last file modification date. Execute the CaoProvFile::DateLastModified method of the CAO provider.

get_FileNames Format HRESULT ICaoFile::get_FileNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get file name list 94

Parameter [in] bstrOption Option

[out] pVal File name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name list. Execute the CaoProvFile::FileNames method of the CAO provider.

get_Files Format HRESULT ICaoFile::get_Files ( [out, retval] ICaoFiles** ppICaoFiles )

Function Get file collection

Parameter [out] ppICaoFiles Address of CaoFiles IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoFiles object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

get_Help Format HRESULT ICaoFile::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help string

Return value HRESULT Return S_OK when succeeded. 95

Explanation Get help string of the file. Execute the CaoProvFile::Help method of the CAO provider.

put_ID Format HRESULT ICaoFile::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set file ID. Execute the CaoProvFile::ID method of the CAO provider.

get_ID Format HRESULT ICaoFile::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get file ID. Execute the CaoProvFile::ID method of the CAO provider.

get_Index Format HRESULT ICaoFile::get_Index ( [out, retval] long* pVal ) 96

Function Get file number

Parameter [out] pVal File number

Return value HRESULT Return S_OK when succeeded.

Explanation Get file number for the object.

get_Name Format HRESULT ICaoFile::get_Name ( [out, retval] BSTR* pVal )

Function Get file name

Parameter [out] pVal File name

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name of the object.

get_Path Format HRESULT ICaoFile::get_Path ( [out, retval] BSTR* pVal )

Function Get file path

Parameter [out] pVal File passing

Return value HRESULT Return S_OK when succeeded.

Explanation Get file path. Execute the CaoProvFile::Path method of the CAO provider.

97 get_Size Format HRESULT ICaoFile::get_Size ( [out, retval] long* pVal )

Function Get file size

Parameter [out] pVal Size of file

Return value HRESULT Return S_OK when succeeded.

Explanation Get file size. Execute the CaoProvFile::Size method of the CAO provider.

put_Tag Format HRESULT ICaoFile::put_Tag ( [in] VARIANT newVal )

Function Set file tag

Parameter [in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set file tag.

get_Tag Format HRESULT ICaoFile::get_Tag ( [out, retval] VARIANT* pVal )

Function Get file tag

Parameter [out] pVal Tag 98

Return value HRESULT Return S_OK when succeeded.

Explanation Get file tag.

get_Type Format HRESULT ICaoFile::get_Type ( [out, retval] BSTR* pVal )

Function Get file type

Parameter [out] pVal File type

Return value HRESULT Return S_OK when succeeded.

Explanation Get file type Execute the CaoProvFile::Size method of the CAO provider.

put_Value Format HRESULT ICaoFile::put_Value ( [in] VARIANT newVal )

Function Set file data

Parameter [in] newVal File data

Return value HRESULT Return S_OK when succeeded.

Explanation Set file data. Execute the CaoProvFile::Value method of the CAO provider.

get_Value Format HRESULT ICaoFile::get_Value ( [out, retval] VARIANT* pVal 99

)

Function ファイルデータの取得 Get file data

Parameter [out] pVal File data

Return value HRESULT Return S_OK when succeeded.

Explanation Get file data. Execute the CaoProvFile::Value method of the CAO provider.

get_VariableNames Format HRESULT ICaoFile::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] bstrOption Option

[out] pVal Variable identifier list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list. Execute the CaoProvFile::VariableNames method of the CAO provider.

get_Variables Format HRESULT ICaoFile::get_Variables ( [out, retval] ICaoVariables** ppICaoVariables )

Function Get variable collection

Parameter [out] ppICaoVariables 100

Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoVariable object, and acquire it. The created object is automatically registered in ICaoVariables. Reference counter of the created object is incremented by one. Execute ICaoVariable::Release method to release the object. Execute the ICaoVariables::Remove method to delete from ICaoVariables registration.

AddFile Format HRESULT ICaoFile::AddFile ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoFile** ppICaoFile )

Function Add file object

Parameter [in] bstrName File name.

[in] bstrOption Option

[out] ppICaoFile Address of CaoFile IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoFile object, and acquire it. The created object is automatically registered in ICaoFiles. Reference counter of the created object is incremented by one. Execute ICaoFile::Release method to release the object. Execute the ICaoFiles::Remove method to delete from ICaoFiles registration.

AddVariable Format HRESULT ICaoFile::AddVariable ( [in] BSTR bstrName, 101

[in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable** ppICaoVar )

Function Add variable object

Parameter [in] bstrName Variable identifier.

[in] bstrOption Option

[out] ppICaoVar Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoVariable object, and acquire it. The created object is automatically registered in ICaoVariables. Reference counter of the created object is incremented by one. Execute ICaoVariable::Release method to release the object. Execute the ICaoVariables::Remove method to delete from ICaoVariables registration.

Copy Format HRESULT ICaoFile::Copy ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption )

Function Copy file

Parameter [in] bstrName Destination file name

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Copy a file. Execute the CaoProvFile::Copy method of the CAO provider.

102

Delete Format HRESULT ICaoFile::Delete ( [in, defaultvalue("")] BSTR bstrOption )

Function Delete file

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Delete file. Execute the CaoProvFile::Delete method of the CAO provider.

Execute Format HRESULT ICaoFile::Execute ( [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command. Execute the CaoProvFile::Execute method of the CAO provider.

Move Format HRESULT ICaoFile::Move ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption 103

)

Function Move file.

Parameter [in] bstrName Destination file name

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Move a file. Execute the CaoProvFile::Move method of the CAO provider.

Run Format HRESULT ICaoFile::Run ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] BSTR* bstrName )

Function Create a task

Parameter [in] bstrOption Option

[out] bstrName Task name

Return value HRESULT Return S_OK when succeeded.

Explanation Create a task from the file, and return the generated task name. Execute the CaoProvFile::Run method of the CAO provider.

4.4.12. ICaoTasks get_Count Format HRESULT ICaoTasks::get_Count ( [out, retval] long* pVal ) 104

Function Get number of collections

Parameter [out] pVal Number of registration of collections

Return value HRESULT Return S_OK when succeeded.

Explanation Get number of registered objects in the collection

Add Format HRESULT ICaoTasks::Add ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoTask** ppICaoTask )

Function Add task object

Parameter [in] bstrName Task name.

[in] bstrOption Option

[out] ppICaoTask Address of CaoTask IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoTask object, and acquire it. The created object is automatically registered in ICaoTasks. Reference counter of the created object is incremented by one. Execute ICaoTask::Release method to release the object. Execute the ICaoTasks::Remove method to delete from ICaoTasks registration.

Clear Format HRESULT ICaoTasks::Clear ( )

Function Release all task objects 105

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Release objects registered in ICaoTasks. When clients hold released ICaoTask object, the object is not released from memory. To release them execute ICaoTask::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

IsMember Format HRESULT ICaoTasks::IsMember ( [in] VARIANT Index, [out, retval] VARIANT_BOOL* pVal )

Function Check registration of task object

Parameter [in] bstrName Task name/number

[out] pVal Registration reference result VARIANT_TRUE: Registered VARIANT_FALSE: Not registered

Return value HRESULT Return S_OK when succeeded.

Explanation Confirm whether specified variable number or variable index is registered in the collection.

Item Format HRESULT ICaoTasks::Item ( [in] VARIANT Index, [out, retval] ICaoTask** ppICaoTask )

Function Get task object

Parameter [in] bstrName Task name/number 106

[out] ppICaoTask Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoTask object corresponding to specified variable index or variable name. Reference counter of the created object is incremented by one. Execute Release method to release the object.

Remove Format HRESULT ICaoTasks::Remove ( [in] VARIANT Index )

Function Release task object

Parameter [in] bstrName Task name/number

Return value HRESULT Return S_OK when succeeded.

Explanation Release ICaoTask object corresponding to specified task index or task name. When clients hold released IcaoTask object, the object is not released from memory. To release them execute ICaoTask::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

4.4.13. ICaoTask get_Attribute Format HRESULT ICaoTask::get_Attribute ( [out, retval] long* pVal )

Function Acquisition of attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded. 107

Explanation Get attribute value of the task. Execute the CaoProvTask::Attribute method of the CAO provider.

get_FileName Format HRESULT ICaoTask::get_FileName ( [out, retval] BSTR* pVal )

Function Get corresponding file name

Parameter [out] pVal Corresponding file name

Return value HRESULT Return S_OK when succeeded.

Explanation Get a file name that corresponds to the task. Execute the CaoProvTask::FileName method of the CAO provider.

get_Help Format HRESULT ICaoTask::get_Help ( [out, retval] BSTR* pVal )

Function Get help string

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the task. Execute the CaoProvTask::Help method of the CAO provider.

put_ID Format HRESULT ICaoTask::put_ID ( [in] VARIANT newVal ) 108

Function Setting of ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the task. Execute the CaoProvTask::ID method of the CAO provider.

get_ID Format HRESULT ICaoTask::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the task. Execute the CaoProvTask::ID method of the CAO provider.

get_Index Format HRESULT ICaoTask::get_Index ( [out, retval] long* pVal )

Function Get task index

Parameter [out] pVal Task index

Return value HRESULT Return S_OK when succeeded.

Explanation Get task index of the object.

109 get_Name Format HRESULT ICaoTask::get_Name ( [out, retval] BSTR* pVal )

Function Get task name

Parameter [out] pVal Task name

Return value HRESULT Return S_OK when succeeded.

Explanation Get task name of the object.

put_Tag Format HRESULT ICaoTask::put_Tag ( [in] VARIANT newVal )

Function Set tag

Parameter [in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set task tag..

get_Tag Format HRESULT ICaoTask::get_Tag ( [out, retval] VARIANT* pVal )

Function Get tag

Parameter [out] pVal Tag

Return value HRESULT 110

Return S_OK when succeeded.

Explanation Get task tag.

get_VariableNames Format HRESULT ICaoTask::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Acquisition of variable identifier list

Parameter [in] bstrOption Option

[out] pVal Variable name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list. Execute the CaoProvTask::VariableNames method of the CAO provider.

get_Variables Format HRESULT ICaoTask::Variables ( [out, retval] ICaoVariables** ppICaoVariables )

Function Get variable collection

Parameter [out] ppICaoVariables Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoVariable object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

111

AddVariable Format HRESULT ICaoTask::AddVariable ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable** ppICaoVar )

Function Add variable object

Parameter [in] bstrName Variable name.

[in] bstrOption Option

[out] ppICaoVar Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoVariable object, and acquire it. The created object is automatically registered in ICaoVariables. Reference counter of the created object is incremented by one. Execute ICaoVariable::Release method to release the object. Execute the ICaoVariables::Remove method to delete from ICaoVariables registration

Delete Format HRESULT ICaoTask::Delete ( [in, defaultvalue("")] BSTR bstrOption )

Function Delete task

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Delete task. Execute the CaoProvTask::Delete method of the CAO provider.

112

Execute Format HRESULT ICaoTask::Execute ( [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execution of extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute the extension command. Execute the CaoProvTask::Execute method of the CAO provider.

Start Format HRESULT ICaoTask::Start ( [in, defaultvalue(0)] long lMode, [in, defaultvalue("")] BSTR bstrOption )

Function Start task

Parameter [in] lMode Mode 1: one cycle execution, 2: continuous cycle execution, 3: one step forward execution, 4:one step backward execution.

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Start execution of the task. 113

Execute CaoProvTask::Start of the CAO provider.

Stop Format HRESULT ICaoTask::Stop ( [in, defaultvalue(0)] long lMode, [in, defaultvalue("")] BSTR bstrOption )

Function Stop task

Parameter [in] lMode Mode 0: default stop 1: immediate stop 2: step stop 3: cycle stop 4: initialization stop (The default stop is one of above mentioned stop type.)

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Stop task execution. Execute CaoProvTask::Stop of the CAO provider.

4.4.14. ICaoCommands get_Count Format HRESULT ICaoCommands::get_Count ( [out, retval] long* pVal )

Function Get number of collections

Parameter [out] pVal Number of registration of collections

Return value HRESULT Return S_OK when succeeded. 114

Explanation Get number of registered objects in the collection

Add Format HRESULT ICaoCommands::Add ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoCommand** ppICaoCommand )

Function Add command object

Parameter [in] bstrName Command name.

[in] bstrOption Option

[out] ppICaoCommand Address of CaoCommand IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoCommand object, and acquire it. The created object is automatically registered in ICaoCommands. Reference counter of the created object is incremented by one. Execute ICaoCommand::Release method to release the object. Execute the ICaoCommands::Remove method to delete from ICaoCommands registration.

Clear Format HRESULT ICaoCommands::Clear ( )

Function Release all command objects

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Release all objects registered in ICaoCommands. When clients hold released ICaoCommand object, the object is not released from memory. To release them execute ICaoCommand::Release method. Objects released from the collection 115

always return E_ACCESSDENIED when the method is executed.

IsMember Format HRESULT ICaoCommands::IsMember ( [in] VARIANT Index, [out, retval] VARIANT_BOOL* pVal )

Function Check registration of command object

Parameter [in] bstrName Command name/number

[out] pVal Registration reference result VARIANT_TRUE: Registered VARIANT_FALSE: Not registered

Return value HRESULT Return S_OK when succeeded.

Explanation Confirm whether specified command name or command index is registered in the collection.

Item Format HRESULT ICaoCommands::Item ( [in] VARIANT Index, [out, retval] ICaoCommand** ppICaoCommand )

Function Get command object

Parameter [in] bstrName Command name/index

[out] ppICaoCommand Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoCommand object corresponding to specified command index or command name. Reference counter of the created object is incremented by one. Execute Release method to 116

release the object.

Remove Format HRESULT ICaoCommands::Remove ( [in] VARIANT Index )

Function Release command object

Parameter [in] bstrName Command name/index

Return value HRESULT Return S_OK when succeeded.

Explanation Release ICaoCommand object corresponding to specified command index or command name. When clients hold released ICaoCommand object, the object is not released from memory. To release them execute ICaoCommand::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

4.4.15. ICaoCommand get_Attribute Format HRESULT ICaoCommand::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the command. Execute the CaoProvCommand::Attribute method of the CAO provider.

get_Help Format HRESULT ICaoCommand::get_Help ( 117

[out, retval] BSTR* pVal )

Function Get help string

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the command. Execute the CaoProvCommand::Help method of the CAO provider.

put_ID Format HRESULT ICaoCommand::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the command. Execute the CaoProvCommand::ID method of the CAO provider.

get_ID Format HRESULT ICaoCommand::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded. 118

Explanation Get ID of the command. Execute the CaoProvCommand::ID method of the CAO provider.

get_Index Format HRESULT ICaoCommand::get_Index ( [out, retval] long* pVal )

Function Get command index

Parameter [out] pVal Command index

Return value HRESULT Return S_OK when succeeded.

Explanation Get command number of the object.

get_Name Format HRESULT ICaoCommand::get_Name ( [out, retval] BSTR* pVal )

Function Get command name

Parameter [out] pVal Command name

Return value HRESULT Return S_OK when succeeded.

Explanation Get command name of the object.

put_Parameters Format HRESULT ICaoCommand::put_Parameters ( [in] VARIANT newVal )

Function Set parameter 119

Parameter [in] newVal Parameter

Return value HRESULT Return S_OK when succeeded.

Explanation Set parameter for command execution. Execute the CaoProvCommand::Parameters method of the CAO provider.

get_Parameters Format HRESULT ICaoCommand::get_Parameters ( [out, retval] VARIANT* pVal )

Function Get parameter

Parameter [out] pVal Parameter

Return value HRESULT Return S_OK when succeeded.

Explanation Get parameter for command execution. Execute the CaoProvCommand::Parameters method of the CAO provider.

get_Result Format HRESULT ICaoCommand::get_Result ( [out, retval] VARIANT* pVal )

Function Get command execution result

Parameter [out] pVal Execution result

Return value HRESULT Return S_OK when succeeded. Return the error code when there is an error on command execution.

Explanation Get the execution result of the latest executed CaoCommand::Execute method.

120 get_State Format HRESULT ICaoCommand::get_State ( [out, retval] long* pVal ) Function Get command execution state

Parameter [out] pVal State Bit1 = executing flag Other bits are provider dependent.

表 4-3 Executing flag

Value Explanation 0 Standby 1 Executing

Return value HRESULT Return S_OK when succeeded.

Explanation Get execution state of the command. Execute the CaoProvCommand::State method of the CAO provider.

put_Tag Format HRESULT ICaoCommand::put_Tag ( [in] VARIANT newVal )

Function Set tag

Parameter [in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set the tag of the task.

121 get_Tag Format HRESULT ICaoCommand::get_Tag ( [out, retval] VARIANT* pVal )

Function Get tag

Parameter [out] pVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Get the tag of the task.

put_Timeout Format HRESULT ICaoCommand::put_Timeout ( [in] long newVal ) Function Set command time-out time

Parameter [in] newVal Time-out time

Return value HRESULT Return S_OK when succeeded.

Explanation Set time-out time for command execution. Execute the CaoProvCommand::Timeout method of the CAO provider.

get_Timeout Format HRESULT ICaoCommand::get_Timeout ( [out, retval] long* pVal )

Function Get command time-out time

Parameter [out] pVal Command time-out time 122

Return value HRESULT Return S_OK when succeeded.

Explanation Get the time-out time for command execution. Execute the CaoProvCommand::Timeout method of the CAO provider.

Cancel Format HRESULT ICaoCommand::Cancel ( )

Function Cancel command

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Cancel command execution. Execute the CaoProvCommand::Cancel method of the CAO provider.

Execute Format HRESULT ICaoCommand::Execute ( [in, defaultvalue(0)] long lMode )

Function Execute extension command

Parameter [in] lMode Mode. Bit1 = asynchronous execution flag. Other bits are provider dependent.

Table4-4 Asynchronous execution flag

Value Explanation 0 Synchronous execution 1 Asynchronous execution

Return value HRESULT Return S_OK when succeeded. Return S_FALSE for asynchronous execution. 123

Explanation Execute extension command. Execute the CaoProvCommand::Execute method of the CAO provider. Execute the CaoCommand::Result method to get the execution result of the command.

4.4.16. ICaoExtensions get_Count Format HRESULT ICaoExtensions::get_Count ( [out, retval] long* pVal )

Function Get number of collections

Parameter [out] pVal Number of registration in collections

Return value HRESULT Return S_OK when succeeded.

Explanation Get number of registered objects in the collection

Add Format HRESULT ICaoExtensions::Add ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoExtension** ppICaoExtension )

Function Add extension board object

Parameter [in] bstrName Extension board name.

[in] bstrOption Option

[out] ppICaoExtension Address of CaoExtension IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoeXTENSION object, and acquire it. The created object is automatically registered 124

in ICaoExtensions. Reference counter of the created object is incremented by one. Execute ICaoExtension::Release method to release the object. Execute the ICaoExtensions::Remove method to delete from ICaoExtensions registration..

Clear Format HRESULT ICaoExtensions::Clear ( )

Function Release all extension board objects.

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Release objects registered in ICaoExtensions. When clients hold released ICaoExtensions object, the object is not released from memory. To release them execute ICaoExtensions::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

IsMember Format HRESULT ICaoExtensions::IsMember ( [in] VARIANT Index, [out, retval] VARIANT_BOOL* pVal )

Function Check registration of extension board object

Parameter [in] bstrName Extension board name/number

[out] pVal Registration reference result VARIANT_TRUE : Registered VARIANT_FALSE: Not registered

Return value HRESULT Return S_OK when succeeded.

Explanation Confirm whether specified extension board name or extension board index is registered in the collection. 125

Item Format HRESULT ICaoExtensions::Item ( [in] VARIANT Index, [out, retval] ICaoExtension** ppICaoExtension )

Function Get extension board object

Parameter [in] bstrName Extension board name/index

[out] ppICaoExtension Address of CaoExtension IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoExtension object corresponding to specified extension board index or extension board name. Reference counter of the created object is incremented by one. Execute Release method to release the object.

Remove Format HRESULT ICaoExtensions::Remove ( [in] VARIANT Index )

Function Release extension board object

Parameter [in] bstrName Extension board name/index

Return value HRESULT Return S_OK when succeeded.

Explanation Release ICaoExtension object corresponding to specified extension board index or extension board name. When clients hold released ICaoExtension object, the object is not released from memory. To release them execute ICaoExtension::Release method. Objects released from the collection always return E_ACCESSDENIED when the method is executed.

126

4.4.17. ICaoExtension get_Attribute Format HRESULT ICaoExtension::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the extension board. Execute the CaoProvExtension::Attribute method of the CAO provider.

get_Help Format HRESULT ICaoExtension::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help character string of the extension board. Execute the CaoProvExtension::Help method of the CAO provider.

put_ID Format HRESULT ICaoExtension::put_ID ( [in] VARIANT newVal )

Function Set ID 127

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set extension board ID Execute the CaoProvExtension::ID method of the CAO provider.

get_ID Format HRESULT ICaoExtension::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board ID. Execute the CaoProvExtension::ID method of the CAO provider.

get_Index Format HRESULT ICaoExtension::get_Index ( [out, retval] long* pVal )

Function Get extension board index

Parameter [out] pVal Extension board index

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board index of the object.

128 get_Name Format HRESULT ICaoExtension::get_Name ( [out, retval] BSTR* pVal )

Function Get extension board name

Parameter [out] pVal Extension board name

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board name of the object.

put_Tag Format HRESULT ICaoExtension::put_Tag ( [in] VARIANT newVal )

Function Set tag

Parameter [in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set extension board tag.

get_Tag Format HRESULT ICaoExtension::get_Tag ( [out, retval] VARIANT* pVal )

Function Get tag

Parameter [out] pVal Tag

Return value HRESULT 129

Return S_OK when succeeded.

Explanation Get extension board tag

get_VariableNames Format HRESULT ICaoExtension::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] bstrOption Option

[out] pVal Variable name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list. Execute the CaoProvExtension::VariableNames method of the CAO provider.

get_Variables Format HRESULT ICaoExtension::get_Variables ( [out, retval] ICaoVariables** ppICaoVariables )

Function Get variable collection

Parameter [out] ppICaoVariables Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Get ICaoVariable object. Reference counter of the acquired object is incremented by one. Execute Release method to release the object.

130

AddVariable Format HRESULT ICaoExtension::AddVariable ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable** ppICaoVar )

Function Add variable object

Parameter [in] bstrName Variable name

[in] bstrOption Option

[out] ppICaoVar Address of CaoVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoVariable object, and acquire it. The created object is automatically registered in ICaoVariables. Reference counter of the created object is incremented by one. Execute ICaoVariable::Release method to release the object. Execute the ICaoVariables::Remove method to delete from ICaoVariables registration.

Execute Format HRESULT ICaoExtension::Execute ( [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT 131

Return S_OK when succeeded.

Explanation Execute extension command. Execute the CaoProvExtension::Execute method of the CAO provider.

4.4.18. ICaoMessage get_DateTime Format HRESULT ICaoMessage::get_DateTime ( [out, retval] VARIANT* pVal )

Function Get message creation date and time.

Parameter [out] pVal Message creation date and time

Return value HRESULT Return S_OK when succeeded.

Explanation Get message creation date and time. Execute the CaoProvMessage::DateTime method of the CAO provider.

get_Description Format HRESULT ICaoMessage::get_Description ( [out, retval] BSTR* pVal )

Function Get description

Parameter [out] pVal Description

Return value HRESULT Return S_OK when succeeded.

Explanation Get description of the message. Execute the CaoProvMessage::Description method of the CAO provider.

get_Destination Format HRESULT ICaoMessage::get_Destination ( 132

[out, retval] BSTR* pVal )

Function Get message destination

Parameter [out] pVal message destination

Return value HRESULT Return S_OK when succeeded.

Explanation Get message destination. Execute the CaoProvMessage::Destination method of the CAO provider.

get_Number Format HRESULT ICaoMessage::get_Number ( [out, retval] long* pVal )

Function Get message number

Parameter [out] pVal Message number

Return value HRESULT Return S_OK when succeeded.

Explanation Get message number. Execute the CaoProvMessage::Number method of the CAO provider.

get_SerialNumber Format HRESULT ICaoMessage::get_SerialNumber ( [out, retval] long* pVal )

Function Get message serial number

Parameter [out] pVal Message serial number

Return value HRESULT Return S_OK when succeeded. 133

Explanation Get serial number for the message.

get_Source Format HRESULT ICaoMessage::get_Source ( [out, retval] BSTR* pVal )

Function Get source of message

Parameter [out] pVal Source of message

Return value HRESULT Return S_OK when succeeded.

Explanation Get source of message. Execute the CaoProvMessage::Source method of the CAO provider.

get_Value Format HRESULT ICaoMessage::get_Value ( [out, retval] VARIANT* pVal )

Function Get message text

Parameter [out] pVal Text

Return value HRESULT Return S_OK when succeeded.

Explanation Get message text. Execute the CaoProvMessage::Value method of the CAO provider.

Clear Format HRESULT ICaoMessage::Clear ( )

Function Clear message

Parameter None. 134

Return value HRESULT Return S_OK when succeeded.

Explanation Clear message. Execute the CaoProvMessage::Clear method of the CAO provider.

Reply Format HRESULT ICaoMessage::Reply ( VARIANT vntData )

Function Reply to message

Parameter [out] pVal Reply data

Return value HRESULT Return S_OK when succeeded.

Explanation Reply to message. Execute the CaoProvMessage::Reply method of the CAO provider.

4.4.19. ICaoEngineStatus get_CurrentDateTime Format HRESULT ICaoEngineStatus::get_CurrentDateTime ( [out, retval] VARIANT* pVal )

Function Get current date and time.

Parameter [out] pVal Current date and time

Return value HRESULT Return S_OK when succeeded.

Explanation Get current date and time

get_ComputerName Format HRESULT ICaoEngineStatus::get_ComputerName ( 135

[out, retval] BSTR* pVal )

Function Get computer name

Parameter [out] pVal Computer name

Return value HRESULT Return S_OK when succeeded.

Explanation Get computer name on which CAO engine is running.

get_ObjectCounts Format HRESULT ICaoEngineStatus::get_ObjectCounts ( [in] VARIANT vntName, [out, retval] long* pVal )

Function Get the number of objects of each class

Parameter [in] vntName Class name/number Class name and class number correspond as follows.

Table4-5 Correspondence of class number and class name

Class number Class name 0 CaoEngine 1 CaoWorkspaces 2 Caoworkspace 3 CaoControllers 4 CaoController 5 CaoExtensions 6 CaoExtension 7 CaoFiles 8 CaoFile 9 CaoRobots 10 CaoRobot 11 CaoTasks 136

12 CaoTask 13 CaoVariables 14 CaoVariable 15 CaoCommands 16 CaoCommand 17 CaoMessage 18 CaoEngineStatus

[out] pVal Number of objects

Return value HRESULT Return S_OK when succeeded.

Explanation Get total of the object specified by a class name or a class number.

get_StartDateTime Format HRESULT ICaoEngineStatus::get_StartDateTime ( [out, retval] VARIANT* pVal )

Function Get CAO engine start date and time

Parameter [out] pVal Start date and time

Return value HRESULT Return S_OK when succeeded.

Explanation Get CAO engine start date and time.

get_Values Format HRESULT ICaoEngineStatus::get_Values ( [in] VARIANT vntName, [out, retval] VARIANT* pVal )

Function (Reserved for future enhancement)

Parameter [in] vntName 137

Status name/number

[out] pVal Data

Return value HRESULT Always return S_OK.

Explanation Reserved for future enhancement The function is currently not implemented.

get_Version Format HRESULT ICaoEngineStatus::get_Version ( [out, retval] BSTR* pVal )

Function Get CAO engine version.

Parameter [out] pVal Version

Return value HRESULT Return S_OK when succeeded.

Explanation Get version information of CAO engine.

4.4.20. _ICaoControllerEvents OnMessage Format HRESULT _ICaoControllerEvents::OnMessage ( [in] ICaoMessage* pICaoMess )

Function OnMessage event

Parameter [in] pICaoMess Address of CaoMessage IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation OnMessage event of the CAO engine. This event occurs when OnMessage event is generated in the CAO provider. This method can be used when “@EventDisable” option of AddController method is set to 138

FALSE.

4.4.21. _ICaoCommandsEvents ExecuteComplete Format HRESULT _ICaoCommandsEvents::ExecuteComplete ( [in] long lID )

Function ExecuteComplete event

Parameter [in] lID Command number Returns command number of CaoCommand object when asynchronous command execution is completed.

Return value HRESULT Return S_OK when succeeded.

Explanation This is ExecuteComplete event generated in CaoController class. Completion of asynchronous execution of the CaoCommand::Execute method generates this event.

This method can be used when “@EventDisable” option of AddController method is set to FALSE.

139

5. Details of CAO provider

5.1. Class and list of interface

Table5-1 CAO Provider Classes

Class name Object resource Explanation CaoProvController Controller Controller class. Offers the function related to controller's overall resources. CaoProvVariable Variable Variable class. Offers the function related to the variable resource. CaoProvRobot Robot Robot class. Offers the function related to the robot resource. CaoProvFile File File class. Offers the function related to the file and the folder resource. CaoProvTask Task Task class. Offers the function related to the task resource. CaoProvCommand Command Command class. Offer the function related to the command resource. CaoProvExtension Extension Extension class. Offers the function related to the extension board resource. board CaoProvMessage Message Message class. Offers the function related to the message resource.

Table5-2 List of CAO Provider interface class

Interface name Implement class Explanation ICaoProvController CaoProvController Controller IF class. ICaoProvVariable CaoProvVariable Variable IF class. ICaoProvRobot CaoProvRobot Robot IF class. ICaoProvFile CaoProvFile File IF class. ICaoProvTask CaoProvTask Task IF class. ICaoProvCommand CaoProvCommand Command IF class. ICaoProvExtension CaoProvEntension Extension board IF class. ICaoProvMessage CaoProvMessage Message IF class. _ICaoProvControllerEvents CaoProvController Controller event IF class

140

5.2. List of method and property 5.2.1. CaoProvController Object-controller Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoProvController Attribute P Get attribute R Attribute: Long

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Name P Get controller name R Controller name: BSTR

CommandNames P Get command name R [Option: BSTR] Command name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

ExtensionNames P Get extension board R [Option: BSTR] Enhancing board name list: The option is filter condition etc. name list VARIANT(VT_VARIANT|VT_ARRAY)

FileNames P Get file name list R [Option: BSTR] File name list: The option is filter condition etc. VARIANT(VT_VARIANT|VT_ARRAY)

RobotNames P Get robot name list R [Option: BSTR] Robot name list: The option is filter condition etc. VARIANT(VT_VARIANT|VT_ARRAY)

TaskNames P Get task name list R [Option: BSTR] Task name list: The option is filter condition etc. VARIANT(VT_VARIANT|VT_ARRAY)

VariableNames P Get variable name R [Option: BSTR] Variable identifier list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

GetCommand M Get command object S Command name: BSTR, Object: ICaoProvCommand [Option: BSTR]

GetExtension M Get extension board S Extension board Object: ICaoProvExtension object name:BSTR, 141

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

[Option: BSTR]

GetFile M Get file object S File name: BSTR, Object: ICaoProvFile [Option: BSTR]

GetRobot M Get robot object S Robot name: BSTR, Object: ICaoProvRobot [Option: BSTR]

GetTask M Get task object S Task name: BSTR, Object: ICaoProvTask [Option: BSTR]

GetVariable M Get variable object S Variable name: BSTR, Object: ICaoProvVariable [Option: BSTR]

Connect M Connect to controller S Controller name: BSTR, [Option: BSTR]

Disconnect M Disconnect S controller

Execute M Execution of S Command: VARIANT Result: VARIANT For function extension extension command

OnMessage M Reception of S Message:ICaoProvMessage forwarding message

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

142

5.2.2. CaoProvVariable Object-variable Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoProvVariable Attribute P Get attribute R Attribute: Long

DateTime P Get time and date R Time and date stamp: VARIANT stamp

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Microsecond P Get time and date R Time and date stamp: Long stamp (micro second)

Name P Get variable name R Variable name: BSTR System variable names start by @.

Value P Get value R/W Value:VARIANT Value:VARIANT Default member

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

143

5.2.3. CaoProvRobot Object-robot Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoProvRobot Attribute P Get attribute R Attribute: Long

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Name P Get robot name R Robot name: BSTR

VariableNames P Get variable name R [Option: BSTR] Variable name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

Accelerate M Refer to ACCEL W Joint number:long, Joint number –1: Tool Center Point(TCP) statement Accel:float, acceleration/deceleration specification of [Decel:float] Joint number 0: All joint SLIM. acceleration/deceleration Other joint number is for acceleration / deceleration of specified joint.

GetVariable M Get variable object S Variable name: BSTR, Object: ICaoProvVariable [Option: BSTR]

Cancel M Cancel execution of W [Option: BSTR] robot control method

Change M Refer to CHANGE W Hand name: BSTR statement specification of SLIM.

Chuck M Refer to GRASP W [Option: BSTR] 144

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

statement specification of SLIM.

Drive M Refer to DRIVE W Joint number:long, Unlike SLIM, multi-joint motion is not statement Distance:float, supported. In the case, MOVE is specification of [Option:BSTR] recommended. SLIM.

Execute M Execute extension S Command: VARIANT Result: VARIANT For function enhancing command

GoHome M Refer to GOHOME W statement specification of SLIM.

Hold M Refer to the W [Option: BSTR] It is a meaning of the temporary stop of the specification of the program in SLIM or it means the temporary HOLD sentence of stop of the robot operation in CAO. SLIM.

Halt M Refer to the W [Option: BSTR] It is a meaning of the forced outage of the specification of the program in SLIM or it means the forced outage HALT sentence of of the robot operation in CAO. SLIM.

Move M Refer to MOVE W Interpolation:long, - Interpolation specification 1:PTP, 2:CP, 145

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

statement Pose array: 3:Circle specification of VARIANT, - Pose specification is manufacturer SLIM. [Option:BSTR] dependent. Circular interpolation will use an array of poses. - Default value for option is “”.

Rotate M Refer to ROTATE W Rotation plane: Specification of rotation plane is statement VARIANT, manufacturer dependant. specification of Angle: Float, SLIM. Rotation center: VARIANT, [Option:BSTR]

Speed M Refer to SPEED / W Joint number:long, Joint number –1: TCP speed JSPEED statement Speed:float Joint number 0: All joint speed specification of Other joint number is for speed of specified SLIM. joint.

Unchuck M Refer to RELEASE W [Option: BSTR] SLIM statement name RELEASE is changed statement to Chuck/Unchuck, because original SLIM specification of statement name Release is already used in SLIM. ORiN.

Unhold M Release of HOLD W [Option: BSTR] Because it means the temporary stop of the sentence of SLIM robot operation in CAO, it uses it for the restart though the command of the restart is not 146

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

provided because the HOLD sentence is a meaning of the temporary stop of the program in SLIM.

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

147

5.2.4. CaoProvFile Object-file Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoProvFile Attribute P Get attribute R Attribute: long

DateCreated P Get creation date R Creation date: VARIANT.

DateLastAccessed P Get last access date R Last access date: VARIANT

DateLastModified P Get last change date R Last change date: VARIANT

FileNames P Get file name list R [Option: BSTR] File name list: The option is filter condition etc. VARIANT(VT_VARIANT|VT_ARRAY) Returns child file name list when the attribute is a directory.

Files P Get file collection R Collection: ICaoFiles

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Name P Get file name R File name: BSTR

Path P Get file path R Path name: BSTR Returns absolute path. File name is not included. The last delimiter is included..

Size P Get file size R File size: long

Type P Get file type R File type: BSTR

Value P File data R/W Data: VARIANT Data: VARIANT Default member

VariableNames P Get variable name R [Option: BSTR] Variable name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

GetFile M Get file object S File name: BSTR Object: ICaoProvFile [Option: BSTR]

GetVariable M Get variable object S Variable name: BSTR Object: ICaoProvVariable 148

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

[Option: BSTR]

Copy M Copy file W Destination file name: BSTR [Option: BSTR]

Delete M Delete file W [Option: BSTR]

Execute M Execute intension S Command: VARIANT Result: VARIANT For function enhancing command

Move M Move file W Destination file name: BSTR [Option: BSTR]

Run M Create task W [Option: BSTR] Task name: BSTR

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

149

5.2.5. CaoProvTask Object-task Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoProvTask Attribute P Get attribute R Attribute: long

FileName P Get corresponding R File name: BSTR file name

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Name P Get task name R Task name: BSTR

VariableNames P Get variable name R [Option: BSTR] Variable identifier list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

GetVariable M Get variable object S Variable name: BSTR Object: ICaoProvVariable [Option: BSTR]

Delete M Delete task W [Option: BSTR]

Execute M Execute extension S Command: VARIANT Result: VARIANT For function enhancing command

Start M Start task W Mode: long, Mode=1: One cycle execution [Option: BSTR] Mode=2: Continuous cycle execution Mode=3: One step forward execution Mode=4: One step backward execution Option specifies start position, etc.

Stop M Stop task W Mode: long, Mode=0: Default stop [Option: BSTR] Mode=1: Immediate stop Mode=2: Step stop 150

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

Mode=3: Cycle stop Mode=4: Initialization stop (Note) Default stop is one of above mentioned stop type.

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

151

5.2.6. CaoProvCommand Object-command Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoProvCommand Attribute P Get attribute R Attribute: long

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Name P Get command name R Command name: BSTR

Parameters P Command R/W Command parameter: Command parameter: VARIANT parameter VARIANT

Result P Execution result of R Execution result: VARIANT latest Execute()

State P Get state R State: long Status-bit1 0: Waiting, 1: Running Meanings of other bits are provider dependent.

Timeout P Time-out R/W Time-out: Long Time-out: Long

Cancel M Cancel execution of S command

Execute M Execute command S Mode: long Mode=0: synchronous execution Mode=1: asynchronous execution Returns S_FALSE when command is executed asynchronously.

Meaning of M:Method ・Arguments in [] are optional.. 152

Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

153

5.2.7. CaoProvExtension Object-extension board Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoProvExtension Attribute P Get attribute R Attribute: long

Help P Help R Help character string: BSTR

ID P ID R/W ID:VARIANT ID:VARIANT

Name P Get extension board R Extension board name: BSTR name

Tag P Tag R/S Tag data: VARIANT Tag data: VARIANT

VariableNames P Get variable name R [Option: BSTR] Variable name list: The option is filter condition etc. list VARIANT(VT_VARIANT|VT_ARRAY)

GetVariable M Get variable object S Variable name: BSTR Object: ICaoProvVariable [Option: BSTR]

Execute M Execute extension S Command: VARIANT Result: VARIANT For function enhancing command

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

154

5.2.8. CaoProvMessage Object-message Argument of function Class Property and method Explanation R/W Remarks IN OUT RETVAL

CaoProvMessage DateTime P Creation date R Creation: VARIANT

Description P Message description R Description: BSTR

Destination P Message destination R Destination: BSTR

Number P Message number R Message number: long

Source P Message source R Message source: BSTR

Value P Message text R Message text: VARIANT

Meaning of M:Method ・Arguments in [] are optional.. symbols P:Property ・The default value for optional BSTR type argument is a null string. ・The default value for optional numeric type argument is 0.

155

5.3. Function specifications 5.3.1. ICaoProvController get_Attribute Format HRESULT ICaoProvController::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get the attribute value of the controller.

get_CommandNames Format HRESULT ICaoProvController::get_CommandNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get command name list

Parameter [in] bstrOption Option

[out] pVal Command name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get command name list.

get_ExtensionNames Format HRESULT ICaoProvController::get_ExtensionNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal 156

)

Function Get extension board name list

Parameter [in] bstrOption Option

[out] pVal Extension board name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board name list.

get_FileNames Format HRESULT ICaoProvController::get_FileNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get file name list

Parameter [in] bstrOption Option

[out] pVal File name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name list.

get_Help Format HRESULT ICaoProvController::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help character string 157

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the controller. Execute the CaoProvController::Help method of the CAO provider.

put_ID Format HRESULT ICaoProvController::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set controller's ID.

get_ID Format HRESULT ICaoProvController::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller's ID.

get_Name Format HRESULT ICaoProvController::get_Name ( [out, retval] BSTR* pVal 158

)

Function Get controller name

Parameter [out] pVal Controller name

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller name of the object.

get_RobotNames Format HRESULT ICaoProvController::get_RobotNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get robot name list

Parameter [in] bstrOption Option

[out] pVal Robot name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get robot name list.

get_TaskNames Format HRESULT ICaoProvController::get_TaskNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get task name list

Parameter [in] bstrOption Option

[out] pVal 159

Task name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get task name list.

get_VariableNames Format HRESULT ICaoProvController::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] bstrOption Option

[out] pVal Variable name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

Connect Format HRESULT ICaoProvController::Connect ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption )

Function Connect provider

Parameter [in] bstrName Controller name

[out] bstrOption Option

Return value HRESULT Return S_OK when succeeded. 160

Explanation Connect provider to corresponding device

Disconnect Format HRESULT ICaoProvController::Disconnect ( )

Function Disconnect provider

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Disconnect device from the provider.

GetCommand Format HRESULT ICaoProvController::GetCommand ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvCommand** ppCaoProvCommand )

Function Add command object

Parameter [in] bstrName Command name.

[in] bstrOption Option

[out] ppCaoProvCommand Address of CaoProvCommand IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvCommand object, and acquire it. Reference counter of the created object is incremented by one. Execute IcaoProvCommand::Release method to release the object.

161

GetExtension Format HRESULT ICaoProvController::GetExtension ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvExtension** ppCaoProvExtension )

Function Add extension board object

Parameter [in] bstrName Extension board name.

[in] bstrOption Option

[out] ppCaoProvExtension Address of CaoProvExtension IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvExtension object, and acquire it. Reference counter of the created object is incremented by one. Execute ICaoProvExtension::Release method to release the object.

GetFile Format HRESULT ICaoProvController::GetFile ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvFile** ppCaoProvFile )

Function Add file object

Parameter [in] bstrName File name.

[in] bstrOption Option

[out] ppCaoProvFile Address of CaoProvFile IF pointer 162

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvFile object, and acquire it. Reference counter of the created object is incremented by one. Execute ICaoProvFile::Release method to release the object.

GetRobot Format HRESULT ICaoProvController::GetRobot ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvRobot** ppCaoProvRobot )

Function Add robot object

Parameter [in] bstrName Robot name.

[in] bstrOption Option

[out] ppCaoProvRobot Address of CaoProvRobot IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvRobot object, and acquire it. Reference counter of the created object is incremented by one. Execute ICaoProvRobot::Release method to release the object.

GetTask Format HRESULT ICaoProvController::GetTask ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvTask** ppCaoProvTask )

Function Add task object 163

Parameter [in] bstrName Task name.

[in] bstrOption Option

[out] ppCaoProvTask Address of CaoProvTask IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvTask object, and acquire it. Reference counter of the created object is incremented by one. Execute ICaoProvTask::Release method to release the object.

GetVariable Format HRESULT ICaoProvController::GetVariable ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable** ppCaoProvVar )

Function Add variable object

Parameter [in] bstrName Variable name.

[in] bstrOption Option

[out] ppCaoProvVariable Address of CaoProvVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvVariable object, and acquire it. Reference counter of the created object is incremented by one. Execute IcaoProvVariable::Release method to release the object.

164

Execute Format HRESULT ICaoProvController::Execute ( [in] VARIANT Command, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command.

OnMessage Format HRESULT ICaoProvController::Execute ( [in] ICaoMessage *pMsg )

Function Reception of provider forwarding message

Parameter [in] pMsg Message

Return value HRESULT When succeeding, S_OK is returned.

Explanation The message transmitted by other providers is received.

5.3.2. ICaoProvVariable get_Attribute Format HRESULT ICaoProvVariable::get_Attribute ( [out, retval] long* pVal ) 165

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get the attribute value of the variable.

get_DateTime Format HRESULT ICaoProvVariable::get_DateTime ( [out, retval] VARIANT* pVal )

Function Get time and date stamp (date)

Parameter [out] pVal Time and date stamp (date)

Return value HRESULT Return S_OK when succeeded.

Explanation Get the time and date stamp (date) of a variable.

get_Help Format HRESULT ICaoProvVariable::get_Help ( [out, retval] BSTR* pVal )

Function Get help string

Parameter [out] pVal Help string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the variable.

166 put_ID Format HRESULT ICaoProvVariable::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the variable.

get_ID Format HRESULT ICaoProvVariable::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the variable.

get_Microsecond Format HRESULT ICaoProvVariable::get_Microsecond ( [out, retval] long* pVal )

Function Get time and date stamp (micro second)

Parameter [out] pVal Time and date stamp(micro second)

Return value HRESULT 167

Return S_OK when succeeded.

Explanation Get time and date stamp of the variable (micro second).

get_Name Format HRESULT ICaoProvVariable::get_Name ( [out, retval] BSTR* pVal )

Function Get variable name

Parameter [out] pVal Variable name

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name of the object.

put_Value Format HRESULT ICaoProvVariable::put_Value ( [in] VARIANT newVal )

Function Set value

Parameter [in] newVal Variable value

Return value HRESULT Return S_OK when succeeded.

Explanation Set variable value.

get_Value Format HRESULT ICaoProvVariable::get_Value ( [out, retval] VARIANT* pVal ) 168

Function Get value

Parameter [out] pVal Variable value

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable value.

5.3.3. ICaoProvRobot get_Attribute Format HRESULT ICaoProvRobot::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the robot.

get_Help Format HRESULT ICaoProvRobot::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the robot.

169 put_ID Format HRESULT ICaoProvRobot::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set robot ID.

get_ID Format HRESULT ICaoProvRobot::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get robot ID.

get_Name Format HRESULT ICaoProvRobot::get_Name ( [out, retval] BSTR* pVal )

Function Get robot name

Parameter [out] pVal Robot name

Return value HRESULT 170

Return S_OK when succeeded.

Explanation Get robot name of the object.

get_VariableNames Format HRESULT ICaoProvRobot::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] bstrOption Option

[out] pVal Variable identifier list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

Accelerate Format HRESULT ICaoProvRobot::Accelerate ( [in] long lAxis, [in] float fAccel, [in, defaultvalue(0)] float fDecel )

Function Execute ACCEL statement

Parameter [in] lAxis Joint number -1: Tool Center Point(TCP) acceleration/deceleration 0: All joint acceleration/deceleration Other joint number: acceleration / deceleration of specified joint.

[in] fAccel Acceleration 171

[in] fDecel Deceleration

Return value HRESULT Return S_OK when succeeded.

Explanation Set acceleration and deceleration of robot motion. Refer to the specification of the ACCEL statement of SLIM for details.

Change Format HRESULT ICaoProvRobot::Change ( [in] BSTR bstrName )

Function Execute CHANGE statement

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the CHANGE statement of SLIM for details.

Chuck Format HRESULT ICaoProvRobot::Chuck ( [in, defaultvalue("")] BSTR bstrOption )

Function Execute GRASP statement

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the GRASP statement of SLIM for details.

172

Drive Format HRESULT ICaoProvRobot::Drive ( [in] long lNo, [in] float fMov, [in, defaultvalue("")] BSTR bstrOpt )

Function Execute DRIVE statement

Parameter [in] lNo Axis number

[in] fMov Amount of movement

[in] bstrOpt Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the DRIVE statement of SLIM for details. Unlike SLIM, multi-joint motion is not supported. In the case, use CaoRobot::Move method.

Execute Format HRESULT ICaoProvRobot::Execute ( [in] VARIANT Command, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command.

173

GetVariable Format HRESULT ICaoProvRobot::GetVariable ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable** ppCaoProvVar )

Function Add variable object

Parameter [in] bstrName Variable name

[in] bstrOption Option

[out] ppCaoProvVariable Address of CaoProvVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvVariable object, and acquire it. Reference counter of the created object is incremented by one. Execute IcaoProvVariable::Release method to release the object.

GoHome Format HRESULT ICaoProvRobot::GoHome ( )

Function Execute GOHOME statement

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the GOHOME statement of SLIM for details.

Hold Format HRESULT ICaoProvRobot::Hold ( [in, defaultvalue("")] BSTR bstrOption 174

)

Function Execution of HOLD sentence

Parameter [in] bstrOption Option

Return value HRESULT When succeeding, S_OK is returned.

Explanation Please refer to the specification of the HOLD sentence of SLIM for details.

Halt Format HRESULT ICaoProvRobot::Halt ( [in, defaultvalue("")] BSTR bstrOption )

Function Execution of HALT sentence

Parameter [in] bstrOption Option

Return value HRESULT When succeeding, S_OK is returned.

Explanation Please refer to the specification of the HALT sentence of SLIM for details.

Move Format HRESULT ICaoProvRobot::Move ( [in] long lComp, [in] VARIANT vntPose, [in, defaultvalue("")] BSTR bstrOpt )

Function Execute MOVE statement

Parameter [in] lComp Interpolation specification. 1:PTP(point to point), 2: CP(continuous path), 3: Circular arc.

[in] vntPose Posed array 175

Pose specification is manufacturer dependent.

[in] bstrOpt Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the MOVE statement of SLIM for details.

Rotate Format HRESULT ICaoProvRobot::Rotate ( [in] VARIANT vntRotSuf, [in] float fDeg, [in] VARIANT vntPivot, [in, defaultvalue("")] BSTR bstrOpt )

Function Execution of ROTATE statement

Parameter [in] vntRotSuf Rotation plane The specification method is manufacturer dependent.

[in] fDeg Angle

[in] vntPivot Rotation center

[in] bstrOpt Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the ROTATE statement of SLIM for details.

Speed Format HRESULT ICaoProvRobot::Speed ( [in] long lAxis, [in] float fSpeed 176

)

Function ExecuteSPEED/JSPEED statement

Parameter [in] lAxis Joint number ‐1: TCP speed, 0: All joint speed, other: speed for specified joint

[in] fSpeed Speed

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the SPEED/JSPEED statement of SLIM for details.

Unchuck Format HRESULT ICaoProvRobot::Unchuck ( [in, defaultvalue("")] BSTR bstrOption )

Function Execute RELEASE statement

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the RELEASE statement of SLIM for details.

Unhold Format HRESULT ICaoProvRobot::Unhold ( [in, defaultvalue("")] BSTR bstrOption )

Function Release of HALT sentence

Parameter [in] bstrOption Option

Return value HRESULT When succeeding, S_OK is returned. 177

Explanation Please refer to the specification of the HOLD sentence of SLIM for details.

5.3.4. ICaoProvFile get_Attribute Format HRESULT ICaoProvFile::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of a file.

get_DateCreated Format HRESULT ICaoProvFile::get_DateCreated ( [out, retval] VARIANT* pVal )

Function Get file creation date

Parameter [out] pVal File creation date

Return value HRESULT Return S_OK when succeeded.

Explanation Get file creation date.

get_DateLastAccessed Format HRESULT ICaoProvFile::get_DateLastAccessed ( [out, retval] VARIANT* pVal )

Function Get last file access date 178

Parameter [out] pVal The last file access date

Return value HRESULT Return S_OK when succeeded.

Explanation Get last file access date.

get_DateLastModified Format HRESULT ICaoProvFile::get_DateLastModified ( [out, retval] VARIANT* pVal )

Function Get last file modification date

Parameter [out] pVal The last file modification date

Return value HRESULT Return S_OK when succeeded.

Explanation Get last file modification date.

get_FileNames Format HRESULT ICaoProvFile::get_FileNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get file name list

Parameter [in] bstrOption Option

[out] pVal File name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name list.

179 get_Help Format HRESULT ICaoProvFile::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the controller.

put_ID Format HRESULT ICaoProvFile::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set controller's ID.

get_ID Format HRESULT ICaoProvFile::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT 180

Return S_OK when succeeded.

Explanation Get controller's ID.

get_Name Format HRESULT ICaoProvFile::get_Name ( [out, retval] BSTR* pVal )

Function Get file name

Parameter [out] pVal File name

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name of the object.

get_Path Format HRESULT ICaoProvFile::get_Path ( [out, retval] BSTR* pVal )

Function Get file path

Parameter [out] pVal File passing

Return value HRESULT Return S_OK when succeeded.

Explanation Get file path.

get_Size Format HRESULT ICaoProvFile::get_Size ( [out, retval] long* pVal )

Function Get file size 181

Parameter [out] pVal Size of file

Return value HRESULT Return S_OK when succeeded.

Explanation Get file size.

get_Type Format HRESULT ICaoProvFile::get_Type ( [out, retval] BSTR* pVal )

Function Get file type

Parameter [out] pVal File type

Return value HRESULT Return S_OK when succeeded.

Explanation Get file type

put_Value Format HRESULT ICaoProvFile::put_Value ( [in] VARIANT newVal )

Function Set file data

Parameter [in] newVal File data

Return value HRESULT Return S_OK when succeeded.

Explanation Set file data.

get_Value Format HRESULT ICaoProvFile::get_Value ( 182

[out, retval] VARIANT* pVal )

Function Get file data

Parameter [out] pVal File data

Return value HRESULT Return S_OK when succeeded.

Explanation Get file data.

get_VariableNames Format HRESULT ICaoProvFile::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] bstrOption Option

[out] pVal Variable identifier list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

Copy Format HRESULT ICaoProvFile::Copy ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption )

Function Copy file

Parameter [in] bstrName Destination file name 183

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Copy a file.

Delete Format HRESULT ICaoProvFile::Delete ( [in, defaultvalue("")] BSTR bstrOption )

Function Delete file

Parameter [in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Delete file.

Execute Format HRESULT ICaoProvFile::Execute ( [in] VARIANT Command, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command.

184

GetFile Format HRESULT ICaoProvFile::GetFile ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvFile** ppCaoProvFile )

Function Add file object

Parameter [in] bstrName File name.

[in] bstrOption Option

[out] ppCaoProvFile Address of CaoProvFile IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvFile object, and acquire it. Reference counter of the created object is incremented by one. Execute IcaoProvFile::Release method to release the object.

GetVariable Format HRESULT ICaoProvFile::GetVariable ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable** ppCaoProvVar )

Function Add variable object

Parameter [in] bstrName Variable name.

[in] bstrOption Option

[out] ppCaoProvVariable Address of CaoProvVariable IF pointer 185

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvVariable object, and acquire it. Reference counter of the created object is incremented by one. Execute IcaoProvVariable::Release method to release the object.

Move Format HRESULT ICaoProvFile::Move ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption )

Function Move file.

Parameter [in] bstrName Destination file name

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Move a file.

Run Format HRESULT ICaoProvFile::Run ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] BSTR* pVal )

Function Create a task

Parameter [in] bstrOption Option

[out] bstrName Task name

Return value HRESULT Return S_OK when succeeded. 186

Explanation Create a task from the file, and return the generated task name.

5.3.5. ICaoProvTask get_Attribute Format HRESULT ICaoProvTask::get_Attribute ( [out, retval] long* pVal )

Function Acquisition of attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the task.

get_FileName Format HRESULT ICaoProvTask::get_FileName ( [out, retval] BSTR* pVal )

Function Get corresponding file name

Parameter [out] pVal Corresponding file name

Return value HRESULT Return S_OK when succeeded.

Explanation Get a file name that corresponds to the task.

get_Help Format HRESULT ICaoProvTask::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string 187

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the robot.

put_ID Format HRESULT ICaoProvTask::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set robot ID.

get_ID Format HRESULT ICaoProvTask::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get task ID.

get_Name Format HRESULT ICaoProvTask::get_Name ( 188

[out, retval] BSTR* pVal )

Function Get task name

Parameter [out] pVal Task name

Return value HRESULT Return S_OK when succeeded.

Explanation Get task name of the object.

get_VariableNames Format HRESULT ICaoProvTask::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal ) Function Acquisition of variable identifier list

Parameter [in] bstrOption Option

[out] pVal Variable name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

Delete Format HRESULT ICaoProvTask::Delete ( [in, defaultvalue("")] BSTR bstrOption )

Function Delete task

Parameter [in] bstrOption Option

Return value HRESULT 189

Return S_OK when succeeded.

Explanation Delete task.

Execute Format HRESULT ICaoProvTask::Execute ( [in] VARIANT Command, [out, retval] VARIANT* pVal )

Function Execution of extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute the extension command.

GetVariable Format HRESULT ICaoProvTask::GetVariable ( [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable** ppCaoProvVar )

Function Add variable object

Parameter [in] bstrName Variable name.

[in] bstrOption Option

[out] ppCaoProvVariable Address of CaoProvVariable IF pointer

Return value HRESULT 190

Return S_OK when succeeded.

Explanation Create ICaoProvVariable object, and acquire it. Reference counter of the created object is incremented by one. Execute IcaoProvVariable::Release method to release the object.

Start Format HRESULT ICaoProvTask::Start ( [in, defaultvalue(0)] long lMode, [in, defaultvalue("")] BSTR bstrOption )

Function Start task

Parameter [in] lMode Mode 1: one cycle execution, 2: continuous cycle execution, 3: one step forward execution, 4:one step backward execution.

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Start execution of the task.

Stop Format HRESULT ICaoProvTask::Stop ( [in, defaultvalue(0)] long lMode, [in, defaultvalue("")] BSTR bstrOption )

Function Stop task

Parameter [in] lMode Mode 0: default stop 1: immediate stop 191

2: step stop 3: cycle stop 4: initialization stop (The default stop is one of above mentioned stop type.)

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Stop task execution.

5.3.6. ICaoProvCommand get_Attribute Format HRESULT ICaoProvCommand::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the command.

get_Help Format HRESULT ICaoProvCommand::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help string

Return value HRESULT Return S_OK when succeeded. 192

Explanation Get help string of the file.

put_ID Format HRESULT ICaoProvCommand::put_ID ( [in] VARIANT newVal )

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set file ID.

get_ID Format HRESULT ICaoProvCommand::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get file ID.

get_Name Format HRESULT ICaoProvCommand::get_Name ( [out, retval] BSTR* pVal )

Function Get file name

Parameter [out] pVal 193

File name

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name of the object.

put_Parameters Format HRESULT ICaoProvCommand::put_Parameters ( [in] VARIANT newVal )

Function Set parameter

Parameter [in] newVal Parameter

Return value HRESULT Return S_OK when succeeded.

Explanation Set parameter for command execution.

get_Parameters Format HRESULT ICaoProvCommand::get_Parameters ( [out, retval] VARIANT* pVal )

Function Get parameter

Parameter [out] pVal Parameter

Return value HRESULT Return S_OK when succeeded.

Explanation Get parameter for command execution.

get_State Format HRESULT ICaoProvCommand::get_State ( [out, retval] long* pVal 194

)

Function Get command execution state

Parameter [out] pVal State Bit1 = executing flag Other bits are provider dependent.

表 5-3 Executing flag

Value Explanation 0 Standby 1 Executing

Return value HRESULT Return S_OK when succeeded.

Explanation Get execution state of the command.

put_Timeout Format HRESULT ICaoProvCommand::put_Timeout ( [in] long newVal )

Function Set command time-out time

Parameter [in] newVal Time-out time

Return value HRESULT Return S_OK when succeeded.

Explanation Set time-out time for command execution.

get_Timeout Format HRESULT ICaoProvCommand::get_Timeout ( [out, retval] long* pVal )

Function Get command time-out time 195

Parameter [out] pVal Command time-out time

Return value HRESULT Return S_OK when succeeded.

Explanation Get the time-out time for command execution.

Cancel Format HRESULT ICaoProvCommand::Cancel ( )

Function Cancel command

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Cancel command execution.

Execute Format HRESULT ICaoProvCommand::Execute ( [in, defaultvalue(0)] long lOption, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] lMode Mode. Bit1 = asynchronous execution flag. Other bits are provider dependent.

Table5-4 Asynchronous execution flag

Value Explanation 0 Synchronous execution 1 Asynchronous execution

Return value HRESULT Return S_OK when succeeded. 196

Return S_FALSE for asynchronous execution.

Explanation Execute extension command..

5.3.7. ICaoProvExtension get_Attribute Format HRESULT ICaoProvExtension::get_Attribute ( [out, retval] long* pVal )

Function Get attribute

Parameter [out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the extension board.

get_Help Format HRESULT ICaoProvExtension::get_Help ( [out, retval] BSTR* pVal )

Function Get help character string

Parameter [out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of extension board.

put_ID Format HRESULT ICaoProvExtension::put_ID ( [in] VARIANT newVal 197

)

Function Set ID

Parameter [in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set extension board ID.

get_ID Format HRESULT ICaoProvExtension::get_ID ( [out, retval] VARIANT* pVal )

Function Get ID

Parameter [out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board ID.

get_Name Format HRESULT ICaoProvExtension::get_Name ( [out, retval] BSTR* pVal )

Function Get robot name

Parameter [out] pVal Extension board name

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board name of the object.

198 get_VariableNames Format HRESULT ICaoProvExtension::get_VariableNames ( [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] bstrOption Option

[out] pVal Variable identifier list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

Execute Format HRESULT ICaoProvExtension::Execute ( [in] VARIANT Command, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command.

GetVariable Format HRESULT ICaoProvExtension::GetVariable ( [in] BSTR bstrName, 199

[in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable** ppCaoProvVar )

Function Add variable object

Parameter [in] bstrName Variable name.

[in] bstrOption Option

[out] ppCaoProvVariable Address of CaoProvVariable IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoProvVariable object, and acquire it. Reference counter of the created object is incremented by one. Execute IcaoProvVariable::Release method to release the object.

5.3.8. ICaoProvMessage get_DateTime Format HRESULT ICaoProvMessage::get_DateTime ( [out, retval] VARIANT* pVal )

Function Get message creation date and time.

Parameter [out] pVal Message creation date and time

Return value HRESULT Return S_OK when succeeded.

Explanation Get message creation date and time.

get_Description Format HRESULT ICaoProvMessage::get_Description ( [out, retval] BSTR* pVal ) 200

Function Get description

Parameter [out] pVal Description

Return value HRESULT Return S_OK when succeeded.

Explanation Get description of the message.

get_Destination Format HRESULT ICaoProvMessage::get_Destination ( [out, retval] BSTR* pVal )

Function Get message destination

Parameter [out] pVal message destination

Return value HRESULT Return S_OK when succeeded.

Explanation Get message destination.

get_Number Format HRESULT ICaoProvMessage::get_Number ( [out, retval] long* pVal )

Function Get message number

Parameter [out] pVal Message number

Return value HRESULT Return S_OK when succeeded.

Explanation Get message number.

201 get_Source Format HRESULT ICaoProvMessage::get_Source ( [out, retval] BSTR* pVal )

Function Get source of message

Parameter [out] pVal Source of message

Return value HRESULT Return S_OK when succeeded.

Explanation Get source of message.

get_Value Format HRESULT ICaoProvMessage::get_Value ( [out, retval] VARIANT* pVal )

Function Get message text

Parameter [out] pVal Text

Return value HRESULT Return S_OK when succeeded.

Explanation Get message text.

Clear Format HRESULT ICaoProvMessage::Clear ( )

Function Clear message

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Clear message. 202

Reply Format HRESULT ICaoProvMessage::Reply ( [in] VARIANT vntData )

Function Reply to message

Parameter [out] pVal Reply data

Return value HRESULT Return S_OK when succeeded.

Explanation Reply to message.

5.3.9. _ICaoProvControllerEvents OnMessage Format HRESULT _ICaoProvControllerEvents::OnMessage ( [in] ICaoProvMessage* pCaoProvMessage, [in, defaultvalue(0)] long lOption )

Function OnMessage event

Parameter [in] pCaoProvMessage Address of CaoProvMessage IF pointer

[in] lOption Message option For details, please check Table8-1.

Return value HRESULT Return S_OK when succeeded.

Explanation OnMessage event of the CAO engine. The event may be generated from the provider at arbitrary timing. 203

6. Generation of CAO object

CAO object is generated in the following order.

(1) Engine object AddWorkspace(…)

(2) Workspace object AddController(…)

(3) Controller object

(4) AddVariable(…) Variable object AddRobot(…) Robot object AddFile(…) File object AddTask(…) Task object AddCommand(…) Command object AddExtension(…) Extension object

Figure6-1 The order of generating CAO object

(1) Create CaoEngine First of all, create a CAO engine, a top object of CAO. ORiN2 CAO engine is implemented with DCOM. In this case, create the engine just like a usual COM object. ProgID=”CAO.CaoEngine”,ClassID=” {60555f1b-e473-4250-bb43-933990fbeced}” ProgID="CAO.CaoEngine",ClassID=" {60555f1b-e473-4250-bb43-933990fbeced}"

(2) Create CaoWorkspace from CaoEngine. Execute CaoEngine::AddWorkspace() and request CaoEngine for creation. Because one CaoWorkspace is automatically crated when a CaoEngine is created, it is possible to use it by acquiring it from the CaoEngine::Workspaces collection.

204

(3) Create CaoController from CaoWorkspace. Create CaoController by specifying CAO provider name in an argument of CaoWorkspace::AddController().

(4) Create necessary CaoVariable, CaoFile, CaoTask, CaoRobot, CaoExtension, and CaoCommand from CaoController. Execute CaoController::Add***() and generate a necessary object.

6.1. Connection parameter of CaoWorkspace::AddController method Following is the interface specification of the AddController method of the CaoWorkspace class.

AddController ( < controller name > < provider name > < machine name > < option >

)

The arguments (parameters) of this method determine used provider, executed machine, and operation of connection. Therefore, these parameters are called as connection parameters.

Table6-1 Argument of AddController method

No. Argument: Type Explanation Controller name: BSTR String for controller identification. Identification information to specify Controllers that belong to the 1 same Workspace object. An arbitrary string can be used. 2 Provider name: BSTR A unique name of the provider to be used. Machine name: BSTR The machine name on which the provider is executed. 3 Identification information to specify a PC on the network. IP address or NETBIOS name, etc. is used. Option: BSTR The option for the specified provider. 4 Refer to 9for details of the option string.

205

7. CAO system variable

CAO system variable is the variables specified by AddVariable method of each CAO classes, and it has system reserved name starting with “@”. The name and the meaning of CAO system variable are predetermined. Following is the list of the CAO system variable of each class of CAO.

7.1. CaoController object Variable identifier Type of Variant Meaning of variable Date, time, and memory @CURRENT_DATETIME VT_DATE Current date and time held by controller.

@OPERATING_TIME VT_R4 Operation (power on) time since turning on the controller power. Unit is hours. @TOTAL_OPERATING_TIME VT_R4 Accumulated operation (power on) time. Unit is hours.

@FREE_USER_MEMORY VT_I4 Byte size of free user virtual memory. The variable returns the byte size of free physical memory if virtual memory is not used. @TOTAL_USER_MEMORY VT_I4 Byte size of total user virtual memory. The variable returns the byte size of total physical memory if virtual memory is not used. Controller status @NORMAL_STATUS VT_BOOL True: normal False: abnormal(error is occurring) (note) BOOL type of S_ERROR_CODE @READY VT_BOOL True: operation preparation ready False: operation preparation not ready @AUTO_MODE VT_BOOL True: in automatic mode False: Not in automatic mode @BUSY_STATUS VT_BOOL True: Program running False: Program not running @EMERGENCY_STOP VT_BOOL True: Emergency stop is activated False: Emergency stop is not activated @ERROR_CODE VT_I4 Currently occurring error number. If no error is occurring, return 0. @ERROR_DESCRIPTION VT_BSTR Description on currently occurring error. If no error is occurring, return NULL. @ERROR_MODULE VT_BSTR Module name of current error occurred. If no error is 206

Variable identifier Type of Variant Meaning of variable occurring, return NULL.

Controller configuration @ROBOT_MAX VT_I2 Number of robots to be controlled (connected)

@MOTOR_MAX VT_I2 Number of axis to be controlled

Manufacturer information @MAKER_NAME VT_BSTR Controller manufacturer name

@TYPE VT_BSTR Controller model type

@SERIAL_ID VT_BSTR Controller serial number

@VERSION VT_BSTR Controller version

@SPECIFICATION VT_BSTR Controller specification (e.g. European model / North America model, etc.)

7.2. CaoRobot object Variable identifier Type of Variant Meaning of variable Robot status @BASE_POSITION VT_R4 | Current robot position in preset (default) coordinate VT_ARRAY system. Unit is arbitrary. @WORK_POSITION VT_R4 | Current robot position in work coordinate system. Unit is VT_ARRAY arbitrary. @TOOL_OFFSET VT_R4 | Current tool coordinate system definition. Unit is arbitrary. VT_ARRAY @JOINT_ANGLE VT_R4 | Current robot position of each joint. Unit is arbitrary. VT_ARRAY @SPEED VT_R4 Current robot TCP speed. Returns default value if current value cannot be acquired. Unit is arbitrary. @JOINT_SPEED VT_R4 | Current robot joint speed. Returns default value if current VT_ARRAY value cannot be acquired. Unit is arbitrary. @ACCELERATION VT_R4 Current robot TCP acceleration. Returns default value if current value cannot be acquired. Unit is arbitrary. @JOINT_ACCELERATION VT_R4 | Current robot joint acceleration. Returns default value if VT_ARRAY current value cannot be acquired. Unit is arbitrary. @DECELERATION VT_R4 Current robot TCP deceleration. Returns default value if current value cannot be acquired. Unit is arbitrary. 207

Variable identifier Type of Variant Meaning of variable @JOINT_DECELERATION VT_R4 | Current robot joint deceleration. Returns default value if VT_ARRAY current value cannot be acquired. Unit is arbitrary. @MOTOR_LOAD VT_R4 | Motor load. Unit is arbitrary. VT_ARRAY @OPERATING_TIME VT_R4 Robot controller operating (energized) time since controller power is turned on. Unit is hours. @TOTAL_OPERATING_TIME VT_R4 Robot controller accumulative operating (energized) time. Unit is hours. @OPERATING_DIST VT_R4 | Motion distance of each robot joint since robot controller VT_ARRAY power is turned on. Unit is arbitrary. @TOTAL_OPERATING_DIST VT_R4 | Accumulative motion distance of each robot joint. Unit is VT_ARRAY arbitrary. @BUSY_STATUS VT_BOOL True: Robot is moving False: Robot is not moving @SERVO_ON VT_BOOL True: servo on False: servo off @ZERO_RETURN_REQUIRED VT_BOOL True: zero return is required False: zero return is not required Robot configuration @MOTOR_MAX VT_I2 Number of controlled motors on the robot

@JOINT_MAX VT_I2 Number of joint on the robot (Note: The number may not be as same as controlled motor number) @JOINT_DATA(n) VT_VARIANT | Detailed information of robot joint. (n = 1~@JOINT_MAX) VT_ARRAY (Refer to the table below for details.) @JOINT_DATA(n)(n = 1~ @JOINT_MAX) Manufacturer information @MAKER_NAME VT_BSTR Robot manufacturer name

@TYPE VT_BSTR Robot type

@SERIAL_ID VT_BSTR Robot serial number

@VERSION VT_BSTR Robot version

@SPECIFICATION VT_BSTR Robot specification (e.g., standard, splash proof, clean room)

208

Variable identifier Type of Variant Meaning of variable - Robot joint detailed information (@JOINT_DATA) Index number: Name Variant type Variable meaning 1:Type VT_I2 Joint type 1: Rotation joint 2: Linear joint 3: other 2:Unit VT_I2 Joint motion unit 1: degree 2: radian 3: mm 4: inch 5: other 3:Direction VT_I2 Joint motion direction 1: X 2: Y 3: Z 4: other 4:ControlAxis VT_I2 Control axis number 5:ParentJoint VT_I2 Parents joint number( 1~ C_JOINT_MAX)

7.3. CaoTask object Variable identifier Type of variant Meaning of variable Task status @STATUS VT_I4 Task. Status(note 1) 0: NON-EXISTENT (unregistered state) 1: DORMANT 2: READY 3: RUN 4: WAIT 5: WAIT-SUSPEND 6: SUSPEND @PRIORITY VT_I4 Task priority

@LINE_NO VT_I4 Currently executing line number of main program

@CYCLE_TIME VT_I4 One cycle execution time of task

@SUB_PROGRAM VT_BSTR Currently executing sub program name 209

@SUB_LINE_NO VT_I4 Currently executing line number of sub program

@SUB_DEPTH VT_I4 Call level (depth) of currently executing sub program

7.4. CaoExtension object Variable identifier Type of Variant Meaning of variable Manufacturer information @MAKER_NAME VT_BSTR Extension board manufacturer name

@TYPE VT_BSTR Extension board type Form of enhancing board @SERIAL_ID VT_BSTR Extension board serial number

@VERSION VT_BSTR Extension board version

@SPECIFICATION VT_BSTR Extension board specification

210

8. CAO event message

Following figure shows outline of CAO event message mechanism.

Application Receive CaoMessage Object (event)

CaoMessa ge DateTime CAO Engine Msg. Description Independently processed X’ Destination by each controllers Number SerialNumber A Co. B Co. C Co. Source CaoController CaoController CaoController Value Clear Message Message Message Reply Handle Handle Handle Procesed FIFO. Synchronous/ asynchronous is specified by Thread Thread Thread Context provier. CaoProvM essage Msg. Msg. Msg. Message pool Pl Pl Pl DateTime Description Destination Number Msg. System message Msg. User message Source Y X Value Log output, etc. Clear Reply A Co. B Co. C Co. Provider Provider Provider

Device A Device B Device C Send CaoProvMessage object

Figure8-1 CAO event message mechanism

As shown in Figure8-1, message is first stored in CAO engine message pool, and then sent to applications. The maximum size of message pool is 1000. If message number exceeds maximum number, even asynchronous type message goes into “wait” status until message pool has empty space. CAO event message is noticed to client application with OnMessage event of CaoController class. If the message from CAOprovider cannot be received by OnMessage event, the message is stored in message pool of CaoControlle object. In this case, GetMessage property of CaoController class is used to get stored message if necessary. When CAO provider send message to CAO engine, it can be specified that message is directly sent to client application without going through message pool, or the message is stored in message pool without issuing event to client application. Table8-1 shows specifications of the message option.

Table8-1 Message option and the operation

Message option Operation Remarks General message CAO_MSG_NORMAL The message is stored in the - 211

(=0x00000000) message pool. After it stores it, the control is returned to the provider without confirming the transmission of the message. Synchronous CAO_MSG_SYNC The message is stored in the message (=0x00010000) message pool. After the transmission of the message is confirmed, the control is returned to the provider after it stores it. Log writing CAO_MSG_OUTPUT_LOG The message is output as a The log level is set in two demand (=0x00020000) log. subordinate position bytes of the message option. Debug : 0x00020000 Info : 0x00020001 Warn : 0x00020002 Error : 0x00020003 Fatal : 0x00020004 Engine control CAO_MSG_SYSTEM The control message is The content of the control is Message (=0x00040000) transmitted to the engine. specified by the CaoMessage::Number property. 0:Log limitation output1 Emergency CAO_MSG_BYPASS It transmits without storing the - message (=0x00080000) message in the pool of the message of the CAO engine. When the previous message is in the message pool, it interrupts sequentially and it transmits. Provider CAO_MSG_PROVIDER The message is transmitted to The provider name of the forwarding (=0x00100000) the provider. destination is set to the message “Detination" property of the message. At this time, the provider that retrieves it is limited by the

1 Please set the message option to CAO_MSG_OUTPUT_LOG + CAOMSG(0x00060000), and set the CaoMessege::Number property to 0 when you make the output destination of the message only a log. 212

controller in the same workspace. Please delimit by comma (,) and specify it when you transmit to two or more providers. (example “Test1, Test2")

When the destination is a null character string, it transmits to all providers of the controller collection.

These option values are divided roughly into two kinds (the transmission method and the forwarding site), and can be used by combining these two kinds. The list of the combination and the option value is shown as follows.

Table 8-2 Combination of message option values

Transmission method Usually Synchronization Emergency Destination Client CAO_MSG_NORMAL CAO_MSG_SYNC CAO_MSG_BYPASS (=0x00000000) (=0x00010000) (=0x00080000) Engine control CAO_MSG_SYSTEM CAO_MSG_SYSTEM CAO_MSG_SYSTEM (=0x00040000) +CAO_MSG_SYNC +CAO_MSG_BYPASS (=0x00050000) (=0x000C0000) Provider CAO_MSG_PROVIDER CAO_MSG_PROVIDER CAO_MSG_PROVIDER (=0x00100000) +CAO_MSG_SYNC +CAO_MSG_BYPASS (=0x00110000) (=0x00180000)

Moreover, the log writing demand can be combined with which option. Example 1) Transmission method: Usually + destination: Client + log output (Debug) 0x00020000 Example 2) Transmission method: Emergency + destination: Client + log output (Info) 0x000A0001 Example 3) Transmission method: Usually + destination: Engine control + log output (Debug) 0x00060000

213

9. Option character string of CAO

The option character string has the following formats.

Enclosure characters can be used for option string. Following characters can be used as enclosure character.

 Parentheses(“( )")  Brace(“{ }")  Bracket(“[ ]")  Square bracket(“< >")

The first character from these enclosure character is treated as an enclosure character, and following other characters are treated as normal symbol. Following is an example of multiple options. Option character string: Test1=Sample1,Test2=Sample2

Table9-1 Option character string, example 1

Option name Option value Test1 Sample1 Test2 Sample2

Next example is options in parentheses. Option character string: Test1=(Sample1),Test2=(Sample2)

Table9-2 Option character string, example 2

Option name Option value Test1 Sample1 Test2 Sample2

Next example is option values in different parentheses. Option character string: Test1=(Sample1),Test2=

Table9-3 Option character string, example 3

Option name Option value Test1 Sample1 Test2 214

Next example is when there is another parenthesis in the option value parentheses. Option character string: Test1=((Sample1)),Test2=()

Table9-4 Option character string, example 4

Option name Option value Test1 (Sample1) Test2 215

9.1. @EventDisenable option When this @EventDisenable option is specified, OnMassage event function of CAO can be enabled and disabled. This option is used with option string of CaoController object creation methods, CaoWorkspace::AddController and CaoControllers::Add. The value of the @EventDisenable option and the meaning are as follows.

Table9-5 Value of @EventEnable option and the meaning

Option value Meaning True Event function OFF False Event function ON(default)

9.2. @Create option @Create option is used to specify whether CAO create object related item newly or not. What is actually created depends on provider implementation. This option can be specified to option string of all Add … methods. The value of the @Create option and the meaning are as follows.

Table9-6 Value of @Create option and the meaning

Option value Meaning 0 Do not create (default) not 0 Create

When the provider is set to read-only by CaoConfig.exe, and it specifies it for this option excluding 0, the error is returned.

9.3. @IfNotMember option The @IfNotMember option specifies whether to acquire an existing object of the specified name. The object of the specified name is newly made when there is no object of the same name. This option is all Add … It is possible to specify it for the option character string of the method. The value of the @IfNotMember option and the meaning are indicated as follows.

Table9-7 Value of @IfNotMember option and the meaning

Option value Meaning True Existing object acquisition False New making (default) 216

This option is mounted from ORiN2.1.

9.4. @GetIfMember option The @GetIfMember option specifies whether to set @IfNotMember option as a default setting when calling Addxxx() methods. Regarding @IfNotMember option, see chapter 9.3. This option can be specified when calling AddWorkspace() method. The value of the @GetIfMember option and the meaning are indicated as follows.

Table9-8 Values of @GetIfMember option and the meaning

Option value Meaning True @IfNotMember option is set implicitly at the all Addxxx() methods under CaoWorkspace class, False @IfNotMember option should be set explicitly at the all Addxxx() methods, (default)

This option is mounted from ORiN2.1.5.

9.5. @ThreadPriority option The @ThreadPriority option sets controller's message thread and the priority of the asynchronization command thread. This option can be specified for the option character string of the AddController method. The value of the @ThreadPriority option and the meaning are indicated as follows.

Table9-9 Value of @ThreadPriority option and the meaning

Option value Meaning 0 THREAD_PRIORITY_IDLE 1 THREAD_PRIORITY_LOWEST 2 THREAD_PRIORITY_BELOW_NORMAL 3 THREAD_PRIORITY_NORMAL 4 THREAD_PRIORITY_ABOVE_NORMAL 5 THREAD_PRIORITY_HIGHEST 6 THREAD_PRIORITY_TIME_CRITICAL

This option is mounted from ORiN2.1.

9.6. @Insensitive option The @Insensitive option sets “Case sensitive” to False. When Addxxx methods called with this option, the case of an object name (a capital letter or a small letter) is ignored. 217

The value of the @Insensitive option and the meaning are indicated as follows.

Table9-10 Values of @Insensitive option and the meaning

Option value Meaning True Object names are not case sensitive False Object names are case sensitive (default)

This option is implemented from ORiN 2.1.8.

218

Appendix A. DCOM-CAO Engine IDL

List A-1 CAO.idl

/** @file CAO.idl * * @brief IDL source file for CAO.dll * * * This file is processed by type library creation tool MIDL * to create type library (CAO.tlb). * * * * @version 1.0 * @date 2003/8/8 * @author DENSO WAVE * */

import "oaidl.idl"; import "ocidl.idl";

/* ------*/ /* CAO Interface Definitions */ /* ------*/ interface ICaoWorkspaces; interface ICaoWorkspace; interface ICaoControllers; interface ICaoController; interface ICaoExtensions; interface ICaoExtension; interface ICaoFiles; interface ICaoFile; interface ICaoRobots; interface ICaoRobot; interface ICaoTasks; interface ICaoTask; interface ICaoVariables; interface ICaoVariable; interface ICaoCommands; interface ICaoCommand; interface ICaoMessage; interface ICaoEngineStatus;

// ICaoEngine Interface [ object, uuid(5acfd9fe-41f0-43f6-a0d6-c10c079315fc), dual, helpstring("ICaoEngine Interface"), pointer_default(unique) ] interface ICaoEngine : IDispatch { [propget, id(1), helpstring("Property EngineStatus")] HRESULT EngineStatus([out, retval] ICaoEngineStatus **ppICaoEngineStatus); [propget, id(2), helpstring("Property Workspaces")] HRESULT Workspaces([out, retval] ICaoWorkspaces **ppICaoWSs); [propget, id(2), helpstring("Property Workspaces")] HRESULT Workspaces([out, retval] ICaoWorkspaces **ppICaoWSs); [id(3), helpstring("Method AddWorkspace")] HRESULT AddWorkspace([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoWorkspace **ppICaoWS); [id(4), helpstring("Method Execute")] HRESULT Execute([in] VARIANT vntCommand, [out, retval] VARIANT *pVal); };

219

// ICaoWorkspaces Interface [ object, uuid(8dcdfb4e-cf07-47ca-895f-db1d5afa8f74), dual, helpstring("ICaoWorkspaces Interface"), pointer_default(unique) ] interface ICaoWorkspaces : IDispatch { [propget, id(-4), helpstring("Property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN *pVal); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoWorkspace **ppICaoWS);

[propget, id(1), helpstring("Property Count")] HRESULT Count([out, retval] long *pVal);

[id(2), helpstring("Method Add")] HRESULT Add([in] BSTR bstrName,[in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoWorkspace **ppICaoWS); [id(3), helpstring("Method Remove")] HRESULT Remove([in] VARIANT Index); [id(4), helpstring("Method Clear")] HRESULT Clear(); [id(5), helpstring("Method IsMember")] HRESULT IsMember([in] VARIANT Index, [out, retval] VARIANT_BOOL *pVal); };

// ICaoWorkspace Interface [ object, uuid(0ed07c17-b078-40cf-9b0f-3a4974de55e5), dual, helpstring("ICaoWorkspace Interface"), pointer_default(unique) ] interface ICaoWorkspace : IDispatch { [id(1), helpstring("Method _PutIndex"), restricted] HRESULT _PutIndex([in] long newVal);

[propget, id(2), helpstring("Property Controllers")] HRESULT Controllers([out, retval] ICaoControllers **ppICaoCtrls); [propget, id(2), helpstring("Property Controllers")] HRESULT Controllers([out, retval] ICaoControllers **ppICaoCtrls); [propget, id(3), helpstring("Property Index")] HRESULT Index([out, retval] long *pVal); [propget, id(4), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal); [propget, id(5), helpstring("Property ProviderNames")] HRESULT ProviderNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal);

[id(6), helpstring("Method AddController")] HRESULT AddController([in] BSTR bstrController, [in] BSTR bstrProvider, [in, defaultvalue("")] BSTR bstrMachine, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoController **ppICaoCtrl); [id(7), helpstring("Method Execute")] HRESULT Execute([in] VARIANT vntCommand, [out, retval] VARIANT *pVal);

};

// ICaoControllers Interface [ object, uuid(474b2753-9f06-41e0-840b-1f26b1ac1c2c), dual, helpstring("ICaoControllers Interface"), pointer_default(unique) ] interface ICaoControllers : IDispatch { [propget, id(-4), helpstring("Property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN *pVal); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoController **ppICaoCtrl); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoController **ppICaoCtrl);

220

[propget, id(1), helpstring("Property Count")] HRESULT Count([out, retval] long *pVal);

[id(2), helpstring("Method Add")] HRESULT Add([in] BSTR bstrController, [in] BSTR bstrProvider, [in, defaultvalue("")] BSTR bstrMachine, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoController **ppICaoCtrl); [id(3), helpstring("Method Remove")] HRESULT Remove([in] VARIANT Index); [id(4), helpstring("Method Clear")] HRESULT Clear(); [id(5), helpstring("Method IsMember")] HRESULT IsMember([in] VARIANT Index, [out, retval] VARIANT_BOOL *pVal); };

// ICaoController Interface [ object, uuid(c94e794f-ec5b-43f2-879f-777a49e7305b), dual, helpstring("ICaoController Interface"), pointer_default(unique) ] interface ICaoController : IDispatch { [id(1), helpstring("Method _PutIndex"), restricted] HRESULT _PutIndex([in] long newVal);

[propget, id(2), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(3), helpstring("Property ExtensionNames")] HRESULT ExtensionNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(4), helpstring("Property Extensions")] HRESULT Extensions([out, retval] ICaoExtensions **ppICaoExtensions); [propget, id(5), helpstring("Property FileNames")] HRESULT FileNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(6), helpstring("Property Files")] HRESULT Files([out, retval] ICaoFiles **ppICaoFiles); [propget, id(6), helpstring("Property Files")] HRESULT Files([out, retval] ICaoFiles **ppICaoFiles); [propget, id(7), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(8), helpstring("Property Index")] HRESULT Index([out, retval] long *pVal); [propget, id(9), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal); [propget, id(10), helpstring("Property RobotNames")] HRESULT RobotNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(11), helpstring("Property Robots")] HRESULT Robots([out, retval] ICaoRobots **ppICaoRobots); [propget, id(11), helpstring("Property Robots")] HRESULT Robots([out, retval] ICaoRobots **ppICaoRobots); [propget, id(12), helpstring("Property Tag")] HRESULT Tag([out, retval] VARIANT *pVal); [propput, id(12), helpstring("Property Tag")] HRESULT Tag([in] VARIANT newVal); [propget, id(13), helpstring("Property TaskNames")] HRESULT TaskNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(14), helpstring("Property Tasks")] HRESULT Tasks([out, retval] ICaoTasks **ppICaoTasks); [propget, id(14), helpstring("Property Tasks")] HRESULT Tasks([out, retval] ICaoTasks **ppICaoTasks); [propget, id(15), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(16), helpstring("Property Variables")] HRESULT Variables([out, retval] ICaoVariables **ppICaoVariables); [propget, id(17), helpstring("Property CommandNames")] HRESULT CommandNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(18), helpstring("Property Commands")] HRESULT Commands([out, retval] ICaoCommands **ppICaoCommands); [propget, id(19), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(19), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(20), helpstring("Method AddExtension")] HRESULT AddExtension([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoExtension **ppICaoExtension); [id(21), helpstring("Method AddFile")] HRESULT AddFile([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoFile **ppICaoFile); [id(22), helpstring("Method AddRobot")] HRESULT AddRobot([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoRobot **ppICaoRobot); [id(23), helpstring("Method AddTask")] HRESULT AddTask([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoTask **ppICaoTask); [id(24), helpstring("Method AddVariable")] HRESULT AddVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable **ppICaoVar); 221

[id(25), helpstring("Method AddCommand")] HRESULT AddCommand([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoCommand **ppICaoCommand); [id(26), helpstring("Method Execute")] HRESULT Execute([in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(27), helpstring("Method GetMessage")] HRESULT GetMessage([out, retval] ICaoMessage **ppICaoMessage);

};

// ICaoExtensions Interface [ object, uuid(c5cd2d49-d7b9-4c6d-8d0d-56a566b78042), dual, helpstring("ICaoExtensions Interface"), pointer_default(unique) ] interface ICaoExtensions : IDispatch { [propget, id(-4), helpstring("Property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN *pVal); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoExtension **ppICaoExtension);

[propget, id(1), helpstring("Property Count")] HRESULT Count([out, retval] long *pVal);

[id(2), helpstring("Method Add")] HRESULT Add([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoExtension **ppICaoExtension); [id(3), helpstring("Method Remove")] HRESULT Remove([in] VARIANT Index); [id(4), helpstring("Method Clear")] HRESULT Clear(); [id(5), helpstring("Method IsMember")] HRESULT IsMember([in] VARIANT Index, [out, retval] VARIANT_BOOL *pVal);

};

// ICaoExtension Interface [ object, uuid(a2e8ab44-325e-4fd8-8e92-55a91d213d19), dual, helpstring("ICaoExtension Interface"), pointer_default(unique) ] interface ICaoExtension : IDispatch { [id(1), helpstring("Method _PutIndex"), restricted] HRESULT _PutIndex([in] long newVal);

[propget, id(2), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(3), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(4), helpstring("Property Index")] HRESULT Index([out, retval] long *pVal); [propget, id(5), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal); [propget, id(6), helpstring("Property Tag")] HRESULT Tag([out, retval] VARIANT *pVal); [propput, id(6), helpstring("Property Tag")] HRESULT Tag([in] VARIANT newVal); [propget, id(7), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(8), helpstring("Property Variables")] HRESULT Variables([out, retval] ICaoVariables **ppICaoVariables); [propget, id(9), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(9), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(10), helpstring("Method AddVariable")] HRESULT AddVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable **ppICaoVar); [id(11), helpstring("Method Execute")] HRESULT Execute([in] VARIANT vntCommand, [out, retval] VARIANT *pVal);

};

// ICaoFiles Interface [ object, uuid(9f1e5eaf-4c53-4718-9d79-efc3f8758d02), 222

dual, helpstring("ICaoFiles Interface"), pointer_default(unique) ] interface ICaoFiles : IDispatch { [propget, id(-4), helpstring("Property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN *pVal); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoFile **ppICaoFile);

[propget, id(1), helpstring("Property Count")] HRESULT Count([out, retval] long *pVal);

[id(2), helpstring("Method Add")] HRESULT Add([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoFile **ppICaoFile); [id(3), helpstring("Method Remove")] HRESULT Remove([in] VARIANT Index); [id(4), helpstring("Method Clear")] HRESULT Clear(); [id(5), helpstring("Method IsMember")] HRESULT IsMember([in] VARIANT Index, [out, retval] VARIANT_BOOL *pVal); };

// ICaoFile Interface [ object, uuid(9a4617d6-3e02-499d-a1b9-3d33bca0569f), dual, helpstring("ICaoFile Interface"), pointer_default(unique) ] interface ICaoFile : IDispatch { [propget, id(0), helpstring("Property Value")] HRESULT Value([out, retval] VARIANT *pVal); [propput, id(0), helpstring("Property Value")] HRESULT Value([in] VARIANT newVal);

[id(1), helpstring("Method _PutIndex"), restricted] HRESULT _PutIndex([in] long newVal);

[propget, id(2), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(3), helpstring("Property DateCreated")] HRESULT DateCreated([out, retval] VARIANT *pVal); [propget, id(4), helpstring("Property DateLastAccessed")] HRESULT DateLastAccessed([out, retval] VARIANT *pVal); [propget, id(5), helpstring("Property DateLastModified")] HRESULT DateLastModified([out, retval] VARIANT *pVal); [propget, id(6), helpstring("Property FileNames")] HRESULT FileNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(7), helpstring("Property Files")] HRESULT Files([out, retval] ICaoFiles **ppICaoFiles); [propget, id(8), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(9), helpstring("Property Index")] HRESULT Index([out, retval] long *pVal); [propget, id(10), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal); [propget, id(11), helpstring("Property Path")] HRESULT Path([out, retval] BSTR *pVal); [propget, id(12), helpstring("Property Size")] HRESULT Size([out, retval] long *pVal); [propget, id(13), helpstring("Property Tag")] HRESULT Tag([out, retval] VARIANT *pVal); [propput, id(13), helpstring("Property Tag")] HRESULT Tag([in] VARIANT newVal); [propget, id(14), helpstring("Property Type")] HRESULT Type([out, retval] BSTR *pVal); [propget, id(15), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(16), helpstring("Property Variables")] HRESULT Variables([out, retval] ICaoVariables **ppICaoVariables); [propget, id(17), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(17), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(18), helpstring("Method AddFile")] HRESULT AddFile([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoFile **ppICaoFile); [id(19), helpstring("Method AddVariable")] HRESULT AddVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable **ppICaoVar); [id(20), helpstring("Method Copy")] HRESULT Copy([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption); [id(21), helpstring("Method Delete")] HRESULT Delete([in, defaultvalue("")] BSTR bstrOption); [id(22), helpstring("Method Execute")] HRESULT Execute([in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(23), helpstring("Method Move")] HRESULT Move([in] BSTR bstrName, [in, defaultvalue("")] BSTR 223 bstrOption); [id(24), helpstring("Method Run")] HRESULT Run([in, defaultvalue("")] BSTR bstrOption, [out, retval] BSTR *bstrName);

};

// ICaoRobots Interface [ object, uuid(76cddba4-09e9-4292-95ef-1a5a85dcbea9), dual, helpstring("ICaoRobots Interface"), pointer_default(unique) ] interface ICaoRobots : IDispatch { [propget, id(-4), helpstring("Property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN *pVal); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoRobot **ppICaoRobot);

[propget, id(1), helpstring("Property Count")] HRESULT Count([out, retval] long *pVal);

[id(2), helpstring("Method Add")] HRESULT Add([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoRobot **ppICaoRobot); [id(3), helpstring("Method Remove")] HRESULT Remove([in] VARIANT Index); [id(4), helpstring("Method Clear")] HRESULT Clear(); [id(5), helpstring("Method IsMember")] HRESULT IsMember([in] VARIANT Index, [out, retval] VARIANT_BOOL *pVal); };

// ICaoRobot Interface [ object, uuid(02105032-6ae1-4251-a72f-9aadc04f6659), dual, helpstring("ICaoRobot Interface"), pointer_default(unique) ] interface ICaoRobot : IDispatch { [id(1), helpstring("Method _PutIndex"), restricted] HRESULT _PutIndex([in] long newVal);

[propget, id(2), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(3), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(4), helpstring("Property Index")] HRESULT Index([out, retval] long *pVal); [propget, id(5), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal); [propget, id(6), helpstring("Property Tag")] HRESULT Tag([out, retval] VARIANT *pVal); [propput, id(6), helpstring("Property Tag")] HRESULT Tag([in] VARIANT newVal); [propget, id(7), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(8), helpstring("Property Variables")] HRESULT Variables([out, retval] ICaoVariables **ppICaoVariables); [propget, id(9), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(9), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(10), helpstring("Method Accelerate")] HRESULT Accelerate([in] long lAxis, [in] float fAccel, [in, defaultvalue(0)] float fDecel); [id(11), helpstring("Method AddVariable")] HRESULT AddVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable **ppICaoVar); [id(12), helpstring("Method Cancel")] HRESULT Cancel([in, defaultvalue("")] BSTR bstrOption); [id(13), helpstring("Method Change")] HRESULT Change([in] BSTR bstrName); [id(14), helpstring("Method Chuck")] HRESULT Chuck([in, defaultvalue("")] BSTR bstrOption); [id(15), helpstring("Method Drive")] HRESULT Drive([in] long lNo, [in] float fMov, [in, defaultvalue("")] BSTR bstrOpt ); [id(16), helpstring("Method Execute")] HRESULT Execute([in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(17), helpstring("Method GoHome")] HRESULT GoHome(); [id(18), helpstring("Method Move")] HRESULT Move([in] long lComp, [in] VARIANT vntPose, [in, defaultvalue("")] BSTR bstrOpt ); [id(19), helpstring("Method Rotate")] HRESULT Rotate([in] VARIANT vntRotSuf, [in] float fDeg, [in] 224

VARIANT vntPivot, [in, defaultvalue("")] BSTR bstrOpt ); [id(20), helpstring("Method Speed")] HRESULT Speed([in] long lAxis, [in] float fSpeed); [id(21), helpstring("Method Unchuck")] HRESULT Unchuck([in, defaultvalue("")] BSTR bstrOption);

};

// ICaoTasks Interface [ object, uuid(a2a35844-148b-4762-8b41-68015bbc26f7), dual, helpstring("ICaoTasks Interface"), pointer_default(unique) ] interface ICaoTasks : IDispatch { [propget, id(-4), helpstring("Property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN *pVal); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoTask **ppICaoTask);

[propget, id(1), helpstring("Property Count")] HRESULT Count([out, retval] long *pVal);

[id(2), helpstring("Method Add")] HRESULT Add([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoTask **ppICaoTask); [id(3), helpstring("Method Remove")] HRESULT Remove([in] VARIANT Index); [id(4), helpstring("Method Clear")] HRESULT Clear(); [id(5), helpstring("Method IsMember")] HRESULT IsMember([in] VARIANT Index, [out, retval] VARIANT_BOOL *pVal); };

// ICaoTask Interface [ object, uuid(cc23c152-1d58-4c70-bd1b-539fd0329ae2), dual, helpstring("ICaoTask Interface"), pointer_default(unique) ] interface ICaoTask : IDispatch { [id(1), helpstring("Method _PutIndex"), restricted] HRESULT _PutIndex([in] long newVal);

[propget, id(2), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(3), helpstring("Property FileName")] HRESULT FileName([out, retval] BSTR *pVal); [propget, id(4), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(5), helpstring("Property Index")] HRESULT Index([out, retval] long *pVal); [propget, id(6), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal); [propget, id(7), helpstring("Property Tag")] HRESULT Tag([out, retval] VARIANT *pVal); [propput, id(7), helpstring("Property Tag")] HRESULT Tag([in] VARIANT newVal); [propget, id(8), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(9), helpstring("Property Variables")] HRESULT Variables([out, retval] ICaoVariables **ppICaoVariables); [propget, id(10), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(10), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(11), helpstring("Method AddVariable")] HRESULT AddVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable **ppICaoVar); [id(12), helpstring("Method Delete")] HRESULT Delete([in, defaultvalue("")] BSTR bstrOption); [id(13), helpstring("Method Execute")] HRESULT Execute([in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(14), helpstring("Method Start")] HRESULT Start([in, defaultvalue(0)] long lMode, [in, defaultvalue("")] BSTR bstrOption); [id(15), helpstring("Method Stop")] HRESULT Stop([in, defaultvalue(0)] long lMode, [in, defaultvalue("")] BSTR bstrOption);

};

// ICaoVariables [ 225

object, uuid(8d392e7a-eb9e-46ef-86c6-8e7acd0eceab), dual, helpstring("ICaoVariables Interface"), pointer_default(unique) ] interface ICaoVariables : IDispatch { [propget, id(-4), helpstring("Property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN *pVal); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoVariable **ppICaoVar);

[propget, id(1), helpstring("Property Count")] HRESULT Count([out, retval] long *pVal);

[id(2), helpstring("Method Add")] HRESULT Add([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoVariable **ppICaoVar); [id(3), helpstring("Method Remove")] HRESULT Remove([in] VARIANT Index); [id(4), helpstring("Method Clear")] HRESULT Clear(); [id(5), helpstring("Method IsMember")] HRESULT IsMember([in] VARIANT Index, [out, retval] VARIANT_BOOL *pVal); };

// ICaoVariable Interface [ object, uuid(3dc12940-6c7b-43e4-b375-136c3e6e7e3a), dual, helpstring("ICaoVariable Interface"), pointer_default(unique) ] interface ICaoVariable : IDispatch { [propget, id(0), helpstring("Property Value")] HRESULT Value([out, retval] VARIANT *pVal); [propput, id(0), helpstring("Property Value")] HRESULT Value([in] VARIANT newVal);

[id(1), helpstring("Method _PutIndex"), restricted] HRESULT _PutIndex([in] long newVal);

[propget, id(2), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(3), helpstring("Property DateTime")] HRESULT DateTime([out, retval] VARIANT *pVal); [propget, id(4), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(5), helpstring("Property Index")] HRESULT Index([out, retval] long *pVal); [propget, id(6), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal); [propget, id(7), helpstring("Property Tag")] HRESULT Tag([out, retval] VARIANT *pVal); [propput, id(7), helpstring("Property Tag")] HRESULT Tag([in] VARIANT newVal); [propget, id(8), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(8), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal); [propget, id(9), helpstring("Property Microsecond")] HRESULT Microsecond([out, retval] long *pVal); };

// ICaoCommands Interface [ object, uuid(480CA4D6-ADCB-4cb4-812B-7E41BE891E03),

dual, helpstring("ICaoCommands Interface"), pointer_default(unique) ] interface ICaoCommands : IDispatch { [propget, id(-4), helpstring("Property _NewEnum"), restricted] HRESULT _NewEnum([out, retval] LPUNKNOWN *pVal); [id(0), helpstring("Method Item")] HRESULT Item([in] VARIANT Index, [out, retval] ICaoCommand **ppICaoCommand);

[propget, id(1), helpstring("Property Count")] HRESULT Count([out, retval] long *pVal);

[id(2), helpstring("Method Add")] HRESULT Add([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoCommand **ppICaoCommand); [id(3), helpstring("Method Remove")] HRESULT Remove([in] VARIANT Index); 226

[id(4), helpstring("Method Clear")] HRESULT Clear(); [id(5), helpstring("Method IsMember")] HRESULT IsMember([in] VARIANT Index, [out, retval] VARIANT_BOOL *pVal); };

// ICaoCommand Interface [ object, uuid(3DA3B42D-EA6A-468b-A57F-C375DEFD11E9), dual, helpstring("ICaoCommand Interface"), pointer_default(unique) ] interface ICaoCommand : IDispatch { [id(1), helpstring("Method _PutIndex"), restricted] HRESULT _PutIndex([in] long newVal);

[propget, id(2), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(3), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(4), helpstring("Property Index")] HRESULT Index([out, retval] long *pVal); [propget, id(5), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal); [propget, id(6), helpstring("Property Parameters")] HRESULT Parameters([out, retval] VARIANT *pVal); [propput, id(6), helpstring("Property Parameters")] HRESULT Parameters([in] VARIANT newVal); [propget, id(7), helpstring("Property Result")] HRESULT Result([out, retval] VARIANT *pVal); [propget, id(8), helpstring("Property State")] HRESULT State([out, retval] long *pVal); [propget, id(9), helpstring("Property Tag")] HRESULT Tag([out, retval] VARIANT *pVal); [propput, id(9), helpstring("Property Tag")] HRESULT Tag([in] VARIANT newVal); [propget, id(10), helpstring("Property Timeout")] HRESULT Timeout([out, retval] long *pVal); [propput, id(10), helpstring("Property Timeout")] HRESULT Timeout([in] long newVal); [propget, id(11), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(11), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(12), helpstring("Method Cancel")] HRESULT Cancel(); [id(13), helpstring("Method Execute")] HRESULT Execute([in, defaultvalue(0)] long lMode);

};

// ICaoMessage Interface [ object, uuid(964497c9-a444-48e3-ad6c-78b1fa5be46f), dual, helpstring("ICaoMessage Interface"), pointer_default(unique) ] interface ICaoMessage : IDispatch { [propget, id(1), helpstring("Property DateTime")] HRESULT DateTime([out, retval] VARIANT *pVal); [propget, id(2), helpstring("Property Description")] HRESULT Description([out, retval] BSTR *pVal); [propget, id(3), helpstring("Property Destination")] HRESULT Destination([out, retval] BSTR *pVal); [propget, id(4), helpstring("Property Number")] HRESULT Number([out, retval] long *pVal); [propget, id(5), helpstring("Property SerialNumber")] HRESULT SerialNumber([out, retval] long *pVal); [propget, id(6), helpstring("Property Source")] HRESULT Source([out, retval] BSTR *pVal); [propget, id(7), helpstring("Property Value")] HRESULT Value([out, retval] VARIANT *pVal);

[id(8), helpstring("Method Clear")] HRESULT Clear(); [id(9), helpstring("Method Reply")] HRESULT Reply(VARIANT vntData);

};

// ICaoEngineStatus Interface [ object, uuid(9b77d6e0-b941-4513-8a63-08c59c992991), dual, helpstring("ICaoEngineStatus Interface"), pointer_default(unique) ] interface ICaoEngineStatus : IDispatch { 227

[propget, id(1), helpstring("Property CurrentDateTime")] HRESULT CurrentDateTime([out, retval] VARIANT *pVal); [propget, id(2), helpstring("Property ComputerName")] HRESULT ComputerName([out, retval] BSTR *pVal); [propget, id(3), helpstring("Property ObjectCounts")] HRESULT ObjectCounts([in] VARIANT vntName, [out, retval] long *pVal); [propget, id(4), helpstring("Property StartDateTime")] HRESULT StartDateTime([out, retval] VARIANT *pVal); [propget, id(5), helpstring("Property Values")] HRESULT Values([in] VARIANT vntName, [out, retval] VARIANT *pVal); [propget, id(6), helpstring("Property Version")] HRESULT Version([out, retval] BSTR *pVal);

};

// IEventSink Interface [ object, uuid(2b27bcbf-c3c2-45dd-ba66-8ac0fa898c1c), dual, helpstring("IEventSink Interface"), pointer_default(unique) ] interface IEventSink : IDispatch { [id(1), helpstring("Method OnMessage")] HRESULT OnMessage([in] IUnknown *pVal, [in, defaultvalue(0)] long lOption);

};

/* ------*/ /* CAO Object Definitions */ /* ------*/ [ uuid(e2f77a83-3965-44e7-99a5-e75c6b07d59c), version(1.0), helpstring("CAO 1.0 タイプ ライブラリ") helpstring("CAO 1.0 type library") ] library CAOLib { importlib("stdole32.tlb"); importlib("stdole2.tlb");

// _ICaoControllerEvents dispinterface [ uuid(a7b43ef1-0215-4940-a6f6-21744b8cba52), helpstring("_ICaoControllerEvents Interface") ] dispinterface _ICaoControllerEvents { properties: methods: [id(1), helpstring("Method OnMessage")] HRESULT OnMessage([in] ICaoMessage* pICaoMess); };

// _ICaoommandEvents dispinterface [ uuid(DC17F478-F7B2-4ce7-819D-8EF34F70E351), helpstring("_ICaoCommandsEvents Interface") ] dispinterface _ICaoCommandsEvents { properties: methods: [id(1), helpstring("Method ExecuteComplete")] HRESULT ExecuteComplete([in] long lID); };

// CaoEngine Class [ uuid(60555f1b-e473-4250-bb43-933990fbeced), helpstring("CaoEngine Class") 228

] coclass CaoEngine { [default] interface ICaoEngine; };

// CaoWorkspaces Class [ uuid(f7430785-4ec2-4193-8552-f5cb2d6be732), helpstring("CaoWorkspaces Class") ] coclass CaoWorkspaces { [default] interface ICaoWorkspaces; };

// CaoWorkspace Class [ uuid(22fc99b8-9c3a-48c9-9f4d-8eee16ed365a), helpstring("CaoWorkspace Class") ] coclass CaoWorkspace { [default] interface ICaoWorkspace; };

// CaoControllers Class [ uuid(41c404be-bfd1-40ce-8454-2f47e04a09b1), helpstring("CaoControllers Class") ] coclass CaoControllers { [default] interface ICaoControllers; };

// CaoController Class [ uuid(d1baa44e-9ca9-4075-8ad1-481aa21434a8), helpstring("CaoController Class") ] coclass CaoController { [default] interface ICaoController; [default, source] dispinterface _ICaoControllerEvents; };

// CaoExtensions Class [ uuid(0AF9CEC7-4F11-4EA4-8033-142CF4E45512), helpstring("CaoExtensions Class") ] coclass CaoExtensions { [default] interface ICaoExtensions; };

// CaoExtension Class [ uuid(FE266A3E-9435-4F25-85E2-B4350A378B81), helpstring("CaoExtension Class") ] coclass CaoExtension { [default] interface ICaoExtension; };

// CaoFiles Class [ uuid(2d662501-91ce-49e0-bafa-453a2d610b50), helpstring("CaoFiles Class") 229

] coclass CaoFiles { [default] interface ICaoFiles; };

// CaoFile Class [ uuid(b7466915-2234-4382-b9e7-da74a34acaff), helpstring("CaoFile Class") ] coclass CaoFile { [default] interface ICaoFile; };

// CaoRobots Class [ uuid(f6981128-7e0f-4159-86b0-7397eb1596a3), helpstring("CaoRobots Class") ] coclass CaoRobots { [default] interface ICaoRobots; };

// CaoRobot Class [ uuid(c486acdd-451e-4fb5-a20b-3cc747f8cc2e), helpstring("CaoRobot Class") ] coclass CaoRobot { [default] interface ICaoRobot; };

// CaoTasks Class [ uuid(eb5211bb-dd98-4e91-b84f-a619f636de30), helpstring("CaoTasks Class") ] coclass CaoTasks { [default] interface ICaoTasks; };

// CaoTask Class [ uuid(1ab45162-d81d-475c-a73f-3f9bbc0f0768), helpstring("CaoTask Class") ] coclass CaoTask { [default] interface ICaoTask; };

// CaoVariables Class [ uuid(5691304f-610a-4645-8d58-64138e059824), helpstring("CaoVariables Class") ] coclass CaoVariables { [default] interface ICaoVariables; };

// CaoVariable Class [ uuid(2c9b6656-32d1-425c-ad61-536c5a07c773), helpstring("CaoVariable Class") ] 230

coclass CaoVariable { [default] interface ICaoVariable; };

// CaoCommands Class [ uuid(887FFEAF-3E41-4d54-A558-DE75E7E11B44), helpstring("CaoCommands Class") ] coclass CaoCommands { [default] interface ICaoCommands; [default, source] dispinterface _ICaoCommandsEvents; };

// CaoCommand Class [ uuid(9289DBE4-ADEC-4001-9CF0-C58C756B2E79), helpstring("CaoCommand Class") ] coclass CaoCommand { [default] interface ICaoCommand; };

// CaoMessage Class [ uuid(4f2f3700-71c8-452a-81ac-5a8539b8a5c6), helpstring("CaoMessage Class"), ] coclass CaoMessage { [default] interface ICaoMessage; };

// CaoEngineStatus Class [ uuid(f5e9b29c-e1d6-4f78-ac18-a85ae49dbbb2), helpstring("CaoEngineStatus Class") ] coclass CaoEngineStatus { [default] interface ICaoEngineStatus; };

// EventSink Class [ uuid(12654e13-f7bc-4f1a-831d-a7a93e733cb7), helpstring("EventSink Class") ] coclass EventSink { [default] interface IEventSink; };

};

231

Appendix B. DCOM-CAO Provider IDL

List B-1 CaoProv.idl

/** @file CaoProv.idl * * @brief IDL source file for CAOPROV.dll * * * This file is processed by type library creation tool MIDL
* to create type library (CAOPROV.tlb). * * * * @version 1.0 * @date 2003/8/8 * @author DENSO WAVE * */

// Remove following comment-out, and overwrite UUID etc. // In that case, change all UUID. Partially changing UUID will cause in unexpected result. // Execute uuidgen.exe-n8 to generate new UUID.

/* #define CAOPROV_TYPELIB 4dc66a5a-9b6e-4261-a1ef-6fb6017d8c4c // (note)Match this value to the value of 'TypeLib' of .rgs file. #define CAOPROV_TYPELIB_HELP "CAOPROV 1.0 Type Library" #define CAOPROV_TYPELIB_VER 1.0 #define CAOPROV_CONTROLLER b0aaafa4-42a6-4063-89cb-de288dd26f58 // (note)Match this value to CLSID &AppID value of .res file! #define CAOPROV_EXTENSION 893a5aea-2d8b-4404-91e9-447e5ce93310 #define CAOPROV_FILE b62e56b0-42ab-460d-8278-83191ce7c6f1 #define CAOPROV_ROBOT c813051e-b391-4aa5-b22f-613b6b1fd6d4 #define CAOPROV_TASK 5013642b-e8ac-4377-ad3c-9ac6edbadf3f #define CAOPROV_VARIABLE 479ff09a-65a1-4f50-a63c-15c8d9b14cb6 #define CAOPROV_MESSAGE 6bdc21c0-f6c1-4e73-a59b-8369e3b57a20 #define CAOPROV_COMMAND 3a43c9e7-fd90-4a7d-bb33-42bdcef82fb4 */

//>>>>>>>>>> Do not edit it after this. <<<<<<<<<<

#include "CAOPROVIF.idl"

List B-2 CaoProvIF.idl

/** @file CAOPROVIF.idl * * * @brief CAO Provider interface definition file * * @version 1.0 * @date 2003/8/8 * @author DENSO WAVE * */

//>>>>>>>>>> Do not edit this file. <<<<<<<<<<

#ifndef CAOPROV_TYPELIB #define CAOPROV_TYPELIB 4489ef8d-cf16-414e-9d93-cb9af157cff2 232

#endif #ifndef CAOPROV_TYPELIB_HELP #define CAOPROV_TYPELIB_HELP "CAOPROV 1.0 Type Library" #endif #ifndef CAOPROV_TYPELIB_VER #define CAOPROV_TYPELIB_VER 1.0 #endif #ifndef CAOPROV_CONTROLLER #define CAOPROV_CONTROLLER 1de03cfd-535f-42db-88cf-3a72bee12813 #endif #ifndef CAOPROV_EXTENSION #define CAOPROV_EXTENSION e4472ad7-05f4-4a39-a000-0831231def08 #endif #ifndef CAOPROV_FILE #define CAOPROV_FILE a6ba526c-f31b-4b74-8399-06bd3322514d #endif #ifndef CAOPROV_ROBOT #define CAOPROV_ROBOT e1ee5e51-beee-4f70-8885-8511437d1cf0 #endif #ifndef CAOPROV_TASK #define CAOPROV_TASK fcc5e43e-3bf3-4056-84ae-0048772e16e5 #endif #ifndef CAOPROV_VARIABLE #define CAOPROV_VARIABLE 490b0408-8b6f-4997-97a9-03bed8dc852b #endif #ifndef CAOPROV_COMMAND #define CAOPROV_COMMAND dea64af0-5fe3-41f0-8edc-b5d631760a9e #endif #ifndef CAOPROV_MESSAGE #define CAOPROV_MESSAGE 36f58255-c9b0-4e27-9ae5-4a6230d98b56 #endif import "oaidl.idl"; import "ocidl.idl";

/* ------*/ /* CAOPROV Interface Definitions */ /* ------*/ interface ICaoProvController; interface ICaoProvExtension; interface ICaoProvFile; interface ICaoProvRobot; interface ICaoProvTask; interface ICaoProvVariable; interface ICaoProvCommand; interface ICaoProvMessage;

// ICaoProvController Interface [ object, uuid(35d6f2f9-b5d8-4467-becf-545e991fe0f4), dual, helpstring("ICaoProvController Interface"), pointer_default(unique) ] interface ICaoProvController : IDispatch { [propget, id(0), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal);

[propget, id(1), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(2), helpstring("Property ExtensionNames")] HRESULT ExtensionNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(3), helpstring("Property FileNames")] HRESULT FileNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(4), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(5), helpstring("Property RobotNames")] HRESULT RobotNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(6), helpstring("Property TaskNames")] HRESULT TaskNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(7), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); 233

[propget, id(8), helpstring("Property CommandNames")] HRESULT CommandNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(9), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(9), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(10), helpstring("Method Connect")] HRESULT Connect([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption); [id(11), helpstring("Method Disconnect")] HRESULT Disconnect(); [id(12), helpstring("Method GetExtension")] HRESULT GetExtension([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvExtension **ppCaoProvExtension); [id(13), helpstring("Method GetFile")] HRESULT GetFile([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvFile **ppCaoProvFile); [id(14), helpstring("Method GetRobot")] HRESULT GetRobot([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvRobot **ppCaoProvRobot); [id(15), helpstring("Method GetTask")] HRESULT GetTask([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvTask **ppCaoProvTask); [id(16), helpstring("Method GetVariable")] HRESULT GetVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable **ppCaoProvVar); [id(17), helpstring("Method GetCommand")] HRESULT GetCommand([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvCommand **ppCaoProvCommand); [id(18), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal); [id(18), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal);

};

// ICaoProvExtension Interface [ object, uuid(288f7a31-613e-455d-a2db-a2a1f7048418), dual, helpstring("ICaoProvExtension Interface"), pointer_default(unique) ] interface ICaoProvExtension : IDispatch { [propget, id(0), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal);

[propget, id(1), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(2), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(3), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(4), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(4), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(5), helpstring("Method GetVariable")] HRESULT GetVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable **ppCaoProvVar); [id(6), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal); [id(6), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal);

};

// ICaoProvFile Interface [ object, uuid(14d6e888-40fe-4ce3-a61c-c5847236339e), dual, helpstring("ICaoProvFile Interface"), pointer_default(unique) ] interface ICaoProvFile : IDispatch { [propget, id(0), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal);

[propget, id(1), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(2), helpstring("Property DateCreated")] HRESULT DateCreated([out, retval] VARIANT *pVal); [propget, id(3), helpstring("Property DateLastAccessed")] HRESULT DateLastAccessed([out, retval] 234

VARIANT *pVal); [propget, id(4), helpstring("Property DateLastModified")] HRESULT DateLastModified([out, retval] VARIANT *pVal); [propget, id(5), helpstring("Property FileNames")] HRESULT FileNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(6), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(7), helpstring("Property Path")] HRESULT Path([out, retval] BSTR *pVal); [propget, id(8), helpstring("Property Size")] HRESULT Size([out, retval] long *pVal); [propget, id(9), helpstring("Property Type")] HRESULT Type([out, retval] BSTR *pVal); [propget, id(10), helpstring("Property Value")] HRESULT Value([out, retval] VARIANT *pVal); [propput, id(10), helpstring("Property Value")] HRESULT Value([in] VARIANT newVal); [propget, id(11), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(12), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(12), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(13), helpstring("Method GetFile")] HRESULT GetFile([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvFile **ppCaoProvFile); [id(14), helpstring("Method Copy")] HRESULT Copy([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption); [id(15), helpstring("Method Delete")] HRESULT Delete([in, defaultvalue("")] BSTR bstrOption); [id(16), helpstring("Method GetVariable")] HRESULT GetVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable **ppCaoProvVar); [id(17), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal); [id(17), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal); [id(18), helpstring("Method Move")] HRESULT Move([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption); [id(19), helpstring("Method Run")] HRESULT Run([in, defaultvalue("")] BSTR bstrOption, [out, retval] BSTR *pVal);

};

// ICaoProvRobot Interface [ object, uuid(08b49065-586e-4819-9992-dc7b5dc26f3e), dual, helpstring("ICaoProvRobot Interface"), pointer_default(unique) ] interface ICaoProvRobot : IDispatch { [propget, id(0), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal);

[propget, id(1), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(2), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(3), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(4), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(4), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(5), helpstring("Method GetVariable")] HRESULT GetVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable **ppCaoProvVar); [id(6), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal); [id(6), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal); [id(7), helpstring("Method Accelerate")] HRESULT Accelerate([in] long lAxis, [in] float fAccel, [in, defaultvalue(0)] float fDecel); [id(8), helpstring("Method Cancel")] HRESULT Cancel([in, defaultvalue("")] BSTR bstrOption); [id(9), helpstring("Method Change")] HRESULT Change([in] BSTR bstrName); [id(10), helpstring("Method Chuck")] HRESULT Chuck([in, defaultvalue("")] BSTR bstrOption); [id(11), helpstring("Method Drive")] HRESULT Drive([in] long lNo, [in] float fMov, [in, defaultvalue("")] BSTR bstrOpt ); [id(12), helpstring("Method GoHome")] HRESULT GoHome(); [id(13), helpstring("Method Move")] HRESULT Move([in] long lComp, [in] VARIANT vntPose, [in, defaultvalue("")] BSTR bstrOpt ); [id(14), helpstring("Method Rotate")] HRESULT Rotate([in] VARIANT vntRotSuf, [in] float fDeg, [in] VARIANT vntPivot, [in, defaultvalue("")] BSTR bstrOpt ); 235

[id(15), helpstring("Method Speed")] HRESULT Speed([in] long lAxis, [in] float fSpeed); [id(16), helpstring("Method Unchuck")] HRESULT Unchuck([in, defaultvalue("")] BSTR bstrOption);

};

// ICaoProvTask Interface [ object, uuid(3f23b096-03ce-465e-8a91-fc861e0a3448), dual, helpstring("ICaoProvTask Interface"), pointer_default(unique) ] interface ICaoProvTask : IDispatch { [propget, id(0), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal);

[propget, id(1), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(2), helpstring("Property FileName")] HRESULT FileName([out, retval] BSTR *pVal); [propget, id(3), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(4), helpstring("Property VariableNames")] HRESULT VariableNames([in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [propget, id(5), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(5), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(6), helpstring("Method GetVariable")] HRESULT GetVariable([in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] ICaoProvVariable **ppCaoProvVar); [id(7), helpstring("Method Delete")] HRESULT Delete([in, defaultvalue("")] BSTR bstrOption); [id(8), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal); [id(8), helpstring("Method Execute")] HRESULT Execute([in] VARIANT Command, [out, retval] VARIANT *pVal); [id(9), helpstring("Method Start")] HRESULT Start([in, defaultvalue(0)] long lMode, [in, defaultvalue("")] BSTR bstrOption); [id(10), helpstring("Method Stop")] HRESULT Stop([in, defaultvalue(0)] long lMode, [in, defaultvalue("")] BSTR bstrOption);

};

// ICaoProvVariable Interface [ object, uuid(a1702324-e8cb-48bc-a963-9bbc7ac4b7a1), dual, helpstring("ICaoProvVariable Interface"), pointer_default(unique) ] interface ICaoProvVariable : IDispatch { [propget, id(0), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal);

[propget, id(1), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(2), helpstring("Property DateTime")] HRESULT DateTime([out, retval] VARIANT *pVal); [propget, id(3), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(4), helpstring("Property Value")] HRESULT Value([out, retval] VARIANT *pVal); [propput, id(4), helpstring("Property Value")] HRESULT Value([in] VARIANT newVal); [propget, id(5), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(5), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal); [propget, id(6), helpstring("Property Microsecond")] HRESULT Microsecond([out, retval] long *pVal); };

// ICaoProvCommand Interface [ object, uuid(97455CAD-FE7C-4abb-A95F-7FE62898CD14), dual, helpstring("ICaoProvCommand Interface"), pointer_default(unique) ] interface ICaoProvCommand : IDispatch { 236

[propget, id(0), helpstring("Property Name")] HRESULT Name([out, retval] BSTR *pVal);

[propget, id(1), helpstring("Property Attribute")] HRESULT Attribute([out, retval] long *pVal); [propget, id(2), helpstring("Property Help")] HRESULT Help([out, retval] BSTR *pVal); [propget, id(3), helpstring("Property Parameters")] HRESULT Parameters([out, retval] VARIANT *pVal); [propput, id(3), helpstring("Property Parameters")] HRESULT Parameters([in] VARIANT newVal); [propget, id(4), helpstring("Property State")] HRESULT State([out, retval] long *pVal); [propget, id(5), helpstring("Property Timeout")] HRESULT Timeout([out, retval] long *pVal); [propput, id(5), helpstring("Property Timeout")] HRESULT Timeout([in] long newVal); [propget, id(6), helpstring("Property ID")] HRESULT ID([out, retval] VARIANT *pVal); [propput, id(6), helpstring("Property ID")] HRESULT ID([in] VARIANT newVal);

[id(7), helpstring("Method Cancel")] HRESULT Cancel(); [id(8), helpstring("Method Execute")] HRESULT Execute([in, defaultvalue(0)] long lOption, [out, retval] VARIANT *pVal); [id(8), helpstring("Method Execute")] HRESULT Execute([in, defaultvalue(0)] long lOption, [out, retval] VARIANT *pVal);

};

// ICaoProvMessage Interface [ object, uuid(96920f0f-d5cd-4568-852f-b21022af8640), dual, helpstring("ICaoProvMessage Interface"), pointer_default(unique) ] interface ICaoProvMessage : IDispatch { [propget, id(1), helpstring("Property DateTime")] HRESULT DateTime([out, retval] VARIANT *pVal); [propget, id(2), helpstring("Property Description")] HRESULT Description([out, retval] BSTR *pVal); [propget, id(3), helpstring("Property Destination")] HRESULT Destination([out, retval] BSTR *pVal); [propget, id(4), helpstring("Property Number")] HRESULT Number([out, retval] long *pVal); [propget, id(5), helpstring("Property Source")] HRESULT Source([out, retval] BSTR *pVal); [propget, id(6), helpstring("Property Value")] HRESULT Value([out, retval] VARIANT *pVal);

[id(7), helpstring("Method Clear")] HRESULT Clear(); [id(8), helpstring("Method Reply")] HRESULT Reply([in] VARIANT vntData); };

/* ------*/ /* CAOPROV Object Definitions */ /* ------*/ [ uuid(CAOPROV_TYPELIB), version(CAOPROV_TYPELIB_VER), helpstring(CAOPROV_TYPELIB_HELP) ] library CAOPROVLib { importlib("stdole32.tlb"); importlib("stdole2.tlb");

// _ICaoProvControllerEvents dispinterface [ uuid(90ec8be4-5552-4541-86d2-5fb082bfa0f8), helpstring("_ICaoProvControllerEvents Interface") ] dispinterface _ICaoProvControllerEvents { properties: methods: [id(1), helpstring("Method OnMessage")] HRESULT OnMessage([in] ICaoProvMessage *pCaoProvMessage, [in, defaultvalue(0)] long lOption); };

// CaoProvController Class [ uuid(CAOPROV_CONTROLLER), helpstring("CaoProvController Class") 237

] coclass CaoProvController { [default] interface ICaoProvController; [default, source] dispinterface _ICaoProvControllerEvents; };

// CaoProvExtension Class [ uuid(CAOPROV_EXTENSION), helpstring("CaoProvExtension Class") ] coclass CaoProvExtension { [default] interface ICaoProvExtension; };

// CaoProvFile Class [ uuid(CAOPROV_FILE), helpstring("CaoProvFile Class") ] coclass CaoProvFile { [default] interface ICaoProvFile; };

// CaoProvRobot Class [ uuid(CAOPROV_ROBOT), helpstring("CaoProvRobot Class") ] coclass CaoProvRobot { [default] interface ICaoProvRobot; };

// CaoProvTask Class [ uuid(CAOPROV_TASK), helpstring("CaoProvTask Class") ] coclass CaoProvTask { [default] interface ICaoProvTask; };

// CaoProvVariable Class [ uuid(CAOPROV_VARIABLE), helpstring("CaoProvVariable Class") ] coclass CaoProvVariable { [default] interface ICaoProvVariable; };

// CaoProvCommand Class [ uuid(CAOPROV_COMMAND), helpstring("CaoProvCommand Class") ] coclass CaoProvCommand { [default] interface ICaoProvCommand; };

// CaoProvMessage Class [ uuid(CAOPROV_MESSAGE), helpstring("CaoProvMessage Class") 238

] coclass CaoProvMessage { [default] interface ICaoProvMessage; };

#ifdef CAOPROV_APPEND_CLASS #include CAOPROV_APPEND_CLASS #endif

};

239

Appendix C. CORBA-CAO Engine IDL

List C-1 CaoCorba.idl

/** @file CaoCorba.idl * * @brief Interface Definition of 'CAO Engine' for CORBA. * * @version 1.0 * @date 2004/11/01 * @author DENSO WAVE * */

/* NOTES: * There are the following differences between this OMG IDL version and the Microsoft IDL version, * because of the differences of those IDL specifications such as the system-reserved name. * * Microsoft IDL (COM) -> OMG IDL (CORBA) * Microsoft IDL (COM) -> OMG IDL (CORBA) * ------* - CaoControllers (interface name) -> ControllerCollection (*1) * - CaoEngine::EngineStatus -> Engine::Status * - EngineStatus::get_ObjectCount -> EngineStatus::getObjectCount * - EngineStatus::get_Values -> EngineStatus::getValues * - ::get_Attribute -> ::type * - CaoFile::get_Type -> File::fileType * - CaoController::get_VariableNames -> Controller::getVariableNames * ------* (*1) All collection interfaces were changed, too. */

//>>>>>>>>>> Do not edit this file. <<<<<<<<<< #ifndef __CAOCORBA_IDL__ #define __CAOCORBA_IDL__

module Cao {

interface Engine; interface WorkspaceCollection; interface Workspace; interface ControllerCollection; interface Controller; interface ExtensionCollection; interface Extension; interface FileCollection; interface File; interface RobotCollection; interface Robot; interface TaskCollection; interface Task; interface VariableCollection; interface Variable; interface CommandCollection; interface Command; interface Message; interface EngineStatus; interface ControllerEvents;

struct Variant;

typedef sequence SafeArray;

struct Variant { unsigned short vt; any val; SafeArray sa; 240

};

// Engine Interface interface Engine { readonly attribute EngineStatus status; readonly attribute WorkspaceCollection workspaces;

Workspace addWorkspace(in wstring wszName, in wstring wszOption); Variant execute(in Variant Command); };

// WorkspaceCollection Interface interface WorkspaceCollection { readonly attribute long count;

Workspace item(in Variant Index); Workspace add(in wstring wszName, in wstring wszOption); void remove(in Variant Index); void clear(); boolean isMember(in Variant Index); };

// Workspace Interface interface Workspace { readonly attribute ControllerCollection controllers; readonly attribute long index; readonly attribute wstring name;

Variant getProviderNames(in wstring wszOption); Controller addController(in wstring wszName, in wstring wszProvider, in wstring wszMachine, in wstring wszOption); Variant execute(in Variant Command); };

// ControllerCollection Interface interface ControllerCollection { readonly attribute long count;

Controller item(in Variant Index); Controller add(in wstring wszName, in wstring wszProvider, in wstring wszMachine, in wstring wszOption); void remove(in Variant Index); void clear(); boolean isMember(in Variant Index); };

// Controller Interface interface Controller { readonly attribute long type; readonly attribute wstring help; readonly attribute long index; readonly attribute wstring name; attribute Variant tag; attribute Variant id;

readonly attribute ExtensionCollection extensions; readonly attribute FileCollection files; readonly attribute RobotCollection robots; readonly attribute TaskCollection tasks; readonly attribute VariableCollection variables; readonly attribute CommandCollection commands;

Variant getExtensionNames(in wstring wszOption); Variant getFileNames(in wstring wszOption); Variant getRobotNames(in wstring wszOption); Variant getTaskNames(in wstring wszOption); 241

Variant getVariableNames(in wstring wszOption); Variant getCommandNames(in wstring wszOption);

Extension addExtension(in wstring wszName, in wstring wszOption); File addFile(in wstring wszName, in wstring wszOption); Robot addRobot(in wstring wszName, in wstring wszOption); Task addTask(in wstring wszName, in wstring wszOption); Variable addVariable(in wstring wszName, in wstring wszOption); Command addCommand(in wstring wszName, in wstring wszOption); Variant execute(in Variant Command); Message getMessage(); };

// ExtensionCollection Interface interface ExtensionCollection { readonly attribute long count;

Extension item(in Variant Index); Extension add(in wstring wszName, in wstring wszOption); void remove(in Variant Index); void clear(); boolean isMember(in Variant Index); };

// Extension Interface interface Extension { readonly attribute long type; readonly attribute wstring help; readonly attribute long index; readonly attribute wstring name; attribute Variant tag; attribute Variant id;

readonly attribute VariableCollection variables; Variant getVariableNames(in wstring wszOption);

Variable addVariable(in wstring wszName, in wstring wszOption); Variant execute(in Variant Command); };

// FileCollection Interface interface FileCollection { readonly attribute long count;

File item(in Variant Index); File add(in wstring wszName, in wstring wszOption); void remove(in Variant Index); void clear(); boolean isMember(in Variant Index); };

// File Interface interface File { readonly attribute long type; readonly attribute wstring help; readonly attribute long index; readonly attribute wstring name; attribute Variant tag; attribute Variant id;

readonly attribute Variant dateCreated; readonly attribute Variant dateLastAccessed; readonly attribute Variant dateLastModified; readonly attribute wstring path; readonly attribute long size; readonly attribute wstring fileType; 242

attribute Variant value;

readonly attribute FileCollection files; readonly attribute VariableCollection variables;

Variant getFileNames(in wstring wszOption); Variant getVariableNames(in wstring wszOption);

File addFile(in wstring wszName, in wstring wszOption); Variable addVariable(in wstring wszName, in wstring wszOption); void copy(in wstring wszName, in wstring wszOption); void deleteFile(in wstring wszOption); Variant execute(in Variant Command); void move(in wstring wszName, in wstring wszOption); wstring run(in wstring wszOption); };

// RobotCollection Interface interface RobotCollection { readonly attribute long count;

Robot item(in Variant Index); Robot add(in wstring wszName, in wstring wszOption); void remove(in Variant Index); void clear(); boolean isMember(in Variant Index); };

// IRobot Interface interface Robot { readonly attribute long type; readonly attribute wstring help; readonly attribute long index; readonly attribute wstring name; attribute Variant tag; attribute Variant id;

readonly attribute VariableCollection variables; Variant getVariableNames(in wstring wszOption); Variable addVariable(in wstring wszName, in wstring wszOption); Variant execute(in Variant Command);

void accelerate(in long lAxis, in float fAccel, in float fDecel); void cancel(in wstring wszOption); void change(in wstring wszName); void chuck(in wstring wszOption); void drive(in long lNo, in float fMov, in wstring wszOption); void goHome();

void move(in long lComp, in Variant vntPose, in wstring wszOption); void rotate(in Variant vntRotSuf, in float fDeg, in Variant vntPivot, in wstring wszOption); void speed(in long lAxis, in float fSpeed); void unchuck(in wstring wszOption); };

// ICaoTaskCollection Interface interface TaskCollection { readonly attribute long count;

Task item(in Variant Index); Task add(in wstring wszName, in wstring wszOption); void remove(in Variant Index); void clear(); boolean isMember(in Variant Index); };

// ITask Interface interface Task 243

{ readonly attribute long type; readonly attribute wstring help; readonly attribute long index; readonly attribute wstring name; attribute Variant tag; attribute Variant id; readonly attribute wstring fileName;

readonly attribute VariableCollection variables; Variant getVariableNames(in wstring wszOption); Variable addVariable(in wstring wszName, in wstring wszOption);

Variant execute(in Variant Command); void deleteTask(in wstring wszOption); void start(in long lMode, in wstring wszOption); void stop(in long lMode, in wstring wszOption); };

// VariableCollection Interface interface VariableCollection { readonly attribute long count;

Variable item(in Variant Index); Variable add(in wstring wszName, in wstring wszOption); void remove(in Variant Index); void clear(); boolean isMember(in Variant Index); };

//IVariable Interface interface Variable { readonly attribute long type; readonly attribute wstring help; readonly attribute long index; readonly attribute wstring name; readonly attribute long microsecond; attribute Variant tag; attribute Variant id;

readonly attribute Variant dateTime; attribute Variant value; };

// CommandCollection Interface interface CommandCollection { readonly attribute long count;

Command item(in Variant Index); Command add(in wstring wszName, in wstring wszOption); void remove(in Variant Index); void clear(); boolean isMember(in Variant Index); };

// Command Interface interface Command { readonly attribute long type; readonly attribute wstring help; readonly attribute long index; readonly attribute wstring name; attribute Variant tag; attribute Variant id;

attribute Variant parameters; attribute long timeout;

244

readonly attribute Variant result; readonly attribute long state; Variant execute(in long lOption); void cancel();

};

// IMessage Interface interface Message { readonly attribute Variant dateTime; readonly attribute wstring description; readonly attribute wstring destination; readonly attribute long serialNumber; readonly attribute wstring source; readonly attribute Variant value;

void clear(); void reply(in Variant vntData); };

// EngineStatus Interface interface EngineStatus { readonly attribute Variant currentDateTime; readonly attribute wstring computerName; readonly attribute Variant startDateTime; readonly attribute wstring version;

Variant getObjectCounts(in Variant vntName); Variant getValues(in Variant vntName); };

//ControllerEvents dispinterface interface ControllerEvents { void onMessage(in Message CaopMessage); };

};

#endif

245

Appendix D. CORBA-CAO Provider IDL

List D-1 CaoProvCorba.idl

/** @file CaoProvCorba.idl * * @brief Interface Definition of 'CAO Provider' for CORBA. * * @version 1.1 * @date 2004/11/01 * @author DENSO WAVE * */

/* NOTES: * There are the following differences between this OMG IDL version and the Microsoft IDL version, * because of the differences of those IDL specifications such as the system-reserved name. * * Microsoft IDL (COM) -> OMG IDL (CORBA) * Microsoft IDL (COM) -> OMG IDL (CORBA) * ------* - ::get_Attribute -> ::type * - CaoProvFile::get_Type -> File::fileType * - CaoProvController::get_VariableNames -> Controller::getVariableNames * ------*/

//>>>>>>>>>> Do not edit this file. <<<<<<<<<< #ifndef __CAOPROVCORBA_IDL__ #define __CAOPROVCORBA_IDL__

module CaoProv {

interface Controller; interface Extension; interface File; interface Robot; interface Task; interface Variable; interface Message; interface Command; interface ControllerEvents;

struct Variant;

typedef sequence SafeArray;

struct Variant { unsigned short vt; any val; SafeArray sa; };

// Controller Interface interface Controller { readonly attribute wstring name; readonly attribute long type; readonly attribute wstring help; attribute Variant id;

Variant getExtensionNames(in wstring wszOption); Variant getFileNames(in wstring wszOption); Variant getRobotNames(in wstring wszOption); Variant getTaskNames(in wstring wszOption); Variant getVariableNames(in wstring wszOption); Variant getCommandNames(in wstring wszOption);

246

void connect(in wstring wszName, in wstring wszOption, in ControllerEvents pCaoEvent); void disconnect(); Extension getExtension(in wstring wszName, in wstring wszOption); File getFile(in wstring wszName, in wstring wszOption); Robot getRobot(in wstring wszName, in wstring wszOption); Task getTask(in wstring wszName, in wstring wszOption); Variable getVariable(in wstring wszName, in wstring wszOption); Command getCommand(in wstring wszName, in wstring wszOption); Variant execute(in Variant Command); };

// Extension Interface interface Extension { readonly attribute wstring name; readonly attribute long type; readonly attribute wstring help; attribute Variant id;

Variant getVariableNames(in wstring wszOption); Variable getVariable(in wstring wszName, in wstring wszOption); Variant execute(in Variant Command); };

// IFile Interface interface File { readonly attribute wstring name; readonly attribute long type; readonly attribute wstring help; readonly attribute Variant dateCreated; readonly attribute Variant dateLastAccessed; readonly attribute Variant dateLastModified; readonly attribute wstring path; readonly attribute long size; readonly attribute wstring fileType; attribute Variant value; attribute Variant id;

Variant getFileNames(in wstring wszOption); Variant getVariableNames(in wstring wszOption);

File getFile(in wstring wszName, in wstring wszOption); Variable getVariable(in wstring wszName, in wstring wszOption); void copy(in wstring wszName, in wstring wszOption); void deleteFile(in wstring wszOption); Variant execute(in Variant Command); void move(in wstring wszName, in wstring wszOption); wstring run(in wstring wszOption); };

// IRobot Interface interface Robot { readonly attribute wstring name; readonly attribute long type; readonly attribute wstring help; attribute Variant id;

Variant getVariableNames(in wstring wszOption); Variable getVariable(in wstring wszName, in wstring wszOption); Variant execute(in Variant Command);

void accelerate(in long lAxis, in float fAccel, in float fDecel); void cancel(in wstring wszOption); void change(in wstring wszName); void chuck(in wstring wszOption); void drive(in long lNo, in float fMov, in wstring wszOption); void goHome(); void move(in long lComp, in Variant vntPose, in wstring wszOption); void rotate(in Variant vntRotSuf, in float fDeg, in Variant vntPivot, in wstring wszOption); void speed(in long lAxis, in float fSpeed); void unchuck(in wstring wszOption); }; 247

// ITask Interface interface Task { readonly attribute wstring name; readonly attribute long type; readonly attribute wstring help; readonly attribute wstring fileName; attribute Variant id;

Variant getVariableNames(in wstring wszOption); Variable getVariable(in wstring wszName, in wstring wszOption); Variant execute(in Variant Command);

void deleteTask(in wstring wszOption); void start(in long lMode, in wstring wszOption); void stop(in long lMode, in wstring wszOption); };

// IVariable Interface interface Variable { readonly attribute wstring name; readonly attribute long type; readonly attribute wstring help; readonly attribute Variant dateTime; readonly attribute long microsecond; attribute Variant value; attribute Variant id; };

// ICommand Interface interface Command { readonly attribute wstring name; readonly attribute long type; readonly attribute wstring help; readonly attribute long state; attribute Variant parameters; attribute long timeout; attribute Variant id;

Variant execute(in long lOption); void cancel(); };

// IMessage Interface interface Message { readonly attribute Variant dateTime; readonly attribute wstring description; readonly attribute wstring destination; readonly attribute long number; readonly attribute wstring source; readonly attribute Variant value;

void clear(); void reply(in Variant vntData); };

interface ControllerEvents { void onMessage(in Message CaopMessage, in long lOption); }; };

#endif

1

ORiN2.1 Specifications

Part 3: CRD

Version 2.1.0

November 18, 2008

【Remarks】

2

【Revision history】

Date Rev. Content 2005-08-25 1.0.0 First edition. 2008-11-18 2.1.0

3

Contents

1. Outline of CRD...... 4 1.1. ORiN2 specifications composition ...... 5 1.2. Document composition ...... 5 2. CRD Schema ...... 6 2.1. CRD elements and CAO interface ...... 6 2.2. CRD static data element and capability definition element ...... 6 2.3. Variant type data ...... 7 2.4. Capability definition element ...... 8 2.4.1. Return value definition...... 9 2.4.2. Argument definition...... 9 2.4.3. VarInfo element ...... 9 2.5. Header and root element ...... 11 2.6. Controller element...... 12 2.7. Variable element ...... 13 2.8. Command element...... 14 2.9. Extension element ...... 15 2.10. File element ...... 15 2.11. Robot element...... 17 2.12. Task element...... 17 2.13. Message element...... 18 2.14. Controller capability definition element ...... 19 2.15. Variable capability definition element ...... 20 2.16. Command capability definition element ...... 21 2.17. Extension board capability definition element ...... 21 2.18. File capability definition element ...... 22 2.19. Robot capability definition element ...... 22 2.20. Task capability definition element...... 23 2.21. Message capability definition element ...... 24 3. CRD samples...... 25 3.1. Static data definiton sample ...... 25 3.2. System configuration definition sample...... 25 3.3. Device capability definition sample ...... 26 Appendix A. CRD Schema...... 28 Appendix B. CRD Provider ...... 38

4

1. Outline of CRD

CRD (Controller Resource Definition) is a standard to describe various static resources of the FA device with XML (eXtensible Markup Language). Its data schema is called CRD schema, and a XML file described according to this CRD schema is called as CRD instance. CRD is a standard data schema to manage FA device information in a common format. CRD is designed assuming following two usages. (Please refer [Changes in CRD2.0) (1) Device static data definition (2) Device and whole system configuration definition An example of usage (1) is defining information like “The link1 length of robot1 is 400mm.” This type of information is usually static and therefore not necessary to be acquired by communicating to the device. Preparing CRD instances for each device with necessary information would be appropriate. An example of usage (2) is defining information like “The equipment is composed of robot A, PLC B and operation panel C.” CRD instance can store parameters for communicating with each device or creating CAO (Controller Access Object) instance for each device. CRD schema is designed to closely correlate CAO interface and CRD elements. (Figure 1-1) This is based on ORiN design policy of unifying basic concept of each standards (CAO, CRD, CAP) and still each standard can be utilized separately.

CAO Engine

CaoEngine CAO Provider CRD Tag

CaoWorkspace

CaoController CaoProvController (1..*)

CaoCommand CaoProvCommand (0..*) CaoExtension CaoProvExtension (0..*) CaoFile CaoProvFile (0..*) CaoRobot CaoProvRobot (0..*) CaoTask CaoProvTask (0..*) CaoVariable CaoProvVariable (0..*) CaoMessage CaoProvMessage (0..*)

Figure 1-1 Correspondence of CRD schema tag and CAO interface

[Changes in CRD2.0] In addition to the above mentioned two usages, CRD2.0 supports additional usage of Device capability definition Device capability is close to usage (1), and it can be represented by defining expression rule for CRD 1.0 5 specifications. However, CRD is extended to CRD 2.0 to represent device capability more intuitively. CRD 2.0 is completely upper compatible with CRD 1.0, and CRD 2.0 schema can represent CRD 1.0 instance. With this extension, information like “Device A has variable I, and the value range is 1 – 100” can be more intuitively represented.

1.1. ORiN2 specifications composition Following is the composition of ORiN2 specifications. Part 1 Outline - ORiN2 outline Part 2 CAO - Standard program interface CAO specifications Part 3 CRD - Standard data schema CRD specifications – This document Part 4 CAP - Standard communication protocol CAP specifications

1.2. Document composition Following is the composition of this document. 1. Outline - CRD outline 2. CRD Schema - CRD Schema definition explanation 3. CRD samples - CRD instance samples for usage (1)-(3). Appendix 1. CRD Schema - CRD Schema definition Appendix 2. CRD provider - CAO provider for CRD

6

2. CRD Schema

2.1. CRD elements and CAO interface CRD schema is designed to closely correlate CAO interface and CRD elements. This section explains the mapping of CAO interface and each element of CRD in CRD Schema. For details of CRD Schema, please refer to CRDSchema2.xsd file in Appendix 3.3.Appendix ACRD.

Table 2-1 Relation between CRD element and CAO interface

CRD element CAO interface Controller CaoController Command CaoCommand Extension CaoExtension File CaoFile Robot CaoRobot Task CaoTask Variable CaoVariable Message CaoMessage

As shown in Table 2-1, CRD elements correspond to CAO interface (and property in it) in almost one-to-one relation, and its data structure is intuitively understood.

2.2. CRD static data element and capability definition element CRD static data element and capability definition element is related as following.

Table 2-2 Relation between static data element and capability definition element

Static data element name Capability definition element name Controller Controller_Info Command Command_Info Extension Extension_Info File File_Info Robot Robot_Info Task Task_Info Variable Variable_Info

Both of them have keys to identify capability element definition used by static data element. In this way, plural types of capabilities can be defined. 7

When key is not defined, capability definition without key is used.

Ex.) Static data element and capability definition related by a key “SYS_FILE_ACTIVE” SYS_FILE_ACTIVE 0 1

・・・

2.3. Variant type data Value element of Variable, Parameter element of Command, and ID element of each object has a structure to represent VARIANT type. To specify the data type, VARIANT type element has “Type" as an attribute value. In CRD, the VARIANT type is expressed by this Type attribute value and the element of the data type corresponding to it. The value of the Type attribute to express VARIANT type is predetermined. Table 2-3 shows correspondence between Type attribute value and VARIANT data type.

Table 2-3 Type attribute and data type for VARIANT type

Data type name Type attribute Tag Type in XML Schema VT_I2 iVal short VT_I4 lVal int VT_R4 fltVal float VT_R8 dblVal double VT_DATE dateVal dateTime VT_BSTR bstrVal string VT_BOOL boolVal boolean VT_UI1 bVal unsignedByte VT_VARIANT varVal Variant VT_ARRAY array array

8

As an example of CRD data expression, substitution of 32bit integer value into VARIANT type element Value is shown.

12345

In the Variant type, there is an element named varVal. The type is used to hold Variant type value in Variant type variable. Following is a usage example.

0

To express an array with VARIANT type elements, add array element and its child element, then describe dimension to show the order of the child element, arrayBound to show the number of elements in each dimension, and arrayData to show each data in the array. arrayBound has two elements; lBound to show the index start point of the dimension, and elements to show the number of elements. arrayData can have arbitrary data by specifying each type element as child element. Next is an example CRD data expression of one dimensional 2 elements array with 16bit integer value.

1 0 5 1 2

2.4. Capability definition element Capability definition element can define argument and return value for each interface member. For details of member definition in each capability definition element, please refer to CRDSchema2.xsd file in Appendix 3.3.Appendix ACRD. For the definition of argument and return value, data type and input/output value list or value range can be specified.

Following is the details.

9

2.4.1. Return value definition Details of the return value is defined with Result element. Result element has the following child elements.

Table 2-4 Chile element of return value definition element

Element name Type Explanation Occurrence rate HelpString String Help information 0,1 VarInfo VarInfo Type definition 0,*

For occurrence rate,“0,1” means that this elemement occurs zero times or once, and “0,*” means that this element occurs for zero to infinite times. For details of descriptions in VarInfo, please refer to 2.4.3.

2.4.2. Argument definition Details of arguments are defined with Args element. Args element has the following child element.

Table 2-5 Child element of the argument definition element

Element name Type Explanation Occurrence rate Arg Arg Argument definition 1,*

Arg element has the same child element as Result element in 2.4.1. The element has Index attribute to describe theorder of the elment.

2.4.3. VarInfo element Varinfor element is used for Result element and child element of Arg element, and the element specifies the data type and a list or range of of the value. Varinfo element can be omitted if data type or value range is not specified. Varinfo element has Type attribute to specify data type. Supported data types are as following.

Table 2-6 Varinfo type attirbutes

Type attibute expression VT_EMPTY VT_BOOL VT_I1 VT_UI1 VT_I2 VT_UI2 VT_I4 10

VT_UI4 VT_R4 VT_R8 VT_DATE VT_BSTR VT_VARIANT VT_ARRAY|VT_BOOL VT_ARRAY|VT_I1 VT_ARRAY|VT_UI1 VT_ARRAY|VT_I2 VT_ARRAY|VT_UI2 VT_ARRAY|VT_I4 VT_ARRAY|VT_UI4 VT_ARRAY|VT_R4 VT_ARRAY|VT_R8 VT_ARRAY|VT_DATE VT_ARRAY|VT_BSTR VT_ARRAY|VT_VARIANT

Following is the child element of VarInfo element.

Table 2-7 Child element of return value definition element

Element name Type Explanation Occurrence rate DataInfo DataInfo Value definition 0,*

Following is child element of DataInfo element.

Table 2-8 Child element of return value definition element

Element name Type Explanation Occurrence rate Min Double Minimum value 0,1 Max Double Maximum value 0,1 Step Double Value step 0,1 List String Value list 0,* VarInfo VarInfo Array element 0,1

Min, Max, and Step elements are used to specify the value range. 11

List element is used to make value list. When parent VarInfo element specifies array, use VarInfo element to describe child element. For DataInfo element, value range, list or array element is selectively used, and they cannot be simultaneously used. If value range is not specified, omit DataInfo element. Following is VarInfo element example.

Ex.) Use list for VT_I2 type, and limit value range of –1 to 100 for VT_I4 type. 10 20 30 40 -1 100

2.5. Header and root element CRD file is an XML file, and at the top of the file is a declaration of XML as following.

Encoding attribute need to be the character code1 used to describe the file. Next, specify CRD document root elements as following.

In this element, the last part “CRDSchema.xsd” specifies the path to the schema.. The structure of the CRD file is not checked when there is no schema in the specified path. CRD root element can also have following child elements.

Table 2-9Child element of route element

Element name Type Explanation Occurance rate Help String Help information 0,1 Version String Version information 0,1 Controller Controller Controller element 0,*

1 XML recommends UTF-8 12

2.6. Controller element The controller element shows the instance of CaoController, and is expressed in the following shape according to the CRD schema.

Table2-10 Child element of Controller element

Element name Type Explanation Occurance rate Attribute Int Attribute information 0,1 Help String Help information 0,1 ID Variant ID information 0,1 Extension Extension Extension board element 0,* File File File element 0,* Robot Robot Robot element 0,* Task Task Task element 0,* Variable Variable Variable element 0,* Command Command Command element 0,*

Table 2-11Controller element attribute

Attribute name Explanation Name Controller name (mandately) provider Provider name machine Machine name Option Option string Key Capability key helpstring Help string

The name attribute is always necessary, and shows the controller name. It should be noted that each of the CRD controller element has one-to-one correspondence to an instance of the CaoController object. In a word, it is necessary to describe two controller elements to express two controllers named RC1 and RC2 with CRD as follows.

13

For device configuration, provider,machine and option attributes need to be specified.

For capability definition, use key attribute to specify corresponding controller capability attribute.

To get each object from the controller, add object elements as child element under the controller element as shown in the following example.

… … … …

In the above example, CaoController “RC1” has CaoFile “pro1.pac” and CaoVariable “I1”. CaoController,CaoCommand,CaoExtension,CaoFile,CaoRobot,CaoTask,and CaoVariable elements has Attribute element to show Attribute property, and Help element to show Help property as child elements.

1 CRD Test Controller Class 3

2.7. Variable element The variable and the system variable element show the instance of CaoVariable, and are expressed as following.

The name attribute is always necessary, and shows the name of the variable resource. The instance and the variable element corresponds one to one, like controller elements. The Variable element can have the following child elements.

Table 2-12 Child element of Variable element

Element name Type Explanation Occurrence rate Attribute Int Attribute information 0,1 14

Help String Help information 0,1 ID Variant ID information 0,1 DateTime DateTime Variable acquisition date 0,1 Microsecond Int Variable acquisition date [millisecond] 0,1 Value Variant Variable value 0,1

Table 2-13 Variable element attribute

Attribute name Explanation Name Variable name(mandately) Option Option string Key Capability kye Helpstring Help string

2.8. Command element The command element shows the instance of CaoCommand, and is expressed according to the CRD schema as following.

The name attribute is always necessary, and shows the command name. The instance and the file element corresponds one to one, like controller element. The command element can have the following child elements.

Table 2-14 Child element of Command element

Element name Type Explanation Occurance rate Attribute int Attribute information 0,1 Help String Help information 0,1 ID Variant ID information 0,1 Timeout int Time-out time 0,1 State int State 0,1 Parameters Variant Parameter 0,1

15

Table 2-15 Command element attribute

Attribute name Explanation name Command name(mandateley) option Option string Key Capability key helpstring Help string

2.9. Extension element The extension element shows the instance of CaoExtension, and is expressed according to the CRD schema as following.

The name attribute is always necessary, and shows the extension element name. The instance and the file element corresponds one to one, like controller element. The extension element can have the following child elements.

Table 2-16 Child element of Extension element

Element name Type Explanation Occurrence rate Attribute Int Attribute information 0,1 Help String Help information 0,1 ID Variant ID information 0,1 Variable Variable Variable element 0,*

Table 2-17 Extension element attribute

Attribute name Explanation name Extension name (mandateley) option Option string Key Capability key helpstring Help string

2.10. File element The file element shows the instance of CaoFile, and is expressed according to the CRD schema as following.

… 16

The name attribute is always necessary, and shows the file resource name. The instance and the file element corresponds one to one, like controller element. The file element can have the following child elements.

Table 2-18 Child element of File element

Element name Type Explanation Occurrence rate Attribute int Attribute information 0,1 Help String Help information 0,1 ID Variant ID information 0,1 DateCreated DateTime Creation date 0,1 DateLastAccessed DateTime Last access date 0,1 DateLastModified DateTime Last updated date and time 0,1 Path String File path 0,1 Size int File size 0,1 Type String File type 0,1 Value Variant Content of file 0,1 File File File element 0,* Variable Variable Variable element 0,*

Table 2-19 File element attribute

Attribute name Explanation name File name (mandateley) option Option string Key Capability key helpstring Help string

When a usual character string is put in the value of the Value element, it is judged as a normal text. To express a binary file with CRD, the binary data is expressed by byte array as following.

1 0 3 0 17

1 2

2.11. Robot element The robot element shows the instance of CaoRobot, and is expressed according to the CRD schema as following.

The name attribute is always necessary, and shows the robot name. The instance and the robot element corresponds one to one, like controller element. The robot element can have the following child elements.

Table 2-20 Child element of Robot element

Element name Type Explanation Occurance rate Attribute int Attribute information 0,1 Help String Help information 0,1 ID Variant ID information 0,1 Variable Variable Variable element 0,*

Table 2-21 Robot element attribute

Attribute name Explanation name Robot name (mandateley) option Option string Key Capability key helpstring Help string

2.12. Task element The task element shows the instance of CaoTask, and is expressed according to the CRD schema as following.

The name attribute is always necessary, and shows the task name. The instance and the task element corresponds one to one, like controller element. The task element can have the following child elements. 18

Table 2-22 Child element of Task element

Element name Type Explanation Occurance rate Attribute int Attribute information 0,1 Help String Help information 0,1 ID Variant ID information 0,1 FileName String File name 0,1 Variable Variable Variable element 0,*

Table 2-23 Task element attribute

Attribute name Explanation name Task name (mandateley) option Option string Key Capability key helpstring Help string

2.13. Message element The message element shows the instance of CaoMessage, and is expressed according to the CRD schema as following.

The name attribute is always necessary, and shows the message ID. The instance and the message element corresponds one to one, like controller element. The message element can have the following child elements.

Table 2-24 Child element of Message element

Element name Type Explanation Occurance rate DateTime DateTime Creation date/time 0,1 Description String Description 0,1 Destination String Message destination 0,1 Source String Message source 0,1 Value Variant Message text 0,*

19

Table 2-25 Message element attribute

Attribute name Explanation number Message ID(mandately) key Capability key

2.14. Controller capability definition element Controller capability definition element specifies controller object member implementation status or data type and value range of arguments and return value.

Table 2-26 Child element of Controller_Info element

Element name Type Explanation Occurrence rate ObjectKey String Attribute information 0,1 HelpString String Help information 0,1 Args Args Arguments for controller creation 0,1 Get_Attribute_Info MemberInfoType Get_Attribute definition 0,1 Get_Help_Info MemberInfoType Get_Help definition 0,1 Put_ID_Info MemberInfoType Put_ID definition 0,1 Get_ID_Info MemberInfoType Get_ID definition 0,1 Get_ExtensionNames_Info MemberInfoType Get_ExtensionNames definition 0,1 Get_FileNames_Info MemberInfoType Get_FileNames definition 0,1 Get_RobotNames_Info MemberInfoType Get_RobotNames definition 0,1 Get_TaskNames_Info MemberInfoType Get_TaskNames definition 0,1 Get_VariableNames_Info MemberInfoType Get_VariableNames definition 0,1 Get_CommandNames_Info MemberInfoType Get_CommandNames definition 0,1 Execute_Info MemberInfoType Execute definition 0,1 Extension_Info Extension_Info Extension capability definition 0,* File_Info File_Info File capability definition 0,* Robot_Info Robot_Info Robot capability definition 0,* Task_Info Task_Info Task capability definition 0,* Variable_Info Variable_Info Variable capability definition 0,* Command_Info Command_Info Command capability definition 0,* Message_Info Message_Info Variable capability definition 0,*

To get each capability from this controller capability definition element, add capability element as child element under controller capability definition element, as shown below. 20

Controller name 0 10 Option string Conn=[eth:[IP Address](:[Port No])

・・・

・・・

・・・

・・・

2.15. Variable capability definition element Variable capability definition element specifies variable object member implementation status or data type and value range of arguments and return value.

Table 2-27 Child element of Variable_Info element

Element name Type Explanation Occurrence rate ObjectKey String Attribute information 0,1 HelpString String Help information 0,1 Args Args Arguments for controller creation 0,1 Get_Attribute_Info MemberInfoType Get_Attribute definition 0,1 Get_Help_Info MemberInfoType Get_Help definition 0,1 Put_ID_Info MemberInfoType Put_ID definition 0,1 Get_ID_Info MemberInfoType Get_ID definition 0,1 Get_DateTime_Info MemberInfoType Get_DateTime definition 0,1 Get_Microsecond_Info MemberInfoType Get_Microsecond definition 0,1 Put_Value_Info MemberInfoType Put_Value definition 0,1 Get_Value_Info MemberInfoType Get_Value definition 0,1

21

2.16. Command capability definition element Command capability definition element specifies copmmand object member implementation status or data type and value range of arguments and return value.

Table 2-28 Child element of Command_Info element

Element name Type Explanation Occurrence rate ObjectKey String Attribute information 0,1 HelpString String Help information 0,1 Args Args Arguments for controller creation 0,1 Get_Attribute_Info MemberInfoType Get_Attribute definition 0,1 Get_Help_Info MemberInfoType Get_Help definition 0,1 Put_ID_Info MemberInfoType Put_ID definition 0,1 Get_ID_Info MemberInfoType Get_ID definition 0,1 Put_Timeout_Info MemberInfoType Put_Timeout definition 0,1 Get_Timeout_Info MemberInfoType Get_Timeout definition 0,1 Get_State_Info MemberInfoType Get_State definition 0,1 Put_Parameters_Info MemberInfoType Put_Parameters definition 0,1 Get_Parameters_Info MemberInfoType Get_Parameters definition 0,1 Cancel_Info MemberInfoType Cancel definition 0,1 Execute_Info MemberInfoType Execute definition 0,1

2.17. Extension board capability definition element Extension board capability definition element specifies extension board object member implementation status or data type and value range of arguments and return value.

Table 2-29 Child element of Extension_Info element

Element name Type Explanation Occurrence rate ObjectKey String Attribute information 0,1 HelpString String Help information 0,1 Args Args Arguments for controller creation 0,1 Get_Attribute_Info MemberInfoType Get_Attribute definition 0,1 Get_Help_Info MemberInfoType Get_Help definition 0,1 Put_ID_Info MemberInfoType Put_ID definition 0,1 Get_ID_Info MemberInfoType Get_ID definition 0,1 Get_VariableNames_Info MemberInfoType Get_VariableNames definition 0,1 Execute_Info MemberInfoType Execute definition 0,1 22

2.18. File capability definition element File capability definition element specifies file object member implementation status or data type and value range of arguments and return value.

Table 2-30 Child element of File_Info element

Element name Type Explanation Occurrence rate ObjectKey String Attribute information 0,1 HelpString String Help information 0,1 Args Args Arguments for controller creation 0,1 Get_Attribute_Info MemberInfoType Get_Attribute definition 0,1 Get_Help_Info MemberInfoType Get_Help definition 0,1 Put_ID_Info MemberInfoType Put_ID definition 0,1 Get_ID_Info MemberInfoType Get_ID definition 0,1 Get_DateCreated_Info MemberInfoType Get_DateCreated definition 0,1 Get_DateLastAccessed_Info MemberInfoType Get_DateLastAccessed definition 0,1 Get_DateLastModified_Info MemberInfoType Get_DateLastModified definition 0,1 Get_Path_Info MemberInfoType Get_Path definition 0,1 Get_Size_Info MemberInfoType Get_Size definition 0,1 Get_Type_Info MemberInfoType Get_Type definition 0,1 Put_Value_Info MemberInfoType Put_Value definition 0,1 Get_Value_Info MemberInfoType Get_Value definition 0,1 Get_FileNames_Info MemberInfoType Get_FileNames definition 0,1 Get_VariableNames_Info MemberInfoType Get_VariableNames definition 0,1 Copy_Info MemberInfoType Copy definition 0,1 Delete_Info MemberInfoType Delete definition 0,1 Move_Info MemberInfoType Move definition 0,1 Run_Info MemberInfoType Run definition 0,1 Execute_Info MemberInfoType Execute definition 0,1

2.19. Robot capability definition element Robot capability definition element specifies robot object member implementation status or data type and value range of arguments and return value.

23

Table 2-31 Child element of Robot_Info element

Element name Type Explanation Occurrence rate ObjectKey String Attribute information 0,1 HelpString String Help information 0,1 Args Args Arguments for controller creation 0,1 Get_Attribute_Info MemberInfoType Get_Attribute definition 0,1 Get_Help_Info MemberInfoType Get_Help definition 0,1 Put_ID_Info MemberInfoType Put_ID definition 0,1 Get_ID_Info MemberInfoType Get_ID definition 0,1 Get_VariableNames_Info MemberInfoType Get_VariableNames definition 0,1 Accelerate_Info MemberInfoType Accelerate definition 0,1 Change_Info MemberInfoType Change definition 0,1 Chuck_Info MemberInfoType Chuck definition 0,1 Drive_Info MemberInfoType Drive definition 0,1 GoHome_Info MemberInfoType GoHome definition 0,1 Halt_Info MemberInfoType Halt definition 0,1 Hold_Info MemberInfoType Hold definition 0,1 Move_Info MemberInfoType Move definition 0,1 Rotate_Info MemberInfoType Rotate definition 0,1 Speed_Info MemberInfoType Speed definition 0,1 Unchuck_Info MemberInfoType Unchuck definition 0,1 Unhold_Info MemberInfoType Unhold definition 0,1 Execute_Info MemberInfoType Execute definition 0,1

2.20. Task capability definition element Task capability definition element specifies task object member implementation status or data type and value range of arguments and return value.

Table 2-32 Child element of Task_Info element

Element name Type Explanation Occurrence rate ObjectKey String Attribute information 0,1 HelpString String Help information 0,1 Args Args Arguments for controller creation 0,1 Get_Attribute_Info MemberInfoType Get_Attribute definition 0,1 Get_Help_Info MemberInfoType Get_Help definition 0,1 Put_ID_Info MemberInfoType Put_ID definition 0,1 24

Get_ID_Info MemberInfoType Get_ID definition 0,1 Get_FileName_Info MemberInfoType Get_FileName definition 0,1 Get_VariableNames_Info MemberInfoType Get_VariableNames definition 0,1 Delete_Info MemberInfoType Delete definition 0,1 Start_Info MemberInfoType Start definition 0,1 Stop_Info MemberInfoType Stop definition 0,1 Execute_Info MemberInfoType Execute definition 0,1

2.21. Message capability definition element Message capability definition element specifies message object member implementation status or data type and value range of arguments and return value.

Table 2-33 Child element of Message_Info element

Element name Type Explanation Occurrence rate ObjectKey String Attribute information 0,1 HelpString String Help information 0,1 Get_Number_Info MemberInfoType Get_Number definition 0,1 Get_DateTime_Info MemberInfoType Get_DateTime definition 0,1 Get_Description_Info MemberInfoType Get_Description definition 0,1 Get_Destination_Info MemberInfoType Get_Destination definition 0,1 Get_Source_Info MemberInfoType Get_Source definition 0,1 Get_Value_Info MemberInfoType Get_Value definition 0,1 Clear_Info MemberInfoType Clear definition 0,1 Reply_Info MemberInfoType Reply definition 0,1

25

3. CRD samples

This ssection shows samples of three ways of CRD usages. These examples may be united into one file, but separating the file for each usage will be more common in actual operation.

3.1. Static data definiton sample List 3-1 CRDSchema2.xsd

CRD Test Data 1.0.0 0 Sample Ctrl

10

1 0 3 0 1 2

3.2. System configuration definition sample List 3-2 CRDSchema2.xsd

26

3.3. Device capability definition sample List 3-3 CRDSample_DC.xml

Controller name 0 10 getAutoMode putAutoMode 10 20 -1 100

27

SYS_VAR_CURRENT_TIME

28

Appendix A. CRD Schema

List A-1 CRDSchema2.xsd

[ORiN2] CRD Schema ver. 2.0

29

30

31

32

33

34

35

36

37

38

Appendix B. CRD Provider

CRD is a separated specification, and it can be used independently from other ORiN2 specifications. In addition, CRD offers following functions in combination with CAO. [Function 1] Unite static data from CRD and dynamic data from communication and handle as one CAO object. [Function 2] By defining CAO object tree using CRD, the defined objects are automatically created when CAO engine starts up. CRD provider prepares these functions. CRD provider is an provider instance based on CAO provider specifications, and provides accessing function to XML file described based on the format defined by CRD Schema. Naturally, CRD instance file can be directly accessed from application program.(Figure B-1). However, CRD file can be accessed in the same procedure as CAO model operation by using CRD provider, and this will simplify application program development.

CRD App. Native [1] CRD native application: Application X App. Y App. Î CRD

[2] CAO application: [2] [1] App. Î CAO Î CRD

CAO Engine Engine XML Parser

Static information CAO CRD Provider CRD Provider Schema CRD File CRDSchema.xsd

Figure B-1 Two access path to CRD instance file

Function 1 has effect of “Increasing provider versatility and development productivity by not implementing non-changing data in the provider.” For example, data like robot arm length can be described in CRD instance instead of communicating contoller to get the data. To realize this function, CAO engine has a function to substitute CAO provider static information by getting necessary information from CRD file and return to client application. If CAO provider returns the value of E_CRDIMPL to the information request, CAO engine automatically get corresponding information from linked CRD through CRD provider, and return the information.(Figure B-2). In this way, application program can handle both CAO provider and CRD instance file in one set. No consideration is necessary about the information source of the data.

39

An application can access App. information as one device. X

Cao Engine switches two Engine providers automatically.

(1) Query (4) Reply

Dynamically changed (3) Query information (2) Return E_CRDIMPL Static information A Co. CRD Provider Provider

CRD File

Figure B-2 CAO engine static merge function

Function 2 has effect of “Increasing application program readability by creating necessary objects for machines automatically and separating system configuration from user program.” Figure B-shows an example. In this example, robot object Robot1, variable object Var1, and variable object Var2 under Robot1, are automatically created. This object configuration is described in CRD instance, and CAO engine automatically configure the object tree as described in the instance. In this way, application can access object without describing code for creating and deleting objects. Usually the devices composing machine is fixed at the early stage of machine development. By using this function, the fixed configuration information can be separated form application program to increase program readability.

40

1. Create an object tree (= system 3. The objects are automatically created configuration) in CRD. when CAO starts.

2. Specify the file with CaoConfig tool.

Figure B-3 Example of automatic object creation by CRD

[AddController method specification for CRD provider] This part explains only AddController method specifications of CRD provider. For details, please refer to CRD provider specifications. Controller name : Controller element name in CRD file Provider name : "CaoProv.CRD" Option string : (Table B-1)

Table B-1 CRD provider option string

Option Explanation Path= Specify CRD file path. Mandately option

Following is an example of executing AddController method.

AddController ( “RC1”, // Controller name : RC1 “CaoProv.CRD”, // Fixed “”, // Execute the provider in CAO engine process “Path=C:\ORiN2\CRD\Text.xml” // CRD file path“C:\ORiN2\CRD\Test.xml” );

1

ORiN2.1 Specifications

Part 4: CAP

Version 2.1.1

October 14, 2010

【Remarks】

2

【Revision history】

Date Rev. Content 2005/8/25 1.0.0 First edition. 2008-11-17 2.1.0 It revises it to 2.1 specifications. 2010-10-14 2.1.1 The mark mistake of the Service_Start function is corrected.

3

Contents

1. Outline ...... 4 1.1. Composition of ORiN2 specifications ...... 4 1.2. Composition of this book ...... 5 2. CAP-WSDL ...... 5 2.1. Service and port name of CAP ...... 5 2.2. CAP message and CAO interface ...... 5 2.3. CAP Message ...... 6 2.3.1.1. Service_ ...... 6 2.3.1.2. Controller_ ...... 7 2.3.1.3. Variable_ ...... 19 2.3.1.4. Robot_ ...... 25 2.3.1.5. File_ ...... 39 2.3.1.6. Task_ ...... 51 2.3.1.7. Command_ ...... 59 2.3.1.8. Extension_ ...... 66 2.3.1.9. Message_ ...... 71 3. e-CAP ...... 76 3.1. Outline...... 76 3.2. Message rule ...... 76 3.2.1. Outbound message ...... 76 3.2.2. Response message ...... 76 4. b-CAP ...... 77 4.1. Outline...... 77 4.2. Structure of b-CAP ...... 77 4.3. Packet structure ...... 79 4.3.1. Packet structure ...... 79 4.3.2. Argument part structure ...... 80 4.3.3. Function ID ...... 82 4.3.4. Return code ...... 86 4.4. Communication procedure ...... 88 4.4.1. Communication sequence ...... 88 4.4.2. b-CAP/UDP retrying sequence ...... 88 4.4.3. Communication procedure of server ...... 90 4.4.4. Communication procedure of client ...... 91

4

1. Outline

CAP(Controller Access Protocol) is a protocol to achieve the remote access between objects by way of the Internet. It communicates by using SOAP in CAP, and WSDL(Web Services Description Language) in the definition of service. This is called CAP-WSDL. It can access the CAO provider remotely by using DCOM of the CAO engine. However, the access through the Internet cannot usually do the excess of the firewall that is impossible, and exists in the enterprise etc. on substance and the remote access with the restriction on security in DCOM. Then, CAP enabled the access through the Internet by using SOAP. ..CAP.. (..the design for the CAO interface and the interface of CAP to relate closely... Figure 1-1).This is based on the design policy of ORiN to be able to use each specification (CAO,CRD,CAP) independently though concepts of the ORiN2 specification are united.

Figure 1-1 Correspondence of CAO object and CAP message

1.1. Composition of ORiN2 specifications The composition of ORiN2 specifications is as follows. Outline of first - Outline of ORiN2 The second CAO - Standard program interface CAO specification The third CRD - Standard [de-tasuki-ma] CRD specification The fourth CAP - Standard communication protocol CAP specification ← This book 5

1.2. Composition of this book The composition of this book is as follows. 1. Outline - Outline of CAP 2. CAP-WSDL - Explanation of CAP-WSDL 3. e-CAP - Explanation of e-CAP 4. b-CAP - Explanation of b-CAP Appendix 1. CAP-WSDL - CAP-WSDL definition Appendix 2. CAP Listener IDL - Interface definition for CAP server Appendix 3. CAP provider - CAO provider for CAP client

2. CAP-WSDL

2.1. Service and port name of CAP CAP communicates the message by using SOAP. The service name and the port name used as a connection information at this time are provided for as follows by CAP-WSDL.

Table 2-1 SOAP service name and port name of CAP

Service name CapListener Port name CapServicesSoapPort

2.2. CAP message and CAO interface In CAP-WSDL, to relate, the CAO interface and the CAP message are closely designed. The CAO interface and the CAP message explain how the mapping is done here in CAP. About details of CAP-WSDLAppendix A CAP-WSDLPlease refer to [wo].

Table 2-2Relation between CAP message and CAO interface

CAP message CAO interface Controller_ CaoController Command_< Method name > CaoCommand Extension_< Method name > CaoExtension File_< Method name > CaoFile Robot_< Method name > CaoRobot Task_< Method name > CaoTask Variable_< Method name > CaoVariable Message_< Method name > CaoMessage

6

Table 2-2The interface of CAP message and CAO corresponds to couple 1 like [karawakaru]. Moreover, the CAP message has the structure of "< method name of object name >_< >", and the method name of each CAO object enters for the method name.

2.3. CAP Message 2.3.1.1. Service_ Service_Start Format HRESULT ICapServices::Service_Start ([in, defaultvalue("")] BSTR bstrOption)

Function Start CapListener Parameter [in] bstrOption Option Option Meaning IStream[=] The use of the IStream provider is selected the maintenance of the CAO object. (Default:False)

Return value HRESULT Return S_OK when succeeded.

Explanation Begin CapListener startup process. This is necessary to be used at first when you use CapListener. This method starts CAO process, and increment reference counter to the CAO engine by one. Call ICapServices::Service_Stop method to end CapListener.

Service_Stop Format HRESULT ICapServices::Service_Stop ( )

Function Stop of CapListener

Parameter None.

Return value HRESULT Return S_OK when succeeded.

Explanation Terminate CapListener process. This is necessary to be used when you end CapListener. This method decrements reference counter to CAO engine by one, and if reference counter becomes 0, CAO process is terminated.

7

2.3.1.2. Controller_ Controller_Connect Format HRESULT ICapServices::Controller_Connect ( [in] BSTR bstrController, [in] BSTR bstrProvider, [in, defaultvalue("")] BSTR bstrMachine, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hController )

Function Add of controller object

Parameter [in] bstrController Controller name. When NULL is specified, the workspace name is automatically assigned.

[in] bstrProvider Provider name. Specify program ID of the CAO provider to start. Following is how to start CAO engine in remote machine and specify CAO provider. < provider name >:< remote machine name >

[in] bstrMachine Machine name. To start CAO provider in remote machine, specify the machine name or IP address.

[in] bstrOption Option Currently not used. All settings are neglected.

[out] ppICaoCtrl Address of CaoWorkspace IF pointer

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoController object, and acquire the controller object management handle in CapListener. The created controller object is managed by CapListener. Execute the ICapServices::Controller_Disconnect method when you delete the object.

8

Controller_Disconnect Format HRESULT ICapServices::Controller_Disconnect ( [in] long hController )

Function Disconnect provider

Parameter [in] hController Handle to controller object

Return value HRESULT Return S_OK when succeeded.

Explanation Disconnect device from the provider.

Controller_Execute Format HRESULT ICapServices::Controller_Execute ( [in] long hController, [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] hController Handle to controller object

[in] vntCommand Command

[out] pVal Execution result

Return value HRESULT

Return S_OK when succeeded.

Explanation Execute extension command.

Controller_GetAttribute Format HRESULT ICapServices::Controller_GetAttribute ( 9

[in] long hController, [out, retval] long* pVal )

Function Get attribute

Parameter [in] hController Handle to controller object

[out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the controller.

Controller_GetCommand Format HRESULT ICapServices::Controller_GetCommand ( [in] long hController, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hCommand )

Function Add of command object

Parameter [in] hController Handle to controller object

[in] bstrName Command name.

[in] bstrOption Option

[out] hCommand Handle to command object

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoCommand object, and get command object management handler for CapListenler. The created command object is managed by CapListener. Execute the 10

ICapServices::Command_Release method to delete the object.

Controller_GetCommandNames Format HRESULT ICapServices::Controller_GetCommandNames ( [in] long hController, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get command name list

Parameter [in] hController Handler to controller object

[in] bstrOption Option

[out] pVal Command name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get command name list.

Controller_GetExtension Format HRESULT ICapServices::Controller_GetExtension ( [in] long hController, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hExtension )

Function Add extension board object

Parameter [in] hController Handler to controller object

[in] bstrName Extension board name.

[in] bstrOption 11

Option

[out] hExtension Handler to extension board handle

Return value HRESULT Return S_OK when succeeded.

Explanation Create ICaoExtension object, and get extension board object management handle in CapListener. The created extension board object is managed by CapListener. Execute ICapServices::Extension_Release method when you delete the object.

Controller_GetExtensionNames Format HRESULT ICapServices::Controller_GetExtensionNames ( [in] long hController, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get extension board name list

Parameter [in] hController Handler to controller object

[in] bstrOption Option

[out] pVal Extension board name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board name list.

Controller_GetFile Format HRESULT ICapServices::Controller_GetFile ( [in] long hController, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hFile 12

)

Function Add file object

Parameter [in] hController Handler to controller object

[in] bstrName File name.

[in] bstrOption Option

[out] hFile Handler to file object

Return value HRESULT Return S_OK when succeeded.

Explanation Cerate the ICaoFile object, and get the file object management handle in CapListener. The created file object is managed in CapListener. Execute the ICapServices::File_Release method when you delete the object.

Controller_GetFileNames Format HRESULT ICapServices::Controller_GetFileNames ( [in] long hController, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get file name list

Parameter [in] hController Handle to controller object

[in] bstrOption Option

[out] pVal File name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name list. 13

Controller_GetHelp Format HRESULT ICapServices::Controller_GetHelp ( [in] long hController, [out, retval] BSTR* pVal )

Function Get help character string

Parameter [in] hController Handle to controller object

[out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the controller.

Controller_GetID Format HRESULT ICapServices::Controller_GetID ( [in] long hController, [out, retval] VARIANT* pVal )

Function Get ID

Parameter [in] hController Handle to controller object

[out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller's ID.

Controller_GetMessage Format HRESULT ICapServices::Controller_GetMessage ( 14

[in] long hController, [out, retval] long* hMessage )

Function Get message

Parameter [in] hController Handle to controller object

[out] hMessage Handle to message object

Return value HRESULT Return S_OK when message is received, S_FALSE if there is no message.

Explanation Get a message form provider, and return message object management handle for CapListenler. The created message object is managed by CapListener. Execute the ICapServices::Message_Release method to delete the object.

Controller_GetName Format HRESULT ICapServices::Controller_GetName ( [in] long hController, [out, retval] BSTR* pVal )

Function Get controller name

Parameter [in] hController Handle to controller object

[out] pVal Controller name

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller name of the object.

Controller_GetRobot Format HRESULT ICapServices::Controller_GetRobot ( [in] long hController, [in] BSTR bstrName, 15

[in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hRobot )

Function Add robot object

Parameter [in] hController Handle to controller object

[in] bstrName Robot name.

[in] bstrOption Option

[out] hRobot Handle to robot object

Return value HRESULT Return S_OK when succeeded.

Explanation Cerate the ICaoRobot object, and get the robot object management handle in CapListener. The created robot object is managed in CapListener. Execute the ICapServices::Robot_Release method when you delete the object.

Controller_GetRobotNames Format HRESULT ICapServices::Controller_GetRobotNames ( [in] long hController, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get robot name list

Parameter [in] hController Handle to controller object

[in] bstrOption Option

[out] pVal Robot name list

Return value HRESULT Return S_OK when succeeded. 16

Explanation Get robot name list.

Controller_GetTag Format HRESULT ICapServices::Controller_GetTag ( [in] long hController, [out, retval] VARIANT* pVal )

Function Get tag

Parameter [in] hController Handle to controller object

[out] pVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Get controller's tag.

Controller_GetTask Format HRESULT ICapServices::Controller_GetTask ( [in] long hController, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hTask )

Function Add task object

Parameter [in] hController Handle to controller object

[in] bstrName Task name.

[in] bstrOption Option

[out] hTask Handle to task object 17

Return value HRESULT Return S_OK when succeeded.

Explanation Cerate the ICaoTask object, and get the task object management handle in CapListener. The created task object is managed in CapListener. Execute the ICapServices::Task_Release method when you delete the object.

Controller_GetTaskNames Format HRESULT ICapServices::Controller_GetTaskNames ( [in] long hController, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get task name list

Parameter [in] hController Handle to controller object

[in] bstrOption Option

[out] pVal Task name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get task name list.

Controller_GetVariable Format HRESULT ICapServices::Controller_GetVariable ( [in] long hController, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hVariable )

Function Add variable object

Parameter [in] hController 18

Handle to controller object

[in] bstrName Variable name.

[in] bstrOption Option

[out] hTask Handle to variable object

Return value HRESULT Return S_OK when succeeded.

Explanation Cerate the IcaoVariable object, and get the variable object management handle in CapListener. The created variable object is managed in CapListener. Execute the ICapServices::Variable_Release method when you delete the object.

Controller_GetVariableNames Format HRESULT ICapServices::Controller_GetVariableNames ( [in] long hController, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] hController Handle to controller object

[in] bstrOption Option

[out] pVal Variable name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

19

Controller_PutID Format HRESULT ICapServices::Controller_PutID ( [in] long hController, [in] VARIANT newVal )

Function Set ID

Parameter [in] hController Handle to controller object

[in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set controller's ID.

Controller_PutTag Format HRESULT ICapServices::Controller_PutTag ( [in] long hController, [in] VARIANT newVal )

Function Set tag

Parameter [in] hController Handle to controller object

[in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set controller's tag.

2.3.1.3. Variable_ Variable_GetAttribute Format HRESULT ICapServices::Variable_GetAttribute ( 20

[in] long hVariable, [out, retval] long* pVal )

Function Get attribute

Parameter [in] hVariable Handle to variable object

[out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the variable.

Variable_GetDateTime Format HRESULT ICapServices::Variable_GetDateTime ( [in] long hVariable, [out, retval] VARIANT* pVal )

Function Get time and date stamp

Parameter [in] hVariable Handle to variable object

[out] pVal Time and date stamp

Return value HRESULT Return S_OK when succeeded.

Explanation Get time and date stamp of the variable

Variable_GetHelp Format HRESULT ICapServices::Variable_GetHelp ( [in] long hVariable, [out, retval] BSTR* pVal ) 21

Function Get help character string

Parameter [in] hVariable Handle to variable object

[out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help string of the variable.

Variable_GetID Format HRESULT ICapServices::Variable_GetID ( [in] long hVariable, [out, retval] VARIANT* pVal )

Function Get ID

Parameter [in] hVariable Handle to variable object

[out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the variable.

Variable_GetMicrosecond Format HRESULT ICapServices::Variable_GetMicrosecond ( [in] long hVariable, [out, retval] long* pVal )

Function Get time stamp (micro second)

Parameter [in] hVariable Handle to variable object 22

[out] pVal Time stamp(micro second)

Return value HRESULT Return S_OK when succeeded.

Explanation Get time stamp of the variable (micro second).

Variable_GetName Format HRESULT ICapServices::Variable_GetName ( [in] long hVariable, [out, retval] BSTR* pVal )

Function Get variable name

Parameter [in] hVariable Handle to variable object

[out] pVal Variable name

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name of the object.

Variable_GetTag Format HRESULT ICapServices::Variable_GetTag ( [in] long hVariable, [out, retval] VARIANT* pVal )

Function Get tag

Parameter [in] hVariable Handle to variable object

[out] pVal Tag

Return value HRESULT 23

Return S_OK when succeeded.

Explanation Get tag of the variable.

Variable_GetValue Format HRESULT ICapServices::Variable_GetValue ( [in] long hVariable, [out, retval] VARIANT* pVal )

Function Get variable value

Parameter [in] hVariable Handle to variable object

[out] pVal Variable value

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable value.

Variable_PutID Format HRESULT ICapServices::Variable_PutID ( [in] long hVariable, [in] VARIANT newVal )

Function Set ID

Parameter [in] hVariable Handle to variable object

[in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the variable.

24

Variable_PutTag Format HRESULT ICapServices::Variable_PutTag ( [in] long hVariable, [in] VARIANT newVal )

Function Set tag

Parameter [in] hVariable Handle to variable object

[in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set the tag of the variable.

Variable_PutValue Format HRESULT ICapServices::Variable_PutValue ( [in] long hVariable, [in] VARIANT newVal )

Function Set variable value

Parameter [in] hVariable Handle to variable object

[in] newVal Variable value

Return value HRESULT Return S_OK when succeeded.

Explanation Set the variable value.

Variable_Release Format HRESULT ICapServices::Variable_Release ( [in] long hVariable 25

)

Function Release variable object

Parameter [in] hVariable Handle to variable object

Return value HRESULT Return S_OK when succeeded.

Explanation Release the CapListener managed variable object of specified handle.

2.3.1.4. Robot_ Robot_Accelerate Format HRESULT ICapServices::Robot_Accelerate ( [in] long hRobot, [in] long lAxis, [in] float fAccel, [in] float fDecel )

Function Execute ACCEL statement

Parameter [in] hRobot Handle to robot object

[in] lAxis Joint number -1: Tool Center Point(TCP) acceleration/deceleration 0: All joint acceleration/deceleration Other joint number: acceleration / deceleration of specified joint.

[in] fAccel Acceleration

[in] fDecel Deceleration

Return value HRESULT Return S_OK when succeeded.

Explanation Set acceleration and deceleration of robot motion. Refer to the specification of the ACCEL statement of SLIM for details.

26

Robot_Change Format HRESULT ICapServices::Robot_Change ( [in] long hRobot, [in] BSTR bstrName )

Function Execute CHANGE statement

Parameter [in] hRobot Handle to robot object

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the CHANGE statement of SLIM for details.

Robot_Chuck Format HRESULT ICapServices::Robot_Chuck ( [in] long hRobot, [in] BSTR bstrOption )

Function Execute GRASP statement

Parameter [in] hRobot Handle to robot object

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the GRASP statement of SLIM for details.

Robot_Drive Format HRESULT ICapServices::Robot_Drive ( [in] long hRobot, 27

[in] long lNo, [in] float fMov, [in, defaultvalue("")] BSTR bstrOpt )

Function Execution of DRIVE sentence

Parameter [in] hRobot Handle to robot object

[in] lNo Axis number

[in] fMov Amount of movement

[in] bstrOpt Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the DRIVE statement of SLIM for details. Unlike SLIM, multi-joint motion is not supported. In the case, use ICapService::Robot_Move method.

Robot_Execute Format HRESULT ICapServices::Robot_Execute ( [in] long hRobot, [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] hRobot Handle to robot object

[in] vntCommand Command

[out] pVal Execution result 28

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command.

Appendix A.1. Robot_GetAttribute Format HRESULT ICapServices::Robot_GetAttribute ( [in] long hRobot, [out, retval] long* pVal )

Function Get attribute

Parameter [in] hRobot Handle to robot object

[out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the robot.

Robot_GetHelp Format HRESULT ICapServices::Robot_GetHelp ( [in] long hRobot, [out, retval] BSTR* pVal )

Function Get help character string

Parameter [in] hRobot Handle to robot object

[out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help character string of the robot. 29

30

Robot_GetID Format HRESULT ICapServices::Robot_GetID ( [in] long hRobot, [out, retval] VARIANT* pVal )

Function Get ID

Parameter [in] hRobot Handle to robot object

[out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the robot.

31

Robot_GetName Format HRESULT ICapServices::Robot_GetName ( [in] long hRobot, [out, retval] BSTR* pVal )

Function Get robot name

Parameter [in] hRobot Handle to robot object

[out] pVal Robot name

Return value HRESULT Return S_OK when succeeded.

Explanation Get robot name of the object.

Robot_GetTag Format HRESULT ICapServices::Robot_GetTag ( [in] long hRobot, [out, retval] VARIANT* pVal )

Function Get tag

Parameter [in] hRobot Handle to robot object

[out] pVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Get tag of the robot.

Robot_GetVariable Format HRESULT ICapServices::Robot_GetVariable ( 32

[in] long hRobot, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hVariable )

Function Add variable object

Parameter [in] hRobot Handle to robot object

[in] bstrName Variable identifier.

[in] bstrOption Option

[out] hVariable Handle to variable object

Return value HRESULT Return S_OK when succeeded.

Explanation Cerate the IcaoVariable object, and get the variable object management handle in CapListener. The created variable object is managed in CapListener. Execute the ICapServices::Variable_Release method when you delete the object.

Robot_GetVariableNames Format HRESULT ICapServices::Robot_GetVariableNames ( [in] long hRobot, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] hRobot Handle to robot object

[in] bstrOption Option

[out] pVal Variable identifier list 33

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

Robot_GoHome Format HRESULT ICapServices::Robot_GoHome ( [in] long hRobot )

Function Execute GOHOME statement

Parameter [in] hRobot Handle to robot object

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the GOHOME statement of SLIM for details.

Robot_Halt Format HRESULT ICapServices::Robot_Halt [in] long hRobot [in] BSTR bstrOption )

Function Execution of HALT sentence

Parameter [in] hRobot Steering wheel of robot object

[in] bstrOption Option

Return value HRESULT When succeeding, S_OK is returned.

Explanation Please refer to the specification of the HALT sentence of SLIM for details.

34

Robot_Hold Format HRESULT ICapServices::Robot_Hold ( [in] long hRobot [in] BSTR bstrOption )

Function Execution of GOHOME sentence

Parameter [in] hRobot Steering wheel of robot object

[in] bstrOption Option

Return value HRESULT When succeeding, S_OK is returned.

Explanation Please refer to the specification of the HOLD sentence of SLIM for details.

Robot_Move Format HRESULT ICapServices::Robot_Move ( [in] long hRobot, [in] long lComp, [in] VARIANT vntPose, [in, defaultvalue("")] BSTR bstrOpt )

Function Execute MOVE statement

Parameter [in] hRobot Handle to robot object

[in] lComp Interpolation specification. 1:PTP(point to point), 2: CP(continuous path), 3: Circular arc.

[in] vntPose Posed array Pose specification is manufacturer dependent.

[in] bstrOpt Option 35

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the MOVE statement of SLIM for details.

Robot_PutID Format HRESULT ICapServices::Robot_PutID ( [in] long hRobot, [in] VARIANT newVal )

Function Set ID

Parameter [in] hRobot Handle to robot object

[in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the robot.

Robot_PutTag Format HRESULT ICapServices::Robot_PutTag ( [in] long hRobot, [in] VARIANT newVal )

Function Set tag

Parameter [in] hRobot Handle to robot object

[in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set tag of the robot. 36

Robot_Release Format HRESULT ICapServices::Robot_Release ( [in] long hRobot )

Function Release robot object

Parameter [in] hRobot Handle to robot object

Return value HRESULT Return S_OK when succeeded.

Explanation Release the CapListener managed robot object of specified handle.

37

Robot_Rotate Format HRESULT ICapServices::Robot_Rotate ( [in] long hRobot, [in] VARIANT vntRotSuf, [in] float fDeg, [in] VARIANT vntPivot, [in, defaultvalue("")] BSTR bstrOpt ) Function Execute ROTATE statement

Parameter [in] hRobot Handle to robot object

[in] vntRotSuf Rotation plane The specification method is manufacturer dependent.

[in] fDeg Angle

[in] vntPivot Rotation center

[in] bstrOpt Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the ROTATE statement of SLIM for details.

Robot_Speed Format HRESULT ICapServices::Robot_Speed ( [in] long hRobot, [in] long lAxis, [in] float fSpeed )

Function Execute SPEED/JSPEED statement 38

Parameter [in] hRobot Handle to robot object

[in] lAxis Joint number 1: TCP speed, 0: All joint speed, other: speed for specified joint

[in] fSpeed Speed

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the SPEED/JSPEED statement of SLIM for details.

Robot_Unchuck Format HRESULT ICapServices::Robot_Unchuck ( [in] long hRobot, [in] BSTR bstrOption )

Function Execute RELEASE statement

Parameter [in] hRobot Handle to robot object

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Refer to the specification of the RELEASE statement of SLIM for details.

Robot_Unhold Format HRESULT ICapServices::Robot_ Unhold ( [in] long hRobot, [in] BSTR bstrOption )

Function Release of HALT sentence 39

Parameter [in] hRobot Steering wheel of robot object

[in] bstrOption Option

Return value HRESULT When succeeding, S_OK is returned.

Explanation Please refer to the specification of the HOLD sentence of SLIM for details.

2.3.1.5. File_ File_Copy Format HRESULT ICapServices::File_Copy ( [in] long hFile, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption )

Function Copy file

Parameter [in] hFile Handle to file object

[in] bstrName Copy destination file name

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Copy file.

File_Delete Format HRESULT ICapServices::File_Delete ( [in] long hFile, [in, defaultvalue("")] BSTR bstrOption ) 40

Function Delete file

Parameter [in] hFile Handle to file object

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Delete file.

File_Execute Format HRESULT ICapServices::File_Execute ( [in] long hFile, [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] hFile Handle to file object

[in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command.

File_GetAttribute Format HRESULT ICapServices::File_GetAttribute ( [in] long hFile, [out, retval] long* pVal ) 41

Function Get attribute

Parameter [in] hFile Handle to file object

[out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the file.

File_GetDateCreated Format HRESULT ICapServices::File_GetDateCreated ( [in] long hFile, [out, retval] VARIANT* pVal )

Function Get file creation date

Parameter [in] hFile Handle to file object

[out] pVal File creation date

Return value HRESULT Return S_OK when succeeded.

Explanation Get file creation date

File_GetDateLastAccessed Format HRESULT ICapServices::File_GetDateLastAccessed ( [in] long hFile, [out, retval] VARIANT* pVal )

Function Get last file access date

Parameter [in] hFile Handle to file object 42

[out] pVal The last file access date

Return value HRESULT Return S_OK when succeeded.

Explanation Get last file access date.

File_GetDateLastModified Format HRESULT ICapServices::File_GetDateLastModified ( [in] long hFile, [out, retval] VARIANT* pVal )

Function Get last file modified date

Parameter [in] hFile Handle to file object

[out] pVal Last file modified date

Return value HRESULT Return S_OK when succeeded.

Explanation Get last file modified date

File_GetFile Format HRESULT ICapServices::File_GetFile ( [in] long hParetntFile, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hFile )

Function Add file object

Parameter [in] hFile Handle to file object

[in] bstrName File name. 43

[in] bstrOption Option

[out] hFile Handle to file object

Return value HRESULT Return S_OK when succeeded.

Explanation Cerate the IcaoFile object, and get the file object management handle in CapListener. The created file object is managed in CapListener. Execute the ICapServices::File_Release method when you delete the object

File_GetFileNames Format HRESULT ICapServices::File_GetFileNames ( [in] long hFile, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get file name list

Parameter [in] hFile Handle to file object

[in] bstrOption Option

[out] pVal File name list

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name list.

File_GetHelp Format HRESULT ICapServices::File_GetHelp ( [in] long hFile, [out, retval] BSTR* pVal ) 44

Function Get help character string

Parameter [in] hFile Handle to file object

[out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help character string of the file.

File_GetID Format HRESULT ICapServices::File_GetID ( [in] long hFile, [out, retval] VARIANT* pVal )

Function Get ID

Parameter [in] hFile Handle to file object

[out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the file.

File_GetName Format HRESULT ICapServices::File_GetName ( [in] long hFile, [out, retval] BSTR* pVal )

Function Get file name

Parameter [in] hFile Handle to file object 45

[out] pVal File name

Return value HRESULT Return S_OK when succeeded.

Explanation Get file name of the object.

File_GetPath Format HRESULT ICapServices::File_GetPath ( [in] long hFile, [out, retval] BSTR* pVal )

Function Get file path

Parameter [in] hFile Handle to file object

[out] pVal File path

Return value HRESULT Return S_OK when succeeded.

Explanation Get file path

File_GetSize Format HRESULT ICapServices::File_GetSize ( [in] long hFile, [out, retval] long* pVal )

Function Get file size

Parameter [in] hFile Handle to file object

[out] pVal file size

Return value HRESULT 46

Return S_OK when succeeded.

Explanation Get file size

File_GetTag Format HRESULT ICapServices::File_GetTag ( [in] long hFile, [out, retval] VARIANT* pVal )

Function Set tag

Parameter [in] hFile Handle to file object

[in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set tag of the file.

File_GetType Format HRESULT ICapServices::File_GetType ( [in] long hFile, [out, retval] BSTR* pVal )

Function Get file type

Parameter [in] hFile Handle to file object

[out] pVal File type

Return value HRESULT Return S_OK when succeeded.

Explanation Get type of the file.

47

File_GetValue Format HRESULT ICapServices::File_GetValue ( [in] long hFile, [out, retval] VARIANT* pVal )

Function Get file data

Parameter [in] hFile Handle to file object

[out] pVal File data

Return value HRESULT Return S_OK when succeeded.

Explanation Get file data.

File_GetVariable Format HRESULT ICapServices::File_GetVariable ( [[in] long hFile, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hVariable )

Function Add variable object

Parameter [in] hFile Handle to file object

[in] bstrName Variable identifier.

[in] bstrOption Option

[out] hVariable Handle to variable object

Return value HRESULT Return S_OK when succeeded. 48

Explanation Cerate the IcaoVariable object, and get the variable object management handle in CapListener. The created variable object is managed in CapListener. Execute the ICapServices::Variable_Release method when you delete the object

File_GetVariableNames Format HRESULT ICapServices::File_GetVariableNames ( [in] long hFile, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] hFile Handle to file object

[in] bstrOption Option

[out] pVal Variable identifier list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

File_Move Format HRESULT ICapServices::File_Move ( [in] long hFile, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption )

Function Move file

Parameter [in] hFile Handle to file object

[in] bstrName Destination file name 49

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Move file

File_PutID Format HRESULT ICapServices::File_PutID ( [in] long hFile, [in] VARIANT newVal )

Function Set ID

Parameter [in] hFile Handle to file object

[in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set file ID

File_PutTag Format HRESULT ICapServices::File_PutTag ( [in] long hFile, [in] VARIANT newVal )

Function Set tag

Parameter [in] hFile Handle to file object

[in] newVal Tag

Return value HRESULT 50

Return S_OK when succeeded.

Explanation Set file tag.

File_PutValue Format HRESULT ICapServices::File_PutValue ( [in] long hFile, [in] VARIANT newVal )

Function Set file data

Parameter [in] hFile Handle to file object

[in] newVal File data

Return value HRESULT Return S_OK when succeeded.

Explanation Set file data.

File_Release Format HRESULT ICapServices::File_Release ( [in] long hFile )

Function Release file object

Parameter [in] hFile Handle to file object

Return value HRESULT Return S_OK when succeeded.

Explanation Release CapListener managed file object of specified handle.

File_Run Format HRESULT ICapServices::File_Run ( 51

[in] long hFile, [in, defaultvalue("")] BSTR bstrOption, [out, retval] BSTR* bstrName )

Function Task creation

Parameter [in] hFile Handle to file object

[in] bstrOption Option

[out] bstrName Task name

Return value HRESULT Return S_OK when succeeded.

Explanation Generate a task from the file, and return the generated task name.

2.3.1.6. Task_ Task_Delete Format HRESULT ICapServices::Task_Delete ( [in] long hTask, [in, defaultvalue("")] BSTR bstrOption )

Function Delete task

Parameter [in] hTask Handle to task object

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Delete task.

52

Task_Execute Format HRESULT ICapServices::Task_Execute ( [in] long hTask, [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] hTask Handle to task object

[in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command.

Task_GetAttribute Format HRESULT ICapServices::Task_GetAttribute ( [in] long hTask, [out, retval] long* pVal )

Function Get attribute

Parameter [in] hTask Handle to task object

[out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the task.

53

Task_GetFileName Format HRESULT ICapServices::Task_GetFileName ( [in] long hTask, [out, retval] BSTR* pVal )

Function Get corresponding file name

Parameter [in] hTask Handle to task object

[out] pVal Corresponding file name

Return value HRESULT Return S_OK when succeeded.

Explanation Get the file name that corresponds to the task.

Task_GetHelp Format HRESULT ICapServices::Task_GetHelp ( [in] long hTask, [out, retval] BSTR* pVal )

Function Get help character string

Parameter [in] hTask Handle to task object

[out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help character string of the task.

Task_GetID Format HRESULT ICapServices::Task_GetID ( [in] long hTask, 54

[out, retval] VARIANT* pVal )

Function Get ID

Parameter [in] hTask Handle to task object

[out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the task.

Task_GetName Format HRESULT ICapServices::Task_GetName ( [in] long hTask, [out, retval] BSTR* pVal )

Function Get task name

Parameter [in] hTask Handle to task object

[out] pVal Task name

Return value HRESULT Return S_OK when succeeded.

Explanation Get task name of the object.

Task_GetTag Format HRESULT ICapServices::Task_GetTag ( [in] long hTask, [out, retval] VARIANT* pVal )

Function Get tag 55

Parameter [in] hTask Handle to task object

[out] pVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Get tag of the task.

Task_GetVariable Format HRESULT ICapServices::Task_GetVariable ( [in] long hTask, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hVariable )

Function Add variable object

Parameter [in] hTask Handle to task object

[in] bstrName Variable identifier.

[in] bstrOption Option

[out] hVariable Steering wheel of variable object

Return value HRESULT Return S_OK when succeeded.

Explanation Cerate the IcaoVariable object, and get the variable object management handle in CapListener. The created variable object is managed in CapListener. Execute the ICapServices::Variable_Release method when you delete the object.

Task_GetVariableNames Format HRESULT ICapServices::Task_GetVariableNames ( 56

[in] long hTask, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list

Parameter [in] hTask Handle to task object

[in] bstrOption Option

[out] pVal Variable identifier list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

Task_PutID Format HRESULT ICapServices::Task_PutID ( [in] long hTask, [in] VARIANT newVal )

Function Set ID

Parameter [in] hTask Handle to task object

[in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the task.

Task_PutTag Format HRESULT ICapServices::Task_PutTag ( [in] long hTask, 57

[in] VARIANT newVal )

Function Set tag

Parameter [in] hTask Handle to task object

[in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set the tag of the task.

Task_Release Format HRESULT ICapServices::Task_Release ( [in] long hTask )

Function Release task object

Parameter [in] hTask Handle to task object

Return value HRESULT Return S_OK when succeeded.

Explanation Release the CapListener managed file object of specified handle.

Task_Start Format HRESULT ICapServices::Task_Start ( [in] long hTask, [in] long lMode, [in, defaultvalue("")] BSTR bstrOption )

Function Start task

Parameter [in] hTask Handle to task object 58

[in] lMode Mode 1: one cycle execution, 2: continuous cycle execution, 3: one step forward execution, 4:one step backward execution.

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Start the execution of the task.

Task_Stop Format HRESULT ICapServices::Task_Stop ( [in] long hTask, [in] long lMode, [in, defaultvalue("")] BSTR bstrOption )

Function Stop task

Parameter [in] hTask Handle to task object

[in] lMode Mode 0: default stop 1: immediate stop 2: step stop 3: cycle stop 4: initialization stop (The default stop is one of above mentioned stop type.)

[in] bstrOption Option

Return value HRESULT Return S_OK when succeeded.

Explanation Stop the executing task. 59

2.3.1.7. Command_ Command_Cancel Format HRESULT ICapServices::Command_Cancel ( [in] long hCommand )

Function Cancellation of command

Parameter [in] hCommand Handle to command object

Return value HRESULT Return S_OK when succeeded.

Explanation Cancel the command execution.

Command_Execute Format HRESULT ICapServices::Command_Execute ( [in] long hCommand, [in] long lMode )

Function Execution of extension command

Parameter [in] hCommand Handle to command object

[in] lMode Mode Bit1=0: synchronous execution, =1: asynchronous execution Other bits are provider dependent.

Return value HRESULT Return S_OK when succeeded. Return S_FALSE for asynchronously execution.

Explanation Execute extension command. Execute ICapService::Command_GetResult method to get the execution result of the command.

60

Command_GetAttribute Format HRESULT ICapServices::Command_GetAttribute ( [in] long hCommand, [out, retval] long* pVal )

Function Get attribute

Parameter [in] hCommand Handle to command object

[out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the command.

Command_GetHelp Format HRESULT ICapServices::Command_GetHelp ( [in] long hCommand, [out, retval] BSTR* pVal )

Function Get help character string

Parameter [in] hCommand Handle to command object

[out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help character string of the command.

Command_GetID Format HRESULT ICapServices::Command_GetID ( [in] long hCommand, 61

[out, retval] VARIANT* pVal )

Function Get ID

Parameter [in] hCommand Handle to command object

[out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the command.

Command_GetName Format HRESULT ICapServices::Command_GetName ( [in] long hCommand, [out, retval] BSTR* pVal )

Function Get command name

Parameter [in] hCommand Handle to command object

[out] pVal Command name

Return value HRESULT Return S_OK when succeeded.

Explanation Get command name of the object.

Command_GetParameters Format HRESULT ICapServices::Command_GetParameters ( [in] long hCommand, [out, retval] VARIANT* pVal )

Function Get parameter 62

Parameter [in] hCommand Handle to command object

[out] pVal Parameter

Return value HRESULT Return S_OK when succeeded.

Explanation Get parameter of the command execution.

Command_GetResult Format HRESULT ICapServices::Command_GetResult ( [in] long hCommand, [in] VARIANT* pVal )

Function Get execution result

Parameter [in] hCommand Handle to command object

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded. Return the error code here when there is an error on command execution.

Explanation Get the execution result of latest executed ICapServices::Command_Execute method.

Command_GetState Format HRESULT ICapServices::Command_GetState ( [in] long hCommand, [out, retval] long* pVal )

Function Get execution state

Parameter [in] hCommand Handle to command object

[out] pVal 63

State Bit1=0: standby, =1:executing Other bits are provider dependent.

Return value HRESULT Return S_OK when succeeded.

Explanation Get the execution state of the command.

Command_GetTag Format HRESULT ICapServices::Command_GetTag ( [in] long hCommand, [out, retval] VARIANT* pVal )

Function Get tag

Parameter [in] hCommand Handle to command object

[out] pVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Get tag of the task.

Command_GetTimeout Format HRESULT ICapServices::Command_GetTimeout ( [in] long hCommand, [out, retval] long* pVal )

Function Get time-out time

Parameter [in] hCommand Handle to command object

[out] pVal Time-out time 64

Return value HRESULT Return S_OK when succeeded.

Explanation Get command execution time-out time.

Command_PutID Format HRESULT ICapServices::Command_PutID ( [in] long hCommand, [in] VARIANT newVal )

Function Set ID

Parameter [in] hCommand Handle to command object

[in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the command.

Command_PutParameters Format HRESULT ICapServices::Command_PutParameters ( [in] long hCommand, [in] VARIANT newVal )

Function Set parameter

Parameter [in] hCommand Handle to command object

[in] newVal Parameter

Return value HRESULT Return S_OK when succeeded.

Explanation Set parameter for command execution. 65

Command_PutTag Format HRESULT ICapServices::Command_PutTag ( [in] long hCommand, [in] VARIANT newVal )

Function Set tag

Parameter [in] hCommand Handle to command object

[in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set tag of the task.

Command_PutTimeout Format HRESULT ICapServices::Command_PutTimeout ( [in] long hCommand, [in] long newVal )

Function Set time-out time

Parameter [in] hCommand Handle to command object

[in] newVal Time-out time

Return value HRESULT Return S_OK when succeeded.

Explanation Set the command execution time-out time.

Command_Release Format HRESULT ICapServices::Command_Release ( 66

[in] long hCommand )

Function Release command object

Parameter [in] hCommand Handle to command object

Return value HRESULT Return S_OK when succeeded.

Explanation Release the CapListener managed command object of specified handle.

2.3.1.8. Extension_ Extension_Execute Format HRESULT ICapServices::Extension_Execute ( [in] long hExtension, [in] VARIANT vntCommand, [out, retval] VARIANT* pVal )

Function Execute extension command

Parameter [in] hExtension Handle to extension board object

[in] vntCommand Command

[out] pVal Execution result

Return value HRESULT Return S_OK when succeeded.

Explanation Execute extension command.

Extension_GetAttribute Format HRESULT ICapServices::Extension_GetAttribute ( [in] long hExtension, [out, retval] long* pVal ) 67

Function Get attribute

Parameter [in] hExtension Handle to extension board object

[out] pVal Attribute

Return value HRESULT Return S_OK when succeeded.

Explanation Get attribute value of the enhancing board.

Extension_GetHelp Format HRESULT ICapServices::Extension_GetHelp ( [in] long hExtension, [out, retval] BSTR* pVal )

Function Get help character string

Parameter [in] hExtension Handle to extension board object

[out] pVal Help character string

Return value HRESULT Return S_OK when succeeded.

Explanation Get help character string of the enhancing board.

Extension_GetID Format HRESULT ICapServices::Extension_GetID ( [in] long hExtension, [out, retval] VARIANT* pVal )

Function Get ID

Parameter [in] hExtension Handle to extension board object 68

[out] pVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Get ID of the enhancing board.

Extension_GetName Format HRESULT ICapServices::Extension_GetName ( [in] long hExtension, [out, retval] BSTR* pVal )

Function Get extension board name

Parameter [in] hExtension Handle to extension board object

[out] pVal Exetnsion board name

Return value HRESULT Return S_OK when succeeded.

Explanation Get extension board name of the object.

Extension_GetTag Format HRESULT ICapServices::Extension_GetTag ( [in] long hExtension, [out, retval] VARIANT* pVal )

Function Get tag

Parameter [in] hExtension Handle to extension board object

[out] pVal Tag

Return value HRESULT 69

Return S_OK when succeeded.

Explanation Get tag of the extension board.

Extension_GetVariable Format HRESULT ICapServices::Extension_GetVariable ( [in] long hExtension, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long* hVariable )

Function Add variable object

Parameter [in] hExtension Handle to extension board object

[in] bstrName Variable identifier.

[in] bstrOption Option

[out] hVariable Handle to variable object

Return value HRESULT Return S_OK when succeeded.

Explanation Cerate the IcaoVariable object, and get the variable object management handle in CapListener. The created variable object is managed in CapListener. Execute the ICapServices::Variable_Release method when you delete the object.

Extension_GetVariableNames Format HRESULT ICapServices::Extension_GetVariableNames ( [in] long hExtension, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT* pVal )

Function Get variable name list 70

Parameter [in] hExtension Handle to extension board object

[in] bstrOption Option

[out] pVal Variable identifier list

Return value HRESULT Return S_OK when succeeded.

Explanation Get variable name list.

Extension_PutID Format HRESULT ICapServices::Extension_PutID ( [in] long hExtension, [in] VARIANT newVal )

Function Set ID

Parameter [in] hExtension Handle to extension board object

[in] newVal ID

Return value HRESULT Return S_OK when succeeded.

Explanation Set ID of the extension board.

Extension_PutTag Format HRESULT ICapServices::Extension_PutTag ( [in] long hExtension, [in] VARIANT newVal )

Function Set tag

Parameter [in] hExtension 71

Handle to extension board object

[in] newVal Tag

Return value HRESULT Return S_OK when succeeded.

Explanation Set the tag of the extension board.

Extension_Release Format HRESULT ICapServices::Extension_Release ( [in] long hExtension )

Function Release extension board object

Parameter [in] hExtension

Handle to extension board object

Return value HRESULT Return S_OK when succeeded.

Explanation Release the CapListener managed extension board object of specified handle.

2.3.1.9. Message_ Message_Clear Format HRESULT ICapServices::Message_Clear ( [in] long hMessage )

Function Clear message

Parameter [in] hMessage Handle to message object

Return value HRESULT Return S_OK when succeeded.

Explanation Clear message.

72

Message_GetDateTime Format HRESULT ICapServices::Message_GetDateTime ( [in] long hMessage, [out, retval] VARIANT* pVal )

Function Get creation date

Parameter [in] hMessage Handle to message object

[out] pVal Creation date

Return value HRESULT Return S_OK when succeeded.

Explanation Get creation date of the message.

Message_GetDescription Format HRESULT ICapServices::Message_GetDescription ( [in] long hMessage, [out, retval] BSTR* pVal )

Function Get description

Parameter [in] hMessage Handle to message object

[out] pVal description

Return value HRESULT Return S_OK when succeeded.

Explanation Get description of message

Message_GetDestination Format HRESULT ICapServices::Message_GetDestination ( [in] long hMessage, 73

[out, retval] BSTR* pVal )

Function Get destination

Parameter [in] hMessage Handle to message object

[out] pVal destination

Return value HRESULT Return S_OK when succeeded.

Explanation Get message destination

Message_GetNumber Format HRESULT ICapServices::Message_GetNumber ( [in] long hMessage, [out, retval] long* pVal ) Function Get message number

Parameter [in] hMessage Handle to message object

[out] pVal Message number

Return value HRESULT Return S_OK when succeeded.

Explanation Get message number of the enhancing board.

Message_GetSerialNumber Format HRESULT ICapServices::Message_GetSerialNumber ( [in] long hMessage, [out, retval] long* pVal )

Function Get message serial number 74

Parameter [in] hMessage Handle to message object

[out] pVal Message serial number

Return value HRESULT Return S_OK when succeeded.

Explanation Get serial number for the message.

Message_GetSource Format HRESULT ICapServices::Message_GetSource ( [in] long hMessage, [out, retval] BSTR* pVal )

Function Get source of the message

Parameter [in] hMessage Handle to message object

[out] pVal source of the message

Return value HRESULT Return S_OK when succeeded.

Explanation Get source of the message

Message_GetValue Format HRESULT ICapServices::Message_GetValue ( [in] long hMessage, [out, retval] VARIANT* pVal )

Function Get message text

Parameter [in] hMessage Handle to message object

[out] pVal 75

Text

Return value HRESULT Return S_OK when succeeded.

Explanation Get text of the message.

Message_Release Format HRESULT ICapServices::Message_Release ( [in] long hMessage )

Function Release message object

Parameter [in] hMessage Handle to message object

Return value HRESULT Return S_OK when succeeded.

Explanation Release the CapListener managed message object of specified handle.

Message_Reply Format HRESULT ICapServices::Message_Reply ( [in] long hMessage, [in] VARIANT vntData )

Function Reply message

Parameter [in] hMessage Handle to message object

[out] pVal Reply data

Return value HRESULT Return S_OK when succeeded.

Explanation Reply message.

76

3. e-CAP

3.1. Outline E-CAP is a protocol to transmit the command to remote PC by using HTTP by abbreviating Embedded CAP. It takes time to mounting when the server side is not Windows machine because it uses SOAP in CAP. Therefore, to become simpler than CAP, it is designed in e-CAP.

3.2. Message rule 3.2.1. Outbound message The transmission command of e-CAP is described according to the following rules. ・ The HTTP command uses the “POST" command. ・ The parameter used is assumed to be “Arg5" from “Func" and “Arg1". ・ “Func" The argument of the execution method is sequentially put from the execution method and “Arg1" in “Arg5" in the parameter. At this time, the dead letter character is set in the argument not used. ・ URL is encoded and the value of each parameter is transmitted. ・ “Content-Type: application/x-www-form-urlencoded" is put in HTTP header.

(example)Command when the following methods are executed with IE6.0 AddController("Sample", "CaoProv.Sample", "", "Option=Sample")

・Outbound message POST /eCap/eCapListener.dll? HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* Accept-Language: ja Content-Type: application/x-www-form-urlencoded Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Host: localhost:8080 Content-Length: 83 Connection: Keep-Alive Cache-Control: no-cache

Func=AddController&Arg1=Sample&Arg2=CaoProv.Sample&Arg3=&Arg4=Option%3Dsample&Arg5=

3.2.2. Response message The response message replies by the following formats. [,,]

: Integral value of HRESULT type : Data type written by VARTYPE type : Character-string data converted by data type

77

4. b-CAP

4.1. Outline B-CAP(Bynary CAP) is a protocol that aims at the improvement of the transmission rate following the concept of CAP. As a result, b-CAP has the following features similar to the CAP family. ・ Service structure similar to object model of CAO provider ・ Function call for which object object is specified with object ID ・ The event from the server is achieved by polling.

B-CAP is mounted as TCP stream communication. Free protocol to make an error in protocol in subordinate position layer because this doesn't have check code in packet of b-CAP is necessary

4.2. Structure of b-CAP B-CAP has the service structure similar to the object model of the CAO provider, and one b-CAP message corresponds to one service (function). This structure is shown in figure below.

CAOエンジン

CaoEngine b-CAP関数ID

CaoWorkspace CAOプロバイダ ID 関数名 CaoController CaoProvController 3 Controller_Connect CaoFile CaoProvFile 42 File_Copy CaoRobot CaoProvRobot 72 Robot_Move CaoTask CaoProvTask 88 Task_Start CaoVariable CaoProvVariable 101 Variable_getValue

Figure 4-1 Structure of b-CAP

B-CAP executes the b-CAP client and service that demands service and is composed of two programs of the b-CAP server that returns the result. The request message that stores information necessary for the demanded service is made, and the b-CAP client is transmitted to the server side. Afterwards, the response message is received and the execution result is confirmed. In the b-CAP server, the request message from the client is received, and service corresponding to function ID is executed. After service is executed, the result and the value are stored in the response message, and it transmits to 78 the client side. Please refer to Figure 4-2 for details of the processing procedure of the client and the server. The connection example by b-CAP is shown as follows.

Figure 4-2 Example of connecting b-CAP 79

4.3. Packet structure 4.3.1. Packet structure Messages of b-CAP are the following structures.

括弧内の数値はサイズ(単位:バイト)

SOH メッセージ長 シリアル番号 予約領域 関数ID or リターンコード 引数の数 (1) (4) (2) (2) (4) (2)

ヘッダ情報部

引数1 引数n EOT ・・・ (可変長) (可変長) (1)

引数部

Figure 4-3 Packet structure

The explanation of each element of the packet is shown as follows. The image of the memory of each data is stored here by the Intel method (little endian).

・Header Start code applied to head of packet. SOH(0x05) is used. ・Message length Data length of the entire packet. Long integer (DWORD) of the sign none is stored. Length from the header to the terminator is stored. ・Serial number Serial number of message. Short integer of sign none type (WORD) is stored. Arbitrary figure of WORD_MAX from one. This value is matched to the request message by the response message. ・Reservation area It is an area that has been reserved with the system. This area always stores 0. The serial number before ..retrying.. is buried under this area when [ritoraipaketto] is transmitted for b-CAP/UDP. ・Function ID ID that identifies the visited function . Long integer (DWORD) of the sign none is stored. It uses it only at the request message. (4.3.3 Reference) ・Return code Execution result code of visited function. Long integer (DWORD) of the sign none is stored. It uses it only at the response message. (4.3.4 Reference) ・Number of arguments Number of arguments of visited function or numbers of output variables of visited function. Short integer of sign none type (WORD) is stored. ・Argument n Nth argument part. (4.3.2 Reference) ・Terminator End code applied at the end of packet. EOT(0x04) is used. 80

4.3.2. Argument part structure The argument part is made to take a variable-length structure according to the data type, and to write two or more data types and done. The structure of the argument part is shown as follows.

括弧内の数値はサイズ(単位:バイト)

引数データ長 データ型 要素数 データ (4) (2) (4) (データ型ごとのサイズ)

Figure 4-4 Structure of argument part

The argument part is composed of the data type and the number of elements as a common part. As for the data division, the structure is decided based on information on the commonness part. The explanation of each element of the argument part is shown as follows.

・Argument data length Data type, number of elements, and number of data of total bytes. Long integer (DWORD) of the sign none is stored. Please refer to Table 4-1 for the size of each data type. ・Data type Data type of argument. Short integer of sign none type (WORD) is stored. Please refer to Table 4-1 for the data type that can be used. ・Number of elements Number of elements of arguments. Short integer of sign none type (WORD) is stored. Whenever VT_ARRAY is not used for the data type, it makes it to one. ・Data division Data of argument. The size used according to the data type is different. Please refer to Table 4-1 for the size of each data.Moreover, please refer to Figure 4-5 for the structure of the information to be stored the data division..

Table 4-1 Data type that can be used

Data type Value Size (Byte) Explanation VT_EMPTY 0 0 Empty data VT_NULL 1 0 NULL value VT_ERROR 10 2 Error code VT_UI1 17 1 Binary VT_I2 2 2 Short integer VT_UI2 18 2 Short integer of sign none VT_I4 3 4 Length integer VT_UI4 19 4 Length of sign none integer VT_R4 4 4 Single-precision floating point VT_R8 5 8 Double-precision floating point 81

VT_CY 6 8 Currency type VT_DATE 7 8 Date type VT_BOOL 11 2 Boolean type VT_BSTR 8 Number of The character string length enters four characters×2+ character string type head bytes. The character 4 string is stored with Unicode behind the character string length. VT_VARIANT 12 - The same one as the argument part enters the Variant type data. Only at VT_ARRAY, it is possible to use it. VT_ARRAY 0x2000 - It specifies it by the logical add with the data type of the array and others. The data of the specified type is continuously stored.

括弧内の数値はサイズ(単位:バイト) ・VT_BSTR、VT_VARIANT、VT_ARRAY以外のデータ

データ (データ型ごとのサイズ(別表参照))

・VT_BSTR

文字列長 文字列データ ・ 文字列はUnicode文字列で格納 (4) (文字列長) ・ 文字列の最後にNULL文字は含めない

・VT_VARIANT

データ型 要素数 データ ・引数部と同じ構造 (2) (4) (データ型ごとのサイズ) ・VT_ARRAYのときのみ使用

・VT_ARRAY

データ1 データn ・・・ (データ型ごとのサイズ(別表参照)) (データ型ごとのサイズ(別表参照))

Figure 4-5 Structure of data 82

4.3.3. Function ID Function ID is allotted in b-CAP as follows.

Table 4-2 Function ID allocation

Function ID Explanation

1~137 Predetermined function 138~255 Reservation area 255~ User function

It is possible to use it by allocating an arbitrary function in the user function to use functions other than a predetermined function. The list of a predetermined function of b-CAP is shown below.

Table 4-3 Predetermined function list

Function ID Function name Explanation 1 Service_Start Beginning of server service 2 Service_Stop Stop of server service 3 Controller_Connect Connection with controller 4 Controller_Disconnect Cutting with controller 5 Controller_GetExtension The controller's extension board acquisition 6 Controller_GetFile The controller's file acquisition 7 Controller_GetRobot The controller's robot acquisition 8 Controller_GetTask The controller's task acquisition 9 Controller_GetVariable The controller's variable acquisition 10 Controller_GetCommand The controller's command acquisition 11 Controller_GetExtensionNames The controller's extension board name list acquisition 12 Controller_GetFileNames The controller's file name list acquisition 13 Controller_GetRobotNames The controller's robot name list acquisition 14 Controller_GetTaskNames The controller's task name list acquisition 15 Controller_GetVariableNames The controller's variable identifier list acquisition 16 Controller_GetCommandNames The controller's command name list acquisition 17 Controller_Execute Execution of controller's enhancing 83

function 18 Controller_GetMessage The controller's event message acquisition 19 Controller_GetAttribute The controller's attribute value acquisition 20 Controller_GetHelp The controller's help character string acquisition 21 Controller_GetName The controller's name acquisition 22 Controller_GetTag The controller's tag information acquisition 23 Controller_PutTag The controller's tag information setting 24 Controller_GetID The controller's ID acquisition 25 Controller_PutID The controller's ID setting 26 Extension_GetVariable Acquisition of variable of extension board 27 Extension_GetVariableNames Acquisition of list of variable identifier of extension board 28 Extension_Execute Execution of enhancing function of extension board 29 Extension_GetAttribute Attribute value acquisition of extension board 30 Extension_GetHelp Acquisition of help character string of extension board 31 Extension_GetName Acquisition of name of extension board 32 Extension_GetTag Acquisition of tag information on extension board 33 Extension_PutTag Setting of tag information on extension board 34 Extension_GetID ID acquisition of extension board 35 Extension_PutID ID setting of extension board 36 Extension_Release Liberating of extension board 37 File_GetFile Another file acquisition of file 38 File_GetVariable Acquisition of variable of file 39 File_GetFileNames Acquisition of list of another file name of file 40 File_GetVariableNames Acquisition of list of variable identifier of file 41 File_Execute Execution of enhancing function of file 42 File_Copy Copy of file 43 File_Delete Deletion of file 44 File_Move Movement of file 84

45 File_Run Execution of file 46 File_GetDateCreated Acquisition at the date of file 47 File_GetDateLastAccessed Acquisition at the final access date of file 48 File_GetDateLastModified Acquisition at last updated date and time of file 49 File_GetPath Passing acquisition of file 50 File_GetSize Size acquisition of file 51 File_GetType File type acquisition of file 52 File_GetValue Acquisition of content of file 53 File_PutValue Setting of content of file 54 File_GetAttribute Attribute acquisition of file 55 File_GetHelp Acquisition of help character string of file 56 File_GetName Acquisition of name of file 57 File_GetTag Acquisition of tag information on file 58 File_PutTag Setting of tag information on file 59 File_GetID ID acquisition of file 60 File_PutID ID setting of file 61 File_Release Liberating of file 62 Robot_GetVariable Acquisition of variable of robot 63 Robot_GetVariableNames Acquisition of list of variable identifier of robot 64 Robot_Execute Execution of enhancing function of robot 65 Robot_Accelerate Execution of ACCEL sentence of robot 66 Robot_Change Execution of CHANGE sentence of robot 67 Robot_Chuck Execution of GRASP sentence of robot 68 Robot_Drive Execution of DRIVE sentence of robot 69 Robot_GoHome Execution of GOHOME sentence of robot 70 Robot_Halt Execution of HALT sentence of robot 71 Robot_Hold Execution of HOLD sentence of robot 72 Robot_Move Execution of MOVE sentence of robot 73 Robot_Rotate Execution of ROTATE sentence of robot 74 Robot_Speed Execution of SPEED/JSPEED sentence of robot 75 Robot_Unchuck Execution of REELASE sentence of robot 76 Robot_Unhold Release of HOLD sentence of robot 77 Robot_GetAttribute Attribute value acquisition of robot 78 Robot_GetHelp Acquisition of help character string of robot 85

79 Robot_GetName Acquisition of name of robot 80 Robot_GetTag Acquisition of tag information on robot 81 Robot_PutTag Setting of tag information on robot 82 Robot_GetID ID acquisition of robot 83 Robot_PutID ID setting of robot 84 Robot_Release Liberating of robot 85 Task_GetVariable Acquisition of variable of task 86 Task_GetVariableNames Acquisition of list of variable identifier of task 87 Task_Execute Execution of enhancing function of task 88 Task_Start Beginning of task 89 Task_Stop Stop of task 90 Task_Delete Deletion of task 91 Task_GetFileName Former file name of task 92 Task_GetAttribute Attribute acquisition of task 93 Task_GetHelp Acquisition of help character string of task 94 Task_GetName Acquisition of name of task 95 Task_GetTag Acquisition of tag information on task 96 Task_PutTag Setting of tag information on task 97 Task_GetID ID acquisition of task 98 Task_PutID ID setting of task 99 Task_Release Liberating of task 100 Variable_GetDateTime Stamp acquisition of time of variable 101 Variable_GetValue Value acquisition of variable 102 Variable_PutValue Value setting of variable 103 Variable_GetAttribute Attribute value acquisition of variable 104 Variable_GetHelp Acquisition of help character string of variable 105 Variable_GetName Acquisition of name of variable 106 Variable_GetTag Acquisition of tag information on variable 107 Variable_PutTag Setting of tag information on variable 108 Variable_GetID ID acquisition of variable 109 Variable_PutID ID setting of variable 110 Variable_GetMicrosecond Time stamp (millisecond) acquisition of variable 111 Variable_Release Liberating of variable 112 Command_Execute Execution of command 113 Command_Cancel Cancellation of command 86

114 Command_GetTimeout Acquisition at time-out time of command 115 Command_PutTimeout Setting at time-out time of command 116 Command_GetState State acquisition of command 117 Command_GetParameters Acquisition of parameter of command 118 Command_PutParameters Setting of parameter of command 119 Command_GetResult Execution result acquisition of command 120 Command_GetAttribute Attribute value acquisition of command 121 Command_GetHelp Acquisition of help character string of command 122 Command_GetName Acquisition of name of command 123 Command_GetTag Acquisition of tag information on command 124 Command_PutTag Setting of tag information on command 125 Command_GetID ID acquisition of command 126 Command_PutID ID setting of command 127 Command_Release Liberating of command 128 Message_Reply Response of event message 129 Message_Clear Clearness of event message 130 Message_GetDateTime Stamp acquisition of time of event message 131 Message_GetDescription Acquisition of explanation of event message 132 Message_GetDestination Destination acquisition of event message 133 Message_GetNumber Acquisition of message number of event message 134 Message_GetSerialNumber Acquisition of serial number of event message 135 Message_GetSource Former transmission acquisition of event message 136 Message_GetValue Value acquisition of event message 137 Message_Release Liberating of event message

4.3.4. Return code The return code is allotted in b-CAP as follows.

Table 4-4 Allocation of return code

Return code Explanation 0x00000000~0x8000FFFF Predetermined return code and reservation area 0x80010000~0x8001FFFF User definition error 87

When the error codes other than the following "Predetermined error code" are made, an arbitrary error code can be allocated within the range of the value of "User definition error".

Table 4-5 Predetermined return code list

Return code Error Explanation 0x00000000 S_OK Normal termination. 0x80004001 E_NOTIMPL Unmounting. 0x80004004 E_ABORT The function was interrupted. 0x80004005 E_FAIL The function failed. 0x80070005 E_ACCESSDENIED It is not possible to access it. 0x80070006 E_HANDLE The steering wheel is illegal. 0x8007000E E_OUTOFMEMORY The memory is insufficient. 0x80070057 E_INVALIDARG The argument is illegal. 0x8000FFFF E_UNEXPECTED A fatal error occurred. 88

4.4. Communication procedure 4.4.1. Communication sequence The sequence of b-CAP starts without fail by transmitting the demand packet from the client. The server side executes the function of the demand packet, and returns the client the response packet. Please wait for the reception of the response message, and always take synchronization in one session after transmitting the demand message. When two or more request messages are used, it is recommended to do by two or more sessions. There is especially no regulations for time from the reception of the demand packet on the server side to the reply of the answer. Therefore, because the time-out will be generated on the client side when the processing time of the server side is long and the time-out detection time of the client is short, attention is needed.

User b-CAP b-CAP b-CAP Client Client Server Service クライアント 要求 関数実行要求

要求メッセージ 作成

要求メッセージ送信 関数呼び出し

実行結果

応答メッセージ 作成

応答メッセージ送信 関数実行結果 実行結果

Figure 4-6 Communication sequence

4.4.2. b-CAP/UDP retrying sequence It doesn't become it for b-CAP/UDP when not mounting in the place where the client server application program side of ..retrying.. processing. The outline is shown in the following.

【Client】 1. When sending it again, b-CAP/UDP improves counting and sends the serial number. → To throw it away when the result of the last request returned immediately after that when it is judged that 89

there is no response and sends it again (serial number disagreement). 2. The first serial number is stored in the reservation area of the b-CAP packet at the same time.

【Server】 1. It is recognized that it is [ritoraipaketto] when there is a serial number in the reservation area. When two or more connections are permitted, each other party (IP + port) should be preserving the last serial number and the answer. 2. The copy of the answer when having executed it without executing it again to prevent double execution of the command when agreeing to the serial number that the serial number executed immediately before for [ritoraipaketto] immediately before is returned. At this time, the serial number of the answer is updated to the serial number of [ritoraipaketto].

90

4.4.3. Communication procedure of server The outline of the communication procedure of the server is shown as follows.

通信ポートを開く 推奨ポート番号: 5007

クライアント接続

要求メッセージ受信

関数実行

応答メッセージ送信

クライアント切断

通信ポートを閉じる

Figure 4-7 Communication procedure of server

The server waits for the connection from the client after opening the communication port first. At this time, the port number of opening TCP recommends “5007". After it connects it from the client, the function corresponding to the request message is executed. The execution result stores in the response message, and returns the client the message. 91

4.4.4. Communication procedure of client The outline of the communication procedure of the client is shown as follows.

サーバへの接続

要求メッセージ送信

応答メッセージ受信

サーバとの切断

Figure 4-8 Communication procedure of client

The client establishes the connection to the server and the session first. The request message of the executed function is transmitted, and the execution result from the server is waited for after this. The client should process the time-out when there is no response from the server. However, set time of the time-out is to have to note it because it is different at the response time of the server depending on the content of processing. 92

Appendix A. CAP-WSDL

List A-1 CapListener.WSDL

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

120

121

namespace='http://tempuri.org/CapListener/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' parts='hController bstrOption'/>

123

124

use='encoded' namespace='http://tempuri.org/CapListener/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' parts='Result'/>

encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' parts='hExtension'/>

127

128

129

130

parts='Result'/>

use='encoded' namespace='http://tempuri.org/CapListener/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' parts='Result'/>

133

use='encoded' namespace='http://tempuri.org/CapListener/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' parts='Result'/>

135

use='encoded' namespace='http://tempuri.org/CapListener/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>

encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>

138

139

140

141

parts='hTask newVal'/>

143

use='encoded' namespace='http://tempuri.org/CapListener/message/' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' parts='hVariable'/>

145

146

encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/>

148

encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' parts='hCommand'/>

150

152

153

Appendix B. CAP Listener IDL

List B-1 CapListener.IDL /** @file CapListener.idl * * @brief IDL source file for CapListener.dll * * * @version 1.0 * @date 2003/12/17 * @author DENSO WAVE * */

// This file is precessed by type library creation tool MIDL // to create type library (CapListener.tbl).

import "oaidl.idl"; import "ocidl.idl"; [ object, uuid(3A427B16-2FBE-4FB4-B20C-1AC32F669B75), dual, helpstring("ICapServices Interface"), pointer_default(unique) ] interface ICapServices : IDispatch { [id(1), helpstring("Method Service_Start")] HRESULT Service_Start(); [id(2), helpstring("Method Service_Stop")] HRESULT Service_Stop();

[id(3), helpstring("Method Controller_Connect")] HRESULT Controller_Connect([in] BSTR bstrController, [in] BSTR bstrProvider, [in, defaultvalue("")] BSTR bstrMachine, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long *hController); [id(4), helpstring("Method Controller_Disconnect")] HRESULT Controller_Disconnect([in] long hController); [id(5), helpstring("Method Controller_GetExtension")] HRESULT Controller_GetExtension([in] long hController, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long *hExtension); [id(6), helpstring("Method Controller_GetFile")] HRESULT Controller_GetFile([in] long hController, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long *hFile); [id(7), helpstring("Method Controller_GetRobot")] HRESULT Controller_GetRobot([in] long hController, [in] BSTR bstrName, [in,defaultvalue("")] BSTR bstrOption, [out, retval] long *hRobot); [id(8), helpstring("Method Controller_GetTask")] HRESULT Controller_GetTask([in] long hController, [in]BSTR bstrName, [in,defaultvalue("")] BSTR bstrOption, [out, retval] long *hTask); [id(9), helpstring("Method Controller_GetVariable")] HRESULT Controller_GetVariable([in] long hController, [in] BSTR bstrName, [in,defaultvalue("")] BSTR bstrOption, [out, retval] long *hVariable); [id(10), helpstring("Method Controller_GetCommand")] HRESULT Controller_GetCommand([in] long hController, [in] BSTR bstrName, [in,defaultvalue("")] BSTR bstrOption, [out, retval] long *hCommand); [id(11), helpstring("Method Controller_GetExtensionNames")] HRESULT Controller_GetExtensionNames([in] long hController, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(12), helpstring("Method Controller_GetFileNames")] HRESULT Controller_GetFileNames([in] long hController, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(13), helpstring("Method Controller_GetRobotNames")] HRESULT Controller_GetRobotNames([in] long hController, [in,defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(14), helpstring("Method Controller_GetTaskNames")] HRESULT Controller_GetTaskNames([in] long hController, [in,defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(15), helpstring("Method Controller_GetVariableNames")] HRESULT 154

Controller_GetVariableNames([in] long hController, [in,defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(16), helpstring("Method Controller_GetCommandNames")] HRESULT Controller_GetCommandNames([in] long hController, [in,defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(17), helpstring("Method Controller_Execute")] HRESULT Controller_Execute([in] long hController, [in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(18), helpstring("Method Controller_GetMessage")] HRESULT Controller_GetMessage([in] long hController, [out,retval] long *hMessage); [id(19), helpstring("Method Controller_GetAttribute")] HRESULT Controller_GetAttribute([in] long hController, [out, retval] long *pVal); [id(20), helpstring("Method Controller_GetHelp")] HRESULT Controller_GetHelp([in] long hController, [out, retval] BSTR *pVal); [id(21), helpstring("Method Controller_GetName")] HRESULT Controller_GetName([in] long hController, [out, retval] BSTR *pVal); [id(22), helpstring("Method Controller_GetTag")] HRESULT Controller_GetTag([in] long hController, [out, retval] VARIANT *pVal); [id(23), helpstring("Method Controller_PutTag")] HRESULT Controller_PutTag([in] long hController, [in] VARIANT newVal); [id(24), helpstring("Method Controller_GetID")] HRESULT Controller_GetID([in] long hController, [out, retval] VARIANT *pVal); [id(25), helpstring("Method Controller_PutID")] HRESULT Controller_PutID([in] long hController, [in] VARIANT newVal);

[id(26), helpstring("Method Extension_GetVariable")] HRESULT Extension_GetVariable([in] long hExtension, [in] BSTR bstrName, [in,defaultvalue("")] BSTR bstrOption, [out, retval] long *hVariable); [id(27), helpstring("Method Extension_GetVariableNames")] HRESULT Extension_GetVariableNames([in] long hExtension, [in,defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(28), helpstring("Method Extension_Execute")] HRESULT Extension_Execute([in] long hExtension, [in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(29), helpstring("Method Extension_GetAttribute")] HRESULT Extension_GetAttribute([in] long hExtension, [out, retval] long *pVal); [id(30), helpstring("Method Extension_GetHelp")] HRESULT Extension_GetHelp([in] long hExtension, [out, retval] BSTR *pVal); [id(31), helpstring("Method Extension_GetName")] HRESULT Extension_GetName([in] long hExtension, [out, retval] BSTR *pVal); [id(32), helpstring("Method Extension_GetTag")] HRESULT Extension_GetTag([in] long hExtension, [out, retval] VARIANT *pVal); [id(33), helpstring("Method Extension_PutTag")] HRESULT Extension_PutTag([in] long hExtension, [in] VARIANT newVal); [id(34), helpstring("Method Extension_GetID")] HRESULT Extension_GetID([in] long hExtension, [out, retval] VARIANT *pVal); [id(35), helpstring("Method Extension_PutID")] HRESULT Extension_PutID([in] long hExtension, [in] VARIANT newVal); [id(36), helpstring("Method Extension_Release")] HRESULT Extension_Release([in] long hExtension);

[id(37), helpstring("Method File_GetFile")] HRESULT File_GetFile([in] long hParetntFile, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption, [out, retval] long *hFile); [id(38), helpstring("Method File_GetVariable")] HRESULT File_GetVariable([in] long hFile, [in] BSTR bstrName, [in,defaultvalue("")] BSTR bstrOption, [out, retval] long *hVariable); [id(39), helpstring("Method File_GetFileNames")] HRESULT File_GetFileNames([in] long hFile, [in, defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(40), helpstring("Method File_GetVariableNames")] HRESULT File_GetVariableNames([in] long hFile, [in,defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(41), helpstring("Method File_Execute")] HRESULT File_Execute([in] long hFile, [in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(42), helpstring("Method File_Copy")] HRESULT File_Copy([in] long hFile, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption); [id(43), helpstring("Method File_Delete")] HRESULT File_Delete([in] long hFile, [in, defaultvalue("")] BSTR bstrOption); [id(44), helpstring("Method File_Move")] HRESULT File_Move([in] long hFile, [in] BSTR bstrName, [in, defaultvalue("")] BSTR bstrOption); [id(45), helpstring("Method File_Run")] HRESULT File_Run([in] long hFile, [in, defaultvalue("")] BSTR bstrOption, [out, retval] BSTR *bstrName); [id(46), helpstring("Method File_GetDateCreated")] HRESULT File_GetDateCreated([in] long hFile, [out, retval] VARIANT *pVal); [id(47), helpstring("Method File_GetDateLastAccessed")] HRESULT 155

File_GetDateLastAccessed([in] long hFile, [out, retval] VARIANT *pVal); [id(48), helpstring("Method File_GetDateLastModified")] HRESULT File_GetDateLastModified([in] long hFile, [out, retval] VARIANT *pVal); [id(49), helpstring("Method File_GetPath")] HRESULT File_GetPath([in] long hFile, [out, retval] BSTR *pVal); [id(50), helpstring("Method File_GetSize")] HRESULT File_GetSize([in] long hFile, [out, retval] long *pVal); [id(51), helpstring("Method File_GetType")] HRESULT File_GetType([in] long hFile, [out, retval] BSTR *pVal); [id(52), helpstring("Method File_GetValue")] HRESULT File_GetValue([in] long hFile, [out, retval] VARIANT *pVal); [id(53), helpstring("Method File_PutValue")] HRESULT File_PutValue([in] long hFile, [in] VARIANT newVal); [id(54), helpstring("Method File_GetAttribute")] HRESULT File_GetAttribute([in] long hFile, [out, retval] long *pVal); [id(55), helpstring("Method File_GetHelp")] HRESULT File_GetHelp([in] long hFile, [out, retval] BSTR *pVal); [id(56), helpstring("Method File_GetName")] HRESULT File_GetName([in] long hFile, [out, retval] BSTR *pVal); [id(57), helpstring("Method File_GetTag")] HRESULT File_GetTag([in] long hFile, [out, retval] VARIANT *pVal); [id(58), helpstring("Method File_PutTag")] HRESULT File_PutTag([in] long hFile, [in] VARIANT newVal); [id(59), helpstring("Method File_GetID")] HRESULT File_GetID([in] long hFile, [out, retval] VARIANT *pVal); [id(60), helpstring("Method File_PutID")] HRESULT File_PutID([in] long hFile, [in] VARIANT newVal); [id(61), helpstring("Method File_Release")] HRESULT File_Release([in] long hFile);

[id(62), helpstring("Method Robot_GetVariable")] HRESULT Robot_GetVariable([in] long hRobot, [in] BSTR bstrName, [in,defaultvalue("")] BSTR bstrOption, [out, retval] long *hVariable); [id(63), helpstring("Method Robot_GetVariableNames")] HRESULT Robot_GetVariableNames([in] long hRobot, [in,defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(64), helpstring("Method Robot_Execute")] HRESULT Robot_Execute([in] long hRobot, [in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(65), helpstring("Method Robot_Cancel")] HRESULT Robot_Cancel([in] long hRobot, [in] BSTR bstrOption); [id(66), helpstring("Method Robot_Accelerate")] HRESULT Robot_Accelerate([in] long hRobot, [in] long lAxis, [in] float fAccel, [in] float fDecel); [id(67), helpstring("Method Robot_Change")] HRESULT Robot_Change([in] long hRobot, [in] BSTR bstrName); [id(68), helpstring("Method Robot_Chuck")] HRESULT Robot_Chuck([in] long hRobot, [in] BSTR bstrOption); [id(69), helpstring("Method Robot_Drive")] HRESULT Robot_Drive([in] long hRobot, [in] long lNo, [in] float fMov, [in,defaultvalue("")] BSTR bstrOpt); [id(70), helpstring("Method Robot_GoHome")] HRESULT Robot_GoHome([in] long hRobot); [id(71), helpstring("Method Robot_Move")] HRESULT Robot_Move([in] long hRobot, [in] long lComp, [in] VARIANT vntPose, [in,defaultvalue("")] BSTR bstrOpt); [id(72), helpstring("Method Robot_Rotate")] HRESULT Robot_Rotate([in] long hRobot, [in] VARIANT vntRotSuf, [in] float fDeg, [in] VARIANT vntPivot, [in,defaultvalue("")] BSTR bstrOpt); [id(73), helpstring("Method Robot_Speed")] HRESULT Robot_Speed([in] long hRobot, [in] long lAxis, [in] float fSpeed); [id(74), helpstring("Method Robot_Unchuck")] HRESULT Robot_Unchuck([in] long hRobot, [in] BSTR bstrOption); [id(75), helpstring("Method Robot_GetAttribute")] HRESULT Robot_GetAttribute([in] long hRobot, [out, retval] long *pVal); [id(76), helpstring("Method Robot_GetHelp")] HRESULT Robot_GetHelp([in] long hRobot, [out, retval] BSTR *pVal); [id(77), helpstring("Method Robot_GetName")] HRESULT Robot_GetName([in] long hRobot, [out, retval] BSTR *pVal); [id(78), helpstring("Method Robot_GetTag")] HRESULT Robot_GetTag([in] long hRobot, [out, retval] VARIANT *pVal); [id(79), helpstring("Method Robot_PutTag")] HRESULT Robot_PutTag([in] long hRobot, [in] VARIANT newVal); [id(80), helpstring("Method Robot_GetID")] HRESULT Robot_GetID([in] long hRobot, [out, retval] VARIANT *pVal); [id(81), helpstring("Method Robot_PutID")] HRESULT Robot_PutID([in] long hRobot, [in] VARIANT newVal); [id(82), helpstring("Method Robot_Release")] HRESULT Robot_Release([in] long hRobot);

156

[id(83), helpstring("Method Task_GetVariable")] HRESULT Task_GetVariable([in] long hTask, [in] BSTR bstrName, [in,defaultvalue("")] BSTR bstrOption, [out, retval] long *hVariable); [id(84), helpstring("Method Task_GetVariableNames")] HRESULT Task_GetVariableNames([in] long hTask, [in,defaultvalue("")] BSTR bstrOption, [out, retval] VARIANT *pVal); [id(85), helpstring("Method Task_Execute")] HRESULT Task_Execute([in] long hTask, [in] VARIANT vntCommand, [out, retval] VARIANT *pVal); [id(86), helpstring("Method Task_Start")] HRESULT Task_Start([in] long hTask, [in] long lMode, [in, defaultvalue("")] BSTR bstrOption); [id(87), helpstring("Method Task_Stop")] HRESULT Task_Stop([in] long hTask, [in] long lMode, [in, defaultvalue("")] BSTR bstrOption); [id(88), helpstring("Method Task_Delete")] HRESULT Task_Delete([in] long hTask, [in, defaultvalue("")] BSTR bstrOption); [id(89), helpstring("Method Task_GetFileName")] HRESULT Task_GetFileName([in] long hTask, [out, retval] BSTR *pVal); [id(90), helpstring("Method Task_GetAttribute")] HRESULT Task_GetAttribute([in] long hTask, [out, retval] long *pVal); [id(91), helpstring("Method Task_GetHelp")] HRESULT Task_GetHelp([in] long hTask, [out, retval] BSTR *pVal); [id(92), helpstring("Method Task_GetName")] HRESULT Task_GetName([in] long hTask, [out, retval] BSTR *pVal); [id(93), helpstring("Method Task_GetTag")] HRESULT Task_GetTag([in] long hTask, [out, retval] VARIANT *pVal); [id(94), helpstring("Method Task_PutTag")] HRESULT Task_PutTag([in] long hTask, [in] VARIANT newVal); [id(95), helpstring("Method Task_GetID")] HRESULT Task_GetID([in] long hTask, [out, retval] VARIANT *pVal); [id(96), helpstring("Method Task_PutID")] HRESULT Task_PutID([in] long hTask, [in] VARIANT newVal); [id(97), helpstring("Method Task_Release")] HRESULT Task_Release([in] long hTask);

[id(98), helpstring("Method Variable_GetDateTime")] HRESULT Variable_GetDateTime([in] long hVariable, [out, retval] VARIANT *pVal); [id(99), helpstring("Method Variable_GetValue")] HRESULT Variable_GetValue([in] long hVariable, [out, retval] VARIANT *pVal); [id(100), helpstring("Method Variable_PutValue")] HRESULT Variable_PutValue([in] long hVariable, [in] VARIANT newVal); [id(101), helpstring("Method Variable_GetAttribute")] HRESULT Variable_GetAttribute([in] long hVariable, [out, retval] long *pVal); [id(102), helpstring("Method Variable_GetHelp")] HRESULT Variable_GetHelp([in] long hVariable, [out, retval] BSTR *pVal); [id(103), helpstring("Method Variable_GetName")] HRESULT Variable_GetName([in] long hVariable, [out, retval] BSTR *pVal); [id(104), helpstring("Method Variable_GetTag")] HRESULT Variable_GetTag([in] long hVariable, [out, retval] VARIANT *pVal); [id(105), helpstring("Method Variable_PutTag")] HRESULT Variable_PutTag([in] long hVariable, [in] VARIANT newVal); [id(106), helpstring("Method Variable_GetID")] HRESULT Variable_GetID([in] long hVariable, [out, retval] VARIANT *pVal); [id(107), helpstring("Method Variable_PutID")] HRESULT Variable_PutID([in] long hVariable, [in] VARIANT newVal); [id(108), helpstring("Method Variable_GetMicrosecond")] HRESULT Variable_GetMicrosecond([in] long hVariable, [out, retval] long *pVal); [id(109), helpstring("Method Variable_Release")] HRESULT Variable_Release([in] long hVariable);

[id(110), helpstring("Method Command_Execute")] HRESULT Command_Execute([in] long hCommand, [in] long lMode); [id(111), helpstring("Method Command_Cancel")] HRESULT Command_Cancel([in] long hCommand); [id(112), helpstring("Method Command_GetTimeout")] HRESULT Command_GetTimeout([in] long hCommand, [out, retval] long *pVal); [id(113), helpstring("Method Command_PutTimeout")] HRESULT Command_PutTimeout([in] long hCommand, [in] long newVal); [id(114), helpstring("Method Command_GetState")] HRESULT Command_GetState([in] long hCommand, [out, retval] long *pVal); [id(115), helpstring("Method Command_GetParameters")] HRESULT Command_GetParameters([in] long hCommand, [out, retval] VARIANT *pVal); [id(116), helpstring("Method Command_PutParameters")] HRESULT Command_PutParameters([in] long hCommand, [in] VARIANT newVal); [id(117), helpstring("Method Command_GetResult")] HRESULT Command_GetResult([in] 157 long hCommand, [in] VARIANT *pVal); [id(118), helpstring("Method Command_GetAttribute")] HRESULT Command_GetAttribute([in] long hCommand, [out, retval] long *pVal); [id(119), helpstring("Method Command_GetHelp")] HRESULT Command_GetHelp([in] long hCommand, [out, retval] BSTR *pVal); [id(120), helpstring("Method Command_GetName")] HRESULT Command_GetName([in] long hCommand, [out, retval] BSTR *pVal); [id(121), helpstring("Method Command_GetTag")] HRESULT Command_GetTag([in] long hCommand, [out, retval] VARIANT *pVal); [id(122), helpstring("Method Command_PutTag")] HRESULT Command_PutTag([in] long hCommand, [in] VARIANT newVal); [id(123), helpstring("Method Command_GetID")] HRESULT Command_GetID([in] long hCommand, [out, retval] VARIANT *pVal); [id(124), helpstring("Method Command_PutID")] HRESULT Command_PutID([in] long hCommand, [in] VARIANT newVal); [id(125), helpstring("Method Command_Release")] HRESULT Command_Release([in] long hCommand);

[id(126), helpstring("Method Message_Reply")] HRESULT Message_Reply([in] long hMessage, [in] VARIANT vntData); [id(127), helpstring("Method Message_Clear")] HRESULT Message_Clear([in] long hMessage); [id(128), helpstring("Method Message_GetDateTime")] HRESULT Message_GetDateTime([in] long hMessage, [out, retval] VARIANT *pVal); [id(129), helpstring("Method Message_GetDescription")] HRESULT Message_GetDescription([in] long hMessage, [out, retval] BSTR *pVal); [id(130), helpstring("Method Message_GetDestination")] HRESULT Message_GetDestination([in] long hMessage, [out, retval] BSTR *pVal); [id(131), helpstring("Method Message_GetNumber")] HRESULT Message_GetNumber([in] long hMessage, [out, retval] long *pVal); [id(132), helpstring("Method Message_GetSerialNumber")] HRESULT Message_GetSerialNumber([in] long hMessage, [out, retval] long *pVal); [id(133), helpstring("Method Message_GetSource")] HRESULT Message_GetSource([in] long hMessage, [out, retval] BSTR *pVal); [id(134), helpstring("Method Message_GetValue")] HRESULT Message_GetValue([in] long hMessage, [out, retval] VARIANT *pVal); [id(135), helpstring("Method Message_Release")] HRESULT Message_Release([in] long hMessage); };

[ uuid(64A6006F-DB26-48E8-BB25-F1F62B52A27A), version(1.0), helpstring("CapListener 1.0 type library") ] library CAPLISTENERLib { importlib("stdole32.tlb"); importlib("stdole2.tlb");

[ uuid(8FCA775A-6855-4741-B891-D4EA9F4CA550), helpstring("CapServices Class") ] coclass CapServices { [default] interface ICapServices; }; };

158

Appendix C. CAP Provider

Remote can be accessed to the device more handily by dividing CAO and the union combination through the Internet though it is possible to use independently of other specifications of ORiN2 because CAP is it and an independent specification. The CAP provider transmits the CAP message (SOAP packet) to connect it with the CAP server remotely as shown in [3] and [4] of Figure C-1. The response message is received from the server side. To show in [1] and [2], the CAP message can be sent and received directly from the application program though it is natural. However, because making and analytical sending and receiving of the message can be done according to a similar procedure to the use of the CAP provider and the operation of the model, the application program can be made concise.

Figure C-1 Operation of CAP

【AddController method specification of CAP provider】 It introduces only the AddController method specification of the CAP provider here. Please refer to the CAP provider specifications for details. Controller name: Controller name Provider name: "CaoProv.CAP" Option character string: (Table C-)

Table C-1 Option character string of CAP provider 159

Option Meaning Provider[=] Provider name that starts remotely. (Default:Null character string) Server[=] The WEB server name is specified. (Default value:“localhost”) Machine[=] When a remote provider is started with a machine different from the WEB server, it specifies it. (Default value:Null character string) Option[=

The example when the AddController method is executed is shown as follows.

AddController ( “RC1”, // Controller name = RC1 “CaoProv.CAP”, // Fixation “”, // The CAP provider is executed in the process of the CAO engine. “Server=TestServer,Provider=CaoProv.DataStore” // The DataStore provider is started with // WEB server “TestServer". );

Appendix D. CAP Listener

The CAP listener is mounted based on CAP-WSDL, and is CAP server that analyzes the CAP message that reaches the server with the server, calls a target CAO provider, and mediates the delivery of necessary information. Easily constructing the CAP server by using this CAP listener, the Web server, and MicroSoft SOAP Toolkit becomes possible.

【Setting of CAP listener】 (1) The CAO engine is set to the user who has the Administrator authority in the service registration or the start user. ・ When you do the service registration to the CAO engine ① "CAO.exe /service" is executed by the command prompt. ② [設定]→[コントロールパネル] is clicked, and [管理ツール]→[サービス] of the control panel of the start menu is selected. ③ “CAO" is selected from among the management tool of service, and the check is put in "The conversation with desktop is permitted to service" of "Logon" tab. 160

Figure D-1 Management tool screen of service

161

・ When you set the CAO engine start user ① "Dcomcnfg" is executed by the command prompt. ② “ CAO" is selected from among the application of the composition property screen of decentralization COM, and the property is clicked. ③ The identification tab on the property screen of CAO is selected, and the following user is selected. The user's password is input to the user-name and the password with the Administrator authority in the user-name and the “OK" button is clicked.

Figure D-2 Dcomcnfg setting screen

(2) The Cap listener is registered in the registry.

Table D-1 CAP listener

File name CapListener.DLL Registry registration regsvr32 CapListener.DLL Blotting out of registry registration regsvr32 /u CapListener.DLL

(3) Microsoft SOAP Toolkit 3.0 is installed.

Table D-2 Soap Toolkit 3.0 download site

File name URL soapsdk.exe http://msdn.microsoft.com/webservices/building/soaptk/

162

(4) The virtual directory is made by using SOAPVDIR.CMD of Microsoft SOAP Toolkit 3.0. The following commands are input to making by the command prompt. SOAPVDIR.CMD CREATE Cap (5) The check is applied to the following reading accesses of two files that exist in virtual directory “CAP" in the setting of IIS. (Please note the extension. ) ・ CapLister.WSML ・ CapListerClient.WSML (6) The Internet guest account is added to the start authority of CAO.exe on the server side. (7) Only the server name of the 3492nd line of the CapListner.WSDL file in the CapListener directory is changed to the name of an actual Web server. (例) soap:address location='http://cap-server/Cap/CapListener.WSDL' /> (8) It right-clicks in "Regulated Web site" by setting IIS and the property is selected. The check on "The HTTP keep alive is made effective" that exists in the item of the connection in "Web site" tab of the dialog is removed. (There is a possibility that the processing speed slows remarkably though CAP operates even if this setting is not done. )