Commit 5ad190de authored by claes's avatar claes

Request StartRtMon added

parent 640d9012
/* /*
* Proview $Id: rt_statussrv.cpp,v 1.3 2007-05-21 14:21:39 claes Exp $ * Proview $Id: rt_statussrv.cpp,v 1.4 2007-05-25 13:38:07 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB. * Copyright (C) 2005 SSAB Oxelsund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <net/if.h> #include <net/if.h>
#include <net/if_arp.h> #include <net/if_arp.h>
#include <pthread.h> #include <pthread.h>
#include <unistd.h>
#include "pwr.h" #include "pwr.h"
#include "pwr_version.h" #include "pwr_version.h"
...@@ -529,25 +530,105 @@ SOAP_FMAC5 int SOAP_FMAC6 __s0__XttStart(struct soap *soap, ...@@ -529,25 +530,105 @@ SOAP_FMAC5 int SOAP_FMAC6 __s0__XttStart(struct soap *soap,
char lang[40] = ""; char lang[40] = "";
pwr_tOName opplace = ""; pwr_tOName opplace = "";
char display[80] = ""; char display[80] = "";
pwr_tCmd cmd; char *argv[] = {"rt_xtt", 0, 0, 0, 0, 0, 0, 0, 0, 0};
char sw_l[] = "-l";
char sw_d[] = "--display";
char sw_q[] = "-q";
char sw_c[] = "-c";
if ( s0__XttStart->ClientRequestHandle) if ( s0__XttStart->ClientRequestHandle)
s0__XttStartResponse->ClientRequestHandle = s0__XttStartResponse->ClientRequestHandle =
new std::string( *s0__XttStart->ClientRequestHandle); new std::string( *s0__XttStart->ClientRequestHandle);
if ( s0__XttStart->Language) { if ( s0__XttStart->Language)
sprintf( lang, "-l %s", s0__XttStart->Language->c_str()); strncpy( lang, s0__XttStart->Language->c_str(), sizeof(lang));
if ( s0__XttStart->OpPlace)
strncpy( opplace, s0__XttStart->OpPlace->c_str(), sizeof(opplace));
if ( s0__XttStart->Display)
strncpy( display, s0__XttStart->Display->c_str(), sizeof(display));
int i = 1;
if ( strcmp( opplace, "") != 0)
argv[i++] = opplace;
argv[i++] = sw_q;
argv[i++] = sw_c;
if ( strcmp( display, "") != 0) {
argv[i++] = sw_d;
argv[i++] = display;
} }
if ( s0__XttStart->OpPlace) { if ( strcmp( lang, "") != 0) {
strcpy( opplace, s0__XttStart->OpPlace->c_str()); argv[i++] = sw_l;
argv[i++] = lang;
} }
if ( s0__XttStart->Display) {
sprintf( display, "--display %s", s0__XttStart->Display->c_str()); pid_t pid = fork();
switch ( pid) {
case -1:
printf( "rt_statussrv: fork failed\n");
break;
case 0: {
// Child process
// Socket open after fork, close
soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
execvp( "rt_xtt", argv);
break;
} }
default: ;
}
return SOAP_OK;
}
sprintf( cmd, "rt_xtt %s -q -c %s %s &", opplace, display, lang); SOAP_FMAC5 int SOAP_FMAC6 __s0__RtMonStart(struct soap *soap,
_s0__RtMonStart *s0__RtMonStart,
_s0__RtMonStartResponse *s0__RtMonStartResponse)
{
char lang[40] = "";
char display[80] = "";
char *argv[] = {"pwr_rtmon", "--display", 0, 0, 0};
char sw_l[] = "-l";
char sw_d[] = "--display";
system( cmd); if ( s0__RtMonStart->ClientRequestHandle)
s0__RtMonStartResponse->ClientRequestHandle =
new std::string( *s0__RtMonStart->ClientRequestHandle);
if ( s0__RtMonStart->Language)
strncpy( lang, s0__RtMonStart->Language->c_str(), sizeof(lang));
if ( s0__RtMonStart->Display)
strncpy( display, s0__RtMonStart->Display->c_str(), sizeof(display));
int i = 1;
if ( strcmp( display, "") != 0) {
argv[i++] = sw_d;
argv[i++] = display;
}
if ( strcmp( lang, "") != 0) {
argv[i++] = sw_l;
argv[i++] = lang;
}
pid_t pid = fork();
switch ( pid) {
case -1:
printf( "rt_statussrv: fork failed\n");
break;
case 0: {
// Child process
// Socket open after fork, close
soap->fclosesocket(soap, (SOAP_SOCKET)soap->master);
execvp( "pwr_rtmon", argv);
break;
}
default: ;
}
return SOAP_OK; return SOAP_OK;
} }
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
#include "statussrv_H.h" #include "statussrv_H.h"
SOAP_SOURCE_STAMP("@(#) statussrv_Server.cpp ver 2.7.9d 2007-05-21 09:05:52 GMT") SOAP_SOURCE_STAMP("@(#) statussrv_Server.cpp ver 2.7.9d 2007-05-25 06:59:31 GMT")
SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap) SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
...@@ -79,6 +79,8 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap) ...@@ -79,6 +79,8 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap)
return soap_serve___s0__Restart(soap); return soap_serve___s0__Restart(soap);
if (!soap_match_tag(soap, soap->tag, "s0:XttStart")) if (!soap_match_tag(soap, soap->tag, "s0:XttStart"))
return soap_serve___s0__XttStart(soap); return soap_serve___s0__XttStart(soap);
if (!soap_match_tag(soap, soap->tag, "s0:RtMonStart"))
return soap_serve___s0__RtMonStart(soap);
return soap->error = SOAP_NO_METHOD; return soap->error = SOAP_NO_METHOD;
} }
#endif #endif
...@@ -247,4 +249,45 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve___s0__XttStart(struct soap *soap) ...@@ -247,4 +249,45 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve___s0__XttStart(struct soap *soap)
return soap_closesock(soap); return soap_closesock(soap);
} }
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___s0__RtMonStart(struct soap *soap)
{ struct __s0__RtMonStart soap_tmp___s0__RtMonStart;
_s0__RtMonStartResponse s0__RtMonStartResponse;
s0__RtMonStartResponse.soap_default(soap);
soap_default___s0__RtMonStart(soap, &soap_tmp___s0__RtMonStart);
soap->encodingStyle = NULL;
if (!soap_get___s0__RtMonStart(soap, &soap_tmp___s0__RtMonStart, "-s0:RtMonStart", NULL))
return soap->error;
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap->error;
soap->error = __s0__RtMonStart(soap, soap_tmp___s0__RtMonStart.s0__RtMonStart, &s0__RtMonStartResponse);
if (soap->error)
return soap->error;
soap_serializeheader(soap);
s0__RtMonStartResponse.soap_serialize(soap);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| s0__RtMonStartResponse.soap_put(soap, "s0:RtMonStartResponse", "")
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
};
if (soap_end_count(soap)
|| soap_response(soap, SOAP_OK)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| s0__RtMonStartResponse.soap_put(soap, "s0:RtMonStartResponse", "")
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap->error;
return soap_closesock(soap);
}
/* End of statussrv_Server.cpp */ /* End of statussrv_Server.cpp */
...@@ -191,6 +191,20 @@ ...@@ -191,6 +191,20 @@
<s:attribute name="ClientRequestHandle" type="s:string" /> <s:attribute name="ClientRequestHandle" type="s:string" />
</s:complexType> </s:complexType>
</s:element> </s:element>
<s:element name="RtMonStart">
<s:complexType>
<s:attribute name="ClientRequestHandle" type="s:string" />
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Language" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Display" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="RtMonStartResponse">
<s:complexType>
<s:attribute name="ClientRequestHandle" type="s:string" />
</s:complexType>
</s:element>
</s:schema> </s:schema>
</types> </types>
<message name="GetStatusSoapIn"> <message name="GetStatusSoapIn">
...@@ -217,6 +231,12 @@ ...@@ -217,6 +231,12 @@
<message name="XttStartSoapOut"> <message name="XttStartSoapOut">
<part name="parameters" element="s0:XttStartResponse" /> <part name="parameters" element="s0:XttStartResponse" />
</message> </message>
<message name="RtMonStartSoapIn">
<part name="parameters" element="s0:RtMonStart" />
</message>
<message name="RtMonStartSoapOut">
<part name="parameters" element="s0:RtMonStartResponse" />
</message>
<portType name="Service"> <portType name="Service">
<operation name="GetStatus"> <operation name="GetStatus">
<input message="s0:GetStatusSoapIn" /> <input message="s0:GetStatusSoapIn" />
...@@ -234,6 +254,10 @@ ...@@ -234,6 +254,10 @@
<input message="s0:XttStartSoapIn" /> <input message="s0:XttStartSoapIn" />
<output message="s0:XttStartSoapOut" /> <output message="s0:XttStartSoapOut" />
</operation> </operation>
<operation name="RtMonStart">
<input message="s0:RtMonStartSoapIn" />
<output message="s0:RtMonStartSoapOut" />
</operation>
</portType> </portType>
<binding name="Service" type="s0:Service"> <binding name="Service" type="s0:Service">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" /> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
...@@ -273,5 +297,14 @@ ...@@ -273,5 +297,14 @@
<soap:body use="literal" /> <soap:body use="literal" />
</output> </output>
</operation> </operation>
<operation name="RtMonStart">
<soap:operation soapAction="s0:RtMonStart" style="document" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding> </binding>
</definitions> </definitions>
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
*/ */
#include "statussrv_H.h" #include "statussrv_H.h"
SOAP_SOURCE_STAMP("@(#) statussrv_Client.cpp ver 2.7.9d 2007-05-21 09:05:52 GMT") SOAP_SOURCE_STAMP("@(#) statussrv_Client.cpp ver 2.7.9d 2007-05-25 06:59:31 GMT")
SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__GetStatus(struct soap *soap, const char *soap_endpoint, const char *soap_action, _s0__GetStatus *s0__GetStatus, _s0__GetStatusResponse *s0__GetStatusResponse) SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__GetStatus(struct soap *soap, const char *soap_endpoint, const char *soap_action, _s0__GetStatus *s0__GetStatus, _s0__GetStatusResponse *s0__GetStatusResponse)
...@@ -217,4 +217,56 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__XttStart(struct soap *soap, const char ...@@ -217,4 +217,56 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__XttStart(struct soap *soap, const char
return soap_closesock(soap); return soap_closesock(soap);
} }
SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__RtMonStart(struct soap *soap, const char *soap_endpoint, const char *soap_action, _s0__RtMonStart *s0__RtMonStart, _s0__RtMonStartResponse *s0__RtMonStartResponse)
{ struct __s0__RtMonStart soap_tmp___s0__RtMonStart;
if (!soap_action)
soap_action = "s0:RtMonStart";
soap->encodingStyle = NULL;
soap_tmp___s0__RtMonStart.s0__RtMonStart = s0__RtMonStart;
soap_begin(soap);
soap_serializeheader(soap);
soap_serialize___s0__RtMonStart(soap, &soap_tmp___s0__RtMonStart);
if (soap_begin_count(soap))
return soap->error;
if (soap->mode & SOAP_IO_LENGTH)
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___s0__RtMonStart(soap, &soap_tmp___s0__RtMonStart, "-s0:RtMonStart", "")
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
}
if (soap_end_count(soap))
return soap->error;
if (soap_connect(soap, soap_endpoint, soap_action)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put___s0__RtMonStart(soap, &soap_tmp___s0__RtMonStart, "-s0:RtMonStart", "")
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap_closesock(soap);
if (!s0__RtMonStartResponse)
return soap_closesock(soap);
s0__RtMonStartResponse->soap_default(soap);
if (soap_begin_recv(soap)
|| soap_envelope_begin_in(soap)
|| soap_recv_header(soap)
|| soap_body_begin_in(soap))
return soap_closesock(soap);
s0__RtMonStartResponse->soap_get(soap, "s0:RtMonStartResponse", "");
if (soap->error)
{ if (soap->error == SOAP_TAG_MISMATCH && soap->level == 2)
return soap_recv_fault(soap);
return soap_closesock(soap);
}
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap_closesock(soap);
return soap_closesock(soap);
}
/* End of statussrv_Client.cpp */ /* End of statussrv_Client.cpp */
This diff is collapsed.
...@@ -49,4 +49,6 @@ SOAP_FMAC5 int SOAP_FMAC6 __s0__Restart(struct soap*, _s0__Restart *s0__Restart, ...@@ -49,4 +49,6 @@ SOAP_FMAC5 int SOAP_FMAC6 __s0__Restart(struct soap*, _s0__Restart *s0__Restart,
SOAP_FMAC5 int SOAP_FMAC6 __s0__XttStart(struct soap*, _s0__XttStart *s0__XttStart, _s0__XttStartResponse *s0__XttStartResponse); SOAP_FMAC5 int SOAP_FMAC6 __s0__XttStart(struct soap*, _s0__XttStart *s0__XttStart, _s0__XttStartResponse *s0__XttStartResponse);
SOAP_FMAC5 int SOAP_FMAC6 __s0__RtMonStart(struct soap*, _s0__RtMonStart *s0__RtMonStart, _s0__RtMonStartResponse *s0__RtMonStartResponse);
#endif #endif
...@@ -28,5 +28,6 @@ class Service ...@@ -28,5 +28,6 @@ class Service
virtual int __s0__GetExtStatus(_s0__GetExtStatus *s0__GetExtStatus, _s0__GetExtStatusResponse *s0__GetExtStatusResponse) { return soap ? soap_call___s0__GetExtStatus(soap, endpoint, NULL, s0__GetExtStatus, s0__GetExtStatusResponse) : SOAP_EOM; }; virtual int __s0__GetExtStatus(_s0__GetExtStatus *s0__GetExtStatus, _s0__GetExtStatusResponse *s0__GetExtStatusResponse) { return soap ? soap_call___s0__GetExtStatus(soap, endpoint, NULL, s0__GetExtStatus, s0__GetExtStatusResponse) : SOAP_EOM; };
virtual int __s0__Restart(_s0__Restart *s0__Restart, _s0__RestartResponse *s0__RestartResponse) { return soap ? soap_call___s0__Restart(soap, endpoint, NULL, s0__Restart, s0__RestartResponse) : SOAP_EOM; }; virtual int __s0__Restart(_s0__Restart *s0__Restart, _s0__RestartResponse *s0__RestartResponse) { return soap ? soap_call___s0__Restart(soap, endpoint, NULL, s0__Restart, s0__RestartResponse) : SOAP_EOM; };
virtual int __s0__XttStart(_s0__XttStart *s0__XttStart, _s0__XttStartResponse *s0__XttStartResponse) { return soap ? soap_call___s0__XttStart(soap, endpoint, NULL, s0__XttStart, s0__XttStartResponse) : SOAP_EOM; }; virtual int __s0__XttStart(_s0__XttStart *s0__XttStart, _s0__XttStartResponse *s0__XttStartResponse) { return soap ? soap_call___s0__XttStart(soap, endpoint, NULL, s0__XttStart, s0__XttStartResponse) : SOAP_EOM; };
virtual int __s0__RtMonStart(_s0__RtMonStart *s0__RtMonStart, _s0__RtMonStartResponse *s0__RtMonStartResponse) { return soap ? soap_call___s0__RtMonStart(soap, endpoint, NULL, s0__RtMonStart, s0__RtMonStartResponse) : SOAP_EOM; };
}; };
#endif #endif
...@@ -400,8 +400,52 @@ public: ...@@ -400,8 +400,52 @@ public:
}; };
#endif #endif
#ifndef SOAP_TYPE__s0__RtMonStart
#define SOAP_TYPE__s0__RtMonStart (21)
/* s0:RtMonStart */
class SOAP_CMAC _s0__RtMonStart
{
public:
std::string *Language; /* optional element of type xsd:string */
std::string *Display; /* optional element of type xsd:string */
std::string *ClientRequestHandle; /* optional attribute */
struct soap *soap; /* transient */
public:
virtual int soap_type() const { return 21; } /* = unique id SOAP_TYPE__s0__RtMonStart */
virtual void soap_default(struct soap*);
virtual void soap_serialize(struct soap*) const;
virtual int soap_put(struct soap*, const char*, const char*) const;
virtual int soap_out(struct soap*, const char*, int, const char*) const;
virtual void *soap_get(struct soap*, const char*, const char*);
virtual void *soap_in(struct soap*, const char*, const char*);
_s0__RtMonStart() : Language(NULL), Display(NULL), ClientRequestHandle(NULL), soap(NULL) { }
virtual ~_s0__RtMonStart() { }
};
#endif
#ifndef SOAP_TYPE__s0__RtMonStartResponse
#define SOAP_TYPE__s0__RtMonStartResponse (22)
/* s0:RtMonStartResponse */
class SOAP_CMAC _s0__RtMonStartResponse
{
public:
std::string *ClientRequestHandle; /* optional attribute */
struct soap *soap; /* transient */
public:
virtual int soap_type() const { return 22; } /* = unique id SOAP_TYPE__s0__RtMonStartResponse */
virtual void soap_default(struct soap*);
virtual void soap_serialize(struct soap*) const;
virtual int soap_put(struct soap*, const char*, const char*) const;
virtual int soap_out(struct soap*, const char*, int, const char*) const;
virtual void *soap_get(struct soap*, const char*, const char*);
virtual void *soap_in(struct soap*, const char*, const char*);
_s0__RtMonStartResponse() : ClientRequestHandle(NULL), soap(NULL) { }
virtual ~_s0__RtMonStartResponse() { }
};
#endif
#ifndef SOAP_TYPE___s0__GetStatus #ifndef SOAP_TYPE___s0__GetStatus
#define SOAP_TYPE___s0__GetStatus (26) #define SOAP_TYPE___s0__GetStatus (28)
/* Operation wrapper: */ /* Operation wrapper: */
struct __s0__GetStatus struct __s0__GetStatus
{ {
...@@ -411,7 +455,7 @@ public: ...@@ -411,7 +455,7 @@ public:
#endif #endif
#ifndef SOAP_TYPE___s0__GetExtStatus #ifndef SOAP_TYPE___s0__GetExtStatus
#define SOAP_TYPE___s0__GetExtStatus (30) #define SOAP_TYPE___s0__GetExtStatus (32)
/* Operation wrapper: */ /* Operation wrapper: */
struct __s0__GetExtStatus struct __s0__GetExtStatus
{ {
...@@ -421,7 +465,7 @@ public: ...@@ -421,7 +465,7 @@ public:
#endif #endif
#ifndef SOAP_TYPE___s0__Restart #ifndef SOAP_TYPE___s0__Restart
#define SOAP_TYPE___s0__Restart (34) #define SOAP_TYPE___s0__Restart (36)
/* Operation wrapper: */ /* Operation wrapper: */
struct __s0__Restart struct __s0__Restart
{ {
...@@ -431,7 +475,7 @@ public: ...@@ -431,7 +475,7 @@ public:
#endif #endif
#ifndef SOAP_TYPE___s0__XttStart #ifndef SOAP_TYPE___s0__XttStart
#define SOAP_TYPE___s0__XttStart (38) #define SOAP_TYPE___s0__XttStart (40)
/* Operation wrapper: */ /* Operation wrapper: */
struct __s0__XttStart struct __s0__XttStart
{ {
...@@ -440,8 +484,18 @@ public: ...@@ -440,8 +484,18 @@ public:
}; };
#endif #endif
#ifndef SOAP_TYPE___s0__RtMonStart
#define SOAP_TYPE___s0__RtMonStart (44)
/* Operation wrapper: */
struct __s0__RtMonStart
{
public:
_s0__RtMonStart *s0__RtMonStart; /* optional element of type s0:RtMonStart */
};
#endif
#ifndef SOAP_TYPE_SOAP_ENV__Header #ifndef SOAP_TYPE_SOAP_ENV__Header
#define SOAP_TYPE_SOAP_ENV__Header (41) #define SOAP_TYPE_SOAP_ENV__Header (47)
/* SOAP Header: */ /* SOAP Header: */
struct SOAP_ENV__Header struct SOAP_ENV__Header
{ {
...@@ -451,7 +505,7 @@ public: ...@@ -451,7 +505,7 @@ public:
#endif #endif
#ifndef SOAP_TYPE_SOAP_ENV__Code #ifndef SOAP_TYPE_SOAP_ENV__Code
#define SOAP_TYPE_SOAP_ENV__Code (42) #define SOAP_TYPE_SOAP_ENV__Code (48)
/* SOAP Fault Code: */ /* SOAP Fault Code: */
struct SOAP_ENV__Code struct SOAP_ENV__Code
{ {
...@@ -462,7 +516,7 @@ public: ...@@ -462,7 +516,7 @@ public:
#endif #endif
#ifndef SOAP_TYPE_SOAP_ENV__Detail #ifndef SOAP_TYPE_SOAP_ENV__Detail
#define SOAP_TYPE_SOAP_ENV__Detail (44) #define SOAP_TYPE_SOAP_ENV__Detail (50)
/* SOAP-ENV:Detail */ /* SOAP-ENV:Detail */
struct SOAP_ENV__Detail struct SOAP_ENV__Detail
{ {
...@@ -474,7 +528,7 @@ public: ...@@ -474,7 +528,7 @@ public:
#endif #endif
#ifndef SOAP_TYPE_SOAP_ENV__Reason #ifndef SOAP_TYPE_SOAP_ENV__Reason
#define SOAP_TYPE_SOAP_ENV__Reason (45) #define SOAP_TYPE_SOAP_ENV__Reason (51)
/* SOAP-ENV:Reason */ /* SOAP-ENV:Reason */
struct SOAP_ENV__Reason struct SOAP_ENV__Reason
{ {
...@@ -484,7 +538,7 @@ public: ...@@ -484,7 +538,7 @@ public:
#endif #endif
#ifndef SOAP_TYPE_SOAP_ENV__Fault #ifndef SOAP_TYPE_SOAP_ENV__Fault
#define SOAP_TYPE_SOAP_ENV__Fault (46) #define SOAP_TYPE_SOAP_ENV__Fault (52)
/* SOAP Fault: */ /* SOAP Fault: */
struct SOAP_ENV__Fault struct SOAP_ENV__Fault
{ {
...@@ -554,6 +608,8 @@ SOAP_FMAC5 int SOAP_FMAC6 __s0__Restart(struct soap*, _s0__Restart *s0__Restart, ...@@ -554,6 +608,8 @@ SOAP_FMAC5 int SOAP_FMAC6 __s0__Restart(struct soap*, _s0__Restart *s0__Restart,
SOAP_FMAC5 int SOAP_FMAC6 __s0__XttStart(struct soap*, _s0__XttStart *s0__XttStart, _s0__XttStartResponse *s0__XttStartResponse); SOAP_FMAC5 int SOAP_FMAC6 __s0__XttStart(struct soap*, _s0__XttStart *s0__XttStart, _s0__XttStartResponse *s0__XttStartResponse);
SOAP_FMAC5 int SOAP_FMAC6 __s0__RtMonStart(struct soap*, _s0__RtMonStart *s0__RtMonStart, _s0__RtMonStartResponse *s0__RtMonStartResponse);
/******************************************************************************\ /******************************************************************************\
* * * *
* Stubs * * Stubs *
...@@ -569,6 +625,8 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__Restart(struct soap *soap, const char ...@@ -569,6 +625,8 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__Restart(struct soap *soap, const char
SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__XttStart(struct soap *soap, const char *soap_endpoint, const char *soap_action, _s0__XttStart *s0__XttStart, _s0__XttStartResponse *s0__XttStartResponse); SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__XttStart(struct soap *soap, const char *soap_endpoint, const char *soap_action, _s0__XttStart *s0__XttStart, _s0__XttStartResponse *s0__XttStartResponse);
SOAP_FMAC5 int SOAP_FMAC6 soap_call___s0__RtMonStart(struct soap *soap, const char *soap_endpoint, const char *soap_action, _s0__RtMonStart *s0__RtMonStart, _s0__RtMonStartResponse *s0__RtMonStartResponse);
/******************************************************************************\ /******************************************************************************\
* * * *
* Skeletons * * Skeletons *
...@@ -587,6 +645,8 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve___s0__Restart(struct soap*); ...@@ -587,6 +645,8 @@ SOAP_FMAC5 int SOAP_FMAC6 soap_serve___s0__Restart(struct soap*);
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___s0__XttStart(struct soap*); SOAP_FMAC5 int SOAP_FMAC6 soap_serve___s0__XttStart(struct soap*);
SOAP_FMAC5 int SOAP_FMAC6 soap_serve___s0__RtMonStart(struct soap*);
#endif #endif
/* End of statussrv_Stub.h */ /* End of statussrv_Stub.h */
/* statussrv_msg.h /* statussrv_msg.h
Generated by wsdl2h 1.2.9d from statussrv.wsdl and typemap.dat Generated by wsdl2h 1.2.9d from statussrv.wsdl and typemap.dat
2007-05-21 09:05:43 GMT 2007-05-25 06:59:12 GMT
Copyright (C) 2001-2006 Robert van Engelen, Genivia Inc. All Rights Reserved. Copyright (C) 2001-2006 Robert van Engelen, Genivia Inc. All Rights Reserved.
This part of the software is released under one of the following licenses: This part of the software is released under one of the following licenses:
GPL or Genivia's license for commercial use. GPL or Genivia's license for commercial use.
...@@ -108,6 +108,12 @@ class _s0__XttStart; ...@@ -108,6 +108,12 @@ class _s0__XttStart;
// Forward declaration of class _s0__XttStartResponse. // Forward declaration of class _s0__XttStartResponse.
class _s0__XttStartResponse; class _s0__XttStartResponse;
// Forward declaration of class _s0__RtMonStart.
class _s0__RtMonStart;
// Forward declaration of class _s0__RtMonStartResponse.
class _s0__RtMonStartResponse;
/// Element "http://www.proview.se/webservices/statussrv/1.0/":GetStatus of complexType. /// Element "http://www.proview.se/webservices/statussrv/1.0/":GetStatus of complexType.
...@@ -486,6 +492,34 @@ class _s0__XttStartResponse ...@@ -486,6 +492,34 @@ class _s0__XttStartResponse
struct soap *soap ; struct soap *soap ;
}; };
/// Element "http://www.proview.se/webservices/statussrv/1.0/":RtMonStart of complexType.
/// "http://www.proview.se/webservices/statussrv/1.0/":RtMonStart is a complexType.
class _s0__RtMonStart
{ public:
/// Element Language of type xs:string.
std::string* Language 0; ///< Optional element.
/// Element Display of type xs:string.
std::string* Display 0; ///< Optional element.
/// Attribute ClientRequestHandle of type xs:string.
@std::string* ClientRequestHandle 0; ///< Optional attribute.
/// A handle to the soap struct that manages this instance (automatically set)
struct soap *soap ;
};
/// Element "http://www.proview.se/webservices/statussrv/1.0/":RtMonStartResponse of complexType.
/// "http://www.proview.se/webservices/statussrv/1.0/":RtMonStartResponse is a complexType.
class _s0__RtMonStartResponse
{ public:
/// Attribute ClientRequestHandle of type xs:string.
@std::string* ClientRequestHandle 0; ///< Optional attribute.
/// A handle to the soap struct that manages this instance (automatically set)
struct soap *soap ;
};
/******************************************************************************\ /******************************************************************************\
* * * *
* Services * * Services *
...@@ -514,6 +548,7 @@ class _s0__XttStartResponse ...@@ -514,6 +548,7 @@ class _s0__XttStartResponse
- @ref __s0__GetExtStatus - @ref __s0__GetExtStatus
- @ref __s0__Restart - @ref __s0__Restart
- @ref __s0__XttStart - @ref __s0__XttStart
- @ref __s0__RtMonStart
@section Service_ports Endpoints of Binding "Service" @section Service_ports Endpoints of Binding "Service"
...@@ -738,4 +773,57 @@ int __s0__XttStart( ...@@ -738,4 +773,57 @@ int __s0__XttStart(
_s0__XttStartResponse* s0__XttStartResponse ///< Response parameter _s0__XttStartResponse* s0__XttStartResponse ///< Response parameter
); );
/******************************************************************************\
* *
* __s0__RtMonStart *
* *
\******************************************************************************/
/// Operation "__s0__RtMonStart" of service binding "Service"
/**
Operation details:
- SOAP document/literal style
- SOAP action="s0:RtMonStart"
C stub function (defined in soapClient.c[pp] generated by soapcpp2):
@code
int soap_call___s0__RtMonStart(
struct soap *soap,
NULL, // char *endpoint = NULL selects default endpoint for this operation
NULL, // char *action = NULL selects default action for this operation
// request parameters:
_s0__RtMonStart* s0__RtMonStart,
// response parameters:
_s0__RtMonStartResponse* s0__RtMonStartResponse
);
@endcode
C server function (called from the service dispatcher defined in soapServer.c[pp]):
@code
int __s0__RtMonStart(
struct soap *soap,
// request parameters:
_s0__RtMonStart* s0__RtMonStart,
// response parameters:
_s0__RtMonStartResponse* s0__RtMonStartResponse
);
@endcode
C++ proxy class (defined in soapServiceProxy.h):
class Service;
*/
//gsoap s0 service method-style: RtMonStart document
//gsoap s0 service method-encoding: RtMonStart literal
//gsoap s0 service method-action: RtMonStart s0:RtMonStart
int __s0__RtMonStart(
_s0__RtMonStart* s0__RtMonStart, ///< Request parameter
_s0__RtMonStartResponse* s0__RtMonStartResponse ///< Response parameter
);
/* End of statussrv_msg.h */ /* End of statussrv_msg.h */
...@@ -408,3 +408,36 @@ pwr_tStatus statussrv_XttStart( char *nodename, char *opplace, char *lang, char ...@@ -408,3 +408,36 @@ pwr_tStatus statussrv_XttStart( char *nodename, char *opplace, char *lang, char
return sts; return sts;
} }
pwr_tStatus statussrv_RtMonStart( char *nodename, char *lang, char *display)
{
pwr_tStatus sts = PWR__SUCCESS;
char endpoint[80];
if ( !init_done) {
soap_init( &soap);
init_done = 1;
}
sprintf( endpoint, "http://%s:%d", nodename, port);
_s0__RtMonStart rtmon_start;
_s0__RtMonStartResponse rtmon_start_response;
rtmon_start.ClientRequestHandle = new std::string("StatusSrv Client");
if ( lang && strcmp( lang, "") != 0)
rtmon_start.Language = new std::string(lang);
if ( display && strcmp( display, "") != 0)
rtmon_start.Display = new std::string(display);
if ( soap_call___s0__RtMonStart( &soap, endpoint, NULL, &rtmon_start, &rtmon_start_response) ==
SOAP_OK) {
}
else {
sts = PWR__SRVCONNECTION;
}
soap_destroy( &soap);
soap_end( &soap);
return sts;
}
/** /**
* Proview $Id: statussrv_utl.h,v 1.2 2007-05-21 14:20:04 claes Exp $ * Proview $Id: statussrv_utl.h,v 1.3 2007-05-25 13:38:07 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB. * Copyright (C) 2005 SSAB Oxelösund AB.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -55,6 +55,7 @@ pwr_tStatus statussrv_GetStatus( char *nodename, statussrv_sGetStatus *result); ...@@ -55,6 +55,7 @@ pwr_tStatus statussrv_GetStatus( char *nodename, statussrv_sGetStatus *result);
pwr_tStatus statussrv_GetExtStatus( char *nodename, statussrv_sGetExtStatus *result); pwr_tStatus statussrv_GetExtStatus( char *nodename, statussrv_sGetExtStatus *result);
pwr_tStatus statussrv_Restart( char *nodename); pwr_tStatus statussrv_Restart( char *nodename);
pwr_tStatus statussrv_XttStart( char *nodename, char *opplace, char *lang, char *display); pwr_tStatus statussrv_XttStart( char *nodename, char *opplace, char *lang, char *display);
pwr_tStatus statussrv_RtMonStart( char *nodename, char *lang, char *display);
#ifdef __cplusplus #ifdef __cplusplus
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment