string dbCommand::MakeDBRequest()
{
	Packet pkt;
	pkt.DecideMessageType(AP_LIST_REQUEST);
	string msg = pkt.CreateMessage();
	return msg;

}
Exemple #2
0
/***********************************************
 *void Report::SendAPUpdateRequest()
 *	Make AP Update Request
 *	Send Message to Manager
 *	Receive ACK from Manager
 ********************************************/
void Report::SendAPStateUpdateRequest(){
	//Make Message
	Packet pkt;
	pkt.DecideMessageType(AP_STATE_UPDATE_REQUEST);

	for(int type=AP_ID; type<=AP_CHANNEL; type++){
		pkt.AddValue(type, m_APInfo.GetAPInformation(type));
	}
	/*
	for(int type=AP_ID; type<=AP_DESCRIPTION; type++){
		pkt.AddValue(type, m_APInfo.GetAPInformation(type));
	}*/
	string msg = pkt.CreateMessage();

	//Send Message to OpenWinNet Manager
	cout << PrintTime() << "[S] AP_STATE_UPDATE REQUEST" << endl;
	m_sock.send(msg);
	msg.clear();
}
Exemple #3
0
//Send response to AP
void Action::SendResponseMessage(int messageType, Packet pkt){
	pkt.DecideMessageType(messageType);
	m_sock->send(pkt.CreateMessage());
}