version 1.2, 2000/01/21 06:24:49 |
version 1.9, 2000/09/09 21:59:13 |
|
|
|
%% $OpenXM: OpenXM/doc/OpenXM-specs/stackmachine.tex,v 1.8 2000/09/08 20:01:38 takayama Exp $ |
//&jp \section{ OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó } |
//&jp \section{ OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó } |
//&eg \section{ OX stackmachine } (This section has not yet been translated.) |
//&eg \section{ OX stack machine } |
|
\label{sec:stackmachine} |
/*&jp |
/*&jp |
¤³¤ÎÀá¤Ç¤Ï, OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó operator ¤ÎÀâÌÀ |
¤³¤ÎÀá¤Ç¤Ï, OX ¥¹¥¿¥Ã¥¯¥Þ¥·¥ó operator ¤ÎÀâÌÀ |
(TCP/IP ¥½¥±¥Ã¥È¾å¤Ç¤Îɸ½à encoding Ë¡ ¤òÍѤ¤¤ë), |
(TCP/IP ¥½¥±¥Ã¥È¾å¤Ç¤Îɸ½à encoding Ë¡ ¤òÍѤ¤¤ë), |
Line 39 that for event-driven programming. |
|
Line 40 that for event-driven programming. |
|
{\tt oxserver00.c} is implemented as a sample server. |
{\tt oxserver00.c} is implemented as a sample server. |
If you want to implement you own server, |
If you want to implement you own server, |
write the following functions and use them instead of |
write the following functions and use them instead of |
those in {\tt nullstackmachine.c }. |
those in {\tt nullstackmachine.c}. |
*/ |
*/ |
|
|
//&jp \subsubsection{¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î¥°¥ë¡¼¥× SMobject/Basic0 ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿} |
//&jp \subsubsection{¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î¥°¥ë¡¼¥× SMobject/Primitive ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿} |
//&eg \subsubsection{Operators in the group SMobject/Basic0} |
//&eg \subsubsection{Operators in the group SMobject/Primitive} |
|
|
/*&jp |
/*&jp |
\noindent |
\noindent |
Line 78 CMObject ¤ËÂФ¹¤ëºÇÂç¸øÌó¿ôŪ¤Ê¥á¥Ã¥»¡¼¥¸¤Î»ÅÍͤòconte |
|
Line 79 CMObject ¤ËÂФ¹¤ëºÇÂç¸øÌó¿ôŪ¤Ê¥á¥Ã¥»¡¼¥¸¤Î»ÅÍͤòconte |
|
°Õ. CMO ·Á¼°¤Ç½ñ¤¤¤Æ¤¢¤Ã¤Æ¤â, ¤½¤ì¤Ï¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Îlocal ·Á¼° |
°Õ. CMO ·Á¼°¤Ç½ñ¤¤¤Æ¤¢¤Ã¤Æ¤â, ¤½¤ì¤Ï¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Îlocal ·Á¼° |
¤Ç¥¹¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤È²ò¼á¤·¤Æ²¼¤µ¤¤.) |
¤Ç¥¹¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤È²ò¼á¤·¤Æ²¼¤µ¤¤.) |
|
|
¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Ï°Ê²¼¤Î´Ø¿ô¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¤È¤¤¤±¤Ê¤¤. |
¤¹¤Ù¤Æ¤Î¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Ï°Ê²¼¤ÎÁàºî¤ò¼ÂÁõ¤·¤Æ¤¤¤Ê¤¤¤È¤¤¤±¤Ê¤¤. |
|
³ÆÁàºî¤ËÂФ·, ¤½¤ÎÁ°¸å¤Ë¤ª¤±¤ë¥¹¥¿¥Ã¥¯¤Î¾õÂÖ¤ò¼¨¤¹. ¿Þ¤Ë¤ª¤¤¤Æ, |
|
±¦Ã¼¤Î¥ª¥Ö¥¸¥§¥¯¥È¤¬¥¹¥¿¥Ã¥¯¤Î¥È¥Ã¥×¤ËÂбþ¤¹¤ë. |
*/ |
*/ |
|
|
/*&eg |
/*&eg |
Line 89 Object xxx_OperandStack[SIZE]; |
|
Line 92 Object xxx_OperandStack[SIZE]; |
|
\end{verbatim} |
\end{verbatim} |
Here {\tt Object} may be local to the system {\tt xxx} wrapped by the stack |
Here {\tt Object} may be local to the system {\tt xxx} wrapped by the stack |
machine. |
machine. |
That is, the server may translate CMObjects into local its |
That is, the server may translate CMObjects into its local |
objects and push them onto the stack. However, it is preferable that |
objects and push them onto the stack. It is preferable that |
the composition of such a translation and its inverse is equal to the |
the composition of such a translation and its inverse is equal to the |
identity map. The translation scheme is called the phrase book of the |
identity map. The translation scheme is called the {\it phrase book} of the |
server and it should be documented for each stack machine. In OpenXM, |
server and it should be documented for each stack machine. In OpenXM, |
any message is private. In future we will provide a content |
any message is private to a connection. In future we will provide a content |
dictionary (CD; see OpenMath \cite{openmath}) for basic specifications |
dictionary (CD; see OpenMath \cite{openmath}) for basic specifications |
of CMObjects. |
of CMObjects. |
|
|
In the following, \verb+ xxx_ + may be omitted if no confusion occurs. |
In the following, \verb+ xxx_ + may be omitted if no confusion occurs. |
As the names of functions and tags are long, one may use abbreviated |
As the names of functions and tags are long, one may use abbreviated |
names. Message packets are represented as follows. Each field is |
names. Message packets are represented as follows. |
shown as \fbox{data type \quad data}. For example {\tt int32 |
|
OX\_DATA} denotes a number {\tt OX\_DATA} which is represented by a 32 |
|
bit network byte order. If a field is displayed by italic characters, |
|
it should be defined elsewhere or its meaning should be clear. For |
|
example {\it String commandName} denotes a local object {\it |
|
commandName} whose data type is String. Note that an object on the |
|
stack may have a local data type even if it is represented as CMO. |
|
|
|
|
Each field is shown as \fbox{data type \quad data}. For example {\tt |
|
int32 OX\_DATA} denotes a number {\tt OX\_DATA} which is represented |
|
by a 32 bit integer with the network byte order. If a field is |
|
displayed by italic characters, it should be defined elsewhere or its |
|
meaning should be clear. For example {\it String commandName} denotes |
|
a local object {\it commandName} whose data type is String. Note that |
|
an object on the stack may have a local data type even if it is |
|
represented as CMO. |
|
|
Any server stack machine has to implement the following operations. |
Any server stack machine has to implement the following operations. |
|
For each operation we show the states of the stack before and after |
|
the operation. In the figures the rightmost object corresponds to the |
|
top of the stack. Only the modified part of the stack are shown. |
*/ |
*/ |
|
|
\begin{enumerate} |
\begin{enumerate} |
\item |
\item |
/*&jp |
/*&jp |
CMObject/Basic0 ¤Î CMO ¥Ç¡¼¥¿¤Î¤¦¤Áɬ¿Ü¤Î¤â¤Î, {\tt CMO\_ERROR2}, {\tt |
CMObject/Primitive ¤Î CMO ¥Ç¡¼¥¿¤Î¤¦¤Áɬ¿Ü¤Î¤â¤Î, {\tt CMO\_ERROR2}, {\tt |
CMO\_NULL}, {\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_LIST}¤¬¤ª¤¯ |
CMO\_NULL}, {\tt CMO\_INT32}, {\tt CMO\_STRING}, {\tt CMO\_LIST}¤¬¤ª¤¯ |
¤é¤ì¤ÆÍ褿¾ì¹ç¤½¤ì¤ò¥¹¥¿¥Ã¥¯¤Ë push ¤¹¤ë. ¤¿¤È¤¨¤Ð, {\tt CMO\_NULL} |
¤é¤ì¤ÆÍ褿¾ì¹ç¤½¤ì¤ò¥¹¥¿¥Ã¥¯¤Ë push ¤¹¤ë. ¤¿¤È¤¨¤Ð, {\tt CMO\_NULL} |
¤¢¤ë¤¤¤Ï {\tt CMO\_String} ¤Î¾ì¹ç¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. |
¤¢¤ë¤¤¤Ï {\tt CMO\_String} ¤Î¾ì¹ç¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
Any server should accept CMObjects in the group CMObject/Basic0. |
Any server should accept CMObjects in the group CMObject/Primitive. |
The server pushes such data onto the stack. |
The server pushes such data onto the stack. |
The following examples show the states of the stack after receiving |
The following examples show the states of the stack after receiving |
{\tt CMO\_NULL} or {\tt CMO\_String} respectively. |
{\tt CMO\_NULL} or {\tt CMO\_String} respectively. |
Line 139 Stack after the request: |
|
Line 147 Stack after the request: |
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp Result: ¤Ê¤·. |
Output: none. |
//&eg Result: none. |
|
|
|
Request: |
Request:\\ |
\begin{tabular}{|c|c|c|c|c|c|} \hline |
\begin{tabular}{|c|c|c|c|c|c|} \hline |
{\tt int32 OX\_DATA} & {\tt int32 CMO\_String} &{\tt int32} {\rm size} |
{\tt int32 OX\_DATA} & {\tt int32 CMO\_String} &{\tt int32} {\rm size} |
&{\tt byte} {\rm s1} & $\cdots$ &{\tt byte} {\rm ssize}\\ |
&{\tt byte} {\rm s1} & $\cdots$ &{\tt byte} {\rm ssize}\\ |
Line 155 Stack after the request: |
|
Line 162 Stack after the request: |
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp Result: ¤Ê¤·. |
Output: none. |
//&eg Result: none. |
|
|
|
//&jp CMO ¥Ç¡¼¥¿¤Î¼õ¤±¼è¤ê¤Ë¼ºÇÔ¤·¤¿»þ¤Î¤ß \\ |
//&jp CMO ¥Ç¡¼¥¿¤Î¼õ¤±¼è¤ê¤Ë¼ºÇÔ¤·¤¿»þ¤Î¤ß \\ |
//&eg If the server fails to receive a CMO data, |
//&eg If the server fails to receive a CMO data,\\ |
\begin{tabular}{|c|c|c|} \hline |
\begin{tabular}{|c|c|c|} \hline |
{\tt int32 OX\_DATA} & {\tt int32 CMO\_ERROR2} & {\it CMObject} ob\\ |
{\tt int32 OX\_DATA} & {\tt int32 CMO\_ERROR2} & {\it CMObject} ob\\ |
\hline |
\hline |
|
|
/*&jp |
/*&jp |
¤³¤Î¥µ¡¼¥Ð¤Î mathcap ¤ò¤â¤É¤¹ (termcap ¤Î¤Þ¤Í). ¥µ¡¼¥Ð¤Î¥¿¥¤¥×, ¥µ¡¼ |
¤³¤Î¥µ¡¼¥Ð¤Î mathcap ¤ò¤â¤É¤¹ (termcap ¤Î¤Þ¤Í). ¥µ¡¼¥Ð¤Î¥¿¥¤¥×, ¥µ¡¼ |
¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎǽÎϤòÃΤ뤳¤È¤¬¤Ç¤¤ë. C ¸À¸ì¤Ç¼ÂÁõ¤¹¤ë¾ì¹ç¤Ï, |
¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎǽÎϤòÃΤ뤳¤È¤¬¤Ç¤¤ë. C ¸À¸ì¤Ç¼ÂÁõ¤¹¤ë¾ì¹ç¤Ï, |
mathCap ¤Î¹½Â¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤Ï¤½¤Î¹½Â¤ÂΤؤΠ|
mathcap ¤Î¹½Â¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤Ï¤½¤Î¹½Â¤ÂΤؤΠ|
¥Ý¥¤¥ó¥¿¤òÌ᤹. (open sm1 ¤Ç¤Ï {\tt struct mathCap} ¤òÍѤ¤¤Æ¤¤¤ë. |
¥Ý¥¤¥ó¥¿¤òÌ᤹. (open sm1 ¤Ç¤Ï {\tt struct mathcap} ¤òÍѤ¤¤Æ¤¤¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
It request to push the mathcap of the server. |
It requests a server to push the mathcap of the server. |
The mathcap is similar to the termcap. One can know the server type |
The mathcap is similar to the termcap. One can know the server type |
and the capability of the server from the mathcap. |
and the capability of the server from the mathcap. |
*/ |
*/ |
|
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
Result: |
Stack after the request: |
\begin{tabular}{|c|c|} \hline |
\begin{tabular}{|c|c|} \hline |
{\tt int32 OX\_DATA} & {\sl Mathcap} mathCapOb \\ |
{\tt int32 OX\_DATA} & {\sl Mathcap} mathCapOb \\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
|
Output: none. |
|
|
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
SM_setMathCap |
SM_setMathcap |
\end{verbatim} |
\end{verbatim} |
/*&jp |
/*&jp |
¼õ¤±¼è¤Ã¤¿ Mathcap {\tt m} ¤ò¼«Ê¬¤Î¥·¥¹¥Æ¥à¤ËÀßÄꤷ¤Æ, Áê¼ê¦¤¬Íý²òÉÔ |
¼õ¤±¼è¤Ã¤¿ Mathcap {\tt m} ¤ò¼«Ê¬¤Î¥·¥¹¥Æ¥à¤ËÀßÄꤷ¤Æ, Áê¼ê¦¤¬Íý²òÉÔ |
ǽ¤Ê CMO ¤ò¤ª¤¯¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë. C ¸À¸ì¤Ç¼ÂÁõ¤¹¤ë¾ì¹ç¤Ï, mathCap ¤Î¹½ |
ǽ¤Ê CMO ¤ò¤ª¤¯¤é¤Ê¤¤¤è¤¦¤Ë¤¹¤ë. C ¸À¸ì¤Ç¼ÂÁõ¤¹¤ë¾ì¹ç¤Ï, mathcap ¤Î¹½ |
¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤Ï¤½¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤ò°ú |
¤ÂΤò¥·¥¹¥Æ¥àËè¤Ë¤¤á¤ë¤â¤Î¤È¤·,¤³¤Î´Ø¿ô¤Ï¤½¤Î¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤ò°ú |
¿ô¤È¤¹¤ë. (open sm1 ¤Ç¤Ï {\tt struct mathCap} ¤òÍѤ¤¤Æ¤¤¤ë. |
¿ô¤È¤¹¤ë. (open sm1 ¤Ç¤Ï {\tt struct mathcap} ¤òÍѤ¤¤Æ¤¤¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
It requests to register the peer's mathcap {\tt m} in the server. |
It requests a server to register the peer's mathcap {\tt m} in the server. |
The server can avoid to send OX messages unknown to its peer. |
The server can avoid to send OX messages unknown to its peer. |
*/ |
*/ |
@plugin/mathcap.h) |
@plugin/mathcap.h) |
|
|
|
Stack before the request: |
|
\begin{tabular}{|c|} \hline |
|
{\it Mathcap m} \\ |
|
\hline |
|
\end{tabular}\\ |
Request: |
Request: |
\begin{tabular}{|c|c|} \hline |
\begin{tabular}{|c|c|} \hline |
{\tt int32 OX\_DATA} & {\sl Mathcap} m \\ \hline |
{\tt int32 OX\_DATA} & {\sl Mathcap} m \\ \hline |
{\tt int32 OX\_COMMAND} & {\tt int32 SM\_setMathCap} \\ |
{\tt int32 OX\_COMMAND} & {\tt int32 SM\_setMathcap} \\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp Result: ¤Ê¤·. \\ |
Output: none. |
//&eg Result: none. \\ |
|
/*&jp |
/*&jp |
\noindent |
\noindent |
Ãí°Õ: mathcap ¤Ï°ìÈ̤˥¯¥é¥¤¥¢¥ó¥È¼çÂΤÇÀßÄꤹ¤ë. |
Ãí°Õ: mathcap ¤Ï°ìÈ̤˥¯¥é¥¤¥¢¥ó¥È¼çÂΤÇÀßÄꤹ¤ë. |
|
|
¤½¤ì¤ò, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¤½¤Î¥µ¡¼¥Ð¤ËÉտ路¤¿ mathcap ¤È¤·¤Æ |
¤½¤ì¤ò, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¤½¤Î¥µ¡¼¥Ð¤ËÉտ路¤¿ mathcap ¤È¤·¤Æ |
ÀßÄꤹ¤ë. |
ÀßÄꤹ¤ë. |
¼¡¤Ë, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥µ¡¼¥Ð¤Ë¼«Ê¬¤Î mathcap ¤ò |
¼¡¤Ë, ¥¯¥é¥¤¥¢¥ó¥È¤Ï¥µ¡¼¥Ð¤Ë¼«Ê¬¤Î mathcap ¤ò |
{\tt SM\_setMathCap} ¤Ç¤ª¤¯¤ê, ¼«Ê¬¤Î mathcap ¤òÀßÄꤵ¤»¤ë. |
{\tt SM\_setMathcap} ¤Ç¤ª¤¯¤ê, ¼«Ê¬¤Î mathcap ¤òÀßÄꤵ¤»¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
\noindent |
\noindent |
Remark: In general the exchange of mathcaps is triggered by a client. |
Remark: In general the exchange of mathcaps is triggered by a client. |
A client sends {\tt SM\_mathcap} to a server and obtains the server's |
A client sends {\tt SM\_mathcap} to a server and obtains the server's |
mathcap. Then the client registers the mathcap. Finally the client |
mathcap. Then the client registers the mathcap. Finally the client |
sends its own mathcap by {\tt SM\_setMathCap} and the server |
sends its own mathcap by {\tt SM\_setMathcap} and the server |
registers it. |
registers it. |
*/ |
*/ |
|
|
|
|
SM_executeStringByLocalParser |
SM_executeStringByLocalParser |
\end{verbatim} |
\end{verbatim} |
/*&jp |
/*&jp |
ʸ»úÎó $s$ ¤ò¥·¥¹¥Æ¥à xxx ¤Îʸˡ(¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎÁȤ߹þ¤ß¥í¡¼¥« |
ʸ»úÎó {\tt s} ¤ò stack ¤«¤é pop ¤·, |
¥ë¸À¸ì)¤Ë¤·¤¿¤¬¤Ã¤¿¥³¥Þ¥ó¥É¤È¤·¤Æ¼Â¹Ô¤¹¤ë. ¤¿¤À¤·, ¥³¥Þ¥ó¥É¤Î¼Â¹Ô¤Î·ë |
¤½¤Îʸ»úÎó¤ò¥·¥¹¥Æ¥à¸ÇͤÎʸˡ(¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎÁȤ߹þ¤ß¥í¡¼¥« |
|
¥ë¸À¸ì)¤Ë¤·¤¿¤¬¤Ã¤¿¥³¥Þ¥ó¥É¤È¤·¤Æ¼Â¹Ô¤¹¤ë. ¥³¥Þ¥ó¥É¤Î¼Â¹Ô¤Î·ë |
²Ì¤ÎºÇ¸å¤ËÌá¤êÃͤ¬¤¢¤ë¤È¤¤Ï, {\tt OperandStack} ¤ËÌá¤êÃͤò push ¤¹¤ë. |
²Ì¤ÎºÇ¸å¤ËÌá¤êÃͤ¬¤¢¤ë¤È¤¤Ï, {\tt OperandStack} ¤ËÌá¤êÃͤò push ¤¹¤ë. |
Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤¹. debug ¥â¡¼¥É¤Ë¤Ï¤¤¤Ã¤¿¾ì |
OpenXM ¤Ç¤Ï, ¸½ºß¤Î¤È¤³¤í´Ø¿ô̾¤Îɸ½à²½¤Ï¤ª¤³¤Ê¤Ã¤Æ¤¤¤Ê¤¤. |
¹ç, -2 ¤òÌ᤹. ¥¨¥é¡¼¤Î»þ Error2 Object¤ò stack ¤Ø push ¤¹¤ë.\\ {\tt |
|
kan/sm1} ¤Î¾ì¹ç, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤ÎÁȤ߹þ¤ß¥í¡¼¥«¥ë¸À¸ì¤Ï{\tt sm1} |
|
¥Ý¥¹¥È¥¹¥¯¥ê¥×¥È¸À¸ì¤Ç¤¢¤ë. ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤È, {\tt sm1} ¥Ý¥¹¥È |
|
¥¹¥¯¥ê¥×¥È¸À¸ì¤Ï¥¹¥¿¥Ã¥¯¤ò¶¦Í¤¹¤ë¤è¤¦¤Ë¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë. ¼ÂºÝ¤Î·×»»¤Ï |
|
{\tt executeStringByLocalParser} ¤Ë¤è¤ê¼Â¹Ô¤µ¤ì¤ë. open XM ¤Ç¤Ï, ¸½ºß |
|
¤Î¤È¤³¤í´Ø¿ô̾¤Îɸ½à²½¤Ï¤ª¤³¤Ê¤Ã¤Æ¤¤¤Ê¤¤. ¤·¤¿¤¬¤Ã¤Æ, ¼ÂºÝ¤Î·×»»¥³¥Þ |
|
¥ó¥É¤ÎÁ÷½Ð¤Ï mathcap ¤ò¤ß¤Æ¥¯¥é¥¤¥¢¥ó¥È¤¬Àµ¤·¤¤¥³¥Þ¥ó¥É¤òÁªÂò¤¹¤ëɬÍ× |
|
¤¬¤¢¤ë. (¤·¤«¤·¤Ê¤¬¤é, ¶¦ÄÌ´Ø¿ô̾¤¬¤Ê¤¤¤¿¤á¤Ë, ¶¦ÄÌ»ÅÍͤΥµ¡¼¥Ð¥¹¥¿¥Ã |
|
¥¯¥Þ¥·¥ó¤Î¼ÂÁõ¤Ï¤¤ï¤á¤Æ´Êñ¤Ç¤¢¤ë. ´Ø¿ô̾¤Î¶¦Ä̲½¤Ï¾Íè¤Î²ÝÂê.) \\³ä |
|
¹þ¤ß¤Ë´Ø¤·¤Æ¤Ï, -1 ¤òÌ᤹¤è¤¦¤Ë ¥Ï¥ó¥É¥é¤ò½ñ¤¯. |
|
executeStringByLocalParser() ¤òºÆµ¢Åª¤Ë¸Æ¤ó¤À¤È¤¤â ³ä¤ê¹þ¤ß¤Î¥Ï¥ó¥É¥é |
|
¤¬Àµ¤·¤¯Æ°ºî¤¹¤ë¤è¤¦¤Ë¤³¤Î´Ø¿ô¤Ï½ñ¤«¤ì¤ë¤Ù¤¤Ç¤¢¤ë. ¤³¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð |
|
¤·¤¿¤Î¤Á, signal, setjmp ¤ÎºÆÀßÄê¤ò¸Æ¤Ó½Ð¤·Â¦¤Ç¤ä¤é¤Ê¤¤¤È¤¤¤±¤Ê¤¤. \\ |
|
¤³¤Î´Ø¿ô¤ª¤è¤Ó {\tt popString} ¤Îµ¡Ç½¤ò¼Â¸½¤¹¤ì¤Ð, ºÇÄã¸Â¤Î open XM ¤Î |
¤³¤Î´Ø¿ô¤ª¤è¤Ó {\tt popString} ¤Îµ¡Ç½¤ò¼Â¸½¤¹¤ì¤Ð, ºÇÄã¸Â¤Î open XM ¤Î |
¥µ¡¼¥Ð¤Ë¤Ê¤ì¤ë. ¼ÂÁõ¤Ç¤Ï, ¤Þ¤º¤³¤ÎÆó¤Ä¤Î´Ø¿ô¤Îµ¡Ç½¤ò¼Â¸½¤¹¤Ù¤¤Ç¤¢¤ë. |
¥µ¡¼¥Ð¤Ë¤Ê¤ì¤ë. ¼ÂÁõ¤Ç¤Ï, ¤Þ¤º¤³¤ÎÆó¤Ä¤Î´Ø¿ô¤Îµ¡Ç½¤ò¼Â¸½¤¹¤Ù¤¤Ç¤¢¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
A character string $s$ is parsed by the local parser of the stack |
It requests a server to pop a character string {\tt s}, to |
machine and interpreted by the local interpreter. |
parse it by the local parser of the stack machine, and |
If the exececution produces a result, it is pushed onto |
to interpret by the local interpreter. |
|
If the execution produces a Output, it is pushed onto |
{\tt OperandStack}. |
{\tt OperandStack}. |
If an error has occured, Error2 Object is pushed onto the stack. |
If an error has occurred, Error2 Object is pushed onto the stack. |
OpenXM does not provide standard function names. |
OpenXM does not provide standard function names. |
If this operation and {\tt SM\_popString} is implemented, the stack machine |
If this operation and {\tt SM\_popString} is implemented, the stack machine |
can be used as an OX server. |
is ready to be used as an OX server. |
*/ |
*/ |
|
|
Stack before the request: |
Stack before the request: |
|
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp Result: ¤Ê¤·. |
Output: none. |
//&eg Result: none. |
|
/*&jp |
/*&jp |
\noindent |
\noindent |
»²¹Í: \ ¼Â¹ÔÁ°¤Î¥¹¥¿¥Ã¥¯¤Î¥Ç¡¼¥¿¤Ï, |
»²¹Í: \ ¼Â¹ÔÁ°¤Î¥¹¥¿¥Ã¥¯¤Î¥Ç¡¼¥¿¤Ï, |
{\it String commandString} ¤Ê¤ë local stackmachine ¤Î object ¤È¤·¤Æ¥¹ |
{\it String commandString} ¤Ê¤ë local stack machine ¤Î object ¤È¤·¤Æ¥¹ |
¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤¬, TCP/IP ¤ÎÄÌ¿®Ï©¤Ç¤Ï, ¼¡¤Î¤è¤¦¤Ê¥Ç¡¼¥¿¤¬¤Þ¤º¤Ê¤¬¤ì¤Æ |
¥¿¥Ã¥¯¾å¤Ë¤¢¤ë¤¬, TCP/IP ¤ÎÄÌ¿®Ï©¤Ç¤Ï, ¼¡¤Î¤è¤¦¤Ê¥Ç¡¼¥¿¤¬¤Þ¤º¤Ê¤¬¤ì¤Æ |
{\it commandName} ¤¬¥¹¥¿¥Ã¥¯¤Ë push ¤µ¤ì¤ë: |
{\it commandName} ¤¬¥¹¥¿¥Ã¥¯¤Ë push ¤µ¤ì¤ë: |
*/ |
*/ |
Line 337 SM_executeStringByLocalParserInBatchMode |
|
Line 337 SM_executeStringByLocalParserInBatchMode |
|
/*&eg |
/*&eg |
This is the same request as {\tt SM\_executeStringByLocalParser} |
This is the same request as {\tt SM\_executeStringByLocalParser} |
except that it does not modify the stack. It pushes an Error2 Object |
except that it does not modify the stack. It pushes an Error2 Object |
if an error has occured. |
if an error has occurred. |
*/ |
*/ |
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
|
|
/*&jp |
/*&jp |
{\tt OperandStack} ¤è¤ê Object ¤ò pop ¤·, ¤½¤ì¤ò xxx ¤Î½ÐÎϵ¬Â§¤Ë¤·¤¿¤¬¤¤Ê¸ |
{\tt OperandStack} ¤è¤ê Object ¤ò pop ¤·, ¤½¤ì¤ò xxx ¤Î½ÐÎϵ¬Â§¤Ë¤·¤¿¤¬¤¤Ê¸ |
»úÎ󷿤ËÊÑ´¹¤·¤ÆÁ÷¿®¤¹¤ë. ¥¹¥¿¥Ã¥¯¤¬¶õ¤Î¤È¤¤Ï, {\tt (char *)NULL} ¤òÌ᤹. |
»úÎ󷿤ËÊÑ´¹¤·¤ÆÁ÷¿®¤¹¤ë. ¥¹¥¿¥Ã¥¯¤¬¶õ¤Î¤È¤¤Ï, {\tt (char *)NULL} ¤òÌ᤹. |
ʸ»úÎó¤Ï {\tt ox\_stream out}¤Ø CMO ¤Î¥Ç¡¼ |
ʸ»úÎó¤Ï TCP/IP stream ¤Ø CMO ¤Î¥Ç¡¼ |
¥¿¤È¤·¤ÆÁ÷¿®¤¹¤ë. ¥¨¥é¡¼¤Î¾ì¹ç¤Ï {\tt CMO\_ERROR2} ¤òÌ᤹¤Ù¤¤Ç¤¢¤ë. |
¥¿¤È¤·¤ÆÁ÷¿®¤¹¤ë. ¥¨¥é¡¼¤Î¾ì¹ç¤Ï {\tt CMO\_ERROR2} ¤òÌ᤹¤Ù¤¤Ç¤¢¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
It requests for a server to pop an object from {\tt OperandStack}, |
It requests a server to pop an object from {\tt OperandStack}, |
to convert it into a character string according to the output format |
to convert it into a character string according to the output format |
of the local system, and to send the character string via TCP/IP stream. |
of the local system, and to send the character string via TCP/IP stream. |
{\tt (char *)NULL} is returned when the stack is empty. |
{\tt (char *)NULL} is returned when the stack is empty. |
The returned strings is sent as a CMO string data. |
The returned string is sent as a CMO string data. |
{\tt CMO\_ERROR2} should be returned if an error has occured. |
{\tt CMO\_ERROR2} should be returned if an error has occurred. |
*/ |
*/ |
|
|
Stack before the request: |
Stack before the request: |
|
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
Result: |
Output: |
\begin{tabular}{|c|c|c|} \hline |
\begin{tabular}{|c|c|c|} \hline |
{\tt int32 OX\_DATA} & {\tt int32 CMO\_STRING} & {\it size and the string s} \\ |
{\tt int32 OX\_DATA} & {\tt int32 CMO\_STRING} & {\it size and the string s} \\ |
\hline |
\hline |
|
|
object ¤¬ push ¤µ¤ì¤¿¤Ð¤¢¤¤, 1 ¤Å¤ÄÁý¤¨¤ë¤â¤Î¤È¤¹¤ë. |
object ¤¬ push ¤µ¤ì¤¿¤Ð¤¢¤¤, 1 ¤Å¤ÄÁý¤¨¤ë¤â¤Î¤È¤¹¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
It request to push the current stack pointer onto the stack. |
It requests a server to push the current stack pointer onto the stack. |
The stack pointer is represented by a non-negative integer. |
The stack pointer is represented by a non-negative integer. |
Its initial value is 0 and a push operation increments the |
Its initial value is 0 and a push operation increments the |
stack pointer by 1. |
stack pointer by 1. |
|
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
Result: |
Stack after the request: |
\begin{tabular}{|c|c|c|} \hline |
\begin{tabular}{|c|c|c|} \hline |
{\tt int32 OX\_DATA} & {\tt int32 CMO\_INT32} & {\it stack pointer value} \\ |
{\tt int32 OX\_DATA} & {\tt int32 CMO\_INT32} & {\it stack pointer value} \\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
|
Output: none. |
|
|
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
SM_dupErrors |
SM_dupErrors |
|
|
¤µ¤»¤Ê¤¤. |
¤µ¤»¤Ê¤¤. |
*/ |
*/ |
/*&eg |
/*&eg |
It requests to push a list object containing all error objects on the stack. |
It requests a server to push a list object containing all error objects on the stack. |
*/ |
*/ |
|
|
Stack before the request: |
Request: |
\begin{tabular}{|c|} \hline |
\begin{tabular}{|c|c|} \hline |
{\it Object} \\ |
{\tt int32 OX\_COMMAND} & {\tt int32 SM\_dupErrors} \\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
|
Stack after the request: |
|
\begin{tabular}{|c|c|c|} \hline |
|
{\tt int32 OX\_DATA} & {\sl CMObject} \ a list of errors\\ |
|
\hline |
|
\end{tabular} |
|
|
|
Output: none. |
|
|
|
\item |
|
\begin{verbatim} |
|
SM_pushCMOtag |
|
\end{verbatim} |
|
/*&jp |
|
¥¹¥¿¥Ã¥¯¤ÎÀèƬ¥ª¥Ö¥¸¥§¥¯¥È¤¬ CMO ¤ËÊÑ´¹¤µ¤ì¤¿¾ì¹ç¤Î CMO tag ¤ò |
|
{\tt CMO\_INT32} ¤È¤·¤Æ¥¹¥¿¥Ã¥¯¤Ø push ¤¹¤ë. |
|
ÀèƬ¥ª¥Ö¥¸¥§¥¯¥È¤Ï¥¹¥¿¥Ã¥¯¤Ëα¤Þ¤ë. |
|
ÀèƬ¥ª¥Ö¥¸¥§¥¯¥È¤òCMO ¤ØÊÑ´¹¤¹¤ëÊýË¡¤¬Ìµ¤¤¾ì¹ç¤Ï, ¥¨¥é¡¼ object ¤òÀѤà. |
|
*/ |
|
/*&eg |
|
It requests a server to push the CMO tag of the top object on the server |
|
stack. The tag is pushed as {\tt CMO\_INT32}. |
|
The top object remains on the stack. |
|
If there is no way to translate the object into CMO, |
|
push an error object. |
|
*/ |
|
|
Request: |
Request: |
\begin{tabular}{|c|c|} \hline |
\begin{tabular}{|c|c|} \hline |
{\tt int32 OX\_COMMAND} & {\tt int32 SM\_dupErrors} \\ |
{\tt int32 OX\_COMMAND} & {\tt int32 SM\_pushCMOtag} \\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
Result: |
Stack after the request: |
\begin{tabular}{|c|c|c|} \hline |
\begin{tabular}{|c|c|c|} \hline |
{\tt int32 OX\_DATA} & {\sl CMObject} \ a list of errors\\ |
{\tt int32 OX\_DATA} & {\sl CMO\_INT32} \ tag\\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
|
Output: none. |
\end{enumerate} |
\end{enumerate} |
|
|
\medbreak |
\medbreak |
\noindent |
\noindent |
|
|
|
//&C \subsubsection{ MathCap } \label{subsubsection:mathcap} |
|
|
/*&jp |
/*&jp |
{\bf Îã}: \ |
{\bf Îã}: \ |
mathcap ¤ÎÌ䤤¹ç¤ï¤»¤ËÂФ·¤Æ, {\tt ox\_sm1} ¤Ï¼¡¤Î¤è¤¦¤ËÅú¤¨¤ë. |
mathcap ¤ÎÌ䤤¹ç¤ï¤»¤ËÂФ·¤Æ, {\tt ox\_sm1} ¤Ï¼¡¤Î¤è¤¦¤ËÅú¤¨¤ë. |
Line 450 mathcap ¤ÎÌ䤤¹ç¤ï¤»¤ËÂФ·¤Æ, {\tt ox\_sm1} ¤Ï¼¡¤Î¤è¤¦ |
|
Line 483 mathcap ¤ÎÌ䤤¹ç¤ï¤»¤ËÂФ·¤Æ, {\tt ox\_sm1} ¤Ï¼¡¤Î¤è¤¦ |
|
{\bf Example}: \ |
{\bf Example}: \ |
{\tt ox\_sm1} returns the following data as its mathcap. |
{\tt ox\_sm1} returns the following data as its mathcap. |
*/ |
*/ |
%%Prog: [(cmoMathCap)] extension :: |
%%Prog: [(cmoMathcap)] extension :: |
\begin{verbatim} |
\begin{verbatim} |
Class.mathcap |
Class.mathcap |
[ [199909080 , $Ox_system=ox_sm1.plain$ , $Version=2.990911$ , |
[ [199909080 , $Ox_system=ox_sm1.plain$ , $Version=2.990911$ , |
|
|
|
|
/*&jp |
/*&jp |
mathcap ¤Ï 3¤Ä¤ÎÍ×ÁǤò¤â¤Ä¥ê¥¹¥È¤Ç¤¢¤ë. ¤Þ¤Å, ºÇ½é¤ÎÍ×ÁǤò¸«¤è¤¦. |
mathcap ¤Ï 3¤Ä¤ÎÍ×ÁǤò¤â¤Ä¥ê¥¹¥È¤Ç¤¢¤ë. ¤Þ¤Å, ºÇ½é¤ÎÍ×ÁǤò¸«¤è¤¦. |
Ox\_system ¤Ï open xxx ¥·¥¹¥Æ¥à̾¤Ç¤¢¤ë. Æɤ߹þ¤à¥é¥¤¥Ö¥é¥ê¤¬¤Á¤¬¤Ã¤Æ |
ºÇ½é¤Î¿ô»ú¤Ï OpenXM ¥×¥í¥È¥³¥ë¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤¢¤ë. |
|
¸½ºß¤Ç¤Ï 1.1.3 Åù¤Î¥Ð¡¼¥¸¥ç¥ó¤¬ 001001003 ¤È¿ô»ú¤Ë¥¨¥ó¥³¡¼¥É¤µ¤ì¤Æ |
|
¤³¤³¤Ë³ÊǼ¤µ¤ì¤ë. |
|
Ox\_system ¤Ï openXM ¥·¥¹¥Æ¥à̾¤Ç¤¢¤ë. Æɤ߹þ¤à¥é¥¤¥Ö¥é¥ê¤¬¤Á¤¬¤Ã¤Æ |
¤¤¤Æ, ´Ø¿ô̾(¤Þ¤¿¤Ï ¥·¥ó¥Ü¥ë)¤Î°ÕÌ£¤¬¤Á¤¬¤¦¤È¤¤Ï¤³¤Î̾Á°¤â¤«¤¨¤ë. ¤¿ |
¤¤¤Æ, ´Ø¿ô̾(¤Þ¤¿¤Ï ¥·¥ó¥Ü¥ë)¤Î°ÕÌ£¤¬¤Á¤¬¤¦¤È¤¤Ï¤³¤Î̾Á°¤â¤«¤¨¤ë. ¤¿ |
¤È¤¨¤Ð, open math ¤Î basic content dictionary Âбþ¤Î´Ø¿ôÄêµÁ¥Þ¥¯¥í¤òÆÉ |
¤È¤¨¤Ð, open math ¤Î basic content dictionary Âбþ¤Î´Ø¿ôÄêµÁ¥Þ¥¯¥í¤òÆÉ |
¤ß¤³¤ó¤À sm1 ¤Ï, ox\_sm1\_basicCD ¤Ê¤ë̾Á°¤Ë¤¹¤ë. HOSTTYPEÃͤÏ, CPU |
¤ß¤³¤ó¤À sm1 ¤Ï, ox\_sm1\_basicCD ¤Ê¤ë̾Á°¤Ë¤¹¤ë. HOSTTYPE ÃͤÏ, CPU |
¤Î¼ïÎà¤ò¤¢¤é¤ï¤·unix ¤Ç¤Ï´Ä¶ÊÑ¿ô\verb+$HOSTTYPE+ ¤ÎÃͤǤ¢¤ë. 2 ÈÖÌÜ |
¤Î¼ïÎà¤ò¤¢¤é¤ï¤·unix ¤Ç¤Ï´Ä¶ÊÑ¿ô\verb+$HOSTTYPE+ ¤ÎÃͤǤ¢¤ë. 2 ÈÖÌÜ |
¤ÎÍ×ÁÇ¤Ï ÍøÍѲÄǽ¤Ê SM ¥³¥Þ¥ó¥É¤ò¤¢¤Ä¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë. 3 ÈÖÌܤΥꥹ¥È |
¤ÎÍ×ÁÇ¤Ï ÍøÍѲÄǽ¤Ê SM ¥³¥Þ¥ó¥É¤ò¤¢¤Ä¤á¤¿¥ê¥¹¥È¤Ç¤¢¤ë. 3 ÈÖÌܤΥꥹ¥È |
¤Ï, ½èÍý²Äǽ¤Ê¿ô³Ø¥Ç¡¼¥¿¤Î·Á¼°, ¤ª¤è¤ÓCMO¤Î¾ì¹ç¤Ê¤é½èÍý²Äǽ¤ÊCMO¤Î¥¿¥° |
¤Ï, ½èÍý²Äǽ¤Ê¿ô³Ø¥Ç¡¼¥¿¤Î·Á¼°, ¤ª¤è¤ÓCMO¤Î¾ì¹ç¤Ê¤é½èÍý²Äǽ¤ÊCMO¤Î¥¿¥° |
Line 474 Ox\_system ¤Ï open xxx ¥·¥¹¥Æ¥à̾¤Ç¤¢¤ë. Æɤ߹þ¤à¥é¥¤ |
|
Line 510 Ox\_system ¤Ï open xxx ¥·¥¹¥Æ¥à̾¤Ç¤¢¤ë. Æɤ߹þ¤à¥é¥¤ |
|
*/ |
*/ |
/*&eg |
/*&eg |
A mathcap has three components. The first one contains informations |
A mathcap has three components. The first one contains informations |
to identify the system and hosts on which the application runs. |
to identify the version number of the OpenXM protocol, |
In the above example, Ox\_system denotes the system name. |
the system and hosts on which the application runs. |
HOSTTYPE represents the OS type and taken from \verb+$HOSTTYPE+ |
In the above example, {\tt Ox\_system} denotes the system name. |
|
{\tt HOSTTYPE} represents the OS type and taken from \verb+$HOSTTYPE+ |
enviroment variable. |
enviroment variable. |
The second component consists of avaiable SM commands. |
The second component consists of avaiable SM commands. |
The third component is a list of pairs. Each pair consists |
The third component is a list of pairs. Each pair consists |
of an OX message tag and the available message tags. |
of an OX message tag and the list of available message tags. |
Again in the above example, 514 is the value of {\tt OX\_DATA} |
Again in the above example, 514 is the value of {\tt OX\_DATA} |
and it indicates that the server accepts CMO (without size information) |
and it indicates that the server accepts CMO (without size information) |
as mathematical data messages. In this case the subsequent |
as mathematical data messages. In this case the subsequent |
list represents available CMO tags. |
list represents available CMO tags. |
*/ |
*/ |
|
|
|
/*&C |
|
\noindent |
|
OpenXM/XML expression of the example above: |
|
\begin{verbatim} |
|
<cmo_mathcap> |
|
<cmo_list for="mathcap"> |
|
|
|
<cmo_list> |
|
<int32 for="length"> 4 </int32> |
|
<int32 for="Protocol version"> 001001003 </int32> |
|
<cmo_string for="system name"> Ox_system=ox_sm1.plain </cmo_string> |
|
<cmo_string for="system version"> Version=2.990911 </cmo_string> |
|
<cmo_string for="hosttype"> HOSTTYPE=i386 </cmo_string> |
|
</cmo_list> |
|
|
|
<cmo_list for="Available SM tags"> |
|
<int32 for="length"> 11 </int32> |
|
<int32> 262 </int32> |
|
<int32> 263 </int32> |
|
... |
|
</cmo_list> |
|
|
|
<cmo_list for="Available OX_DATA tags"> |
|
<int32 for="length"> 2 </int32> |
|
<cmo_list for="OX_DATA tag"> |
|
<int32 for="length"> 1 </int32> |
|
<int32 comment="OX_DATA"> 514 </int32> |
|
</cmo_list> |
|
<cmo_list for="Available CMO tags"> |
|
<int32 for="length"> 21 </int32> |
|
<int32 comment="CMO_ERROR2"> 2130706434 </int32> |
|
<int32 comment="CMO_NULL"> 1 </int32> |
|
.... |
|
</cmo_list> |
|
|
|
</cmo_list> |
|
</cmo_list> |
|
</cmo_mathcap> |
|
\end{verbatim} |
|
*/ |
|
|
\medbreak |
\medbreak |
|
|
|
//&jp \subsubsection{ Îã } |
|
//&eg \subsubsection{ Examples } |
|
|
\noindent |
\noindent |
//&jp {\bf Îã}: \ |
//&jp {\bf Îã}: \ |
//&eg {\bf Example}: \ |
//&eg {\bf Example}: \ |
%%Prog: (ox.sm1) run sm1connectr [(oxWatch) ox.ccc] extension |
%%Prog: (ox.sm1) run sm1connectr [(oxWatch) ox.ccc] extension |
%%Prog: ox.ccc (122345; ) oxsubmit ; |
%%Prog: ox.ccc (122345; ) oxsubmit ; |
//&jp {\tt message\_body} ¤Î¼ÂÎã¤ò¤¢¤²¤ë. ¥·¥ê¥¢¥ëÈÖ¹æÉô¤Ï½ü¤¤¤Æ¤¢¤ë. |
//&jp {\tt message\_body} ¤Î¼ÂÎã¤ò¤¢¤²¤ë. ¥·¥ê¥¢¥ëÈÖ¹æÉô¤Ï½ü¤¤¤Æ¤¢¤ë. |
//&eg {\tt message\_body} ¤Î¼ÂÎã¤ò¤¢¤²¤ë. ¥·¥ê¥¢¥ëÈÖ¹æÉô¤Ï½ü¤¤¤Æ¤¢¤ë. |
//&eg We show examples of {\tt message\_body}. Serial numbers are omitted. |
\begin{enumerate} |
\begin{enumerate} |
\item {\tt executeStringByLocalParser("12345 ;");} |
\item {\tt executeStringByLocalParser("12345 ;");} |
/*&jp |
/*&jp |
Line 502 list represents available CMO tags. |
|
Line 584 list represents available CMO tags. |
|
{\tt xx(yy)} ¤Î¤Ê¤«¤Î {\tt (yy)} ¤ÏÂбþ¤¹¤ë¥¢¥¹¥¡¼¥³¡¼¥É¤ò¤¢¤ï¤é¤¹. |
{\tt xx(yy)} ¤Î¤Ê¤«¤Î {\tt (yy)} ¤ÏÂбþ¤¹¤ë¥¢¥¹¥¡¼¥³¡¼¥É¤ò¤¢¤ï¤é¤¹. |
*/ |
*/ |
/*&eg |
/*&eg |
¤Ï¼¡¤Î¤è¤¦¤Ê¥Ñ¥±¥Ã¥È¤ËÊÑ´¹¤µ¤ì¤ë. ³Æ¿ô»ú¤Ï 16¿Ê1¥Ð¥¤¥È¤ò¤¢¤é¤ï¤¹. |
is converted into the following packet. Each number denotes |
{\tt xx(yy)} ¤Î¤Ê¤«¤Î {\tt (yy)} ¤ÏÂбþ¤¹¤ë¥¢¥¹¥¡¼¥³¡¼¥É¤ò¤¢¤ï¤é¤¹. |
one byte in hexadecimal representation. |
|
{\tt (yy)} in {\tt xx(yy)} represents the corresponding ASCII code. |
*/ |
*/ |
\begin{verbatim} |
\begin{verbatim} |
0 0 2 2 0 0 0 4 0 0 0 7 |
0 0 2 2 0 0 0 4 0 0 0 7 |
Line 511 list represents available CMO tags. |
|
Line 594 list represents available CMO tags. |
|
0 0 2 1 0 0 1 c |
0 0 2 1 0 0 1 c |
\end{verbatim} |
\end{verbatim} |
/*&jp |
/*&jp |
¤³¤³¤Ç, |
¤½¤ì¤¾¤ì¤Î¥Ç¡¼¥¿¤Î°ÕÌ£¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¢¤ë. |
\verb+ 0 0 2 2 0 0 0 4 + ¤Ï, network byte order ¤Ç, |
|
½çÈÖ¤Ë {\tt OX\_DATA} ¤½¤ì¤«¤é, |
|
CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. |
|
\verb+ 0 0 0 7 + ¤Ïʸ»ú¿ô, |
|
ºÇ¸å¤Ë ʸ»úÎó {\tt 12345 ;} ¤¬Íè¤ë. |
|
¤³¤³¤Ç, \verb+ 0 0 1 c + ¤Ï, network byte order ¤Ç, |
|
{\tt OX\_executeString} ¤òɽ¤¹. |
|
*/ |
*/ |
/*&eg |
/*&eg |
¤³¤³¤Ç, |
Each data has the following meaning. |
\verb+ 0 0 2 2 0 0 0 4 + ¤Ï, network byte order ¤Ç, |
|
½çÈÖ¤Ë {\tt OX\_DATA} ¤½¤ì¤«¤é, |
|
CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. |
|
\verb+ 0 0 0 7 + ¤Ïʸ»ú¿ô, |
|
ºÇ¸å¤Ë ʸ»úÎó {\tt 12345 ;} ¤¬Íè¤ë. |
|
¤³¤³¤Ç, \verb+ 0 0 1 c + ¤Ï, network byte order ¤Ç, |
|
{\tt OX\_executeString} ¤òɽ¤¹. |
|
*/ |
*/ |
|
|
//&jp ¤Þ¤È¤á¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. |
|
//&eg ¤Þ¤È¤á¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. |
|
\begin{verbatim} |
\begin{verbatim} |
0 0 2 2 (OX_DATA) 0 0 0 4 (CMO_STRING) |
0 0 2 2 (OX_DATA) 0 0 0 4 (CMO_STRING) |
0 0 0 7 (size) |
0 0 0 7 (size) |
Line 541 CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. |
|
Line 608 CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. |
|
0 0 1 c (SM_executeStringByLocalParser) |
0 0 1 c (SM_executeStringByLocalParser) |
\end{verbatim} |
\end{verbatim} |
//&jp ¤³¤ì¤ò OXexpression ¤Çɽµ¤¹¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. |
//&jp ¤³¤ì¤ò OXexpression ¤Çɽµ¤¹¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. |
//&eg ¤³¤ì¤ò OXexpression ¤Çɽµ¤¹¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ë. |
//&eg This is expressed by OXexpression as follows. |
\begin{center} |
\begin{center} |
(OX\_DATA, (CMO\_STRING, 7, "12345 ;")) |
(OX\_DATA, (CMO\_STRING, 7, "12345 ;")) |
\end{center} |
\end{center} |
Line 550 CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. |
|
Line 617 CMO ¤Î¥¿¥°¤Î, {\tt CMO\_STRING} ¤òɽ¤¹. |
|
\end{center} |
\end{center} |
|
|
//&jp \item {\tt popString()} ¤òÍ×ÀÁ¤¹¤ë¥á¥Ã¥»¡¼¥¸: |
//&jp \item {\tt popString()} ¤òÍ×ÀÁ¤¹¤ë¥á¥Ã¥»¡¼¥¸: |
//&eg \item {\tt popString()} ¤òÍ×ÀÁ¤¹¤ë¥á¥Ã¥»¡¼¥¸: |
//&eg \item A message which requests {\tt SM\_popString}: |
\begin{verbatim} |
\begin{verbatim} |
0 0 2 1 (OX_COMMAND) |
0 0 2 1 (OX_COMMAND) |
0 0 1 7 (SM_popString) |
0 0 1 7 (SM_popString) |
\end{verbatim} |
\end{verbatim} |
OXexpression ¤Ç¤Ï |
//&jp OXexpression ¤Ç¤Ï |
|
//&eg In OXexpression it is represented as |
(OX\_COMMAND, (SM\_popString)). |
(OX\_COMMAND, (SM\_popString)). |
|
|
\noindent |
\noindent |
//&jp ¤³¤ì¤Ë¤¿¤¤¤·¤Æ¼¡¤ÎÊÖÅú¥á¥Ã¥»¡¼¥¸¤¬¤¯¤ë. |
//&jp ¤³¤ì¤Ë¤¿¤¤¤·¤Æ¼¡¤ÎÊÖÅú¥á¥Ã¥»¡¼¥¸¤¬¤¯¤ë. |
//&eg ¤³¤ì¤Ë¤¿¤¤¤·¤Æ¼¡¤ÎÊÖÅú¥á¥Ã¥»¡¼¥¸¤¬¤¯¤ë. |
//&eg The server returns the following reply message: |
\begin{verbatim} |
\begin{verbatim} |
0 0 2 2 (OX_DATA) |
0 0 2 2 (OX_DATA) |
0 0 0 4 (CMO_STRING) 0 0 0 5 (size) |
0 0 0 4 (CMO_STRING) 0 0 0 5 (size) |
31(1) 32(2) 33(3) 34(4) 35(5) |
31(1) 32(2) 33(3) 34(4) 35(5) |
\end{verbatim} |
\end{verbatim} |
//&jp OXexpression ¤Ç¤«¤¯¤È, |
//&jp OXexpression ¤Ç¤«¤¯¤È, |
//&eg OXexpression ¤Ç¤«¤¯¤È, |
//&eg In OXexpression it is represented as |
(OX\_DATA, (CMO\_STRING, 7, "12345 ;")). |
(OX\_DATA, (CMO\_STRING, 7, "12345 ;")). |
\end{enumerate} |
\end{enumerate} |
|
|
//&jp \subsubsection{¥°¥ë¡¼¥× SMobject/Basic1 ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿} |
//&jp \subsubsection{¥°¥ë¡¼¥× SMobject/Basic ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿} |
//&eg \subsubsection{¥°¥ë¡¼¥× SMobject/Basic1 ¤Ë°¤¹¤ë¥ª¥Ú¥ì¡¼¥¿} |
//&eg \subsubsection{Operators in the group SMobject/Basic} |
|
|
\begin{enumerate} |
\begin{enumerate} |
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
void xxx_pops(int n) |
SM_pops |
\end{verbatim} |
\end{verbatim} |
/*&jp |
/*&jp |
operand stack ¤è¤ê, {\it n} ¸Ä¤Î¸µ ({\it obj1, obj2, $\ldots$, objn}) |
operand stack ¤è¤ê, {\it n} ¸Ä¤Î¸µ ({\it obj1, obj2, $\ldots$, objn} |
¤ò pop ¤·¤Æ¼Î¤Æ¤ë. |
¤ò pop ¤·¤Æ¼Î¤Æ¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
operand stack ¤è¤ê, {\it n} ¸Ä¤Î¸µ ({\it obj1, obj2, $\ldots$, objn}) |
It requests a server to pop {\it n} and to discard elements {\it obj1, obj2, |
¤ò pop ¤·¤Æ¼Î¤Æ¤ë. |
$\ldots$, objn} from the stack. |
*/ |
*/ |
|
|
//&jp Stack before the request: (±¦¤¬ stack ¤Î¥È¥Ã¥×¤Ç¤¢¤ë.) \\ |
//&jp Stack before the request: \\ |
//&eg Stack before the request: (±¦¤¬ stack ¤Î¥È¥Ã¥×¤Ç¤¢¤ë.) \\ |
//&eg Stack before the request: \\ |
\begin{tabular}{|c|c|c|c|c|} \hline |
\begin{tabular}{|c|c|c|c|c|} \hline |
{\it obj1} & {\it obj2} & $\cdots$ & {\it objn} &{\it INT32 n} \\ |
{\it obj1} & {\it obj2} & $\cdots$ & {\it objn} &{\it Integer32 n} \\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
|
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp Result: ¤Ê¤·. |
Output: none. |
//&eg Result: none. |
|
|
|
|
|
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
int xxx_setName(char *name) |
int SM_setName |
\end{verbatim} |
\end{verbatim} |
/*&jp |
/*&jp |
{\tt OperandStack} ¤è¤ê {\it name} ¤ò pop ¤·, ¤Ä¤®¤Ë{\tt OperandStack} |
{\tt OperandStack} ¤è¤ê {\it name} ¤ò pop ¤·, ¤Ä¤®¤Ë{\tt OperandStack} |
Line 616 bind ¤¹¤ë. Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤ |
|
Line 683 bind ¤¹¤ë. Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤ |
|
¤ëÄÌ¿®¤Ç¤Ï, °Û¾ï½ªÎ»¤Î»þ¤Î¤ß, {\tt CMO\_ERROR2} ¤òstack ¤Ø push ¤¹¤ë. |
¤ëÄÌ¿®¤Ç¤Ï, °Û¾ï½ªÎ»¤Î»þ¤Î¤ß, {\tt CMO\_ERROR2} ¤òstack ¤Ø push ¤¹¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
{\tt OperandStack} ¤è¤ê {\it name} ¤ò pop ¤·, ¤Ä¤®¤Ë{\tt OperandStack} |
It requests a server to pop {\it name}, to pop {\it obj}, and to |
¤è¤ê {\it obj} ¤ò pop ¤·, ¤½¤ì¤ò¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤Ë |
bind {\it obj} to a variable {\it name} in the current name space |
bind ¤¹¤ë. Àµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê¤é -1 ¤ò¤â¤É¤¹. TCP/IP ¤Ë¤è |
of the server. |
¤ëÄÌ¿®¤Ç¤Ï, °Û¾ï½ªÎ»¤Î»þ¤Î¤ß, {\tt CMO\_ERROR2} ¤òstack ¤Ø push ¤¹¤ë. |
If an error has occurred {\tt CMO\_ERROR2} is pushed onto the stack. |
*/ |
*/ |
//&jp Stack before the request: (±¦¤¬ stack ¤Î top.) |
//&jp Stack before the request: |
//&eg Stack before the request: (±¦¤¬ stack ¤Î top.) |
//&eg Stack before the request: |
\begin{tabular}{|c|c|} \hline |
\begin{tabular}{|c|c|} \hline |
{\it obj} & {\it String name} \\ |
{\it obj} & {\it String name} \\ |
\hline |
\hline |
|
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp Result: ¤Ê¤·. |
Output: none. |
//&eg Result: none. |
|
|
|
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
int xxx_evalName(char *name) |
SM_evalName |
\end{verbatim} |
\end{verbatim} |
|
|
/*&jp |
/*&jp |
¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤òɾ²Á¤¹¤ë. ɾ²Á¤Î·ë²Ì {\it |
¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤òɾ²Á¤¹¤ë. ɾ²Á¤Î·ë²Ì {\it |
resultObj} ¤ò¥¹¥¿¥Ã¥¯¤ØÌ᤹. ´Ø¿ô¼«ÂΤÏÀµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê |
OutputObj} ¤ò¥¹¥¿¥Ã¥¯¤ØÌ᤹. ´Ø¿ô¼«ÂΤÏÀµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê |
¤é -1 ¤ò¤â¤É¤¹. TCP/IP ¤Î¾ì¹ç, °Û¾ï½ªÎ»¤Î¾ì¹ç¤Î¤ß {\tt CMO\_ERROR2} |
¤é -1 ¤ò¤â¤É¤¹. TCP/IP ¤Î¾ì¹ç, °Û¾ï½ªÎ»¤Î¾ì¹ç¤Î¤ß {\tt CMO\_ERROR2} |
¤ò stack ¤Ø push ¤¹¤ë. |
¤ò stack ¤Ø push ¤¹¤ë. |
*/ |
*/ |
|
|
/*&eg |
/*&eg |
¸½ºß¤Î̾Á°¶õ´Ö¤ÇÊÑ¿ô {\it name} ¤òɾ²Á¤¹¤ë. ɾ²Á¤Î·ë²Ì {\it |
It requests a server to pop {\it name} and to evaluate a variable |
resultObj} ¤ò¥¹¥¿¥Ã¥¯¤ØÌ᤹. ´Ø¿ô¼«ÂΤÏÀµ¾ï½ªÎ»¤Ê¤é 0 ¤ò, °Û¾ï½ªÎ»¤Ê |
{\it name} in the current name space. The Output of the evaluation |
¤é -1 ¤ò¤â¤É¤¹. TCP/IP ¤Î¾ì¹ç, °Û¾ï½ªÎ»¤Î¾ì¹ç¤Î¤ß {\tt CMO\_ERROR2} |
{\it OutputObj} is pushed to the stack. |
¤ò stack ¤Ø push ¤¹¤ë. |
If an error has occurred {\tt CMO\_ERROR2} is pushed onto the stack. |
*/ |
*/ |
|
|
//&jp Stack before the request: (±¦¤¬ stack ¤Î top.) |
//&jp Stack before the request: |
//&eg Stack before the request: (±¦¤¬ stack ¤Î top.) |
//&eg Stack before the request: |
\begin{tabular}{|c|} \hline |
\begin{tabular}{|c|} \hline |
{\it String name} \\ |
{\it String name} \\ |
\hline |
\hline |
|
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp Stack after the request: (±¦¤¬ stack ¤Î top.) |
//&jp Stack after the request: |
//&eg Stack after the request: (±¦¤¬ stack ¤Î top.) |
//&eg Stack after the request: |
\begin{tabular}{|c|} \hline |
\begin{tabular}{|c|} \hline |
{\it resultObj} \\ |
{\it OutputObj} \\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp Result: ¤Ê¤·. |
Output: none. |
//&eg Result: none. |
|
|
|
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
int xxx_executeFunction(char *s, int n) |
SM_executeFunction |
\end{verbatim} |
\end{verbatim} |
/*&jp |
/*&jp |
¥¹¥¿¥Ã¥¯¤è¤ê {\it n} ¸Ä¤Î¥Ç¡¼¥¿¤ò pop ¤·¤Æ, ¥µ¡¼¥Ð¤Î¥í¡¼¥«¥ë´Ø¿ô{\it |
¥¹¥¿¥Ã¥¯¤è¤ê {\it n} ¸Ä¤Î¥Ç¡¼¥¿¤ò pop ¤·¤Æ, ¥µ¡¼¥Ð¤Î¥í¡¼¥«¥ë´Ø¿ô{\it |
Line 687 s} ¤ò¼Â¹Ô¤¹¤ë. ¥¨¥é¡¼¤Î¤È¤¤Î¤ß {\tt CMO\_ERROR2} ¤ò |
|
Line 754 s} ¤ò¼Â¹Ô¤¹¤ë. ¥¨¥é¡¼¤Î¤È¤¤Î¤ß {\tt CMO\_ERROR2} ¤ò |
|
¤ë. |
¤ë. |
*/ |
*/ |
/*&eg |
/*&eg |
¥¹¥¿¥Ã¥¯¤è¤ê {\it n} ¸Ä¤Î¥Ç¡¼¥¿¤ò pop ¤·¤Æ, ¥µ¡¼¥Ð¤Î¥í¡¼¥«¥ë´Ø¿ô{\it |
It requests a server to pop {\it s} as a function name, |
s} ¤ò¼Â¹Ô¤¹¤ë. ¥¨¥é¡¼¤Î¤È¤¤Î¤ß {\tt CMO\_ERROR2} ¤ò stack ¤Ø push ¤¹ |
to pop {\it n} as the number of arguments and to execute |
¤ë. |
a local function {\it s} with {\it n} arguments popped from |
|
the stack. |
|
If an error has occurred {\tt CMO\_ERROR2} is pushed to the stack. |
*/ |
*/ |
|
|
//&jp Stack before the request: (±¦¤¬ stack ¤Î top.) \\ |
//&jp Stack before the request: \\ |
//&eg Stack before the request: (±¦¤¬ stack ¤Î top.) \\ |
//&eg Stack before the request: \\ |
\begin{tabular}{|c|c|c|c|c|} \hline |
\begin{tabular}{|c|c|c|c|c|} \hline |
{\it objn} & $\cdots$ & {\it obj1} & {\it INT32 n} & {\it String s} \\ |
{\it objn} & $\cdots$ & {\it obj1} & {\it INT32 n} & {\it String s} \\ |
\hline |
\hline |
|
|
\end{tabular} |
\end{tabular} |
|
|
//&jp Stack after the request: ´Ø¿ô¼Â¹Ô¤Î·ë²Ì. |
//&jp Stack after the request: ´Ø¿ô¼Â¹Ô¤Î·ë²Ì. |
//&eg Stack after the request: ´Ø¿ô¼Â¹Ô¤Î·ë²Ì. |
//&eg Stack after the request: The Output of the execution. |
|
|
//&jp Result: ¤Ê¤·. |
Output: none. |
//&eg Result: none. |
|
|
|
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
bytes *xxx_popSerializedLocalObject(void) |
SM_popSerializedLocalObject |
void popSerializedLocalObject(ox_stream out) |
|
\end{verbatim} |
\end{verbatim} |
|
|
/*&jp |
/*&jp |
ºÇ½é¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. ¥¹¥¿¥Ã |
¥¹¥¿¥Ã¥¯¤è¤ê pop ¤·¤¿ object ¤ò local ·Á¼°¤Ç serialization ¤·¤Æ |
¥¯¤è¤ê pop ¤·¤¿ object ¤ò local ·Á¼°¤Î serialization ¤·¤Æbyte Îó¤ÇÌ᤹. |
OX message ¤È¤·¤Æ stream ¤Ø½ÐÎϤ¹¤ë. OX message tag ¤È¤·¤Æ¤Ï, |
2 ÈÖÌܤδؿô¤Ï Socket ¤ÇÄÌ¿®¤¹¤ë¤¿¤á¤ÎƱµ¡Ç½¤Î´Ø¿ô¤Ç¤¢¤ê, |
local ·Á¼°¤ËÂбþ¤·¤¿¤â¤Î¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤³¤È¤¬É¬ÍפǤ¢¤ë. |
serialization ¤µ¤ì¤¿ byte Îó¤ò{\tt ox\_stream out} ¤Ø½ÐÎϤ¹¤ë. ¤³¤Î¾ì |
¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, homogeneous ¤Êʬ»¶¥·¥¹¥Æ¥à¤ÇÍѤ¤¤ë. |
¹ç, header {\tt int32 OX\_DATA}, {\tt int32 CMO\_LOCAL\_OBJECT} ¤ò¤Ä¤± |
|
¤Æ¤«¤é, byte Îó¤òÁ÷¤ë. ¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, homogeneous ¤Êʬ»¶¥·¥¹¥Æ¥à¤Ç |
|
ÍѤ¤¤ë. ¼¡¤Ë, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î´Ø¿ô¤¬¼Â¹Ô¤µ¤ì¤ë¤Þ¤Ç¤Ï,Ìá¤ê |
|
object ¤ÎÆâÍƤÏÊݾڤµ¤ì¤Ê¤¤¤È¤¤¤±¤Ê¤¤. |
|
*/ |
*/ |
/*&eg |
/*&eg |
ºÇ½é¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. ¥¹¥¿¥Ã |
It requests a sever to pop an object, to convert it into a |
¥¯¤è¤ê pop ¤·¤¿ object ¤ò local ·Á¼°¤Î serialization ¤·¤Æbyte Îó¤ÇÌ᤹. |
serialized form according to a local serialization scheme, and |
2 ÈÖÌܤδؿô¤Ï Socket ¤ÇÄÌ¿®¤¹¤ë¤¿¤á¤ÎƱµ¡Ç½¤Î´Ø¿ô¤Ç¤¢¤ê, |
to send it to the stream as an OX message. |
serialization ¤µ¤ì¤¿ byte Îó¤ò{\tt ox\_stream out} ¤Ø½ÐÎϤ¹¤ë. ¤³¤Î¾ì |
An OX message tag corresponding to |
¹ç, header {\tt int32 OX\_DATA}, {\tt int32 CMO\_LOCAL\_OBJECT} ¤ò¤Ä¤± |
the local data format must be sent prior to the serialized data |
¤Æ¤«¤é, byte Îó¤òÁ÷¤ë. ¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, homogeneous ¤Êʬ»¶¥·¥¹¥Æ¥à¤Ç |
itself. |
ÍѤ¤¤ë. ¼¡¤Ë, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î´Ø¿ô¤¬¼Â¹Ô¤µ¤ì¤ë¤Þ¤Ç¤Ï,Ìá¤ê |
This operation is used mainly on homogeneous distributed systems. |
object ¤ÎÆâÍƤÏÊݾڤµ¤ì¤Ê¤¤¤È¤¤¤±¤Ê¤¤. |
|
*/ |
*/ |
\item |
|
/*&jp |
|
local serialized object, ¤ª¤è¤Ó ¥µ¥Ý¡¼¥È¤¹¤ë CMO object ¤ò{\tt |
|
OX\_DATA} ¤È¤·¤Æ¼õ¿®¤·¤¿¾ì¹ç, {\tt OperandStack} ¤Øpush ¤¹¤ë. ¼õ¿®¥¨ |
|
¥é¡¼¤òµ¯¤³¤·¤¿¤È¤¤Î¤ß, {\tt CMO\_ERROR2} ¤ò stack ¤Ø push ¤¹¤ë. |
|
*/ |
|
/*&eg |
|
local serialized object, ¤ª¤è¤Ó ¥µ¥Ý¡¼¥È¤¹¤ë CMO object ¤ò{\tt |
|
OX\_DATA} ¤È¤·¤Æ¼õ¿®¤·¤¿¾ì¹ç, {\tt OperandStack} ¤Øpush ¤¹¤ë. ¼õ¿®¥¨ |
|
¥é¡¼¤òµ¯¤³¤·¤¿¤È¤¤Î¤ß, {\tt CMO\_ERROR2} ¤ò stack ¤Ø push ¤¹¤ë. |
|
*/ |
|
|
|
\item |
\item |
\begin{verbatim} |
\begin{verbatim} |
bytes *xxx_popCMO(void) |
SM_popCMO |
void xxx_popCMO(ox_stream out) |
|
\end{verbatim} |
\end{verbatim} |
|
|
/*&jp |
/*&jp |
ºÇ½é¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. {\tt |
{\tt OperandStack} ¤è¤ê object ¤ò pop ¤· CMO ·Á¼°¤Î serialized object ¤ò |
OperandStack} ¤è¤ê object ¤ò pop ¤· CMO ·Á¼°¤Î serialized object ¤ò |
stream ¤Ø header {\tt OX\_DATA} ¤ò¤Ä¤±¤Æ¤Ê¤¬¤¹. |
byte Îó¤È¤·¤ÆÌ᤹. 2 ÈÖÌܤδؿô¤Ï Socket ¤ÇÄÌ¿®¤¹¤ë¤¿¤á¤ÎƱµ¡Ç½¤Î´Ø¿ô |
|
¤Ç¤¢¤ê, {\tt ox\_stream out } ¤Ø, ¤½¤Î¥Ç¡¼¥¿¤ò header {\tt OX\_DATA} |
|
¤ò¤Ä¤±¤Æ¤Ê¤¬¤¹. ¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, heterotic ¤Êʬ»¶¥·¥¹¥Æ¥à¤ÇÍѤ¤¤ë. |
|
¼¡¤Ë, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î´Ø¿ô¤¬¼Â¹Ô¤µ¤ì¤ë¤Þ¤Ç¤Ï,Ìá¤ê object ¤ÎÆâÍÆ |
|
¤ÏÊݾڤµ¤ì¤Ê¤¤¤È¤¤¤±¤Ê¤¤. |
|
*/ |
*/ |
/*&eg |
/*&eg |
ºÇ½é¤Î´Ø¿ô¤Ï¥é¥¤¥Ö¥é¥ê¤È¤·¤Æ¥ê¥ó¥¯¤·¤Æ»ÈÍѤ¹¤ë¤¿¤á¤Î´Ø¿ô¤Ç¤¢¤ë. {\tt |
It requests a server to pop an object from the stack, to convert |
OperandStack} ¤è¤ê object ¤ò pop ¤· CMO ·Á¼°¤Î serialized object ¤ò |
it into a serialized form according to the standard CMO encoding scheme, |
byte Îó¤È¤·¤ÆÌ᤹. 2 ÈÖÌܤδؿô¤Ï Socket ¤ÇÄÌ¿®¤¹¤ë¤¿¤á¤ÎƱµ¡Ç½¤Î´Ø¿ô |
and to send it to the stream with the {\tt OX\_DATA} header. |
¤Ç¤¢¤ê, {\tt ox\_stream out } ¤Ø, ¤½¤Î¥Ç¡¼¥¿¤ò header {\tt OX\_DATA} |
|
¤ò¤Ä¤±¤Æ¤Ê¤¬¤¹. ¤³¤Î´Ø¿ô¤Ï¤ª¤â¤Ë, heterotic ¤Êʬ»¶¥·¥¹¥Æ¥à¤ÇÍѤ¤¤ë. |
|
¼¡¤Ë, ¥µ¡¼¥Ð¥¹¥¿¥Ã¥¯¥Þ¥·¥ó¤Î´Ø¿ô¤¬¼Â¹Ô¤µ¤ì¤ë¤Þ¤Ç¤Ï,Ìá¤ê object ¤ÎÆâÍÆ |
|
¤ÏÊݾڤµ¤ì¤Ê¤¤¤È¤¤¤±¤Ê¤¤. |
|
*/ |
*/ |
|
|
Request: |
Request: |
|
|
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
Result: |
Output: |
\begin{tabular}{|c|c|} \hline |
\begin{tabular}{|c|c|} \hline |
{\tt int32 OX\_DATA} & {\it Serialized CMO} \\ |
{\tt int32 OX\_DATA} & {\it Serialized CMO} \\ |
\hline |
\hline |
\end{tabular} |
\end{tabular} |
|
|
//&jp °Ê²¼¤Ç, {\tt ox\_stream} ¤Ï¥µ¥ó¥×¥ë¥µ¡¼¥Ð¤Î¾ì¹ç, |
|
//&eg °Ê²¼¤Ç, {\tt ox\_stream} ¤Ï¥µ¥ó¥×¥ë¥µ¡¼¥Ð¤Î¾ì¹ç, |
|
\begin{verbatim} |
|
typedef FILE2 * ox_stream; |
|
\end{verbatim} |
|
//&jp ¤Ç¤¢¤ë (cf. {\tt file2.h}). ¤³¤ì¤Ï½èÍý·Ï¤Ë¤è¤ê¤Á¤¬¤Ã¤Æ¤è¤¤. |
|
//&jp {\tt ox\_asir} ¤Ç¤Ï, {\tt FILE *} ¤òÍѤ¤¤Æ¤¤¤ë. |
|
//&eg ¤Ç¤¢¤ë (cf. {\tt file2.h}). ¤³¤ì¤Ï½èÍý·Ï¤Ë¤è¤ê¤Á¤¬¤Ã¤Æ¤è¤¤. |
|
//&eg {\tt ox\_asir} ¤Ç¤Ï, {\tt FILE *} ¤òÍѤ¤¤Æ¤¤¤ë. |
|
|
|
\end{enumerate} |
\end{enumerate} |
|
|