Protective Stop
Loading...
Searching...
No Matches
pstop_aux_channel.h File Reference

Role schema carried in pstop_c v2 padding1. More...

#include <stdbool.h>
#include <stdint.h>
#include "pstop/machine.h"
#include "pstop/pstop_msg.h"
#include "pstop/pstop_remote_data.h"
Include dependency graph for pstop_aux_channel.h:

Go to the source code of this file.

Macros

#define PSTOP_AUX_UP_VERSION   0x01u
 Schema version stored in padding1 bits 0..7.
#define PSTOP_AUX_UP_ROLE_SHIFT   8u
 Bit position of the role in padding1.
#define PSTOP_AUX_BYTE_MASK   0xFFu
 Mask for one byte of padding1.

Enumerations

enum  pstop_aux_role_t { PSTOP_AUX_ROLE_UNSPECIFIED = 0 , PSTOP_AUX_ROLE_STOP_ONLY = 1 , PSTOP_AUX_ROLE_OPERATOR = 2 }
 Remote role, declared by the remote on every frame; wire-stable values. More...

Detailed Description

Role schema carried in pstop_c v2 padding1.

Every wrapper includes this header to share the wire values. padding2 is unused and zero-initialized by pstop_message_init().

Enumeration Type Documentation

◆ pstop_aux_role_t

Remote role, declared by the remote on every frame; wire-stable values.

Enumerator
PSTOP_AUX_ROLE_UNSPECIFIED 

No role claim (unprovisioned or version mismatch); treated as non-operator.

PSTOP_AUX_ROLE_STOP_ONLY 

May only STOP, never re-arm.

PSTOP_AUX_ROLE_OPERATOR 

May re-arm with a STOP -> OK gesture.