w11 - cpp 0.794
Backend server for Rlink and w11
Loading...
Searching...
No Matches
RlinkContext.ipp
Go to the documentation of this file.
1// $Id: RlinkContext.ipp 1186 2019-07-12 17:49:59Z mueller $
2// SPDX-License-Identifier: GPL-3.0-or-later
3// Copyright 2013-2019 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4//
5// Revision History:
6// Date Rev Version Comment
7// 2019-03-16 1122 1.2 BUGFIX: use proper polarity of status mask
8// 2015-03-28 660 1.1 add SetStatus(Value|Mask)()
9// 2013-02-23 492 1.0 Initial version
10// ---------------------------------------------------------------------------
11
16// all method definitions in namespace Retro
17namespace Retro {
18
19//------------------------------------------+-----------------------------------
21
22inline void RlinkContext::SetStatus(uint8_t stat, uint8_t statmsk)
23{
24 fStatusVal = stat;
25 fStatusMsk = statmsk;
26 return;
27}
28
29//------------------------------------------+-----------------------------------
31
32inline void RlinkContext::SetStatusValue(uint8_t stat)
33{
34 fStatusVal = stat;
35 return;
36}
37
38//------------------------------------------+-----------------------------------
40
41inline void RlinkContext::SetStatusMask(uint8_t statmsk)
42{
43 fStatusMsk = statmsk;
44 return;
45}
46
47//------------------------------------------+-----------------------------------
49
50inline uint8_t RlinkContext::StatusValue() const
51{
52 return fStatusVal;
53}
54
55//------------------------------------------+-----------------------------------
57
58inline uint8_t RlinkContext::StatusMask() const
59{
60 return fStatusMsk;
61}
62
63//------------------------------------------+-----------------------------------
65
67{
68 return fStatusMsk != 0x00;
69}
70
71//------------------------------------------+-----------------------------------
73
74inline bool RlinkContext::StatusCheck(uint8_t val) const
75{
76 return (val & fStatusMsk) == fStatusVal;
77}
78
79//------------------------------------------+-----------------------------------
81
82inline void RlinkContext::IncErrorCount(size_t inc)
83{
84 fErrCnt += inc;
85 return;
86}
87
88//------------------------------------------+-----------------------------------
90
92{
93 fErrCnt = 0;
94 return;
95}
96
97//------------------------------------------+-----------------------------------
99
100inline size_t RlinkContext::ErrorCount() const
101{
102 return fErrCnt;
103}
104
105} // end namespace Retro
size_t ErrorCount() const
FIXME_docs.
void SetStatusMask(uint8_t statmsk)
FIXME_docs.
void IncErrorCount(size_t inc=1)
FIXME_docs.
uint8_t StatusValue() const
FIXME_docs.
bool StatusCheck(uint8_t val) const
FIXME_docs.
bool StatusIsChecked() const
FIXME_docs.
void ClearErrorCount()
FIXME_docs.
uint8_t fStatusVal
status value
size_t fErrCnt
error count
void SetStatus(uint8_t stat, uint8_t statmsk=0x00)
FIXME_docs.
uint8_t StatusMask() const
FIXME_docs.
uint8_t fStatusMsk
status mask
void SetStatusValue(uint8_t stat)
FIXME_docs.
Declaration of class ReventLoop.
Definition: ReventLoop.cpp:47