Ejemplo n.º 1
0
void CSIF::SaveState_Header(const std::string& prefix, CStructFile& file, const SIFCMDHEADER& packetHeader)
{
	file.SetRegister32((prefix + STATE_PACKET_HEADER_PACKETSIZE).c_str(), packetHeader.packetSize);
	file.SetRegister32((prefix + STATE_PACKET_HEADER_DESTSIZE).c_str(),   packetHeader.destSize);
	file.SetRegister32((prefix + STATE_PACKET_HEADER_DEST).c_str(),       packetHeader.dest);
	file.SetRegister32((prefix + STATE_PACKET_HEADER_CID).c_str(),        packetHeader.commandId);
	file.SetRegister32((prefix + STATE_PACKET_HEADER_OPTIONAL).c_str(),   packetHeader.optional);
}
Ejemplo n.º 2
0
void CSIF::SaveState_RpcCall(CStructFile& file, const SIFRPCCALL& call)
{
	SaveState_Header("call", file, call.header);
	file.SetRegister32(STATE_PACKET_CALL_RECORDID,			call.recordId);
	file.SetRegister32(STATE_PACKET_CALL_PACKETADDR,		call.packetAddr);
	file.SetRegister32(STATE_PACKET_CALL_RPCID,				call.rpcId);
	file.SetRegister32(STATE_PACKET_CALL_CLIENTDATAADDR,	call.clientDataAddr);
	file.SetRegister32(STATE_PACKET_CALL_RPCNUMBER,			call.rpcNumber);
	file.SetRegister32(STATE_PACKET_CALL_SENDSIZE,			call.sendSize);
	file.SetRegister32(STATE_PACKET_CALL_RECV,				call.recv);
	file.SetRegister32(STATE_PACKET_CALL_RECVSIZE,			call.recvSize);
	file.SetRegister32(STATE_PACKET_CALL_RECVMODE,			call.recvMode);
	file.SetRegister32(STATE_PACKET_CALL_SERVERDATAADDR,	call.serverDataAddr);
}
Ejemplo n.º 3
0
void CSIF::SaveState_RequestEnd(CStructFile& file, const SIFRPCREQUESTEND& requestEnd)
{
	SaveState_Header("requestEnd", file, requestEnd.header);
	file.SetRegister32(STATE_PACKET_REQUEST_END_RECORDID,		requestEnd.recordId);
	file.SetRegister32(STATE_PACKET_REQUEST_END_PACKETADDR,		requestEnd.packetAddr);
	file.SetRegister32(STATE_PACKET_REQUEST_END_RPCID,			requestEnd.rpcId);
	file.SetRegister32(STATE_PACKET_REQUEST_END_CLIENTDATAADDR,	requestEnd.clientDataAddr);
	file.SetRegister32(STATE_PACKET_REQUEST_END_CID,			requestEnd.commandId);
	file.SetRegister32(STATE_PACKET_REQUEST_END_SERVERDATAADDR,	requestEnd.serverDataAddr);
	file.SetRegister32(STATE_PACKET_REQUEST_END_BUFFER,			requestEnd.buffer);
	file.SetRegister32(STATE_PACKET_REQUEST_END_CLIENTBUFFER,	requestEnd.cbuffer);
}
Ejemplo n.º 4
0
void CSifCmd::SaveState(Framework::CZipArchiveWriter& archive)
{
	auto modulesFile = new CStructCollectionStateFile(STATE_MODULES);
	{
		int moduleIndex = 0;
		for(const auto& module : m_servers)
		{
			auto moduleName = std::string(STATE_MODULE) + std::to_string(moduleIndex++);
			CStructFile moduleStruct;
			{
				uint32 serverDataAddress = module->GetServerDataAddress();
				moduleStruct.SetRegister32(STATE_MODULE_SERVER_DATA_ADDRESS, serverDataAddress);
			}
			modulesFile->InsertStruct(moduleName.c_str(), moduleStruct);
		}
	}
	archive.InsertFile(modulesFile);
}