ewmscp  ..
key words valid when the copy is finished
Collaboration diagram for key words valid when the copy is finished:
static copyRequest::base::registerme kw_reason ("%" "reason",&copyRequest::base::kw_reason)
 
static copyRequest::base::registerme kw_state ("%" "state",&copyRequest::base::kw_state)
 %state the state of the copy request More...
 
static copyRequest::base::registerme kw_finishtime ("%" "finishtime",&copyRequest::base::kw_finishtime)
 %finishtime the time it took from the event timestamp to end of copy More...
 
void copyRequest::base::kw_reason (std::string &value) const
 
void copyRequest::base::kw_state (std::string &value) const
 
void copyRequest::base::kw_finishtime (std::string &value) const
 

Detailed Description

Function Documentation

◆ kw_finishtime()

void copyRequest::base::kw_finishtime ( std::string &  value) const

Definition at line 349 of file copyRequest.cpp.

349  {
350  char buffer[64];
351  sprintf(buffer, "%.6f", std::chrono::duration_cast<std::chrono::duration<double>>(tWorkDone - tInotify).count());
352  value = buffer;
353 }

◆ kw_reason()

void copyRequest::base::kw_reason ( std::string &  value) const

Definition at line 312 of file copyRequest.cpp.

312  {
313  if (errorMessage.empty()) {
314  value = "no error message found";
315  } else {
316  value = errorMessage;
317  }
318 }

◆ kw_state()

void copyRequest::base::kw_state ( std::string &  value) const

Definition at line 321 of file copyRequest.cpp.

321  {
322  value = "";
323  static struct {
324  stateBitType bit;
325  const char *name;
326  } bitNames[] = {{stateBitType::done, "done"},
327  {stateBitType::append, "append"},
328  {stateBitType::linkToBeMade, "link"},
329  {stateBitType::failed, "failed"},
330  {stateBitType::ignore, "ignored"},
331  {stateBitType::trucated, "trucated"},
332  {stateBitType::inWork, "inWork"}
333  };
334 
335  bool needComma = false;
336  for (const auto& bitName : bitNames) {
337  if (state & bitName.bit) {
338  if (needComma) {
339  value += ", ";
340  }
341 
342  value += bitName.name;
343  needComma = true;
344  }
345  }
346 }

References copyRequest::append, copyRequest::done, copyRequest::failed, copyRequest::ignore, copyRequest::inWork, copyRequest::linkToBeMade, and copyRequest::trucated.

Variable Documentation

◆ kw_finishtime

copyRequest::base::registerme kw_finishtime("%" "finishtime",&copyRequest::base::kw_finishtime)
static

%finishtime the time it took from the event timestamp to end of copy

◆ kw_reason

copyRequest::base::registerme kw_reason("%" "reason",&copyRequest::base::kw_reason)
static

%reason the error message if something went wrong

◆ kw_state

copyRequest::base::registerme kw_state("%" "state",&copyRequest::base::kw_state)
static

%state the state of the copy request

copyRequest::stateBitType
stateBitType
Definition: copyRequestTypes.h:50
copyRequest::base::errorMessage
std::string errorMessage
Definition: copyRequest.h:283
copyRequest::stateBitType::inWork
@ inWork
copyRequest::stateBitType::ignore
@ ignore
copyRequest::stateBitType::done
@ done
copyRequest::stateBitType::failed
@ failed
copyRequest::base::tInotify
clock_type::time_point tInotify
Definition: copyRequest.h:303
copyRequest::stateBitType::trucated
@ trucated
copyRequest::base::state
stateType state
Definition: copyRequest.h:282
copyRequest::stateBitType::linkToBeMade
@ linkToBeMade
copyRequest::base::tWorkDone
clock_type::time_point tWorkDone
Definition: copyRequest.h:306
copyRequest::stateBitType::append
@ append