Commit 1397f8f7 authored by claes's avatar claes

UserStatus added to GetStatusResponse

parent b9bca55e
/*
* Proview $Id: rt_statussrv.cpp,v 1.5 2007-06-01 11:28:33 claes Exp $
* Proview $Id: rt_statussrv.cpp,v 1.6 2007-06-29 12:50:44 claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -51,7 +51,7 @@ class status_server {
status_server() : m_grant_all(true), m_config(0), m_node(0), qid(qcom_cNQid) {}
bool m_grant_all;
pwr_sNode *m_config;
pwr_sClass_StatusServerConfig *m_config;
pwr_sNode *m_node;
qcom_sQid qid;
char version[20];
......@@ -297,6 +297,26 @@ SOAP_FMAC5 int SOAP_FMAC6 __s0__GetStatus(struct soap *soap,
s0__GetStatusResponse->RestartTime->assign( timstr);
s0__GetStatusResponse->Restarts = (int *) soap_malloc( soap, sizeof(s0__GetStatusResponse->Restarts));
*s0__GetStatusResponse->Restarts = statussrv->m_node->Restarts;
s0__GetStatusResponse->UserStatus1 = statussrv->m_config->UserStatus[0];
s0__GetStatusResponse->UserStatusStr1 = soap_new_std__string( soap, -1);
s0__GetStatusResponse->UserStatusStr1->assign( statussrv->m_config->UserStatusStr[0]);
s0__GetStatusResponse->UserStatus2 = statussrv->m_config->UserStatus[1];
s0__GetStatusResponse->UserStatusStr2 = soap_new_std__string( soap, -1);
s0__GetStatusResponse->UserStatusStr2->assign( statussrv->m_config->UserStatusStr[1]);
s0__GetStatusResponse->UserStatus3 = statussrv->m_config->UserStatus[2];
s0__GetStatusResponse->UserStatusStr3 = soap_new_std__string( soap, -1);
s0__GetStatusResponse->UserStatusStr3->assign( statussrv->m_config->UserStatusStr[2]);
s0__GetStatusResponse->UserStatus4 = statussrv->m_config->UserStatus[3];
s0__GetStatusResponse->UserStatusStr4 = soap_new_std__string( soap, -1);
s0__GetStatusResponse->UserStatusStr4->assign( statussrv->m_config->UserStatusStr[3]);
s0__GetStatusResponse->UserStatus5 = statussrv->m_config->UserStatus[4];
s0__GetStatusResponse->UserStatusStr5 = soap_new_std__string( soap, -1);
s0__GetStatusResponse->UserStatusStr5->assign( statussrv->m_config->UserStatusStr[4]);
return SOAP_OK;
}
......
......@@ -6,7 +6,7 @@
*/
#include "statussrv_H.h"
SOAP_SOURCE_STAMP("@(#) statussrv_Server.cpp ver 2.7.9d 2007-05-30 13:46:12 GMT")
SOAP_SOURCE_STAMP("@(#) statussrv_Server.cpp ver 2.7.9d 2007-06-29 12:20:02 GMT")
SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
......
......@@ -21,15 +21,15 @@
<s:element minOccurs="0" maxOccurs="1" name="BootTime" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="RestartTime" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Restarts" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatus1" type="s:int" />
<s:element name="UserStatus1" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatusStr1" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatus2" type="s:int" />
<s:element name="UserStatus2" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatusStr2" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatus3" type="s:int" />
<s:element name="UserStatus3" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatusStr3" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatus4" type="s:int" />
<s:element name="UserStatus4" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatusStr4" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatus5" type="s:int" />
<s:element name="UserStatus5" type="s:int" />
<s:element minOccurs="0" maxOccurs="1" name="UserStatusStr5" type="s:string" />
</s:sequence>
</s:complexType>
......
......@@ -7,7 +7,7 @@
#include "statussrv_H.h"
SOAP_SOURCE_STAMP("@(#) statussrv_C.cpp ver 2.7.9d 2007-05-30 13:46:12 GMT")
SOAP_SOURCE_STAMP("@(#) statussrv_C.cpp ver 2.7.9d 2007-06-29 12:20:02 GMT")
#ifndef WITH_NOGLOBAL
......@@ -3153,15 +3153,15 @@ void _s0__GetStatusResponse::soap_default(struct soap *soap)
((_s0__GetStatusResponse*)this)->BootTime = NULL;
((_s0__GetStatusResponse*)this)->RestartTime = NULL;
((_s0__GetStatusResponse*)this)->Restarts = NULL;
((_s0__GetStatusResponse*)this)->UserStatus1 = NULL;
soap_default_int(soap, &((_s0__GetStatusResponse*)this)->UserStatus1);
((_s0__GetStatusResponse*)this)->UserStatusStr1 = NULL;
((_s0__GetStatusResponse*)this)->UserStatus2 = NULL;
soap_default_int(soap, &((_s0__GetStatusResponse*)this)->UserStatus2);
((_s0__GetStatusResponse*)this)->UserStatusStr2 = NULL;
((_s0__GetStatusResponse*)this)->UserStatus3 = NULL;
soap_default_int(soap, &((_s0__GetStatusResponse*)this)->UserStatus3);
((_s0__GetStatusResponse*)this)->UserStatusStr3 = NULL;
((_s0__GetStatusResponse*)this)->UserStatus4 = NULL;
soap_default_int(soap, &((_s0__GetStatusResponse*)this)->UserStatus4);
((_s0__GetStatusResponse*)this)->UserStatusStr4 = NULL;
((_s0__GetStatusResponse*)this)->UserStatus5 = NULL;
soap_default_int(soap, &((_s0__GetStatusResponse*)this)->UserStatus5);
((_s0__GetStatusResponse*)this)->UserStatusStr5 = NULL;
((_s0__GetStatusResponse*)this)->ClientRequestHandle = NULL;
/* transient soap skipped */
......@@ -3180,15 +3180,15 @@ void _s0__GetStatusResponse::soap_serialize(struct soap *soap) const
soap_serialize_PointerTostd__string(soap, &((_s0__GetStatusResponse*)this)->BootTime);
soap_serialize_PointerTostd__string(soap, &((_s0__GetStatusResponse*)this)->RestartTime);
soap_serialize_PointerToint(soap, &((_s0__GetStatusResponse*)this)->Restarts);
soap_serialize_PointerToint(soap, &((_s0__GetStatusResponse*)this)->UserStatus1);
soap_embedded(soap, &((_s0__GetStatusResponse*)this)->UserStatus1, SOAP_TYPE_int);
soap_serialize_PointerTostd__string(soap, &((_s0__GetStatusResponse*)this)->UserStatusStr1);
soap_serialize_PointerToint(soap, &((_s0__GetStatusResponse*)this)->UserStatus2);
soap_embedded(soap, &((_s0__GetStatusResponse*)this)->UserStatus2, SOAP_TYPE_int);
soap_serialize_PointerTostd__string(soap, &((_s0__GetStatusResponse*)this)->UserStatusStr2);
soap_serialize_PointerToint(soap, &((_s0__GetStatusResponse*)this)->UserStatus3);
soap_embedded(soap, &((_s0__GetStatusResponse*)this)->UserStatus3, SOAP_TYPE_int);
soap_serialize_PointerTostd__string(soap, &((_s0__GetStatusResponse*)this)->UserStatusStr3);
soap_serialize_PointerToint(soap, &((_s0__GetStatusResponse*)this)->UserStatus4);
soap_embedded(soap, &((_s0__GetStatusResponse*)this)->UserStatus4, SOAP_TYPE_int);
soap_serialize_PointerTostd__string(soap, &((_s0__GetStatusResponse*)this)->UserStatusStr4);
soap_serialize_PointerToint(soap, &((_s0__GetStatusResponse*)this)->UserStatus5);
soap_embedded(soap, &((_s0__GetStatusResponse*)this)->UserStatus5, SOAP_TYPE_int);
soap_serialize_PointerTostd__string(soap, &((_s0__GetStatusResponse*)this)->UserStatusStr5);
/* transient soap skipped */
}
......@@ -3220,15 +3220,15 @@ SOAP_FMAC3 int SOAP_FMAC4 soap_out__s0__GetStatusResponse(struct soap *soap, con
soap_out_PointerTostd__string(soap, "s0:BootTime", -1, &(((_s0__GetStatusResponse*)a)->BootTime), "");
soap_out_PointerTostd__string(soap, "s0:RestartTime", -1, &(((_s0__GetStatusResponse*)a)->RestartTime), "");
soap_out_PointerToint(soap, "s0:Restarts", -1, &(((_s0__GetStatusResponse*)a)->Restarts), "");
soap_out_PointerToint(soap, "s0:UserStatus1", -1, &(((_s0__GetStatusResponse*)a)->UserStatus1), "");
soap_out_int(soap, "s0:UserStatus1", -1, &(((_s0__GetStatusResponse*)a)->UserStatus1), "");
soap_out_PointerTostd__string(soap, "s0:UserStatusStr1", -1, &(((_s0__GetStatusResponse*)a)->UserStatusStr1), "");
soap_out_PointerToint(soap, "s0:UserStatus2", -1, &(((_s0__GetStatusResponse*)a)->UserStatus2), "");
soap_out_int(soap, "s0:UserStatus2", -1, &(((_s0__GetStatusResponse*)a)->UserStatus2), "");
soap_out_PointerTostd__string(soap, "s0:UserStatusStr2", -1, &(((_s0__GetStatusResponse*)a)->UserStatusStr2), "");
soap_out_PointerToint(soap, "s0:UserStatus3", -1, &(((_s0__GetStatusResponse*)a)->UserStatus3), "");
soap_out_int(soap, "s0:UserStatus3", -1, &(((_s0__GetStatusResponse*)a)->UserStatus3), "");
soap_out_PointerTostd__string(soap, "s0:UserStatusStr3", -1, &(((_s0__GetStatusResponse*)a)->UserStatusStr3), "");
soap_out_PointerToint(soap, "s0:UserStatus4", -1, &(((_s0__GetStatusResponse*)a)->UserStatus4), "");
soap_out_int(soap, "s0:UserStatus4", -1, &(((_s0__GetStatusResponse*)a)->UserStatus4), "");
soap_out_PointerTostd__string(soap, "s0:UserStatusStr4", -1, &(((_s0__GetStatusResponse*)a)->UserStatusStr4), "");
soap_out_PointerToint(soap, "s0:UserStatus5", -1, &(((_s0__GetStatusResponse*)a)->UserStatus5), "");
soap_out_int(soap, "s0:UserStatus5", -1, &(((_s0__GetStatusResponse*)a)->UserStatus5), "");
soap_out_PointerTostd__string(soap, "s0:UserStatusStr5", -1, &(((_s0__GetStatusResponse*)a)->UserStatusStr5), "");
/* transient soap skipped */
soap_element_end_out(soap, tag);
......@@ -3327,7 +3327,7 @@ SOAP_FMAC3 _s0__GetStatusResponse * SOAP_FMAC4 soap_in__s0__GetStatusResponse(st
continue;
}
if (soap_flag_UserStatus11 && soap->error == SOAP_TAG_MISMATCH)
if (soap_in_PointerToint(soap, "s0:UserStatus1", &(((_s0__GetStatusResponse*)a)->UserStatus1), "xsd:int"))
if (soap_in_int(soap, "s0:UserStatus1", &(((_s0__GetStatusResponse*)a)->UserStatus1), "xsd:int"))
{ soap_flag_UserStatus11--;
continue;
}
......@@ -3337,7 +3337,7 @@ SOAP_FMAC3 _s0__GetStatusResponse * SOAP_FMAC4 soap_in__s0__GetStatusResponse(st
continue;
}
if (soap_flag_UserStatus21 && soap->error == SOAP_TAG_MISMATCH)
if (soap_in_PointerToint(soap, "s0:UserStatus2", &(((_s0__GetStatusResponse*)a)->UserStatus2), "xsd:int"))
if (soap_in_int(soap, "s0:UserStatus2", &(((_s0__GetStatusResponse*)a)->UserStatus2), "xsd:int"))
{ soap_flag_UserStatus21--;
continue;
}
......@@ -3347,7 +3347,7 @@ SOAP_FMAC3 _s0__GetStatusResponse * SOAP_FMAC4 soap_in__s0__GetStatusResponse(st
continue;
}
if (soap_flag_UserStatus31 && soap->error == SOAP_TAG_MISMATCH)
if (soap_in_PointerToint(soap, "s0:UserStatus3", &(((_s0__GetStatusResponse*)a)->UserStatus3), "xsd:int"))
if (soap_in_int(soap, "s0:UserStatus3", &(((_s0__GetStatusResponse*)a)->UserStatus3), "xsd:int"))
{ soap_flag_UserStatus31--;
continue;
}
......@@ -3357,7 +3357,7 @@ SOAP_FMAC3 _s0__GetStatusResponse * SOAP_FMAC4 soap_in__s0__GetStatusResponse(st
continue;
}
if (soap_flag_UserStatus41 && soap->error == SOAP_TAG_MISMATCH)
if (soap_in_PointerToint(soap, "s0:UserStatus4", &(((_s0__GetStatusResponse*)a)->UserStatus4), "xsd:int"))
if (soap_in_int(soap, "s0:UserStatus4", &(((_s0__GetStatusResponse*)a)->UserStatus4), "xsd:int"))
{ soap_flag_UserStatus41--;
continue;
}
......@@ -3367,7 +3367,7 @@ SOAP_FMAC3 _s0__GetStatusResponse * SOAP_FMAC4 soap_in__s0__GetStatusResponse(st
continue;
}
if (soap_flag_UserStatus51 && soap->error == SOAP_TAG_MISMATCH)
if (soap_in_PointerToint(soap, "s0:UserStatus5", &(((_s0__GetStatusResponse*)a)->UserStatus5), "xsd:int"))
if (soap_in_int(soap, "s0:UserStatus5", &(((_s0__GetStatusResponse*)a)->UserStatus5), "xsd:int"))
{ soap_flag_UserStatus51--;
continue;
}
......@@ -3385,7 +3385,7 @@ SOAP_FMAC3 _s0__GetStatusResponse * SOAP_FMAC4 soap_in__s0__GetStatusResponse(st
if (soap->error)
return NULL;
}
if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_Version1 > 0 || soap_flag_SystemStatus1 > 0 || soap_flag_SystemStatusStr1 > 0))
if ((soap->mode & SOAP_XML_STRICT) && (soap_flag_Version1 > 0 || soap_flag_SystemStatus1 > 0 || soap_flag_SystemStatusStr1 > 0 || soap_flag_UserStatus11 > 0 || soap_flag_UserStatus21 > 0 || soap_flag_UserStatus31 > 0 || soap_flag_UserStatus41 > 0 || soap_flag_UserStatus51 > 0))
{ soap->error = SOAP_OCCURS;
return NULL;
}
......
......@@ -6,7 +6,7 @@
*/
#include "statussrv_H.h"
SOAP_SOURCE_STAMP("@(#) statussrv_Client.cpp ver 2.7.9d 2007-05-30 13:46:12 GMT")
SOAP_SOURCE_STAMP("@(#) statussrv_Client.cpp ver 2.7.9d 2007-06-29 12:20:02 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)
......
......@@ -126,15 +126,15 @@ public:
std::string *BootTime; /* optional element of type xsd:string */
std::string *RestartTime; /* optional element of type xsd:string */
int *Restarts; /* optional element of type xsd:int */
int *UserStatus1; /* optional element of type xsd:int */
int UserStatus1; /* required element of type xsd:int */
std::string *UserStatusStr1; /* optional element of type xsd:string */
int *UserStatus2; /* optional element of type xsd:int */
int UserStatus2; /* required element of type xsd:int */
std::string *UserStatusStr2; /* optional element of type xsd:string */
int *UserStatus3; /* optional element of type xsd:int */
int UserStatus3; /* required element of type xsd:int */
std::string *UserStatusStr3; /* optional element of type xsd:string */
int *UserStatus4; /* optional element of type xsd:int */
int UserStatus4; /* required element of type xsd:int */
std::string *UserStatusStr4; /* optional element of type xsd:string */
int *UserStatus5; /* optional element of type xsd:int */
int UserStatus5; /* required element of type xsd:int */
std::string *UserStatusStr5; /* optional element of type xsd:string */
std::string *ClientRequestHandle; /* optional attribute */
struct soap *soap; /* transient */
......@@ -146,7 +146,7 @@ public:
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__GetStatusResponse() : Description(NULL), SystemTime(NULL), BootTime(NULL), RestartTime(NULL), Restarts(NULL), UserStatus1(NULL), UserStatusStr1(NULL), UserStatus2(NULL), UserStatusStr2(NULL), UserStatus3(NULL), UserStatusStr3(NULL), UserStatus4(NULL), UserStatusStr4(NULL), UserStatus5(NULL), UserStatusStr5(NULL), ClientRequestHandle(NULL), soap(NULL) { }
_s0__GetStatusResponse() : Description(NULL), SystemTime(NULL), BootTime(NULL), RestartTime(NULL), Restarts(NULL), UserStatusStr1(NULL), UserStatusStr2(NULL), UserStatusStr3(NULL), UserStatusStr4(NULL), UserStatusStr5(NULL), ClientRequestHandle(NULL), soap(NULL) { }
virtual ~_s0__GetStatusResponse() { }
};
#endif
......
/* statussrv_msg.h
Generated by wsdl2h 1.2.9d from statussrv.wsdl and typemap.dat
2007-05-30 13:46:06 GMT
2007-06-29 12:19:52 GMT
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:
GPL or Genivia's license for commercial use.
......@@ -149,23 +149,23 @@ class _s0__GetStatusResponse
/// Element Restarts of type xs:int.
int* Restarts 0; ///< Optional element.
/// Element UserStatus1 of type xs:int.
int* UserStatus1 0; ///< Optional element.
int UserStatus1 1; ///< Required element.
/// Element UserStatusStr1 of type xs:string.
std::string* UserStatusStr1 0; ///< Optional element.
/// Element UserStatus2 of type xs:int.
int* UserStatus2 0; ///< Optional element.
int UserStatus2 1; ///< Required element.
/// Element UserStatusStr2 of type xs:string.
std::string* UserStatusStr2 0; ///< Optional element.
/// Element UserStatus3 of type xs:int.
int* UserStatus3 0; ///< Optional element.
int UserStatus3 1; ///< Required element.
/// Element UserStatusStr3 of type xs:string.
std::string* UserStatusStr3 0; ///< Optional element.
/// Element UserStatus4 of type xs:int.
int* UserStatus4 0; ///< Optional element.
int UserStatus4 1; ///< Required element.
/// Element UserStatusStr4 of type xs:string.
std::string* UserStatusStr4 0; ///< Optional element.
/// Element UserStatus5 of type xs:int.
int* UserStatus5 0; ///< Optional element.
int UserStatus5 1; ///< Required element.
/// Element UserStatusStr5 of type xs:string.
std::string* UserStatusStr5 0; ///< Optional element.
/// Attribute ClientRequestHandle of type xs:string.
......
......@@ -58,6 +58,41 @@ pwr_tStatus statussrv_GetStatus( char *nodename, statussrv_sGetStatus *result)
else
result->Restarts = -1;
if ( get_status_response.UserStatus1)
result->UserStatus[0] = get_status_response.UserStatus1;
if ( get_status_response.UserStatusStr1)
strncpy( result->UserStatusStr[0], get_status_response.UserStatusStr1->c_str(), sizeof(result->UserStatusStr[0]));
else
strcpy( result->UserStatusStr[0], "");
if ( get_status_response.UserStatus2)
result->UserStatus[1] = get_status_response.UserStatus2;
if ( get_status_response.UserStatusStr2)
strncpy( result->UserStatusStr[1], get_status_response.UserStatusStr2->c_str(), sizeof(result->UserStatusStr[0]));
else
strcpy( result->UserStatusStr[1], "");
if ( get_status_response.UserStatus3)
result->UserStatus[2] = get_status_response.UserStatus3;
if ( get_status_response.UserStatusStr3)
strncpy( result->UserStatusStr[2], get_status_response.UserStatusStr3->c_str(), sizeof(result->UserStatusStr[0]));
else
strcpy( result->UserStatusStr[2], "");
if ( get_status_response.UserStatus4)
result->UserStatus[3] = get_status_response.UserStatus4;
if ( get_status_response.UserStatusStr4)
strncpy( result->UserStatusStr[3], get_status_response.UserStatusStr4->c_str(), sizeof(result->UserStatusStr[0]));
else
strcpy( result->UserStatusStr[3], "");
if ( get_status_response.UserStatus5)
result->UserStatus[4] = get_status_response.UserStatus5;
if ( get_status_response.UserStatusStr5)
strncpy( result->UserStatusStr[4], get_status_response.UserStatusStr5->c_str(), sizeof(result->UserStatusStr[0]));
else
strcpy( result->UserStatusStr[4], "");
}
else {
sts = PWR__SRVCONNECTION;
......
/**
* Proview $Id: statussrv_utl.h,v 1.4 2007-06-01 11:27:58 claes Exp $
* Proview $Id: statussrv_utl.h,v 1.5 2007-06-29 12:51:05 claes Exp $
* Copyright (C) 2005 SSAB Oxelösund AB.
*
* This program is free software; you can redistribute it and/or
......@@ -39,6 +39,8 @@ typedef struct {
pwr_tTime BootTime;
pwr_tTime RestartTime;
int Restarts;
pwr_tStatus UserStatus[5];
char UserStatusStr[5][120];
} statussrv_sGetStatus;
typedef struct {
......
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