Skip to content

Commit

Permalink
Add node brownout and ident event constants (#454)
Browse files Browse the repository at this point in the history
Adds constants for standard events:
- Power brownout below required by standard;
- Power brownout below required by node;
- Node ident button pressed.
  • Loading branch information
atanisoft authored Oct 20, 2020
1 parent 7896fc0 commit 9e47246
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/openlcb/Defs.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,21 @@ struct Defs
/// station may react to this by restoring locomotive speed settings.
static constexpr uint64_t CLEAR_EMERGENCY_STOP_EVENT = 0x010000000000FFFCULL;

/// "Power supply brownout detected below minimum required by standard"
/// This event can be generated when a node detects that the CAN bus power
/// has dropped below the minimum declared in the standard.
static constexpr uint64_t POWER_STANDARD_BROWNOUT_EVENT = 0x010000000000FFF0ULL;

/// "Power supply brownout detected below minimum required by node"
/// This event can be generated when a node detects that it has
/// insufficient power for normal operations.
static constexpr uint64_t NODE_POWER_BROWNOUT_EVENT = 0x010000000000FFF1ULL;

/// "Ident button combination pressed"
/// This event can be generated by a node when it is instructed to generate
/// an identification event.
static constexpr uint64_t NODE_IDENT_BUTTON_EVENT = 0x010000000000FE00ULL;

/** Status of the pysical layer link */
enum LinkStatus
{
Expand Down

0 comments on commit 9e47246

Please sign in to comment.