next up previous
Next: A formal expression of Up: Design and Implementation of Previous: Introduction

   
CMO Primitive object

Objects in CMO (Common Mathematical Object format) group Primitive are primitive data such as int, string. All OpenXM compliant systems should implement all data types in the group Primitive. In this section, as an introduction, we will introduce CMObject (Common Mathematical Object) of the group Primitive without using the Backus-Nauer form.

The canonical name of this group is CMObject/Primitive. In the sequel, int32 means the signed 32 bit integer expressed by two's complement (internal expressions of int of the language C usually use this expression). byte means 8 bit data.

In our encoding of the CMO's for TCP/IP, any CMObject consists of a tag and a body:
cmo_tag cmo_body

cmo_tag should be given by a positive int32.

The following is a list of tags of CMObject/Primitive. @../SSkan/plugin/cmotag.h

#define LARGEID  0x7f000000
#define CMO_ERROR2 (LARGEID+2)
#define CMO_NULL   1
#define CMO_INT32  2
#define CMO_DATUM  3
#define CMO_STRING 4
#define CMO_MATHCAP 5
#define CMO_LIST 17

We will explain each object format. Servers and clients do not need to implement all CMO's. However, CMO_ERROR2, CMO_NULL, CMO_INT32, CMO_STRING, CMO_MATHCAP, CMO_LIST are primitive data and all servers and clients have to implement them.

CMObject Error2 is of the form
int32 CMO_ERROR2 CMObject ob

It is an object used when a server makes an error. CMObject ob carries error informations. The instance ob is a list and in case of a stream connection like TCP/IP the first element must be the serial number of the OX message that caused the error. The serial number is given by the data type Integer32.

Remark: For a historical reason the CMO tag of the error object is named CMO_ERROR2. In the next vesion of OpenXM specification we wll rename it CMO_ERROR.

CMObject Null has the format
int32 CMO_NULL  

32 bit integer n is called Integer32 as a CMObject and has the format
int32 CMO_INT32 int32 n

A byte array of the length n is called Datum as a CMObject and has the format
int32 CMO_DATUM int32 n byte data[0] byte data[1]
$\cdots$ byte data[n-1]    

String of n bytes is called Cstring as CMObject and has the format
int32 CMO_STRING int32 n byte data[0] byte data[1]
$\cdots$ byte data[n-1]    

CMObject Mathcap has the format
int32 CMO_MATHCAP CMObject ob

ob is a list of which length is more than or equal to three. The first element is a list of OpenXM protocol version number in Integer32, the server name in Cstring, the server version and CPU type in Cstring, and extra informations. The second element is a list of SM tags in Integer 32. The third element is a list of data type tags which the server or the client can understand. The details will be explained in the section on mathcap.

A list of the length m has the form
int32 CMO_LIST int32 m CMObject ob[0] $\cdots$ CMObject ob[m-1]


next up previous
Next: A formal expression of Up: Design and Implementation of Previous: Introduction
Nobuki Takayama 平成12年1月25日