Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_BehaviourConflictResolution.h File Reference
Include dependency graph for cs_BehaviourConflictResolution.h:

Go to the source code of this file.

Functions

bool PresenceIsMoreRelevant (PresencePredicate lhs, PresencePredicate rhs)
 Returns true if lhs is strictly more relevant than rhs. More...
 
bool FromUntilIntervalIsMoreRelevantOrEqual (int32_t lhs_from, int32_t lhs_until, int32_t rhs_from, int32_t rhs_until, int32_t current_tod)
 Returns true if;. More...
 
bool FromUntilIntervalIsMoreRelevantOrEqual (Behaviour *lhs, Behaviour *rhs, Time currentTime)
 Wrapper for raw int32_t values. More...
 
bool FromUntilIntervalIsEqual (Behaviour *lhs, Behaviour *rhs)
 Returns false if either of lhs and rhs is nullptr, else returns true iff both from() and until() values match. More...
 

Function Documentation

◆ FromUntilIntervalIsEqual()

bool FromUntilIntervalIsEqual ( Behaviour lhs,
Behaviour rhs 
)

Returns false if either of lhs and rhs is nullptr, else returns true iff both from() and until() values match.

◆ FromUntilIntervalIsMoreRelevantOrEqual() [1/2]

bool FromUntilIntervalIsMoreRelevantOrEqual ( Behaviour lhs,
Behaviour rhs,
Time  currentTime 
)

Wrapper for raw int32_t values.

◆ FromUntilIntervalIsMoreRelevantOrEqual() [2/2]

bool FromUntilIntervalIsMoreRelevantOrEqual ( int32_t  lhs_from,
int32_t  lhs_until,
int32_t  rhs_from,
int32_t  rhs_until,
int32_t  current_tod 
)

Returns true if;.

  • lhs_from is closer in the past than rhs_from; or
  • lhs_until is closer in the future than rhs_until and the lhs_from == rhs_from; or
  • lhs_from == rhs_from and lhs_until == rhs_until.

◆ PresenceIsMoreRelevant()

bool PresenceIsMoreRelevant ( PresencePredicate  lhs,
PresencePredicate  rhs 
)

Returns true if lhs is strictly more relevant than rhs.

  • VacuouslyTrue is least relevant.
  • 'in Sphere' is less relevant than 'In room'.
  • 'presence' is less relevant than 'absence'..