Improved doc for PanicBroadcaster

This commit is contained in:
Pavel Kirienko 2015-03-16 23:43:42 +03:00
parent f2cfed70cb
commit 2d7e20b885
2 changed files with 6 additions and 4 deletions

View File

@ -32,10 +32,12 @@ public:
}
/**
* Begin broadcasting at the standard interval.
* Begin broadcasting at the standard interval (see BROADCASTING_INTERVAL_MS).
* This method does not block and can't fail.
* @param short_reason Short ASCII string that describes the reason of the panic, 7 characters max.
* If the string exceeds 7 characters, it will be truncated.
*/
void panic(const char* short_reason);
void panic(const char* short_reason_description);
/**
* Stop broadcasting immediately.

View File

@ -22,10 +22,10 @@ void PanicBroadcaster::handleTimerEvent(const TimerEvent&)
publishOnce();
}
void PanicBroadcaster::panic(const char* short_reason)
void PanicBroadcaster::panic(const char* short_reason_description)
{
msg_.reason_text.clear();
const char* p = short_reason;
const char* p = short_reason_description;
while (p && *p)
{
if (msg_.reason_text.size() == msg_.reason_text.capacity())