According to the above analysis, the operation of the command, and the state is separated, and after the command is sent, if the command is executed, the state will continue to return to the OCS (where some of the state is global, and it is necessary to always return to OCS). At the same time, considering the synchronous request of the subsystem, and the data structure of the interface is:
Enum cmdpriority {pri_lower, pri_normal, pri_higher, pri_highest, pri_realtime};
Struct Thecommand {string; // The current command UID, the format is standard UID "." "YYYYMMDD" // "" YYYMMMDD "// " "YYYMMMSS" "." flow number // water number can be the count to send There is an OCS to allocate string strcmdparameter; // command parameters, use
The return structure of the command TYPEDEF STRING CMDRESULT; / / Synchronous command returns the result // Asynchronous command Returns the code, "0" indicates that the command is accepted // Other representation error code (to be defined)
ENUM severity {info, warning, error, fatalerror};
The relevant command UID of the STRUCT THESTATUID; / / Status is defined to the same time // If there is no relevant command, this value is "0" string strsTatuscuid; // Current state UID, the format is standard UID "." // " YYYYMMDD " ". " " HHMMSS "Severity Eseverity; // Status String StrstusAttribute; // Status Properties with
enum CmdPriority {PRI_LOWER, PRI_NORMAL, PRI_HIGHER, PRI_HIGHEST, PRI_REALTIME}; struct TheCommand {string strCmdCUID; string strCmdParameter; CmdPriority cpPriority; boolean bSync;}; typedef string TheCmdResult; typedef string TheXMLCommand; typedef string TheXMLCmdResult;
Interface sss_cmd_server {Void Sendcommand (In ThecmdResult Resultdata); Void SendcommandbyXML (In ThexmlCommand Cmddata, Out thexmlcmdResult Resultdata);
Status.idl # prgma prefix "lamost.USTC"
Module Ocs {Enum Severity {Info, Warning, Error, Fatalerror};
Struct theater;
Interface status_server {void sendstatus; void sendstatusbyXML (in string xmlstatusdata);};