REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
Loading...
Searching...
No Matches

Facilities to lock a LUCIDAC device by a single user. More...

#include <auth.h>

Collaboration diagram for net::auth::DeviceLock:

Public Member Functions

void check ()
 
bool is_locked ()
 
void force_unlock ()
 
void enable_lock (const User &user)
 

Public Attributes

User holder
 
utils::duration locked_at
 

Static Public Attributes

static constexpr utils::time_ms max_lock_duration = 3 * 60 * 1000
 

Detailed Description

Facilities to lock a LUCIDAC device by a single user.

Definition at line 106 of file auth.h.

Member Function Documentation

◆ check()

void net::auth::DeviceLock::check ( )
inline

Definition at line 111 of file auth.h.

References utils::duration::expired(), holder, locked_at, and max_lock_duration.

Referenced by is_locked().

◆ enable_lock()

void net::auth::DeviceLock::enable_lock ( const User & user)
inline

Definition at line 123 of file auth.h.

References holder, locked_at, and utils::duration::reset().

◆ force_unlock()

void net::auth::DeviceLock::force_unlock ( )
inline

Definition at line 121 of file auth.h.

References holder.

◆ is_locked()

bool net::auth::DeviceLock::is_locked ( )
inline

Definition at line 116 of file auth.h.

References check(), and holder.

Member Data Documentation

◆ holder

User net::auth::DeviceLock::holder

Definition at line 107 of file auth.h.

Referenced by check(), enable_lock(), force_unlock(), and is_locked().

◆ locked_at

utils::duration net::auth::DeviceLock::locked_at

Definition at line 108 of file auth.h.

Referenced by check(), and enable_lock().

◆ max_lock_duration

utils::time_ms net::auth::DeviceLock::max_lock_duration = 3 * 60 * 1000
staticconstexpr

Definition at line 109 of file auth.h.

Referenced by check().


The documentation for this struct was generated from the following file:
  • lib/communication/src/net/auth.h