Interface definition

xiaoxiao2021-03-06  68

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 // quotation to perform priority cmdpriority cppriority // command to perform a priority BOOL BSYNC / / is a synchronous request}

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 Bool Bexestatus; // Whether to perform feedback information // If the feedback information is executed, the startup information returns // executes the time, the format is: // "YYYYMMDD" "." "Hhmms"; // Execute feedback to fill in strStatusattribute // Perform the feedback information status When "Active", the progress of the execution can be fed back to the percentage of percentage; ignore the ESEVERITY. } This structure is communicarted as the basic unit of state communication. For command execution priority, define as follows: PRI_LOWER Low Pri_NORMAL Ordinary Pri_Higher High Pri_HIGHEST Higher Pri_RealTime Real Time (Max) IDL File Sss.IDL # Pragma Prefix "Lamost.ustc" Module SSS {

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);};

转载请注明原文地址:https://www.9cbs.com/read-110020.html

New Post(0)