IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 23, 2008, 11:35:39 AM (18 years ago)
Author:
eugene
Message:

split out client command from client response; allow response to return slowly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/include/pcontrol.h

    r17419 r17475  
    2828  PCONTROL_HOST_IDLE,
    2929  PCONTROL_HOST_BUSY, 
     30  PCONTROL_HOST_RESP,
    3031  PCONTROL_HOST_DOWN,
    3132  PCONTROL_HOST_DONE,
    3233  PCONTROL_HOST_OFF,
    3334} HostStat;
     35
     36/** host response options **/
     37typedef enum {
     38  PCONTROL_RESP_NONE,
     39  PCONTROL_RESP_START_JOB,
     40  PCONTROL_RESP_CHECK_BUSY_JOB, 
     41  PCONTROL_RESP_CHECK_DONE_HOST, 
     42  PCONTROL_RESP_CHECK_HOST,
     43  PCONTROL_RESP_KILL_JOB,
     44  PCONTROL_RESP_STOP_HOST,
     45} HostResp;
    3446
    3547typedef enum {
     
    97109  Ptime       nexttry;
    98110  IDtype      HostID;
     111  IOBuffer    comms_buffer;
     112  char       *response;
     113  HostResp    response_state;
    99114  struct Job *job;
    100115} Host;
     
    156171
    157172/*** own files ***/
     173int StartJob (Job *job, Host *host);
     174int StartJobResponse (Host *host);
     175
    158176int CheckHost (Host *host);
     177int CheckHostResponse (Host *host);
     178
     179int CheckDoneHost (Host *host);
     180int CheckDoneHostResponse (Host *host);
     181
     182int CheckBusyJob (Job *job, Host *host);
     183int CheckBusyJobResponse (Host *host);
     184
     185int KillJob (Job *job, Host *host);
     186int KillJobResponse (Host *host);
     187
    159188int StartHost (Host *host);
    160189int CheckIdleHost (Host *host);
    161 int CheckDoneHost (Host *host);
    162 int CheckBusyJob (Job *job, Host *host);
    163190int CheckDoneJob (Job *job, Host *host);
    164 int KillJob (Job *job, Host *host);
    165 int StartJob (Job *job, Host *host);
    166 int ResetJob (Job *job);
    167191int GetJobOutput (char *command, Host *host, IOBuffer *buffer, int Nbytes);
    168 int PclientCommand (Host *host, char *command, char *response, IOBuffer *buffer);
    169192int rconnect (char *command, char *hostname, char *shell, int *stdio);
     193
     194int PclientCommand (Host *host, char *command, char *response, HostResp response_state);
     195int PclientResponse (Host *host, char *response, IOBuffer *buffer);
     196
     197int CheckRespHosts (float MaxDelay);
     198int CheckRespHost (Host *host);
    170199
    171200/*** misc files ***/
     
    203232int    DownHosts ();
    204233int    StopHost (Host *host);
     234int    StopHostResponse (Host *host);
    205235int    HarvestHost (int pid);
    206236
Note: See TracChangeset for help on using the changeset viewer.