Lines Matching refs:DistributedAgent
32 DistributedAgent::DistributedAgent()
42 DistributedAgent::~DistributedAgent()
58 bool DistributedAgent::SetUp()
67 bool DistributedAgent::TearDown()
72 int DistributedAgent::InitAgentServer()
74 HiLog::Info(DistributedAgent::LABEL, "begin create agent server.\n");
103 HiLog::Error(DistributedAgent::LABEL, "agent bind error.\n");
110 HiLog::Error(DistributedAgent::LABEL, "agent listen error.\n");
124 int DistributedAgent::DoCmdServer(int serverSockFd)
135 receiveLen = DistributedAgent::RECE_LEN;
138 HiLog::Info(DistributedAgent::LABEL, "wait client .......\n");
146 HiLog::Error(DistributedAgent::LABEL, "test case runner can not work because I can not accept it.");
151 HiLog::Info(DistributedAgent::LABEL, "accept testcase runner IP:%s port:%d \n",
163 HiLog::Info(DistributedAgent::LABEL, "agent connect socket closed, IP:%s .\n",
172 HiLog::Info(DistributedAgent::LABEL, "test agent get message type:%d .\n", pcline->cmdTestType);
175 HiLog::Info(DistributedAgent::LABEL, "agent get message cmd=%s .\n", pcline->alignmentCmd);
213 HiLog::Info(DistributedAgent::LABEL, "agent get message :%s .\n",
261 void DistributedAgent::OnNotifyImf(DistributedMsg *pcline)
263 char alignmentCmd[DistributedAgent::CMD_LENGTH];
264 char szMsg[MAX_BUFF_LEN / DistributedAgent::HALF_NUM - DistributedAgent::CMD_LENGTH];
267 ret = memset_s(alignmentCmd, sizeof(alignmentCmd), 0, DistributedAgent::CMD_LENGTH);
272 MAX_BUFF_LEN / DistributedAgent::HALF_NUM - DistributedAgent::CMD_LENGTH, 0,
273 MAX_BUFF_LEN / DistributedAgent::HALF_NUM - DistributedAgent::CMD_LENGTH);
274 for (cmdNo = 0; cmdNo < DistributedAgent::CMD_LENGTH; cmdNo++) {
279 if (cmdNo >= DistributedAgent::CMD_LENGTH) {
280 HiLog::Error(DistributedAgent::LABEL, "error command.\n");
287 ret = memcpy_s(szMsg, MAX_BUFF_LEN / DistributedAgent::HALF_NUM - DistributedAgent::CMD_LENGTH,
306 int DistributedAgent::OnProcessMsg(const std::string &strMsg, int msgLen,
327 int DistributedAgent::OnProcessCmd(const std::string &strCommand, int cmdLen,
331 char alignmentCmd[DistributedAgent::CMD_LENGTH];
332 char szArgs[MAX_BUFF_LEN / DistributedAgent::HALF_NUM - DistributedAgent::CMD_LENGTH];
335 ret = memset_s(alignmentCmd, sizeof(alignmentCmd), 0, DistributedAgent::CMD_LENGTH);
340 MAX_BUFF_LEN / DistributedAgent::HALF_NUM - DistributedAgent::CMD_LENGTH, 0,
341 MAX_BUFF_LEN / DistributedAgent::HALF_NUM - DistributedAgent::CMD_LENGTH);
342 for (cmdNo = 0; cmdNo < DistributedAgent::CMD_LENGTH; cmdNo++) {
347 if (cmdNo >= DistributedAgent::CMD_LENGTH) {
348 HiLog::Error(DistributedAgent::LABEL, "error command.\n");
358 MAX_BUFF_LEN / DistributedAgent::HALF_NUM - DistributedAgent::CMD_LENGTH,
369 int DistributedAgent::OnProcessCmd(const std::string &strCommand, int cmdLen, const std::string &strArgs,
373 HiLog::Info(DistributedAgent::LABEL, "this is a agent.\n");
382 int DistributedAgent::Start(std::string cfgFile)
387 HiLog::Error(DistributedAgent::LABEL, "agent can not get port.\n");
396 void DistributedAgent::Join()
403 int DistributedAgent::OnNotify(const std::string ¬ifyType, const std::string &msg, int msgLen)
406 HiLog::Error(DistributedAgent::LABEL, "onNotify: %s.\n", msg.c_str());
409 HiLog::Error(DistributedAgent::LABEL, "msgLen < 0.");
414 int DistributedAgent::Stop()