[BACK]Return to cmo-basic0.tex CVS log [TXT][DIR] Up to [local] / OpenXM / doc / OpenXM-specs

File: [local] / OpenXM / doc / OpenXM-specs / cmo-basic0.tex (download)

Revision 1.8, Sat Mar 14 01:21:56 2020 UTC (4 years, 1 month ago) by takayama
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +57 -57 lines

euc --> utf8.
A note on XQuartz X11 and OX_XTERM_GEOMETRY.

%% $OpenXM: OpenXM/doc/OpenXM-specs/cmo-basic0.tex,v 1.8 2020/03/14 01:21:56 takayama Exp $
//&jp \section{CMO Primitive object}
//&eg \section{CMO Primitive object}
\label{sec:basic0}
/*&jp
CMO (Common Mathematical Object format) グループ Primitive の Object は, 
ローレベルのデータ型, {\tt int} , {\tt string}
などに対応する object である.
この CMO はすべての OpenXM が実装していると仮定される.
この節では, イントロダクションとして, グループ Primitive に属する CMObject
(Common Mathematical Object) を形式的な方法をつかわず導入しよう.
*/
/*&eg
Objects in CMO (Common Mathematical Object format) group Primitive 
are primitive data such as {\tt int}, {\tt 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.
*/
/*&jp
このグループの正式な名前は,
CMObject/Primitive  である.
以下, {\tt int32} で2の補数表現された
32 bit integer をあらわす
(これはよく使われる計算機での C 言語の int の内部表現).
{\tt byte} で 8 bit データをあらわす.
*/
/*&eg
The canonical name of this group is
CMObject/Primitive.
In the sequel,
{\tt int32} means the signed 32 bit integer expressed by two's complement
(internal expressions of {\tt int} of the language C usually use 
this expression).
{\tt byte} means 8 bit data.
*/

//&C  
/*&jp
CMObject の TCP/IP 用の実装では,
CMO の object は \\
\begin{tabular}{|c|c|}
\hline
{\tt cmo\_tag}& {\tt cmo\_body} \\ 
\hline
\end{tabular} \\
なる形をしている.
ここで, {\tt cmo\_tag} は, 正の
{\tt int32} で表現するものと規約する.
*/
/*&eg
In our encoding of the CMO's for TCP/IP,
any CMObject consists of a tag and a body: \\
\begin{tabular}{|c|c|}
\hline
{\tt cmo\_tag}& {\tt cmo\_body} \\ 
\hline
\end{tabular} \\
{\tt cmo\_tag} should be given by a positive
{\tt int32}.
*/

/*&C  

*/
/*&jp
{\tt cmo\_tag} は object のタイプをあらわすタグであり,
以下のように決めている.
*/
//&eg The following is a list of tags of CMObject/Primitive.
/*&C
@../SSkan/plugin/cmotag.h
\begin{verbatim}
#define LARGEID  0x7f000000   /* 2130706432 */
#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
\end{verbatim}
*/

/*&jp
以下, 各 object の フォーマットを説明する.
サーバ, クライアントはすべての object の CMO 形式をサポートする必要はないが,
{\tt CMO\_ERROR2}, {\tt CMO\_NULL},
{\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_MATHCAP}, {\tt CMO\_LIST}
は最も基本的なデータであり,
また全てのサーバ, クライアントが実装すべき CMO データである.
*/
/*&eg
We will explain each object format.
Servers and clients do not need to implement all CMO's.
However, 
{\tt CMO\_ERROR2}, {\tt CMO\_NULL},
{\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_MATHCAP}, {\tt CMO\_LIST}
are primitive data and
all servers and clients have to implement them.
*/

