rtc: add documentation comments

Issue #3450
This commit is contained in:
Josef Söntgen 2019-07-15 13:24:04 +02:00 committed by Christian Helmuth
parent 85b1563e57
commit 86cacd23bb
2 changed files with 26 additions and 1 deletions

View File

@ -23,9 +23,18 @@ namespace Rtc { struct Session_client; }
struct Rtc::Session_client : Genode::Rpc_client<Session> struct Rtc::Session_client : Genode::Rpc_client<Session>
{ {
/**
* Constructor
*
* \param session session capability
*/
Session_client(Genode::Capability<Session> cap) Session_client(Genode::Capability<Session> cap)
: Genode::Rpc_client<Session>(cap) {} : Genode::Rpc_client<Session>(cap) {}
/***********************
** Session interface **
***********************/
Timestamp current_time() override { return call<Rpc_current_time>(); } Timestamp current_time() override { return call<Rpc_current_time>(); }
}; };

View File

@ -7,7 +7,7 @@
/* /*
* Copyright (C) 2012 Intel Corporation * Copyright (C) 2012 Intel Corporation
* Copyright (C) 2013-2017 Genode Labs GmbH * Copyright (C) 2013-2019 Genode Labs GmbH
* *
* This file is part of the Genode OS framework, which is distributed * This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3. * under the terms of the GNU Affero General Public License version 3.
@ -26,6 +26,9 @@ namespace Rtc {
} }
/*
* RTC value
*/
struct Rtc::Timestamp struct Rtc::Timestamp
{ {
unsigned microsecond; unsigned microsecond;
@ -53,8 +56,21 @@ struct Rtc::Session : Genode::Session
enum { CAP_QUOTA = 2 }; enum { CAP_QUOTA = 2 };
/***********************
** Session interface **
***********************/
/**
* Query current time
*
* \return RTC value as structed timestamp
*/
virtual Timestamp current_time() = 0; virtual Timestamp current_time() = 0;
/*******************
** RPC interface **
*******************/
GENODE_RPC(Rpc_current_time, Timestamp, current_time); GENODE_RPC(Rpc_current_time, Timestamp, current_time);
GENODE_RPC_INTERFACE(Rpc_current_time); GENODE_RPC_INTERFACE(Rpc_current_time);
}; };