1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef RYAI_AIDS_MESSAGES_H
20 #define RYAI_AIDS_MESSAGES_H
22 #include "nel/misc/types_nl.h"
23 #include "nel/misc/sheet_id.h"
24 #include "nel/misc/entity_id.h"
26 #include "nel/net/transport_class.h"
29 //----------------------------------------------------------------
30 // Message sent by AIS to AIDS in reaction to AIDS's service up
32 class CMsgAIServiceUp
: public NLNET::CTransportClass
35 float ProcessorAllocation
;
37 std::vector
<uint16
> ManagersRunning
;
41 ProcessorAllocation
=1.0f
;
45 CMsgAIServiceUp(float processorAllocation
,float ramAllocation
)
47 ProcessorAllocation
=processorAllocation
;
48 RamAllocation
=ramAllocation
;
51 virtual void description ()
53 className ("CMsgAIServiceUp");
54 property ("ProcessorAllocation", PropFloat
, 1.0f
, ProcessorAllocation
);
55 property ("RamAllocation", PropFloat
, 1.0f
, RamAllocation
);
56 propertyCont ("ManagersRunning", PropUInt16
, ManagersRunning
);
59 virtual void callback (const std::string
&name
, NLNET::TServiceId id
);
63 //----------------------------------------------------------------
64 // Message sent by AIS to AIDS each time new manager comes up
66 class CMsgAIManagerUp
: public NLNET::CTransportClass
76 CMsgAIManagerUp(uint mgrId
,std::string Name
)
81 virtual void description ()
83 className ("CMsgAIManagerUp");
84 property ("MgrId", PropUInt16
, uint16(0), MgrId
);
85 property ("Name", PropString
, std::string(), Name
);
88 virtual void callback (const std::string
&name
, NLNET::TServiceId id
);
92 //----------------------------------------------------------------
93 // Message sent by AIS to AIDS any time there's an important info to display
95 class CMsgAIFeedback
: public NLNET::CTransportClass
104 CMsgAIFeedback(const std::string
&message
)
109 CMsgAIFeedback(const char *msgStr
)
111 Message
=std::string(msgStr
);
114 virtual void description ()
116 className ("CMsgAIFeedback");
117 property ("Msg", PropString
, std::string(), Message
);
120 virtual void callback (const std::string
&name
, NLNET::TServiceId id
);