/*&C

\medbreak \noindent
*/
//&jp CMObject Error2 は \\
//&eg CMObject Error2 is of the form \\
/*&C
\begin{tabular}{|c|c|}
\hline
{\tt int32 CMO\_ERROR2} & {\sl CMObject} {\rm ob} \\ 
\hline
\end{tabular} \\
*/
/*&jp
なる形で表現する.  
エラーの時に push する object であり, {\it CMObject} ob の
部分に詳細なエラー情報がはいる.
ob はリストであり,  TCP/IP によるストリーム型接続の場合,
最初の成分はエラーを起こした OX メッセージ(後述)
のシリアル番号でないといけない.
シリアル番号は Integer32 で表現する.

\noindent
Remark: 歴史的な理由により, エラーオブジェクトの CMO タグは {\it
CMO\_ERROR2} と名付けられている. 次の版の仕様書では {\tt CMO\_ERROR}
に変更する予定である. 
*/
/*&eg
It is an object used when a server makes an error.
{\it 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.

\noindent
Remark: For a historical reason the CMO tag of the error object is 
named {\tt CMO\_ERROR2}. In the next version of OpenXM specification
we may rename it {\tt CMO\_ERROR}.
*/

/*&C

\medbreak \noindent
*/

//&jp CMObject Null は \\
//&eg CMObject Null has the format \\
/*&C
\begin{tabular}{|c|c|}
\hline
{\tt int32 CMO\_NULL}  \\ 
\hline
\end{tabular} \\
*/
/*&jp
なる形で表現する.
*/

/*&C

\noindent
*/

//&jp 32 bit integer n は CMObject としては Integer32 と呼ばれ, \\
//&eg 32 bit integer n is called Integer32 as a CMObject and has the format \\
/*&C
\begin{tabular}{|c|c|}
\hline
{\tt int32 CMO\_INT32}& {\tt int32} {\rm n}  \\ 
\hline
\end{tabular} \\
*/
//&jp なる形で表現する.

/*&C

\medbreak \noindent
*/


//&jp 長さ n の バイト列 data は CMObject としては, Datum 型とよばれ \\
//&eg A byte array of the length n is called Datum as a CMObject and has the format \\
/*&C
\begin{tabular}{|c|c|c|c|}
\hline
{\tt int32 CMO\_DATUM}& {\tt int32} {\rm n} & {\tt byte} {\rm  data[0]} 
& {\tt byte} {\rm  data[1]} \\
\hline
$\cdots$ & {\tt byte} {\rm  data[n-1]} \\ 
\cline{1-2}
\end{tabular} \\
*/
//&jp と表現する.

/*&C

\noindent
*/

//&jp 長さ n の 文字列 data は, CMObject としては, Cstring 型とよばれ \\
//&eg String of n bytes is called Cstring as CMObject and has the format \\
/*&C
\begin{tabular}{|c|c|c|c|}
\hline
{\tt int32 CMO\_STRING}& {\tt int32} {\rm n} & {\tt byte} {\rm data[0]} 
& {\tt byte} {\rm data[1]}  \\ 
\hline
$\cdots$ & {\tt byte} {\rm data[n-1]} \\ 
\cline{1-2}
\end{tabular} \\
*/
/*&jp
と表現する.  C 言語で普通用いられる, 文字列のおわりの {\tt 0} は文字列
に含めない. 
*/

/*&C	

\noindent
*/
//&jp CMObject Mathcap は \\
//&eg CMObject Mathcap  has the format \\
/*&C
\begin{tabular}{|c|c|}
\hline
{\tt int32 CMO\_MATHCAP} & {\it CMObject} {\rm ob} \\ 
\hline
\end{tabular} \\
*/
/*&jp
なる形で表現する.  
{\tt ob} はリストであり少なくとも3つの要素をもつ.
0 番目の要素は, Integer32 で表した OpenXM protocol version number と,
Cstring で表したシステム名, Server version, CPU type, その他の情報
のリストである.
1 番目の要素は, システム xxx が扱うことの可能な
SM タグを, Integer32 で表現したものを集めたリストである.
3 番目の要素は, システム xxx があつかうことの可能な
データ形式をあつめたリストである.
詳細は mathcap の節 \ref{subsubsection:mathcap} で説明する.
*/
/*&eg
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 \ref{subsubsection:mathcap}.
*/

/*&C

\medbreak \noindent
*/
//&jp 長さ m のリストは \\
//&eg A list of the length m has the form \\
/*&C
\begin{tabular}{|c|c|c|c|c|}
\hline
{\tt int32 CMO\_LIST}& {\tt int32} {\rm m} & {\tt CMObject}\, ob[0] & $\cdots$ &
{\tt CMObject}\, ob[$m-1$] \\
\hline
\end{tabular}\\
*/
//&jp で表現する.