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

Annotation of OpenXM/doc/OpenXM-specs/cmo-basic0.tex, Revision 1.1

1.1     ! noro        1: %% $OpenXM$
        !             2: //&jp \section{CMO Basic0 の object}
        !             3: //&eg \section{CMO Basic0 object}
        !             4: /*&jp
        !             5: CMO (Common Mathematical Object format) グループ Basic0 の Object は,
        !             6: ローレベルのデータ型, {\tt int} , {\tt string}
        !             7: などに対応する object である.
        !             8: この CMO はすべての OpenXM が実装していると仮定される.
        !             9: この節では, イントロダクションとして, グループ Basic0 に属する CMObject
        !            10: (Common Mathematical Object) を形式的な方法をつかわず導入しよう.
        !            11: */
        !            12: /*&eg
        !            13: Objects in CMO (Common Mathematical Object format) group Basic0
        !            14: are primitive data such as {\tt int}, {\tt string}.
        !            15: All OpenXM compliant systems should implement all data types
        !            16: in the group Basic0.
        !            17: In this section, as an introduction, we will introduce
        !            18: CMObject (Common Mathematical Object) of the group Basic0 without
        !            19: using the Backus-Nauer form.
        !            20: */
        !            21: /*&jp
        !            22: このグループの正式な名前は,
        !            23: CMObject/Basic0  である.
        !            24: 以下, {\tt int32} で2の補数表現された
        !            25: 32 bit integer をあらわす
        !            26: (これはよく使われる計算機での C 言語の int の内部表現).
        !            27: {\tt byte} で 8 bit データをあらわす.
        !            28: */
        !            29: /*&eg
        !            30: The canonical name of this group is
        !            31: CMObject/Basic0.
        !            32: In the sequel,
        !            33: {\tt int32} means the signed 32 bit integer expressed by two's complement
        !            34: (internal expressions of {\tt int} of the language C usually use
        !            35: this expression).
        !            36: {\tt byte} means 8 bit data.
        !            37: */
        !            38:
        !            39: //&C
        !            40: /*&jp
        !            41: CMObject の TCP/IP 用の実装では,
        !            42: CMO の object は \\
        !            43: \begin{tabular}{|c|c|}
        !            44: \hline
        !            45: {\tt cmo\_tag}& {\tt cmo\_body} \\
        !            46: \hline
        !            47: \end{tabular} \\
        !            48: なる形をしている.
        !            49: ここで, {\tt cmo\_tag} は, 正の
        !            50: {\tt int32} で表現するものと規約する.
        !            51: */
        !            52: /*&eg
        !            53: In our encoding of the CMO's for TCP/IP,
        !            54: any CMObject consists of a tag and a body: \\
        !            55: \begin{tabular}{|c|c|}
        !            56: \hline
        !            57: {\tt cmo\_tag}& {\tt cmo\_body} \\
        !            58: \hline
        !            59: \end{tabular} \\
        !            60: {\tt cmo\_tag} should be given by a positive
        !            61: {\tt int32}.
        !            62: */
        !            63:
        !            64: /*&C
        !            65:
        !            66: */
        !            67: /*&jp
        !            68: {\tt cmo\_tag} は object のタイプをあらわすタグであり,
        !            69: 以下のように決めている.
        !            70: */
        !            71: //&eg The following is a list of tags of CMObject/Basic0.
        !            72: /*&C
        !            73: @../SSkan/plugin/cmotag.h
        !            74: \begin{verbatim}
        !            75: #define LARGEID  0x7f000000
        !            76: #define CMO_ERROR2 (LARGEID+2)
        !            77: #define CMO_NULL   1
        !            78: #define CMO_INT32  2
        !            79: #define CMO_DATUM  3
        !            80: #define CMO_STRING 4
        !            81: #define CMO_MATHCAP 5
        !            82: #define CMO_LIST 17
        !            83: \end{verbatim}
        !            84: */
        !            85:
        !            86: /*&jp
        !            87: 以下, 各 object の フォーマットを説明する.
        !            88: サーバ, クライアントはすべての object の CMO 形式をサポートする必要はないが,
        !            89: {\tt CMO\_ERROR2}, {\tt CMO\_NULL},
        !            90: {\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_MATHCAP}, {\tt CMO\_LIST}
        !            91: は最も基本的なデータであり,
        !            92: また全てのサーバ, クライアントが実装すべき CMO データである.
        !            93: */
        !            94: /*&eg
        !            95: We will explain each object format.
        !            96: Servers and clients do not need to implement all CMO's.
        !            97: However,
        !            98: {\tt CMO\_ERROR2}, {\tt CMO\_NULL},
        !            99: {\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_MATHCAP}, {\tt CMO\_LIST}
        !           100: are primitive data and
        !           101: all servers and clients have to implement them.
        !           102: */
        !           103:
        !           104: /*&C
        !           105:
        !           106: \medbreak \noindent
        !           107: */
        !           108: //&jp CMObject Error2 は \\
        !           109: //&eg CMObject Error2 is of the form \\
        !           110: /*&C
        !           111: \begin{tabular}{|c|c|}
        !           112: \hline
        !           113: {\tt int32 CMO\_ERROR2} & {\sl CMObject} {\rm ob} \\
        !           114: \hline
        !           115: \end{tabular} \\
        !           116: */
        !           117: /*&jp
        !           118: なる形で表現する.
        !           119: エラーの時に push する object であり, {\it CMObject} ob の
        !           120: 部分に詳細なエラー情報がはいる.
        !           121: ob はリストであり,  TCP/IP によるストリーム型接続の場合,
        !           122: 最初の成分はエラーを起こした OX メッセージ(後述)
        !           123: のシリアル番号でないといけない.
        !           124: シリアル番号は Integer32 で表現する.
        !           125: */
        !           126: /*&eg
        !           127: It is an object used when a server makes an error.
        !           128: {\it CMObject} ob carries error informations.
        !           129: The instance ob is a list and in case of a stream connection like TCP/IP
        !           130: the first element must be the serial number of the OX message
        !           131: that caused the error.
        !           132: The serial number is given by the data type Integer32.
        !           133: */
        !           134:
        !           135: /*&C
        !           136:
        !           137: \medbreak \noindent
        !           138: */
        !           139:
        !           140: //&jp CMObject Null は \\
        !           141: //&eg CMObject Null has the format \\
        !           142: /*&C
        !           143: \begin{tabular}{|c|c|}
        !           144: \hline
        !           145: {\tt int32 CMO\_NULL}  \\
        !           146: \hline
        !           147: \end{tabular} \\
        !           148: */
        !           149: /*&jp
        !           150: なる形で表現する.
        !           151: */
        !           152:
        !           153: /*&C
        !           154:
        !           155: \noindent
        !           156: */
        !           157:
        !           158: //&jp 32 bit integer n は CMObject としては Integer32 と呼ばれ, \\
        !           159: //&eg 32 bit integer n is called Integer32 as a CMObject and has the format \\
        !           160: /*&C
        !           161: \begin{tabular}{|c|c|}
        !           162: \hline
        !           163: {\tt int32 CMO\_INT32}& {\tt int32} {\rm n}  \\
        !           164: \hline
        !           165: \end{tabular} \\
        !           166: */
        !           167: //&jp なる形で表現する.
        !           168:
        !           169: /*&C
        !           170:
        !           171: \medbreak \noindent
        !           172: */
        !           173:
        !           174:
        !           175: //&jp 長さ n の バイト列 data は CMObject としては, Datum 型とよばれ \\
        !           176: //&eg A byte array of the length n is called Datum as a CMObject and has the format \\
        !           177: /*&C
        !           178: \begin{tabular}{|c|c|c|c|}
        !           179: \hline
        !           180: {\tt int32 CMO\_DATUM}& {\tt int32} {\rm n} & {\tt byte} {\rm  data[0]}
        !           181: & {\tt byte} {\rm  data[1]} \\
        !           182: \hline
        !           183: $\cdots$ & {\tt byte} {\rm  data[n-1]} \\
        !           184: \cline{1-2}
        !           185: \end{tabular} \\
        !           186: */
        !           187: //&jp と表現する.
        !           188:
        !           189: /*&C
        !           190:
        !           191: \noindent
        !           192: */
        !           193:
        !           194: //&jp 長さ n の 文字列 data は, CMObject としては, Cstring 型とよばれ \\
        !           195: //&eg String of n bytes is called Cstring as CMObject and has the format \\
        !           196: /*&C
        !           197: \begin{tabular}{|c|c|c|c|}
        !           198: \hline
        !           199: {\tt int32 CMO\_STRING}& {\tt int32} {\rm n} & {\tt byte} {\rm data[0]}
        !           200: & {\tt byte} {\rm data[1]}  \\
        !           201: \hline
        !           202: $\cdots$ & {\tt byte} {\rm data[n-1]} \\
        !           203: \cline{1-2}
        !           204: \end{tabular} \\
        !           205: */
        !           206: /*&jp
        !           207: と表現する.  C 言語で普通用いられる, 文字列のおわりの {\tt 0} は文字列
        !           208: に含めない.
        !           209: */
        !           210:
        !           211: /*&C
        !           212:
        !           213: \noindent
        !           214: */
        !           215: //&jp CMObject Mathcap は \\
        !           216: //&eg CMObject Mathcap  has the format \\
        !           217: /*&C
        !           218: \begin{tabular}{|c|c|}
        !           219: \hline
        !           220: {\tt int32 CMO\_MATHCAP} & {\it CMObject} {\rm ob} \\
        !           221: \hline
        !           222: \end{tabular} \\
        !           223: */
        !           224: /*&jp
        !           225: なる形で表現する.
        !           226: {\tt ob} はリストであり少なくとも3つの要素をもつ.
        !           227: 0 番目の要素は, Integer32 で表した OpenXM protocol version number と,
        !           228: Cstring で表したシステム名, Server version, CPU type, その他の情報
        !           229: のリストである.
        !           230: 1 番目の要素は, システム xxx が扱うことの可能な
        !           231: SM タグを, Integer32 で表現したものを集めたリストである.
        !           232: 3 番目の要素は, システム xxx があつかうことの可能な
        !           233: データ形式をあつめたリストである.
        !           234: 詳細は mathcap の節で説明する.
        !           235: */
        !           236: /*&eg
        !           237: ob is a list of which length is more than or equal to three.
        !           238: The first element is a list of
        !           239: OpenXM protocol version number in Integer32,
        !           240: the server name in Cstring,
        !           241: the server version and CPU type in Cstring,
        !           242: and extra informations.
        !           243: The second element is a list of SM tags in Integer 32.
        !           244: The third element is a list of data type tags which the server or the client
        !           245: can understand.
        !           246: The details will be explained in the section on mathcap.
        !           247: */
        !           248:
        !           249: /*&C
        !           250:
        !           251: \medbreak \noindent
        !           252: */
        !           253: //&jp 長さ m のリストは \\
        !           254: //&eg A list of the length m has the form \\
        !           255: /*&C
        !           256: \begin{tabular}{|c|c|c|c|c|}
        !           257: \hline
        !           258: {\tt int32 CMO\_LIST}& {\tt int32} {\rm m} & {\tt CMObject}\, ob[0] & $\cdots$ &
        !           259: {\tt CMObject}\, ob[$m-1$] \\
        !           260: \hline
        !           261: \end{tabular}\\
        !           262: */
        !           263: //&jp で表現する.
        !           264:
        !           265:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>